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.

Title: OS-specific frozen modules are built, even on other OSes.
Type: behavior Stage: patch review
Components: Interpreter Core Versions: Python 3.11
Status: open Resolution:
Dependencies: Superseder:
Assigned To: eric.snow Nosy List: eric.snow, gvanrossum, steve.dower
Priority: normal Keywords: patch

Created on 2021-09-23 17:31 by eric.snow, last changed 2022-04-11 14:59 by admin.

Pull Requests
URL Status Linked Edit
PR 29648 merged gvanrossum, 2021-11-20 00:28
Messages (2)
msg402514 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2021-09-23 17:31
The list of frozen modules in Python/frozen.c is generated by Tools/scripts/  Currently we freeze both posixpath and ntpath, even though for startup we only need one of the two (depending on the OS).  In this case both modules are available on all platforms (and only os.path differs), so we might be okay to leave both frozen.  The cost isn't high.

However, we may need to accommodate freezing a module only on a subset of supported OSes:

* if the extra cost (to the size of the executable) is too high
* if there's an OS-specific module that is only available on that OS

In that case, we'd need to generate the appropriate ifdefs in Python/frozen.c.  We can't just exclude the module during generation since frozen.c is committed to the repo.
msg402515 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2021-09-23 17:32
FYI, currently os.path is also frozen and *is* OS-specific.  However, that's a separate matter.  See bpo-45272.
Date User Action Args
2022-04-11 14:59:50adminsetgithub: 89436
2021-11-20 00:28:14gvanrossumsetpull_requests: + pull_request27887
2021-11-20 00:12:50gvanrossumsetmessages: - msg406633
2021-11-20 00:12:30gvanrossumsetpull_requests: - pull_request27883
2021-11-20 00:11:55gvanrossumsetmessages: + msg406633
2021-11-19 23:46:10gvanrossumsetkeywords: + patch
nosy: + gvanrossum

pull_requests: + pull_request27883
stage: needs patch -> patch review
2021-09-23 17:32:16eric.snowsetmessages: + msg402515
2021-09-23 17:31:45eric.snowcreate