Skip to content

gh-122273: Support PyREPL history on Windows #127141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Nov 22, 2024

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

cc @devdanzin @ambv @pablogsal

except ImportError:
readline = None
else:
import rlcompleter # noqa: F401
Copy link
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
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.

Copy link
Contributor

@ambv ambv left a comment

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
52 checks passed
@miss-islington-app
Copy link

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

@miss-islington-app
Copy link

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
Copy link

bedevere-app bot commented Nov 26, 2024

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 bugs and security fixes label Nov 26, 2024
@vstinner
Copy link
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

⚠️⚠️⚠️ 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
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants