Skip to content

Segfault in Python 3.14.0a5, PyYaml 6.0.3 #903

@skeledrew

Description

@skeledrew

Hello. There seems to be a breaking change in the latest release. Running:

uvx --with pyyaml --python 3.14 --verbose python -X faulthandler -c 'import yaml'

Gives:

DEBUG Searching for Python 3.14 in managed installations or search path
DEBUG Searching for managed installations at `/home/skeledrew/.local/share/uv/python`
DEBUG Found managed installation `cpython-3.14.0a5-linux-x86_64-gnu`
DEBUG Found `cpython-3.14.0a5-linux-x86_64-gnu` at `/home/skeledrew/.local/share/uv/python/cpython-3.14.0a5-linux-x86_64-gnu/bin/python3.14` (managed installations)
DEBUG Acquired lock for `/home/skeledrew/.local/share/uv/tools`
DEBUG Released lock at `/home/skeledrew/.local/share/uv/tools/.lock`
DEBUG Assessing Python executable as base candidate: /home/skeledrew/.local/share/uv/python/cpython-3.14.0a5-linux-x86_64-gnu/bin/python3.14
DEBUG Caching via base interpreter: `/home/skeledrew/.local/share/uv/python/cpython-3.14.0a5-linux-x86_64-gnu/bin/python3.14`
DEBUG Stripping pre-release from `python_full_version`: 3.14.0a5
DEBUG Using request timeout of 30s
DEBUG Solving with installed Python version: 3.14a5
DEBUG Solving with target Python version: >=3.14
DEBUG Adding direct dependency: pyyaml*
DEBUG No cache entry for: https://pypi.org/simple/pyyaml/
WARN Skipping file for pyyaml: PyYAML-3.10.win32-py2.5.exe
WARN Skipping file for pyyaml: PyYAML-3.10.win32-py2.6.exe
WARN Skipping file for pyyaml: PyYAML-3.10.win32-py2.7.exe
WARN Skipping file for pyyaml: PyYAML-3.10.win32-py3.0.exe
WARN Skipping file for pyyaml: PyYAML-3.10.win32-py3.1.exe
WARN Skipping file for pyyaml: PyYAML-3.10.win32-py3.2.exe
WARN Skipping file for pyyaml: PyYAML-3.11.win-amd64-py2.6.exe
WARN Skipping file for pyyaml: PyYAML-3.11.win-amd64-py2.7.exe
WARN Skipping file for pyyaml: PyYAML-3.11.win-amd64-py3.1.exe
WARN Skipping file for pyyaml: PyYAML-3.11.win-amd64-py3.2.exe
WARN Skipping file for pyyaml: PyYAML-3.11.win-amd64-py3.3.exe
WARN Skipping file for pyyaml: PyYAML-3.11.win-amd64-py3.4.exe
WARN Skipping file for pyyaml: PyYAML-3.11.win32-py2.6.exe
WARN Skipping file for pyyaml: PyYAML-3.11.win32-py2.7.exe
WARN Skipping file for pyyaml: PyYAML-3.11.win32-py3.1.exe
WARN Skipping file for pyyaml: PyYAML-3.11.win32-py3.2.exe
WARN Skipping file for pyyaml: PyYAML-3.11.win32-py3.3.exe
WARN Skipping file for pyyaml: PyYAML-3.11.win32-py3.4.exe
WARN Skipping file for pyyaml: PyYAML-3.12.win-amd64-py2.7.exe
WARN Skipping file for pyyaml: PyYAML-3.12.win-amd64-py3.4.exe
WARN Skipping file for pyyaml: PyYAML-3.12.win-amd64-py3.5.exe
WARN Skipping file for pyyaml: PyYAML-3.12.win32-py2.7.exe
WARN Skipping file for pyyaml: PyYAML-3.12.win32-py3.4.exe
WARN Skipping file for pyyaml: PyYAML-3.12.win32-py3.5.exe
WARN Skipping file for pyyaml: PyYAML-4.2b4.win-amd64-py2.7.exe
WARN Skipping file for pyyaml: PyYAML-4.2b4.win-amd64-py3.4.exe
WARN Skipping file for pyyaml: PyYAML-4.2b4.win32-py2.7.exe
WARN Skipping file for pyyaml: PyYAML-4.2b4.win32-py3.4.exe
DEBUG Searching for a compatible version of pyyaml (*)
DEBUG Selecting: pyyaml==6.0.3 [compatible] (pyyaml-6.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl)
DEBUG No cache entry for: https://files.pythonhosted.org/packages/88/f9/16491d7ed2a919954993e48aa941b200f38040928474c9e85ea9e64222c3/pyyaml-6.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.metadata
DEBUG Tried 1 versions: pyyaml 1
DEBUG marker environment resolution took 0.451s
Resolved 1 package in 452ms
DEBUG Assessing Python executable as base candidate: /home/skeledrew/.local/share/uv/python/cpython-3.14.0a5-linux-x86_64-gnu/bin/python3.14
DEBUG Using base executable for virtual environment: /home/skeledrew/.local/share/uv/python/cpython-3.14.0a5-linux-x86_64-gnu/bin/python3.14
DEBUG Ignoring empty directory
DEBUG Using request timeout of 30s
DEBUG Identified uncached distribution: pyyaml==6.0.3
DEBUG No cache entry for: https://files.pythonhosted.org/packages/88/f9/16491d7ed2a919954993e48aa941b200f38040928474c9e85ea9e64222c3/pyyaml-6.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Prepared 1 package in 411ms
Installed 1 package in 3ms
 + pyyaml==6.0.3
DEBUG Checking for Python environment at `/home/skeledrew/.cache/uv/archive-v0/Vok6RbWxkuQZZN0J-Q2M8`
DEBUG Running `python -X faulthandler -c import yaml`
DEBUG Spawned child 2841353 in process group 2841324
Fatal Python error: Segmentation fault

Current thread 0x0000736a343dd740 (most recent call first):
  File "<frozen importlib._bootstrap>", line 488 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 1064 in exec_module
  File "<frozen importlib._bootstrap>", line 935 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1330 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1359 in _find_and_load
  File "/home/skeledrew/.cache/uv/archive-v0/Vok6RbWxkuQZZN0J-Q2M8/lib/python3.14/site-packages/yaml/cyaml.py", line 7 in <module>
  File "<frozen importlib._bootstrap>", line 488 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 762 in exec_module
  File "<frozen importlib._bootstrap>", line 935 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1330 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1359 in _find_and_load
  File "/home/skeledrew/.cache/uv/archive-v0/Vok6RbWxkuQZZN0J-Q2M8/lib/python3.14/site-packages/yaml/__init__.py", line 13 in <module>
  File "<frozen importlib._bootstrap>", line 488 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 762 in exec_module
  File "<frozen importlib._bootstrap>", line 935 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1330 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1359 in _find_and_load
  File "<string>", line 1 in <module>

Extension modules: yaml._yaml (total: 1)
DEBUG Command exited with signal: Some(11)```

Specifying pyyaml==6.0.1 resolves the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions