-
Notifications
You must be signed in to change notification settings - Fork 25
Fix Python 3.14+ compatibility issues #130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Aug 22, 2025
In Python 3.14 the combination of crossenv's patching and the import of collections.namedtuple results in a loop in the import machinery: Fatal Python error: init_import_site: Failed to import the site module Python runtime state: initialized Traceback (most recent call last): File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/venv/lib/site.py", line 177, in <module> File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/venv/lib/site.py", line 122, in __init__ File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/venv/lib/site.py", line 170, in manually_patch_loaded File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/venv/lib/site.py", line 56, in _patch_module File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/venv/lib/os-patch.py", line 1, in <module> File "<frozen importlib._bootstrap>", line 1371, in _find_and_load File "<frozen importlib._bootstrap>", line 1333, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 1267, in _find_spec File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/venv/lib/importlib-machinery-patch.py", line 18, in _PathFinder_find_spec File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/lib/python3.14/sysconfig/__init__.py", line 507, in get_path File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/lib/python3.14/sysconfig/__init__.py", line 497, in get_paths File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/lib/python3.14/sysconfig/__init__.py", line 276, in _expand_vars File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/lib/python3.14/sysconfig/__init__.py", line 625, in get_config_vars File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/lib/python3.14/sysconfig/__init__.py", line 525, in _init_config_vars File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/lib/python3.14/sysconfig/__init__.py", line 393, in _init_posix File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/lib/python3.14/sysconfig/__init__.py", line 373, in _get_sysconfigdata File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/lib/python3.14/importlib/__init__.py", line 88, in import_module File "<frozen importlib._bootstrap>", line 1398, in _gcd_import File "<frozen importlib._bootstrap>", line 1371, in _find_and_load File "<frozen importlib._bootstrap>", line 1333, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 1267, in _find_spec File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/venv/lib/importlib-machinery-patch.py", line 18, in _PathFinder_find_spec File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/lib/python3.14/sysconfig/__init__.py", line 507, in get_path File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/lib/python3.14/sysconfig/__init__.py", line 497, in get_paths File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/lib/python3.14/sysconfig/__init__.py", line 286, in _expand_vars File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/lib/python3.14/sysconfig/__init__.py", line 262, in _subst_vars AttributeError: 'installed_base'
…nce Python 3.12 See here for the deprecation: python/cpython@0675975#diff-d593bd299ba58e440ba411ffa0640ccd9d20d518b0cf2644ed4bdb75a82a3e70 The argument is removed in Python 3.15 and in Python 3.14 the import of warnings results in a loop in the import machinery (similar to 3e7f2e9): Fatal Python error: init_import_site: Failed to import the site module Python runtime state: initialized Traceback (most recent call last): File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/venv/lib/site.py", line 177, in <module> File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/venv/lib/site.py", line 122, in __init__ File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/venv/lib/site.py", line 170, in manually_patch_loaded File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/venv/lib/site.py", line 56, in _patch_module File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/venv/lib/sysconfig-patch.py", line 5, in <module> File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/lib/python3.14/sysconfig/__init__.py", line 225, in is_python_build File "<frozen importlib._bootstrap>", line 1371, in _find_and_load File "<frozen importlib._bootstrap>", line 1333, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 1267, in _find_spec File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/venv/lib/importlib-machinery-patch.py", line 18, in _PathFinder_find_spec File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/lib/python3.14/sysconfig/__init__.py", line 507, in get_path File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/lib/python3.14/sysconfig/__init__.py", line 497, in get_paths File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/lib/python3.14/sysconfig/__init__.py", line 276, in _expand_vars File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/lib/python3.14/sysconfig/__init__.py", line 625, in get_config_vars File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/lib/python3.14/sysconfig/__init__.py", line 525, in _init_config_vars File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/lib/python3.14/sysconfig/__init__.py", line 393, in _init_posix File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/lib/python3.14/sysconfig/__init__.py", line 373, in _get_sysconfigdata File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/lib/python3.14/importlib/__init__.py", line 88, in import_module File "<frozen importlib._bootstrap>", line 1398, in _gcd_import File "<frozen importlib._bootstrap>", line 1371, in _find_and_load File "<frozen importlib._bootstrap>", line 1333, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 1267, in _find_spec File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/venv/lib/importlib-machinery-patch.py", line 18, in _PathFinder_find_spec File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/lib/python3.14/sysconfig/__init__.py", line 507, in get_path File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/lib/python3.14/sysconfig/__init__.py", line 497, in get_paths File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/lib/python3.14/sysconfig/__init__.py", line 286, in _expand_vars File "/home/cburr/Development/conda-forge/pycurl-feedstock/output/bld/rattler-build_pycurl_1755835374/build_env/lib/python3.14/sysconfig/__init__.py", line 262, in _subst_vars AttributeError: 'installed_base'
21dbd98 to
51112fb
Compare
Member
|
Thanks for fixing this! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses several compatibility issues that arise when using crossenv with Python 3.14+, fixing import loops and deprecation warnings.
Make tracebacks involving _patch_module more readable by including file path
Use posix.uname_result rather than making a named tuple
collections.namedtupleimportPython 3.14 traceback (click to expand)
Don't pass any argument to
is_python_builddue to deprecation since Python 3.12warnings)Python 3.14 traceback (click to expand)