Description
CPython's dev versions don't strictly follow PEP 440 because of the plus: 3.15.0a8+
This prevents pip installing from a pylock.toml with this version.
Expected behavior
I expect to be able to install from a CPython dev version, because I'd like to use a lockfile for CPython's docs: python/cpython#149058.
pip version
25.1
Python version
3.15.0a8+
OS
macOS and Linux
How to Reproduce
- Build CPython from source: https://devguide.python.org/
- Save this as
pylock.toml:
lock-version = "1.0"
created-by = "minimal-repro"
requires-python = ">=3.12"
packages = []
- Install:
python.exe -m pip install -r pylock.toml
Output
Defaulting to user installation because normal site-packages is not writeable
WARNING: Using pylock.toml as a requirements source is an experimental feature. It may be removed/changed in a future release without prior warning.
ERROR: Cannot select requirements from pylock file 'pylock.toml': python_full_version '3.15.0a8+' in provided environment does not satisfy the Python version requirement '>=3.12'
See also https://github.com/python/cpython/actions/runs/25007535303/job/73234353237?pr=149058
This comes from src/packaging/pylock.py
Description
CPython's dev versions don't strictly follow PEP 440 because of the plus: 3.15.0a8+
This prevents pip installing from a pylock.toml with this version.
Expected behavior
I expect to be able to install from a CPython dev version, because I'd like to use a lockfile for CPython's docs: python/cpython#149058.
pip version
25.1
Python version
3.15.0a8+
OS
macOS and Linux
How to Reproduce
pylock.toml:python.exe -m pip install -r pylock.tomlOutput
See also https://github.com/python/cpython/actions/runs/25007535303/job/73234353237?pr=149058
This comes from
src/packaging/pylock.py