Add optional native parser backend (minimal adapter) - #1
Closed
lowmiaq-gmail wants to merge 2 commits into
Closed
lowmiaq-gmail wants to merge 2 commits into
lowmiaq-gmail wants to merge 2 commits into
Conversation
Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
Owner
Author
|
Opened against the fork by mistake. Upstream PR: python-semver#476 |
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.
Fixes python-semver#474
Summary
This PR implements the minimal adapter for an optional native parser backend as proposed in python-semver#474. The implementation is intentionally small to minimize maintenance footprint:
pip install python-semver[native]fast-semver-rs-backend) is maintained separately by the contributorChanges
pyproject.toml: Add[project.optional-dependencies]withnativeextra pointing tofast-semver-rs-backend>=0.1.1(CPython only)src/semver/version.py: Optional import of native backend; use it inVersion.parse()only when:optional_minor_and_patchmode (Python-only feature)tests/test_optional_native_backend.py: Tests for backend presence and fallback behaviorCompatibility
Maintenance model
python-semvermaintains only the thin adapter (this PR)Verification
Per python-semver#474:
Reviewer guidance
@tomschr: This PR focuses exclusively on the maintenance footprint of the adapter itself. The backend implementation, wheels, and benchmarks are provided as context in python-semver#474 but are not part of this review scope. Please evaluate:
Performance evidence and detailed backend verification are documented in the original issue.