Repository navigation
Conversation
|
This branch has not been deployed
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
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.



An exact Python requirement such as
==3.13.12currently exports asrequires-python = "3.13.12"inpylock.toml. Consumers reject this because the version specifier has no operator. This affects both the project requirement and a locked package's requirement.Poetry parses exact requirements into a
Version, whose string form omits==. Prefix that operator when serializing aVersionat both locations. Add one regression parameter for each location; ranges, wildcards, unions, and marker generation keep their existing paths.Reproduction with Python 3.13.12, Poetry 2.4.2, poetry-core 2.4.0, and uv 0.13.1:
Run
poetry lock, thenpoetry export -f pylock.toml -o pylock.toml. Before this change,uv pip sync pylock.toml --offline --dry-run --python /path/to/python3.13.12exits 2 with “expected operator”. Afterward it exits 0, withrequires-python = "==3.13.12". This is a dependency-free parsing/compatibility check; the dry run applies no installation or removal.Validation on macOS with Python 3.13.12:
python -m pytest -n 0 -q).Limits: the full OS/Python and minimum Poetry/core compatibility matrices and full pre-commit hook suite were not run locally. The real CLI/uv example covers a project pin without dependencies; package-level coverage uses exporter tests and synthetic lock metadata, rather than downloading and installing a package graph. No documentation change is proposed for this serialization correction.
AI assistance was used to prepare implementation and regression tests.