-
-
Couldn't load subscription status.
- Fork 33.2k
gh-125140: Remove the current directory from sys.path when using pyrepl #125212
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
Conversation
5643a8c to
eb97b2d
Compare
…g pyrepl Signed-off-by: Pablo Galindo <[email protected]>
Misc/NEWS.d/next/Security/2024-10-09-20-08-13.gh-issue-125140.YgNWRB.rst
Outdated
Show resolved
Hide resolved
| import _pyrepl.unix_console | ||
| from _pyrepl.main import CAN_USE_PYREPL | ||
| finally: | ||
| sys.path = original_path |
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.
Confirmed this works fine for PYTHONSTARTUP usage (including manipulating sys.path there) as well as keeps sitecustomize.py and usercustomize.py working. Also confirmed asyncio REPL still works in the aforementioned cases.
…YgNWRB.rst Co-authored-by: Peter Bierma <[email protected]>
|
Thanks @pablogsal for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
…g pyrepl (pythonGH-125212) (cherry picked from commit c7d5d1d) Co-authored-by: Pablo Galindo Salgado <[email protected]> Signed-off-by: Pablo Galindo <[email protected]> Co-authored-by: Łukasz Langa <[email protected]> Co-authored-by: Peter Bierma <[email protected]>
|
GH-125224 is a backport of this pull request to the 3.13 branch. |
Uh oh!
There was an error while loading. Please reload this page.