Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.4k
Description
Scope: The change would be minor on functionality of the interpreter (no change) what will change is the number of files in all types of distributions and potentially minor slowdowns in the compilation of pythonX.Y.dll/so/dylib (a few seconds or less).
The following modules could be set to build into pythonX.Y.dll (and possibly also pythonX.Y.so/dylib):
- _asyncio.pyd/so/dylib
- _bz2.pyd/so/dylib
- _ctypes.pyd/so/dylib
- _decimal.pyd/so/dylib
- _elementtree.pyd/so/dylib
- _hashlib.pyd/so/dylib
- _lzma.pyd/so/dylib
- _msi.pyd (Windows only but is fine to have it only in pythonX.Y.dll)
- _multiprocessing.pyd/so/dylib
- _overlapped.pyd (Windows only but is fine to have it only in pythonX.Y.dll)
- _queue.pyd/so/dylib
- _socket.pyd/so/dylib
- _sqlite3.pyd/so/dylib
- _ssl.pyd/so/dylib
- _uuid.pyd/so/dylib
- _zoneinfo.pyd/so/dylib
- pyexpat.pyd/so/dylib
- select.pyd/so/dylib
- unicodedata.pyd/so/dylib
- winsound.pyd (Windows only but is fine to have it only in pythonX.Y.dll)
Note: _tkinter would remain excluded due to it not being present in embedded distributions of python (in zip file form).
Pros:
- less files that need to be shipped in both embedded and standard distributions on all supported operating systems. (These pyd files takes up about 2.61 MB on Windows Embed amd64 zip files that could easily be instead part of pythonX.Y.dll since it's 6 MB anyways (largest file in the zip file).
- Easier for users to manually compile python to update files by hand from a previously downloaded embed zip file (say for example they downloaded 3.11.4 zip file and decided to manually compile the latest patches in the 3.11 branch and remain in the same embedded state on the interpreter). A few files vs needing to copy 34 files and sorting through the extra files (.lib's/.pyd's, *.exp's, *.dll's can be painful to do when the pcbuild.sln file has 44 projects and people typically just hit build solution without thinking about what projects actually are built for the normal embed distributions).
- For pcbuild.sln the number of projects would be reduced by ~20 (out of 44 which is actually a decent amount).
Cons: - Old versions would need to be fully uninstalled before installing the versions with this change (of the same major and minor version that is).
Pitch
The pitch here is to simplify all distributions further by having all (except _tkinter) extension modules that are in the python source code (most of which are needed anyways to avoid fatal python errors with it finding the modules if say they forgot to copy them into the correct location) can be avoided by instead linking them into pythonX.Y.dll/so/dylib since they are technically part of the python core in a way. The usage of them would not change at all, just the number of files that would be shipped in each distribution (and also simplifies the script in the source code that actually makes the normal and embedded distributions).
Previous discussion
I am currently unsure if there was any previous discussion on a proposal similar to this. Please comment to this issue if I am not correct however as this has been the first in a long time for me to look back into the python repository.
Affected Python versions:
- 3.11 (this can start from 3.11.5)
- 3.12 (this can start on the next development release of 3.12)
- Other python versions I think are fine as is (unless determined otherwise).