gh-99437: runpy: decode path-like objects before setting globals#107644
gh-99437: runpy: decode path-like objects before setting globals#107644FFY00 merged 6 commits intopython:mainfrom
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.
FFY00
left a comment
There was a problem hiding this comment.
@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/