Update dependency semver to v3.1.2 #14

Open
renovate wants to merge 1 commit from renovate/semver-3.x into main
Collaborator

This PR contains the following updates:

Package Change Age Confidence
semver (changelog) ==3.0.4 → ==3.1.2 age confidence

⚠️ Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

python-semver/python-semver (semver)

v3.1.2

Compare Source

=============

:Released: 2026-11-15
:Maintainer: Tom Schraitle

Deprecations

  • :gh:506: Equality comparisons between :class:~semver.version.Version instances and strings, bytes, tuples,
    or lists now issue a :py:exc:DeprecationWarning and will be removed in semver 4.
    :class:~semver.version.Version remains hashable, but do not mix these types as dictionary keys or
    set elements during the transition. Convert strings and bytes with
    :meth:~semver.version.Version.parse and tuples or lists with Version(*parts).

Trivial Changes

  • :gh:511: :meth:Version.compare now returns early when both prerelease parts are equal,
    or when only one version has a prerelease. This makes comparisons and sorting faster.

v3.1.1

Compare Source

=============

:Released: 2026-11-09
:Maintainer: Tom Schraitle

Bug Fixes

  • :pr:483: Fix :meth:~semver.Version.bump_prerelease and :meth:~semver.Version.bump_build to raise a :class:ValueError when the token argument is not a valid dot-separated SemVer identifier (for example build+meta or rc.). Previously such tokens were concatenated unchecked, producing version strings that :meth:~semver.Version.parse itself would reject.

  • :pr:486: Fix :meth:~semver.Version.next_version to drop the build metadata when incrementing an old-style prerelease without a dot separator (for example rc3). Previously 1.2.3-rc3+build.5 became 1.2.3-rc4+build.5 while 1.2.3-rc.3+build.5 became 1.2.3-rc.4.

  • :pr:489: Version.next_version now validates used prerelease tokens and matches token
    families literally. Invalid tokens raise ValueError. Dotted prefixes advance
    correctly while existing qualifier chains and legacy counters are preserved.

  • :pr:495: The type annotation of Version.is_valid() now includes its existing support for UTF-8 encoded byte strings.

  • :pr:501: Version.replace() now preserves the original constructor TypeError
    when an existing version component receives an invalid value, rather than
    reporting zero unexpected keyword arguments.

  • :pr:508: Version subscripts now accept objects implementing __index__ and raise
    TypeError for invalid key types.

  • :gh:484: Fix :meth:~semver.Version.next_version to correctly increment old-style prerelease versions without a dot separator (for example rc3). Previously, calling next_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 raises
    ValueError because of Python's integer string conversion limit.

  • :gh:497: Version.next_version("prerelease", prerelease_token=...) now advances the
    patch version when switching tokens would otherwise produce a lower version.
    For example, switching from 1.2.3-rc.1 to alpha returns
    1.2.4-alpha.1. Forward token changes retain the current patch version.

  • :gh:499: Version.next_version("prerelease") now advances the patch version when
    incrementing an old-style prerelease counter would produce an older version.
    For example, 1.2.3-rc9 becomes 1.2.4-rc10. The legacy token and
    incremented counter are preserved; increments that already move forward keep
    the current patch version.

Trivial Changes

  • :pr: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:pysemver return code for an invalid version, and the :func:deprecated() messages.

v3.1.0

Compare Source

=============

:Released: 2026-09-12
:Maintainer: Tom Schraitle

Bug Fixes

  • :pr:478: Version.parse() and Version.is_valid() now reject non-ASCII digits and
    trailing newlines, in accordance with the SemVer grammar. Optional minor and
    patch parsing applies the same character restrictions.

  • :pr:479: Comparing a :class:~semver.Version with a dict, tuple, or list that 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 from Version.__init__. The comparison operators now return :py:const:NotImplemented for such operands, following the general rule for invalid comparison operand types: equality evaluates to False and 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 .0 to 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+alpha is bumped to 1.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_prerelease will now add .0 to an
    existing prerelease when the last segment of the current prerelease, split by
    dots (.), is not numeric. This is to ensure the new prerelease is considered
    higher than the previous one.

    :meth:~semver.version.Version.bump_prerelease now also support an argument
    bump_when_empty which will bump the patch version if there is no existing
    prerelease, to ensure the resulting version is considered a higher version than
    the previous one.

Features

  • :pr:476: Added optional [native] extra to accelerate parsing on CPython via the
    fast-semver-rs-backend package. 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

  • :gh:463: Remove double code in :meth:Version.bump_build
: Improve test coverage to 100% by ignoring the optional Rust backend fallback.

Improve test suite for comparisons and fix test coverage.

Suppress deprecation warnings in test suite.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 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.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate CLI.

This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [semver](https://github.com/python-semver/python-semver) ([changelog](https://python-semver.readthedocs.io/en/latest/changelog.html)) | `==3.0.4` → `==3.1.2` | ![age](https://developer.mend.io/api/mc/badges/age/pypi/semver/3.1.2?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/semver/3.0.4/3.1.2?slim=true) | --- > ⚠️ **Warning** > > Some dependencies could not be looked up. Check the [Dependency Dashboard](issues/8) for more information. --- ### Release Notes <details> <summary>python-semver/python-semver (semver)</summary> ### [`v3.1.2`](https://github.com/python-semver/python-semver/blob/HEAD/CHANGELOG.rst#Version-312) [Compare Source](https://github.com/python-semver/python-semver/compare/3.1.1...3.1.2) \============= :Released: 2026-11-15 :Maintainer: Tom Schraitle ## Deprecations - :gh:`506`: Equality comparisons between :class:`~semver.version.Version` instances and strings, bytes, tuples, or lists now issue a :py:exc:`DeprecationWarning` and will be removed in semver 4. :class:`~semver.version.Version` remains hashable, but do not mix these types as dictionary keys or set elements during the transition. Convert strings and bytes with :meth:`~semver.version.Version.parse` and tuples or lists with `Version(*parts)`. ## Trivial Changes - :gh:`511`: :meth:`Version.compare` now returns early when both prerelease parts are equal, or when only one version has a prerelease. This makes comparisons and sorting faster. *** ### [`v3.1.1`](https://github.com/python-semver/python-semver/blob/HEAD/CHANGELOG.rst#Version-311) [Compare Source](https://github.com/python-semver/python-semver/compare/3.1.0...3.1.1) \============= :Released: 2026-11-09 :Maintainer: Tom Schraitle ## Bug Fixes - :pr:`483`: Fix :meth:`~semver.Version.bump_prerelease` and :meth:`~semver.Version.bump_build` to raise a :class:`ValueError` when the `token` argument is not a valid dot-separated SemVer identifier (for example `build+meta` or `rc.`). Previously such tokens were concatenated unchecked, producing version strings that :meth:`~semver.Version.parse` itself would reject. - :pr:`486`: Fix :meth:`~semver.Version.next_version` to drop the build metadata when incrementing an old-style prerelease without a dot separator (for example `rc3`). Previously `1.2.3-rc3+build.5` became `1.2.3-rc4+build.5` while `1.2.3-rc.3+build.5` became `1.2.3-rc.4`. - :pr:`489`: `Version.next_version` now validates used prerelease tokens and matches token families literally. Invalid tokens raise `ValueError`. Dotted prefixes advance correctly while existing qualifier chains and legacy counters are preserved. - :pr:`495`: The type annotation of `Version.is_valid()` now includes its existing support for UTF-8 encoded byte strings. - :pr:`501`: `Version.replace()` now preserves the original constructor `TypeError` when an existing version component receives an invalid value, rather than reporting zero unexpected keyword arguments. - :pr:`508`: `Version` subscripts now accept objects implementing `__index__` and raise `TypeError` for invalid key types. - :gh:`484`: Fix :meth:`~semver.Version.next_version` to correctly increment old-style prerelease versions without a dot separator (for example `rc3`). Previously, calling `next_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 raises `ValueError` because of Python's integer string conversion limit. - :gh:`497`: `Version.next_version("prerelease", prerelease_token=...)` now advances the patch version when switching tokens would otherwise produce a lower version. For example, switching from `1.2.3-rc.1` to `alpha` returns `1.2.4-alpha.1`. Forward token changes retain the current patch version. - :gh:`499`: `Version.next_version("prerelease")` now advances the patch version when incrementing an old-style prerelease counter would produce an older version. For example, `1.2.3-rc9` becomes `1.2.4-rc10`. The legacy token and incremented counter are preserved; increments that already move forward keep the current patch version. ## Trivial Changes - :pr:`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:`pysemver` return code for an invalid version, and the :func:`deprecated()` messages. *** ### [`v3.1.0`](https://github.com/python-semver/python-semver/blob/HEAD/CHANGELOG.rst#Version-310) [Compare Source](https://github.com/python-semver/python-semver/compare/3.0.4...3.1.0) \============= :Released: 2026-09-12 :Maintainer: Tom Schraitle ## Bug Fixes - :pr:`478`: `Version.parse()` and `Version.is_valid()` now reject non-ASCII digits and trailing newlines, in accordance with the SemVer grammar. Optional minor and patch parsing applies the same character restrictions. - :pr:`479`: Comparing a :class:`~semver.Version` with a `dict`, `tuple`, or `list` that 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 from `Version.__init__`. The comparison operators now return :py:const:`NotImplemented` for such operands, following the general rule for invalid comparison operand types: equality evaluates to `False` and 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 `.0` to 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+alpha` is bumped to `1.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_prerelease` will now add `.0` to an existing prerelease when the last segment of the current prerelease, split by dots (`.`), is not numeric. This is to ensure the new prerelease is considered higher than the previous one. :meth:`~semver.version.Version.bump_prerelease` now also support an argument `bump_when_empty` which will bump the patch version if there is no existing prerelease, to ensure the resulting version is considered a higher version than the previous one. ## Features - :pr:`476`: Added optional `[native]` extra to accelerate parsing on CPython via the `fast-semver-rs-backend` package. 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 - :gh:`463`: Remove double code in :meth:`Version.bump_build` : Improve test coverage to 100% by ignoring the optional Rust backend fallback. : Improve test suite for comparisons and fix test coverage. : Suppress deprecation warnings in test suite. </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **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. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC42NS41IiwidXBkYXRlZEluVmVyIjoiNDQuNjUuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
Update dependency semver to v3.1.0
Some checks failed
renovate/artifacts Artifact file update failure
e3633ae639
Author
Collaborator

⚠️ 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:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: requirements.txt
Post-upgrade command 'python -m fragcha renovate --data-file $RENOVATE_POST_UPGRADE_COMMAND_DATA_FILE' has not been added to the allowed list in allowedCommands
### ⚠️ 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: - any of the package files in this branch needs updating, or - the branch becomes conflicted, or - you click the rebase/retry checkbox if found above, or - you rename this PR's title to start with "rebase!" to trigger it manually The artifact failure details are included below: ##### File name: requirements.txt ``` Post-upgrade command 'python -m fragcha renovate --data-file $RENOVATE_POST_UPGRADE_COMMAND_DATA_FILE' has not been added to the allowed list in allowedCommands ```
renovate force-pushed renovate/semver-3.x from e3633ae639
Some checks failed
renovate/artifacts Artifact file update failure
to 921b4067bc
Some checks failed
renovate/artifacts Artifact file update failure
2026-11-09 13:32:45 +01:00
Compare
renovate changed title from Update dependency semver to v3.1.0 to Update dependency semver to v3.1.1 2026-11-09 13:32:46 +01:00
renovate force-pushed renovate/semver-3.x from 921b4067bc
Some checks failed
renovate/artifacts Artifact file update failure
to 30a8e901cf
Some checks failed
renovate/artifacts Artifact file update failure
2026-11-15 18:32:44 +01:00
Compare
renovate changed title from Update dependency semver to v3.1.1 to Update dependency semver to v3.1.2 2026-11-15 18:32:46 +01:00
Some checks failed
renovate/artifacts Artifact file update failure
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin renovate/semver-3.x:renovate/semver-3.x
git switch renovate/semver-3.x

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.

git switch main
git merge --no-ff renovate/semver-3.x
git switch renovate/semver-3.x
git rebase main
git switch main
git merge --ff-only renovate/semver-3.x
git switch renovate/semver-3.x
git rebase main
git switch main
git merge --no-ff renovate/semver-3.x
git switch main
git merge --squash renovate/semver-3.x
git switch main
git merge --ff-only renovate/semver-3.x
git switch main
git merge renovate/semver-3.x
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kjh/fragcha!14
No description provided.