You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
py.ini and pyw.ini (for the launcher) are ignored if they are encoded in utf-8 with BOM #99620
I can confirm this (I wrote the file with powershell which adds a BOM in older versions).
While I'm fine with it failing, the launcher debug output showed # Did not find file C:\Windows\py.ini despite it being there, which was quite confusing.
Yeah, this issue will have been around forever, which should mean there are precisely zero py.ini files out there with a BOM.
In any case, if PEP 773 goes through, this launcher will be deprecated and replaced. So let's not worry about this one until we see whether we get to move to a better implementation or not.
The launcher referred to in this issue has now been removed (#153511), and so this issue is expired. Please use the Python install manager to install Python, and file any issues on the pymanager repo.
Activity
urica12 commentedon Nov 21, 2022
urica12 commentedon Nov 21, 2022
lazka commentedon Jun 12, 2024
I can confirm this (I wrote the file with powershell which adds a BOM in older versions).
While I'm fine with it failing, the launcher debug output showed
# Did not find file C:\Windows\py.inidespite it being there, which was quite confusing.StanFromIreland commentedon Mar 9, 2025
picnixz commentedon Mar 9, 2025
add test_py_default_with_valid_bom and mark as expected failure
chris-eibl commentedon Mar 10, 2025
When implementing #131021 to fix #131020, I've had a quick look at the problem here:
cpython/PC/launcher2.c
Lines 920 to 928 in 475f933
Internet search for
"GetPrivateProfileStringW" "BOM"seems to reveal that indeed that there are issues with it.zooba commentedon Mar 10, 2025
Yeah, this issue will have been around forever, which should mean there are precisely zero
py.inifiles out there with a BOM.In any case, if PEP 773 goes through, this launcher will be deprecated and replaced. So let's not worry about this one until we see whether we get to move to a better implementation or not.
zooba commentedon Jul 20, 2026
The launcher referred to in this issue has now been removed (#153511), and so this issue is expired. Please use the Python install manager to install Python, and file any issues on the pymanager repo.