Update dependency semver to v3.1.2 #14
Loading…
Reference in a new issue
No description provided.
Delete branch "renovate/semver-3.x"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
==3.0.4→==3.1.2Release Notes
python-semver/python-semver (semver)
v3.1.2Compare Source
=============
:Released: 2026-11-15
:Maintainer: Tom Schraitle
Deprecations
506: Equality comparisons between :class:~semver.version.Versioninstances and strings, bytes, tuples,or lists now issue a :py:exc:
DeprecationWarningand will be removed in semver 4.:class:
~semver.version.Versionremains hashable, but do not mix these types as dictionary keys orset elements during the transition. Convert strings and bytes with
:meth:
~semver.version.Version.parseand tuples or lists withVersion(*parts).Trivial Changes
511: :meth:Version.comparenow returns early when both prerelease parts are equal,or when only one version has a prerelease. This makes comparisons and sorting faster.
v3.1.1Compare Source
=============
:Released: 2026-11-09
:Maintainer: Tom Schraitle
Bug Fixes
:pr:
483: Fix :meth:~semver.Version.bump_prereleaseand :meth:~semver.Version.bump_buildto raise a :class:ValueErrorwhen thetokenargument is not a valid dot-separated SemVer identifier (for examplebuild+metaorrc.). Previously such tokens were concatenated unchecked, producing version strings that :meth:~semver.Version.parseitself would reject.:pr:
486: Fix :meth:~semver.Version.next_versionto drop the build metadata when incrementing an old-style prerelease without a dot separator (for examplerc3). Previously1.2.3-rc3+build.5became1.2.3-rc4+build.5while1.2.3-rc.3+build.5became1.2.3-rc.4.:pr:
489:Version.next_versionnow validates used prerelease tokens and matches tokenfamilies literally. Invalid tokens raise
ValueError. Dotted prefixes advancecorrectly while existing qualifier chains and legacy counters are preserved.
:pr:
495: The type annotation ofVersion.is_valid()now includes its existing support for UTF-8 encoded byte strings.:pr:
501:Version.replace()now preserves the original constructorTypeErrorwhen an existing version component receives an invalid value, rather than
reporting zero unexpected keyword arguments.
:pr:
508:Versionsubscripts now accept objects implementing__index__and raiseTypeErrorfor invalid key types.:gh:
484: Fix :meth:~semver.Version.next_versionto correctly increment old-style prerelease versions without a dot separator (for examplerc3). Previously, callingnext_version("prerelease")on such versions would reset the prerelease number to 1 instead of incrementing it.:gh:
487: Comparing versions with long numeric prerelease identifiers no longer raisesValueErrorbecause of Python's integer string conversion limit.:gh:
497:Version.next_version("prerelease", prerelease_token=...)now advances thepatch version when switching tokens would otherwise produce a lower version.
For example, switching from
1.2.3-rc.1toalphareturns1.2.4-alpha.1. Forward token changes retain the current patch version.:gh:
499:Version.next_version("prerelease")now advances the patch version whenincrementing an old-style prerelease counter would produce an older version.
For example,
1.2.3-rc9becomes1.2.4-rc10. The legacy token andincremented counter are preserved; increments that already move forward keep
the current patch version.
Trivial Changes
502: Add tests for six behaviours that mutation testing showed were not covered: :func:match()at the boundary version, build metadata in :func:is_compatible(), numeric-only prereleases in :func:bump_prerelease(), the :command:pysemverreturn code for an invalid version, and the :func:deprecated()messages.v3.1.0Compare Source
=============
:Released: 2026-09-12
:Maintainer: Tom Schraitle
Bug Fixes
:pr:
478:Version.parse()andVersion.is_valid()now reject non-ASCII digits andtrailing newlines, in accordance with the SemVer grammar. Optional minor and
patch parsing applies the same character restrictions.
:pr:
479: Comparing a :class:~semver.Versionwith adict,tuple, orlistthat cannot construct a valid version (for example, an empty collection, wrong number of parts, non-numeric parts, or unknown keys) no longer raises internal errors fromVersion.__init__. The comparison operators now return :py:const:NotImplementedfor such operands, following the general rule for invalid comparison operand types: equality evaluates toFalseand ordering raises Python's standard :py:exc:TypeError(for example,'>' not supported between instances of 'Version' and 'dict').:pr:
480: (:meth:~semver.version.Version.bump_build) will now add.0to an existing build when the last segment of the current build metadata, split by dots (.), is not numeric. This is to ensure the bumped version contains a raised build instead of silently returning an unchanged version. For example,1.2.3+alphais bumped to1.2.3+alpha.0. This mirrors the corresponding fix for the prerelease part (:gh:460). Related to :gh:466.:gh:
460: :meth:~semver.version.Version.bump_prereleasewill now add.0to anexisting prerelease when the last segment of the current prerelease, split by
dots (
.), is not numeric. This is to ensure the new prerelease is consideredhigher than the previous one.
:meth:
~semver.version.Version.bump_prereleasenow also support an argumentbump_when_emptywhich will bump the patch version if there is no existingprerelease, to ensure the resulting version is considered a higher version than
the previous one.
Features
476: Added optional[native]extra to accelerate parsing on CPython via thefast-semver-rs-backendpackage. The pure-Python parser remains the default;the native backend is opt-in and only available on CPython.
Internal Changes
: Update GitHub Actions for astral-sh/setup-uv (version 0.10.1), github/codeql-action (version 4)
Trivial Changes
463: Remove double code in :meth:Version.bump_buildImprove test suite for comparisons and fix test coverage.
Suppress deprecation warnings in test suite.
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate CLI.
⚠️ Artifact update problem
Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.
♻ Renovate will retry this branch, including artifacts, only when one of the following happens:
The artifact failure details are included below:
File name: requirements.txt
e3633ae639921b4067bcUpdate dependency semver to v3.1.0to Update dependency semver to v3.1.1921b4067bc30a8e901cfUpdate dependency semver to v3.1.1to Update dependency semver to v3.1.2View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.