This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Error in freeze.py due to unguarded sys.abiflags usage under Windows
Type: behavior Stage: resolved
Components: Demos and Tools, Windows Versions: Python 3.8, Python 3.7
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: SilentGhost, gevorg, meador.inge, ned.deily, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords: patch

Created on 2016-09-10 19:45 by gevorg, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
28068_2.diff SilentGhost, 2016-09-11 18:11 review
Messages (8)
msg275686 - (view) Author: Gevorg Voskanyan (gevorg) Date: 2016-09-10 19:45
Traceback (most recent call last):
  File ".../freeze.py", line 493, in <module>
    main()
  File ".../freeze.py", line 222, in main
    flagged_version = version + sys.abiflags
AttributeError: module 'sys' has no attribute 'abiflags'
msg275698 - (view) Author: SilentGhost (SilentGhost) * (Python triager) Date: 2016-09-10 21:13
Here is the patch, I'm not sure if any more changes are needed there, so it would be good to test.
msg275820 - (view) Author: Gevorg Voskanyan (gevorg) Date: 2016-09-11 18:06
Thanks for the patch! It makes the error go away for me, but only because `ishome` is True in my case. Were it False, it would fail the same way on the line containing sys.abiflags .
I think this line in the patch:
        flagged_version = version + sys.abiflags
should be changed to:
        flagged_version = version + abiflags
That way I get no errors regardless of the value of `ishome`.
msg275823 - (view) Author: SilentGhost (SilentGhost) * (Python triager) Date: 2016-09-11 18:11
Sure, that was just a typo. While "no errors" is good news, does the code is actually doing what it's supposed to do? Are you sure there aren't any hidden issue related to the potentially incorrect paths?
msg275829 - (view) Author: Gevorg Voskanyan (gevorg) Date: 2016-09-11 19:01
It works OK for me, but as mentioned above `ishome` is True in my setup, so the path-related changes in the patch don't affect my setup in any way. I really don't know how it would affect setups of other people where `ishome` is False. So no, I can't be sure about hidden issues related to potentially incorrect paths. Sorry for not being able to help with that aspect here :(
msg275833 - (view) Author: SilentGhost (SilentGhost) * (Python triager) Date: 2016-09-11 19:20
Given that it's a Windows issue, I'm sure Windows core developers in the nosy list would find a way to verify the fix. For the record, this bug was introduced in issue 11824.
msg275922 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2016-09-12 02:34
That folder won't ever exist on Windows - if anything it should just be os.path.join(sys.execprefix, "DLLs"), but I'm not even sure how valuable that is.
msg371344 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2020-06-12 09:14
This appears to be a duplicate of Issue32217 which was fixed in 3.7.4 and 3.8.0. If that doesn't solve the problem, please reopen with a current failure.
History
Date User Action Args
2022-04-11 14:58:36adminsetgithub: 72255
2020-06-12 09:14:56ned.deilysetstatus: open -> closed

versions: + Python 3.7, Python 3.8, - Python 3.5, Python 3.6
nosy: + ned.deily

messages: + msg371344
resolution: duplicate
stage: patch review -> resolved
2016-09-12 02:34:56steve.dowersetmessages: + msg275922
2016-09-11 19:21:21SilentGhostsetfiles: - 28068.diff
2016-09-11 19:20:37SilentGhostsetnosy: + meador.inge
messages: + msg275833
2016-09-11 19:01:08gevorgsetmessages: + msg275829
2016-09-11 18:11:10SilentGhostsetfiles: + 28068_2.diff

messages: + msg275823
2016-09-11 18:06:12gevorgsetmessages: + msg275820
2016-09-10 21:13:41SilentGhostsetfiles: + 28068.diff

type: compile error -> behavior
components: + Windows
versions: + Python 3.6
keywords: + patch
nosy: + paul.moore, tim.golden, SilentGhost, zach.ware, steve.dower

messages: + msg275698
stage: patch review
2016-09-10 19:45:45gevorgcreate