-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
gh-99437: runpy: decode path-like objects before setting globals #107644
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
runpy.run_path did not decode path-like objects to string, and instead stored them directly in the runned module globals, potentially as non-str objects.
Renamed variable from `decoded_path` as it longer makes sense in this context since the decoding was extracted out of the fuction.
This reverts commit f7fc15c.
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.
@kamilturek thanks for this PR, and sorry for the time it took to get someone to review it!
I had a look and it looks good, I don't really have any notes. Good job 😅
@pablogsal @Yhg1s I think this qualifies to be backported as a bugfix, but I could understand if someone doesn't feel the same way. Could you weigh in as the RM for 3.11 and 3.12? Thanks! |
I am happy back porting it to 3.11. @Yhg1s WDYT? |
Will add the backport labels, we can revert back if unwanted. |
Thanks @kamilturek for the PR, and @FFY00 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
Thanks @kamilturek for the PR, and @FFY00 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Sorry, @kamilturek and @FFY00, I could not cleanly backport this to
|
I think it's fine to backport to 3.12, it's still accepting bug fixes. I've resolved the merge conflict in #114838. Since Pablo's acceptance for 3.11, 3.11 is now only accepting security fixes, so let's not backport to 3.11. |
Closes #99437.
📚 Documentation preview 📚: https://cpython-previews--107644.org.readthedocs.build/