[issue43969] "bad magic number" when Python 2's pyc file exists without py file

2021-11-04 Thread Mitchell Hentges
Mitchell Hentges added the comment: I'm going to close this here - I currently don't have the cycles to push this forward. Besides, this issue only occurs in environments that are using both Python 2 and 3, and as Python 2's EOL date gets further in the past, the severity of this ticket

[issue43969] "bad magic number" when Python 2's pyc file exists without py file

2021-04-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: Unless you find documentation that says otherwise, this an enhancement proposal for 3.11. If no core developer (other than me) jumps on this, you might use git blame to fine out who committed code in the area you proposed changing. -- nosy:

[issue43969] "bad magic number" when Python 2's pyc file exists without py file

2021-04-29 Thread Mitchell Hentges
Mitchell Hentges added the comment: Looking closer into this, it appears that Python 3 will still try to load non-__pycache__ `.pyc` files. Perhaps I'm missing context, but aren't those only supposed by to written and read by Python 2? Location where `pyc` loader is registered:

[issue43969] "bad magic number" when Python 2's pyc file exists without py file

2021-04-28 Thread Mitchell Hentges
New submission from Mitchell Hentges : Python 3 imports may fail if a Python 2 .pyc file exists without an accompanying .py file. - My project vendors code, and we recently updated "requests" to a drastically newer version. As part of this version change,