fix: use valid PEP 440 syntax for requires-python - #501
Merged
Merged
Conversation
The Poetry [tool.poetry] -> PEP 621 [project] migration carried over Poetry's caret syntax (^3.9.2) verbatim into the PEP 621 requires-python field, which PyPI's upload validator rejects outright. The last two release attempts (v0.1.0, v6.9.1) both tagged and created GitHub Releases successfully, but `poetry publish` failed at the last step with "HTTP Error 400: '^3.9.2' is invalid for 'requires-python'", so PyPI is still stuck on 6.9.0. Verified the fix produces valid Requires-Python metadata and passes `twine check` on both the sdist and wheel. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
The constraint and lock metadata updates are consistent and address the publishing issue.
Pull request overview
Fixes the package’s Python version constraint so release metadata is valid for PyPI publishing.
Changes:
- Replaces Poetry caret syntax with
>=3.9.2,<4.0.0inpyproject.toml. - Regenerates matching lock metadata in
poetry.lock.
File summaries
| File | Description |
|---|---|
pyproject.toml |
Defines the corrected Python version constraint. |
poetry.lock |
Synchronizes lock metadata with the updated constraint. |
Review details
- Files reviewed: 1/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
aleks-ndustrial
approved these changes
Sep 14, 2026
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.
Summary
The release pipeline has been silently broken since the Poetry
[tool.poetry]-> PEP 621[project]migration:requires-python = "^3.9.2"uses Poetry's caret syntax, which is valid under the old[tool.poetry]table but is not valid PEP 440, which is what PyPI's upload validator requires for the PEP 621requires-pythonfield.The last two release attempts both succeeded at bumping the version, tagging, and creating a GitHub Release, but the final
poetry publishstep failed:As a result, PyPI is currently stuck on
6.9.0even though the repo/tags say6.9.1.Changes
pyproject.toml:requires-python = "^3.9.2"->requires-python = ">=3.9.2,<4.0.0"(equivalent constraint, valid PEP 440 syntax).poetry.lock: regenerated (poetry lock) to match — only thepython-versions/content-hashmetadata lines changed.Test plan
poetry buildsucceedspython -m twine check dist/*— PASSED on both sdist and wheel (previously this metadata shape is what PyPI itself rejects)PKG-INFOnow hasRequires-Python: >=3.9.2,<4.0.0poetry run poe lint— all checks pass (isort, black, flake8, mypy)poetry run poe test— 15 passed, 1 skipped, 2 pre-existing failures unrelated to this change (they depend on a local httpbin-style server onlocalhost:8080not present in this environment; confirmed they fail identically on unmodifiedmain)Once merged, the next conventional-commit release to
mainshould finally reach PyPI (superseding the never-published6.9.1).🤖 Generated with Claude Code