Skip to content

gh-122273: Support PyREPL history on Windows - #127141

Merged
vstinner merged 1 commit into
python:mainfrom
vstinner:pyrepl_history_win
Nov 26, 2024
Merged

vstinner merged 1 commit into
python:mainfrom
vstinner:pyrepl_history_win

Conversation

@vstinner

@vstinner vstinner commented Nov 22, 2024 •

Copy link
Copy Markdown
Member
Co-Authored-By: devdanzin <74280297+devdanzin@users.noreply.github.com>
@vstinner

Copy link
Copy Markdown
Member Author
Comment thread Lib/site.py
except ImportError:
readline = None
else:
import rlcompleter # noqa: F401

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can this import ever fail?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I don't know. In case of doubt, I prefer to keep the old behavior: catch and ignore ImportError.

@ambv ambv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested on Windows 11 with PowerShell and cmd.exe, works as intended.

@vstinner
vstinner merged commit 3c7a90a into python:main Nov 26, 2024
@miss-islington-app

Copy link
Copy Markdown

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Sorry, @vstinner, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 3c7a90a83146dc6e55f6f9ecd9af0bf9682f98a6 3.13
@vstinner
vstinner deleted the pyrepl_history_win branch November 26, 2024 09:22
vstinner added a commit to vstinner/cpython that referenced this pull request Nov 26, 2024
Co-authored-by: devdanzin <74280297+devdanzin@users.noreply.github.com>
(cherry picked from commit 3c7a90a)
@bedevere-app

bedevere-app Bot commented Nov 26, 2024

Copy link
Copy Markdown

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label Nov 26, 2024
@vstinner

Copy link
Copy Markdown
Member Author

Merged, thanks for the review @ambv.

vstinner added a commit that referenced this pull request Nov 26, 2024
gh-122273: Support PyREPL history on Windows (#127141)

Co-authored-by: devdanzin <74280297+devdanzin@users.noreply.github.com>
(cherry picked from commit 3c7a90a)
@bedevere-bot

Copy link
Copy Markdown

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

Hi! The buildbot x86-64 MacOS Intel NoGIL 3.13 has failed when building commit a5741d6.

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/1449/builds/713) and take a look at the build logs.
  4. Check if the failure is related to this commit (a5741d6) 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/1449/builds/713

Failed tests:

  • test_threading

Failed subtests:

  • test_start_new_thread_failed - test.test_threading.ThreadTests.test_start_new_thread_failed

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/Users/ec2-user/buildbot/buildarea/3.13.itamaro-macos-intel-aws.nogil/build/Lib/test/test_threading.py", line 1205, in test_start_new_thread_failed
    self.assertEqual(out, b'ok')
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^
AssertionError: b"skip\nshouldn't be printed" != b'ok'
@vstinner

Copy link
Copy Markdown
Member Author

test_start_new_thread_failed - test.test_threading.ThreadTests.test_start_new_thread_failed

#109761 (comment)

ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
Co-authored-by: devdanzin <74280297+devdanzin@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants