Features & Improvements
- Retain dependency
extramarkers in lockfiles and evaluate them against the parent package's extras when traversing dependencies. (#2638) - Allow specifying lock targets in
pyproject.tomlviatool.pdm.lock.targets. (#3188) - Add
python.auto_installconfig (env varPDM_PYTHON_AUTO_INSTALL) to disable automatically installing a Python interpreter when no matching one is found. (#4022)
Bug Fixes
- Stop the HTTP cache from being cleared every time a client is created, which made concurrent hash fetching fail and left packages without files in
pdm.lockand exportedpylock.toml. (#4000) - Resolve metadata for named Python scripts relative to their task working directory when running from subdirectories. (#4002)
- Quote the Python interpreter in {pdm} placeholders for Windows shell tasks when its path contains spaces. (#4003)
- Fix
--save-compatibleand--save-safe-compatiblewriting an invalid~=specifier for single-segment versions and dropping the epoch from saved specifiers. (#4005) - Fix resolution failing with
CandidateNotFoundfor a transitive dependency when another candidate can satisfy the requirements. (#4006) - Fix the PEP 582 shell setup command corrupting non-ASCII bytes in paths under dash by emitting the path as octal escapes. (#4007)
- Quote the path that
pdm venv activateprints on Windows outside PowerShell, so cmd.exe no longer splits it at a space, a comma or&. (#4009) - Preserve version exclusions when pinning requirements to avoid locking and installing excluded local versions. (#4013)
- Fix PEP 582 setup for tcsh when the installation path contains an apostrophe. (#4015)
- Resolve
.compat_libsfor the target Python interpreter using--python-versionand--only-binary=:all:and validateRequires-Pythoncompatibility across cached distributions. (#4024) - Fix a
KeyErrorinpdm addwhen adding to a new group whose name isn't normalized, such as-G My_Group. (#4025) - Stop
pdm exportfrom writing a#egg=fragment on relative editable paths, which pip rejects. (#4026) - Preserve PEP 440 version epochs when computing
^and~upper bounds in Poetrypyproject.tomlimports. (#4029) - Fix
pdm importfailing on a Poetry constraint that pins a version with a single=, such asrequests = "=2.32.3". (#4031) - Fix
pdm importof aPipfilewhose marker key uses theinornot inoperator, such assys_platform = "in 'linux darwin'". (#4032) - Preserve wheel URLs with query strings or fragments when exporting to pylock.toml. (#4033)
- Normalize PEP 685 extra names in
Requirement.identify()andRequirement._hash_key(). (#4034) - A
pdm.tomlcommitted to the project can no longer set global-only config items such ascache_dir; they are ignored with a warning. Before, a repository could pointcache_dirinto itself and have its own plugin directory loaded on startup.
Documentation
- Correct the minimum Python version stated for the installation script in the docs. (#4004)