Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds PEP 440 version parsing functionality to picopip, enabling version comparison and ordering without external dependencies. The implementation provides a practical subset of PEP 440, excluding rarely-used features like epochs and local versions.
- Implements
parse_version()function that returns a comparable tuple representation - Adds comprehensive test suite covering version ordering, equivalence, and edge cases
- Updates documentation with usage examples and API description
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/picopip.py | Adds parse_version() function and _VersionParser class implementing PEP 440 version comparison logic with regex-based parsing and offset-based ordering |
| tests/test_version_ordering.py | Comprehensive test suite covering version sorting, equivalence, stage ordering, error cases, and edge cases for the new version parsing functionality |
| ruff.toml | Adds linter rule exceptions (EM101, EM102, TRY003, RUF012) to accommodate error message patterns used in the new code |
| README.md | Documents the new parse_version() function with usage examples demonstrating version comparison capabilities |
| .github/workflows/tests.yml | Adds Python 3.14 to the test matrix for future compatibility |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Implement support for parsing versions of packages published on PyPi.
The focus on published packages means we can make it simpler by ignoring
localreleases.Also as they are rarely if ever released, and are only used in development environments, we can also avoid support for combined dev versions of pre releases (IE:
1.2.3alpha5.dev12)