Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Consider moving the modules in sources to build within the pythoncore project itself. #107463

Open
Labels
OS-windowsbuildThe build process and cross-buildtype-featureA feature request or enhancement
@AraHaan

Description

@AraHaan

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).

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-windowsbuildThe build process and cross-buildtype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp