-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
gh-131020: Pylauncher does not correctly detect a BOM when searching for the shebang #131021
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
both fail with the current implementation
You do not need to update the branch see the devguide. You do need a NEWS entry :-) |
I updated before I pushed - seems okay to me?
Done! |
There is no need to update every time you push. Please read the devguide, the "Update branch button" section (and really the devguide in general, it's got lots of interesting info!). |
Yeah, I know. This was just the first push, so I should be fine to update before. |
Misc/NEWS.d/next/Windows/2025-03-09-19-57-35.gh-issue-131020._c87wf.rst
Outdated
Show resolved
Hide resolved
…c87wf.rst Co-authored-by: Stan Ulbrych <[email protected]>
If it's not horrendously behind it's not really necessary. |
Please rewrite the NEWS entry with the correct issue number (the old one). We usually close new duplicates and keep old ones. |
No it's fine if it's the first push... What we don't want is someone who continuously click on "Update branch" when there is essentially nothing new at all. If you have forked your branch from a quite old main, it's fine to hit the update button once. |
Just to reassure: #99620 was about |
They are likely to go through the same according to the issue description but if I have incorrectly closed the issue I'll reopen it |
…l/cpython into fix-launcher2-warnings
#99620 is not fixed by this PR. I've created Lines 920 to 928 in 475f933
Internet search for "GetPrivateProfileStringW" "BOM" seems to reveal that indeed that there are issues with it.
Not sure how to proceed here. These two seem related because they both report problems of the launcher with a BOM. Yet, the other issue deals with Since I do not know how to easily fix the I'd update the issue title of #131020 to "Pylauncher does not correctly detect a BOM in the Python file when looking for the shebang" (seems too long, though). I think the blurb issue and text is then ok? |
BTW: looking into the |
Oh so it wasn't a duplicate. Ok for reopening and changing the issue number back to what it was then. |
I've updated the issue and PR title to be more specific: "when searching for the shebang". |
Lib/test/test_launcher.py
Outdated
with self.py_ini(b"\xEF\xBB\xBF" + content): | ||
data = self.run_py(["-arg"]) |
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.
We don't read from the INI file ourselves, and unless the SC rejects PEP 773 we're not going to replace the existing Windows API call with our own code.
I'd just remove this test.
This reverts commit 1a245fa. Was merely a demo to show that this PR does not fix the other issue :)
There shouldn't be any harm in updating the branch, provided you've done a fairly normal branch/PR. The problem is when you update incorrectly (e.g. merging |
(Most of the time it's to avoid wasting CI resources and notifying those that are subscribed to the conversation. This causes lots of noise since we can't unsubscribe from such commits unfortunately) |
Thanks @chris-eibl for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
… searching for the shebang (pythonGH-131021) (cherry picked from commit 36ef3bf) Co-authored-by: Chris Eibl <[email protected]>
GH-131047 is a backport of this pull request to the 3.13 branch. |
… searching for the shebang (pythonGH-131021) (cherry picked from commit 36ef3bf) Co-authored-by: Chris Eibl <[email protected]>
GH-131048 is a backport of this pull request to the 3.12 branch. |
Sorry @chris-eibl and @zooba, I had trouble completing the backport.
|
…hing for the shebang (GH-131021) (cherry picked from commit 36ef3bf) Co-authored-by: Chris Eibl <[email protected]>
… searching for the shebang (pythonGH-131021)
This is due to
cpython/PC/launcher2.c
Lines 1080 to 1081 in 475f933
for wich clang-cl creates the following warnings:
The fix is easy. I first created two failing tests.