GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-128388: pyrepl on Windows: add meta and ctrl+arrow keybindings by paulie4 · Pull Request #128389 · python/cpython

Conversation

@paulie4

@paulie4 paulie4 commented Jan 1, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Fix Lib/_pyrepl/windows_console.py to support more keybindings, like the Ctrl+← and Ctrl+→ word-skipping keybindings and those with meta (i.e. Alt), e.g. to kill-word or backward-kill-word.

Specifics: if Ctrl is pressed, emit "ctrl left" and "ctrl right" instead of just "left" or "right," and if Meta/Alt is pressed, emit the special key code for meta before emitting the other key that was pressed.

NOTE: this is my first PR for https://github.com/python/cpython, so please tell me if I need to do something else, e.g. does this need an entry added somewhere under Misc/NEWS.d?

  • Issue: pyrepl on Windows: add Ctrl+← and Ctrl+→ word-skipping and other keybindings #128388

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

mido-99 reacted with rocket emoji
All reactions
  • 🚀 1 reaction
@paulie4
paulie4 requested review from ambv, lysnikolaou and pablogsal as code owners January 1, 2025 05:54
@ghost

ghost commented Jan 1, 2025 •
edited by ghost
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.
CLA signed

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot mentioned this pull request Jan 1, 2025
pyrepl on Windows: add Ctrl+← and Ctrl+→ word-skipping and other keybindings #128388
Closed
@bedevere-app

bedevere-app Bot commented Jan 1, 2025

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot added the awaiting review label Jan 1, 2025
@paulie4
pyrepl on Windows: add meta and ctrl+arrow keybindings
283e7c3
@paulie4
paulie4 force-pushed the fix-issue-128388 branch from 6606f63 to 283e7c3 Compare January 1, 2025 05:57
@bedevere-app

bedevere-app Bot commented Jan 1, 2025

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk hugovk added OS-windows topic-repl Related to the interactive shell labels Jan 1, 2025
@hugovk

hugovk commented Jan 1, 2025

Copy link
Copy Markdown
Member

NOTE: this is my first PR for https://github.com/python/cpython, so please tell me if I need to do something else, e.g. does this need an entry added somewhere under Misc/NEWS.d?

Yes please, and also sign the CLA.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@paulie4

paulie4 commented Jan 1, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

@hugovk, Misc/NEWS.d is a directory, so I don't know which file(s) in there to edit, especially since it looks like the versions in there have all been released. Do I need to create a new file (or files if it's going to both 3.13.2 and to a 3.14.0a)?

UPDATE: it looks like these are the instructions for which file I should create: https://devguide.python.org/core-developers/committing/#how-to-add-a-news-entry. I think _pyrepr is part of the standard library, right?

I tried signing the CLA, but the SIGN IN WITH GITHUB TO AGREE button doesn't work with the @users.noreply.github.com email address I use for my commits. I submitted a manual CLA, so hopefully that will work. FYI, this is the error I get when I try to use https://cpython-clabot.herokuapp.com/contributor-license-agreement?state=...:

Thank you for authorizing our application, but the CLA must be signed by the users who contributed to the PR. Authors emails are: [email protected].
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk

hugovk commented Jan 1, 2025

Copy link
Copy Markdown
Member

UPDATE: it looks like these are the instructions for which file I should create: https://devguide.python.org/core-developers/committing/#how-to-add-a-news-entry. I think _pyrepr is part of the standard library, right?

Yes, that's right, the Lib dir is the stdlib.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

blurb-it Bot and others added 2 commits January 1, 2025 19:24
@blurb-it
📜🤖 Added by blurb_it.
d3df8a2
@paulie4
2025-01-01-19-24-43.gh-issue-128388.8UdMz_.rst: fix typo
459b379
hugovk
hugovk reviewed Jan 2, 2025
View reviewed changes
Comment thread Misc/NEWS.d/next/Library/2025-01-01-19-24-43.gh-issue-128388.8UdMz_.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@paulie4 @hugovk
lint fix `Misc/NEWS.d/next/Library/2025-01-01-19-24-43.gh-issue-12838…
abe1f62
…8.8UdMz_.rst`

Co-authored-by: Hugo van Kemenade <[email protected]>
@paulie4

paulie4 commented Jan 2, 2025

Copy link
Copy Markdown
Contributor Author

@hugovk, thank you for that suggested doc change, which I approved. Is there anything else I need to do, or do we now just need to wait for someone else (e.g. @pablogsal, @lysnikolaou, or @ambv) to review the code changes?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk

hugovk commented Jan 3, 2025

Copy link
Copy Markdown
Member

Thanks for the updates. Yes, someone with Windows will need to review, hopefully it shouldn't be too long :)

paulie4 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

eendebakpt
eendebakpt reviewed Jan 3, 2025
View reviewed changes

@eendebakpt eendebakpt left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some comments for improvement of the code, but the PR is good: I tested with Windows 11 and the meta keybindings work now

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Lib/_pyrepl/windows_console.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/_pyrepl/windows_console.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/_pyrepl/windows_console.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/_pyrepl/windows_console.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/_pyrepl/windows_console.py Outdated
return Event(
evt="key", data=code, raw=rec.Event.KeyEvent.uChar.UnicodeChar
)
if code in ("left", "right") and (ctrlstate := key_event.dwControlKeyState) and ctrlstate & CTRL_OR_ALT_ACTIVE:

@eendebakpt eendebakpt Jan 3, 2025

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes Alt+← and Ctrl-Alt+← work just as Ctrl+←. Is that how it should be?

On Unix for me Alt+← gives me capital C (not sure why, does not really make sense to me) and Ctrl-Alt+← triggers my window manager.

In the keymap I also don't see Alt-left with a special meaning:

cpython/Lib/_pyrepl/reader.py

Lines 146 to 161 in f157485

(r"\<up>", "up"),
(r"\<down>", "down"),
(r"\<left>", "left"),
(r"\C-\<left>", "backward-word"),
(r"\<right>", "right"),
(r"\C-\<right>", "forward-word"),
(r"\<delete>", "delete"),
(r"\x1b[3~", "delete"),
(r"\<backspace>", "backspace"),
(r"\M-\<backspace>", "backward-kill-word"),
(r"\<end>", "end-of-line"), # was 'end'
(r"\<home>", "beginning-of-line"), # was 'home'
(r"\<f1>", "help"),
(r"\<f2>", "show-history"),
(r"\<f3>", "paste-mode"),
(r"\EOF", "end"), # the entries in the terminfo database for xterms

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@paulie4 paulie4 Jan 4, 2025

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly, I didn't see anything existing that was useful for Alt+←, so I figured might as well make it useful. I can remove it if you prefer only Ctrl+← being useful. Also, it would definitely violate separation of concerns if this Lib/_pyrepl/windows_console.py file were to try to read the keymappings in Lib/_pyrepl/reader.py to check if r"\M-\<left>" existed, and I don't expect that to be added anytime soon.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@eendebakpt eendebakpt Jan 4, 2025

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer all implementations (unix, windows, etc.) to have the same implementation. Please revert the changes to ALT. There might be good use for the ALT modifier, but that would be for another PR.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@paulie4 paulie4 Jan 4, 2025

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That brings up a good question, why don't we add (r"\M-\<left>", "backward-word") and (r"\M-\<right>", "forward-word") to the default_keymap, so that way all implementations will have something useful for Alt+←?

Also, I just tested that, and it made me realize that the Lib\_pyrepl\windows_console.py code also needs to # queue the key, return the meta command in the special key == "\x00" section (see 46b22d1 for the fix and removal of treating Alt+← as Ctrl+←).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@paulie4 paulie4 Jan 8, 2025

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess adding (r"\M-\<left>", "backward-word") and (r"\M-\<right>", "forward-word") to the default_keymap can be part of a separate GH Issue+PR...

Are you ok with the changes I made so we can resolve this conversation?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Misc/NEWS.d/next/Library/2025-01-01-19-24-43.gh-issue-128388.8UdMz_.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Misc/NEWS.d/next/Library/2025-01-01-19-24-43.gh-issue-128388.8UdMz_.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

paulie4 and others added 4 commits January 3, 2025 20:39
@paulie4 @eendebakpt
Lib/_pyrepl/windows_console.py: temp var ctrlstate is not needed
3d07c34
Co-authored-by: Pieter Eendebak <[email protected]>
@paulie4 @eendebakpt
Lib/_pyrepl/windows_console.py: clearer comment
16f2a13
Co-authored-by: Pieter Eendebak <[email protected]>
@paulie4
PR suggestions
e3f6438
@paulie4
Lib\_pyrepl\windows_console.py: fix Alt+← handling
46b22d1
eendebakpt
eendebakpt reviewed Jan 4, 2025
View reviewed changes
Comment thread Lib/_pyrepl/windows_console.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/_pyrepl/windows_console.py
Comment on lines +431 to +432
self.event_queue.insert(0, Event(evt="key", data=key, raw=key))
return Event(evt="key", data="\033") # keymap.py uses this for meta

@eendebakpt eendebakpt Jan 4, 2025

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know the answer. But why pass the ctrl modifier as a key f'ctrl {key}`, and the alt modifier using a special event?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@paulie4 paulie4 Jan 5, 2025

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it took me a while to figure out what was going on in Lib\_pyrepl\keymap.py, cause the code is not very readable, but that's what it expects. If we wanted Ctrl and Alt to be treated in a similar way, we'd probably have to make some major edits to Lib\_pyrepl\keymap.py and Lib\_pyrepl\unix_eventqueue.py.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@paulie4 @eendebakpt
Lib/_pyrepl/windows_console.py: standardize Ctrl+special key
55e4fbf
Co-authored-by: Pieter Eendebak <[email protected]>
vstinner
vstinner reviewed Jan 7, 2025
View reviewed changes
Comment thread Lib/_pyrepl/windows_console.py
CLEAR = "\x1b[H\x1b[J"

# State of control keys: https://learn.microsoft.com/en-us/windows/console/key-event-record-str
ALT_ACTIVE = 0x01 | 0x02

@vstinner vstinner Jan 7, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about including the right ALT in ALT_ACTIVE. On Linux, ALT+Backspace removes a whole word, whereas AltGr+Backspace removes a single character.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@paulie4 paulie4 Jan 8, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lib/_pyrepl/keymap.py doesn't distinguish between right and left (it just has C- and M-), so I'm not sure that was a conscious decision that was made for the Linux code. Maybe that's actually a bug in the _pyrepl/unix_* code?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@vstinner vstinner Jan 8, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lib/_pyrepl/keymap.py doesn't distinguish between right and left

Python 3.14 on Linux behaves differently for left Alt and right AltGr:

  • Left Alt + backspace: remove a word
  • Right AltGr + backspace: remove a single character

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@encukou encukou Jan 8, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On my Linux, the English keyboard layout has Right Alt which generally works like Left Alt (in a terminal).
The French or Czech layout has AltGr instead, which is apparently not Meta enough, so AltGr+Backspace works like Backspace (in both pyrepl and bash).

I tried on some Windows consoles:

LAlt+Backspace RAlt+Backspace AltGr+Backspace
cmd Delete single character Nothing Nothing
powershell Nothing Nothing Nothing

Doesn't look useful, so it's probably best to have Linux-like behaviour here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@paulie4 paulie4 Jan 8, 2025

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand what you are saying. Are you saying because the existing functionality isn't useful, we should continue to make the right Alt key not be useful in _pyrepl?

Either way, if this is about AltGr, I think we have to really understand how it works in Windows... I don't have an AltGr key, so I can't test it, but https://en.wikipedia.org/wiki/AltGr_key says, "Windows interprets Ctrl+Alt as AltGr," and since the _KEY_EVENT_RECORD doc doesn't show a dwControlKeyState value for AltGr, doesn't that mean that RIGHT_ALT_PRESSED is not the same thing as AltGr and that the Lib/_pyrepl/windows_console.py code would actually have to look for a combination of Ctrl (left/right) and Alt (left/right) (or maybe just lefts?) being pressed to know if AltGr is being pressed, or am I misunderstanding how the _KEY_EVENT_RECORD works?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@vstinner vstinner Jan 8, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know that other keyboards have a right ALT key different than AltGr. In this case, I'm fine with ALT_ACTIVE = 0x01 | 0x02.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@encukou encukou Jan 9, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand what you are saying.

Sorry for being unclear!
I meant that the behaviour of Windows terminals I tried (cmd & powershell) is not useful, so Python should not emulate that.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@encukou encukou Jan 9, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have an AltGr key, so I can't test it

It's a feature of the keyboard layout, not the physical keyboard. To test it you can add, for example, French "AZERTY" in system settings.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
vstinner
vstinner approved these changes Jan 8, 2025
View reviewed changes

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. It works as expected: CTRL+Left skips a whole word and ALT+Backspace deletes a word.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

eendebakpt, paulie4, and encukou reacted with thumbs up emoji
All reactions
  • 👍 3 reactions
Comment thread Lib/_pyrepl/windows_console.py
CLEAR = "\x1b[H\x1b[J"

# State of control keys: https://learn.microsoft.com/en-us/windows/console/key-event-record-str
ALT_ACTIVE = 0x01 | 0x02

@vstinner vstinner Jan 8, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know that other keyboards have a right ALT key different than AltGr. In this case, I'm fine with ALT_ACTIVE = 0x01 | 0x02.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Jan 8, 2025
@paulie4
Merge branch 'main' into fix-issue-128388
d117d52
@encukou
encukou merged commit 688f3a0 into python:main Jan 10, 2025
@bedevere-app bedevere-app Bot removed the awaiting merge label Jan 10, 2025
@SimonvBez SimonvBez mentioned this pull request Jan 12, 2025
gh-127947: Repeat PyREPL key events on Windows when wRepeatCount > 1 #127948
Closed
@paulie4
paulie4 deleted the fix-issue-128388 branch January 13, 2025 01:57
@hugovk hugovk added the needs backport to 3.13 only security fixes label Feb 24, 2025
@miss-islington-app

miss-islington-app Bot commented Feb 24, 2025

Copy link
Copy Markdown

Thanks @paulie4 for the PR, and @encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

paulie4 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 24, 2025
@paulie4 @hugovk
@eendebakpt @miss-islington
pythongh-128388: pyrepl on Windows: add meta and ctrl+arrow keybindin…
f93b31b
…gs (pythonGH-128389)

Fix `Lib/_pyrepl/windows_console.py` to support more keybindings, like the
`Ctrl`+`←` and `Ctrl`+`→` word-skipping keybindings and those with meta (i.e. Alt),
e.g. to `kill-word` or `backward-kill-word`.

Specifics: if Ctrl is pressed, emit "ctrl left" and "ctrl right" instead of just "left" or
"right," and if Meta/Alt is pressed, emit the special key code for meta before
emitting the other key that was pressed.
(cherry picked from commit 688f3a0)

Co-authored-by: Paulie Peña <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Pieter Eendebak <[email protected]>
@bedevere-app

bedevere-app Bot commented Feb 24, 2025

Copy link
Copy Markdown

GH-130500 is a backport of this pull request to the 3.13 branch.

paulie4 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label Feb 24, 2025
encukou pushed a commit that referenced this pull request Mar 3, 2025
@miss-islington @paulie4
@hugovk @eendebakpt
[3.13] gh-128388: pyrepl on Windows: add meta and ctrl+arrow keybindi…
4c6318e
…ngs (GH-128389) (GH-130500)

gh-128388: pyrepl on Windows: add meta and ctrl+arrow keybindings (GH-128389)

Fix `Lib/_pyrepl/windows_console.py` to support more keybindings, like the
`Ctrl`+`←` and `Ctrl`+`→` word-skipping keybindings and those with meta (i.e. Alt),
e.g. to `kill-word` or `backward-kill-word`.

Specifics: if Ctrl is pressed, emit "ctrl left" and "ctrl right" instead of just "left" or
"right," and if Meta/Alt is pressed, emit the special key code for meta before
emitting the other key that was pressed.
(cherry picked from commit 688f3a0)

Co-authored-by: Paulie Peña <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Pieter Eendebak <[email protected]>
@bedevere-bot

bedevere-bot commented Mar 3, 2025

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 FreeBSD14 3.13 (tier-3) has failed when building commit 4c6318e.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1481/builds/1020) and take a look at the build logs.
  4. Check if the failure is related to this commit (4c6318e) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1481/builds/1020

Failed tests:

  • test_interpreters

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.13.opsec-fbsd14/build/Lib/threading.py", line 1041, in _bootstrap_inner
    self.run()
    ~~~~~~~~^^
  File "/home/buildbot/buildarea/3.13.opsec-fbsd14/build/Lib/threading.py", line 992, in run
    self._target(*self._args, **self._kwargs)
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.13.opsec-fbsd14/build/Lib/test/test_interpreters/test_stress.py", line 30, in task
    interp = interpreters.create()
  File "/home/buildbot/buildarea/3.13.opsec-fbsd14/build/Lib/test/support/interpreters/__init__.py", line 76, in create
    id = _interpreters.create(reqrefs=True)
interpreters.InterpreterError: interpreter creation failed
k


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.13.opsec-fbsd14/build/Lib/threading.py", line 1041, in _bootstrap_inner
    self.run()
    ~~~~~~~~^^
  File "/home/buildbot/buildarea/3.13.opsec-fbsd14/build/Lib/threading.py", line 992, in run
    self._target(*self._args, **self._kwargs)
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.13.opsec-fbsd14/build/Lib/test/test_interpreters/test_stress.py", line 47, in run
    interp = interpreters.create()
  File "/home/buildbot/buildarea/3.13.opsec-fbsd14/build/Lib/test/support/interpreters/__init__.py", line 76, in create
    id = _interpreters.create(reqrefs=True)
interpreters.InterpreterError: interpreter creation failed
k
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Apr 12, 2025
New REPL on Windows swallows characters entered via AltGr #132439
Closed
GH-132439: Fix REPL swallowing characters entered with AltGr on cmd.exe #132440
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@encukou encukou encukou left review comments
@eendebakpt eendebakpt eendebakpt left review comments
@hugovk hugovk hugovk left review comments
@vstinner vstinner vstinner approved these changes
@pablogsal pablogsal Awaiting requested review from pablogsal pablogsal is a code owner
@lysnikolaou lysnikolaou Awaiting requested review from lysnikolaou lysnikolaou is a code owner
@ambv ambv Awaiting requested review from ambv ambv is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

OS-windows topic-repl Related to the interactive shell

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@paulie4 @hugovk @bedevere-bot @vstinner @encukou @eendebakpt
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.