NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #355 most downloaded on PyPI
Python helper for Semantic Versioning (https://semver.org)
Last release 23 days ago
12 Sep 2026
Release timing varies
gaps range from 9 days to 1.6 years
Some releases are documented
notes for 15 of 42 stable releases
1 version withdrawn
withdrawn after publishing
14 years old
48 releases · first in 2012
Fix #463 : Remove duplicate code Version.bump_build by @tomschr in #464
Full Changelog: 3.0.4...3.1.0
Documentation: https://python-semver.readthedocs.io/en/latest/
One column per quarter.
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.
479: Comparing a ~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 NotImplemented for such operands, following the general rule for invalid comparison operand types: equality evaluates to False and ordering raises Python's standard TypeError (for example, '>' not supported between instances of 'Version' and 'dict').
480: (~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 (460). Related to 466.
460: ~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.
~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.
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.
: Update GitHub Actions for astral-sh/setup-uv (version 0.10.1), github/codeql-action (version 4)
463: Remove double code in 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.
Documentation: https://python-semver.rtfd.io/en/3.0.4/ PyPI: https://pypi.org/project/semver/3.0.4/ Full Changelog: 3.0.3...3.0.4
Documentation: https://python-semver.rtfd.io/en/3.0.4/
PyPI: https://pypi.org/project/semver/3.0.4/
Full Changelog: 3.0.3...3.0.4
Thanks to @RobPasMue and @mgorny ❤️
459: Fix 3.0.3:
457: Re-enable Trove license identifier
456: Fix source dist file
Documentation: https://python-semver.rtfd.io/en/3.0.3/ PyPI : https://pypi.org/project/semver/3.0.3/ (yanked release) Full Changelog : 3.0.2...3.0.3
Documentation: https://python-semver.rtfd.io/en/3.0.3/
PyPI: https://pypi.org/project/semver/3.0.3/ (yanked release)
Full Changelog: 3.0.2...3.0.3
_nat_cmp() method by @tomschr in #445453: The check in _comparator does not match the check in Version.compare. This breaks comparision with subclasses.
435: Several small improvements for documentation:
Add meta description to improve SEO
Use canonicals on ReadTheDocs (commit 87f639f)
Pin versions for reproducable doc builds (commit 03fb990)
Add missing .readthedocs.yaml file (commit ec9348a)
Correct some smaller issues when building (commit f65feab)
436: Move search box more at the top. This makes it easier for users as if the TOC is long, the search box isn't visible anymore.
439: Improve type hints to fix TODOs
440: Update workflow file
446: Add Python 3.13 to GitHub Actions
447: Modernize project configs with pyproject.toml and use Astral's uv command.
In pyproject.toml:
Move all project related data from setup.cfg to pyproject.toml
Use new dependency group from 735
Consolidate flake8, isort, pycodestyle with ruff
Split towncrier config type "trivial" into "trivial" and "internal"
Create config file for ruff (.ruff.toml)
Create config file for pytest (.pytest.ini)
Simplify tox.ini and remove old stuff
Document installation with new uv command
Simplify Sphinx config with find_version()
Update the authors
Use uv in GitHub Action python-testing.yml workflow
Update release-procedure.md.
451: Turn our Markdown issue templates into YAML
438: Replace organization placeholder in license
445: Improve private _nat_cmp method:
Remove obsolete else.
Find a better way to identify digits without the re module.
Fix docstring in Version.compare
Documentation: https://python-semver.rtfd.io/en/3.0.2/ PyPI : https://pypi.org/project/semver/3.0.2/ Full Changelog : 3.0.1...3.0.2 Full Changelog bet
Documentation: https://python-semver.rtfd.io/en/3.0.2/
PyPI: https://pypi.org/project/semver/3.0.2/
Full Changelog: 3.0.1...3.0.2
Full Changelog between last 2 release and 3: 3.0.1...3.0.2
Full Changelog: 3.0.1...3.0.2
418: Replace ~collection.OrderedDict with dict.
The dict datatype is ordered since Python 3.7. As we do not support Python 3.6 anymore, it can be considered safe to avoid ~collection.OrderedDict. Related to 419.
426: Fix ~semver.version.Version.replace method to use the derived class of an instance instead of ~semver.version.Version class.
431: Clarify version policy for the different semver versions (v2, v3, >v3) and the supported Python versions.
432: Improve external doc links to Python and Pydantic.
417: Amend GitHub Actions to check against MacOS.
420: Introduce ~typing.ClassVar for some ~semver.version.Version class variables, mainly ~semver.version.Version.NAMES and some private.
421: Insert mypy configuration into pyproject.toml and remove config options from tox.ini.
Released : 2023-10-09 Maintainer : Tom Schraitle
PR #418 : Replace OrderedDict with dict .
The dict datatype is ordered since Python 3.7. As we do not support Python 3.6 anymore, it can be considered safe to avoid OrderedDict . Related to #419 .
PR #426 : Fix replace() method to use the derived class of an instance instead of Version class.
PR #431 : Clarify version policy for the different semver versions (v2, v3, >v3) and the supported Python versions.
#432 : Improve external doc links to Python and Pydantic.
PR #417 : Amend GitHub Actions to check against MacOS.
PR #420 : Introduce ClassVar for some Version class variables, mainly NAMES and some private.
PR #421 : Insert mypy configuration into pyproject.toml and remove config options from tox.ini .
Documentation: https://python-semver.rtfd.io/en/3.0.1/ PyPI : https://pypi.org/project/semver/3.0.1/ Full Changelog : 3.0.0...3.0.1 Full Changelog bet
Related pr: #413
Documentation: https://python-semver.rtfd.io/en/3.0.1/
PyPI: https://pypi.org/project/semver/3.0.1/
Full Changelog: 3.0.0...3.0.1
Full Changelog between last 2 release and 3: 2.13.0...3.0.1
next_version by @treee111 in #406__all__ export. Fix #410 by @Soneji in #411Full Changelog: 3.0.0...3.0.1
410: Export functions properly using __all__ in __init__.py.
Fix #258 : Keep semver._deprecated.compare by @tomschr in #402
Related pr: #403
Documentation: https://python-semver.rtfd.io/en/3.0.0/
PyPI: https://pypi.org/project/semver/3.0.0/
Full Changelog: 3.0.0-rc.1...3.0.0
Full Changelog between last 2 release and 3: 2.13.0...3.0.0
291: Disallow negative numbers in VersionInfo arguments for major, minor, and patch.
310: Rework API documentation. Follow a more "semi-manual" attempt and add auto directives into docs/api.rst.
344: Allow empty string, a string with a prefix, or None as token in ~semver.version.Version.bump_build and ~semver.version.Version.bump_prerelease.
374: Correct Towncrier's config entries in the pyproject.toml file. The old entries [[tool.towncrier.type]] are deprecated and need to be replaced by [tool.towncrier.fragment.<TYPE>].
384: General cleanup, reformat files:
Reformat source code with black again as some config options did accidentely exclude the semver source code. Mostly remove some includes/excludes in the black config.
Integrate concurrency in GH Action
Ignore Python files on project dirs in .gitignore
Remove unused patterns in MANIFEST.in
Use extend-exclude for flake in setup.cfg` and adapt list.
Use skip_install=True in tox.ini for black
393: Fix command python -m semver to avoid the error "invalid choice"
396: Calling ~semver.version.Version.parse on a derived class will show correct type of derived class.
169: Deprecate CLI functions not imported from semver.cli.
234: In setup.py simplified file and remove Tox and Clean classes
284: Deprecate the use of ~Version.isvalid.
Rename ~semver.version.Version.isvalid to ~semver.version.Version.is_valid for consistency reasons with ~semver.version.Version.is_compatible.
290: For semver 3.0.0-alpha0 deprecated:
Remove anything related to Python2
In tox.ini and .travis.yml Remove targets py27, py34, py35, and pypy. Add py38, py39, and nightly (allow to fail)
In setup.py simplified file and remove Tox and Clean classes
Remove old Python versions (2.7, 3.4, 3.5, and pypy) from Travis
372: Deprecate support for Python 3.6.
Python 3.6 reached its end of life and isn't supported anymore. At the time of writing (Dec 2022), the lowest version is 3.7.
Although the poll didn't cast many votes, the majority agreed to remove support for Python 3.6.
Although it breaks consistency with module level functions, it seems it's a much needed/used function. It's still unclear if we should deprecate this function or not (that's why we use PendingDeprecationWarning).
As we don't have a uniform initializer yet, this function stays in the _deprecated.py file for the time being until we find a better solution. See 258 for details.
169: Create semver package and split code among different modules in the packages:
Remove semver.py
Create src/semver/__init__.py
Create src/semver/cli.py for all CLI methods
Create src/semver/_deprecated.py for the deprecated decorator and other deprecated functions
Create src/semver/__main__.py to allow calling the CLI using python -m semver
Create src/semver/_types.py to hold type aliases
Create src/semver/version.py to hold the Version class (old name VersionInfo) and its utility functions
Create src/semver/__about__.py for all the metadata variables
213: Add typing information
284: Implement ~semver.version.Version.is_compatible to make "is self compatible with X".
305: Rename ~semver.version.VersionInfo to ~semver.version.Version but keep an alias for compatibility
359: Add optional parameter optional_minor_and_patch in ~semver.version.Version.parse to allow optional minor and patch parts.
362: Make ~semver.version.Version.match accept a bare version string as match expression, defaulting to equality testing.
364: Enhance pyproject.toml to make it possible to use the pyproject-build command from the build module. For more information, see build-semver.
365: Improve pyproject.toml.
Use setuptools, add metadata. Taken approach from A Practical Guide to Setuptools and Pyproject.toml.
Doc: Describe building of semver
Remove .travis.yml in MANIFEST.in (not needed anymore)
Distinguish between Python 3.6 and others in tox.ini
Add skip_missing_interpreters option for tox.ini
GH Action: Upgrade setuptools and setuptools-scm and test against 3.11.0-rc.2
276: Document how to create a sublass from ~semver.version.VersionInfo class
284: Document deprecation of ~semver.version.Version.isvalid.
290: Several improvements in the documentation:
New layout to distinguish from the semver2 development line.
Create new logo.
Remove any occurances of Python2.
Describe changelog process with Towncrier.
Update the release process.
304: Several improvements in documentation:
Reorganize API documentation.
Add migration chapter from semver2 to semver3.
Distinguish between changlog for version 2 and 3
305: Add note about ~semver.version.Version rename.
312: Rework "Usage" section.
Mention the rename of ~semver.version.VersionInfo to ~semver.version.Version class
Remove semver. prefix in doctests to make examples shorter
Correct some references to dunder methods like ~semver.version.Version.__getitem__, ~semver.version.Version.__gt__ etc.
Remove inconsistencies and mention module level function as deprecated and discouraged from using
Make empty super call in semverwithvprefix.py example
315: Improve release procedure text
335: Add new section "Converting versions between PyPI and semver" the limitations and possible use cases to convert from one into the other versioning scheme.
340: Describe how to get version from a file
343: Describe combining Pydantic with semver in the "Advanced topic" section.
350: Restructure usage section. Create subdirectory "usage/" and splitted all section into different files.
351: Introduce new topics for:
"Migration to semver3"
"Advanced topics"
392: Fix the example in the documentation for combining semver and pydantic.
169: Adapted infrastructure code to the new project layout.
Replace setup.py with setup.cfg because the setup.cfg is easier to use
Adapt documentation code snippets where needed
Adapt tests
Changed the deprecated to hardcode the semver package name in the warning.
Increase coverage to 100% for all non-deprecated APIs
290: Add supported Python versions to black.
304: Support PEP-561 py.typed.
According to the mentioned PEP:
"Package maintainers who wish to support type checking of their code MUST add a marker file named py.typed to their package supporting typing."
Add package_data to setup.cfg to include this marker in dist and whl file.
309: Some (private) functions from the semver.version module has been changed.
The following functions got renamed:
function semver.version.comparator got renamed to semver.version._comparator as it is only useful inside the ~semver.version.Version class.
function semver.version.cmp got renamed to semver.version._cmp as it is only useful inside the ~semver.version.Version class.
The following functions got integrated into the ~semver.version.Version class:
function semver.version._nat_cmd as a classmethod
function semver.version.ensure_str
313: Correct tox.ini for changelog entry to skip installation for semver. This should speed up the execution of towncrier.
316: Comparisons of ~semver.version.Version class and other types return now a NotImplemented constant instead of a TypeError exception.
The NotImplemented section of the Python documentation recommends returning this constant when comparing with __gt__, __lt__, and other comparison operators to "to indicate that the operation is not implemented with respect to the other type".
319: Introduce stages in .travis.yml The config file contains now two stages: check and test. If check fails, the test stage won't be executed. This could speed up things when some checks fails.
322: Switch from Travis CI to GitHub Actions.
347: Support Python 3.10 in GitHub Action and other config files.
378: Fix some typos in Towncrier configuration
388: For pytest, switch to the more modern importlib approach as it doesn't require to modify sys.path: https://docs.pytest.org/en/7.2.x/explanation/pythonpath.html
389: Add public class variable Version.NAMES.
This class variable contains a tuple of strings that contains the names of all attributes of a Version (like "major", "minor" etc).
In cases we need to have dynamical values, this makes it easier to iterate.
Correct docstrings on some deprecated functions
Related pr: #399
Documentation: https://python-semver.rtfd.io/en/3.0.0-rc.1/
PyPI: https://pypi.org/project/semver/3.0.0rc1/
Full Changelog: 3.0.0-dev.4...3.0.0-rc.1
python -m semver commands fail with 'error: invalid choice:' by @zanecodes in #393Apart from the above issues/pull request, for this release there were made some additional changes:
changelog.d entries and integrate it into CHANGELOGchangelog-semver3-devel.rst:meth: consistently for semver.Version methodsThanks to all! ❤️
Documentation: https://python-semver.rtfd.io/en/3.0.0-dev.4/ Full Changelog: 3.0.0-dev.3...3.0.0-dev.4 PyPI: https://pypi.org/project/semver/3.0.0dev4
Related pr: #385
Released
2022-12-20
Maintainer
Tom Schraitle
Documentation: https://python-semver.rtfd.io/en/3.0.0-dev.4/
Full Changelog: 3.0.0-dev.3...3.0.0-dev.4
PyPI: https://pypi.org/project/semver/3.0.0dev4/
[[tool.towncrier.type]] are deprecated and need to be replaced by [tool.towncrier.fragment.<TYPE>].#372: Deprecate support for Python 3.6
Python 3.6 reached its end of life and isn’t supported anymore. At the time of writing (Dec 2022), the lowest version is 3.7.
Although the poll didn’t cast many votes, the majority agree to remove support for Python 3.6.
optional_minor_and_patch in Version.parse() to allow optional minor and patch parts.Version.match() accept a bare version string as match expression, defaulting to equality testing..travis.yml in MANIFEST.in (not needed anymore)(in alphabetical order)
Thanks to all! ❤️
Remove inconsistencies and mention module level function as deprecated and discouraged from using
Related pr: #315
Released
2022-01-20
Maintainer
Tom Schraitle
Documentation: https://python-semver.rtfd.io/en/3.0.0-dev.3/
Full Changelog: 3.0.0-dev.2...3.0.0-dev.3
docs/api.rst.#312: Rework “Usage” section.
VersionInfo to Version class, but keep the old name as aliassemver. prefix in doctests to make examples shorter__getitem__(), __gt__() etc.super() call in semverwithvprefix.py example#315: Improve release procedure text
#337: Improve documentation for semver max/min
#309: Some (private) functions from the semver.version module has been changed.
The following functions got renamed as it is only useful inside the Version class:
semver.version.comparator got renamed to semver.version._comparator()semver.version.cmp got renamed to semver.version._cmp()The following functions got integrated into the Version class:
semver.version._nat_cmd as a class methodsemver.version.ensure_str#313: Correct tox.ini for changelog entry to skip installation for semver. This should speed up the execution of towncrier.
#316: Comparisons of Version class and other types return now a NotImplemented constant instead of a TypeError exception.
The NotImplemented section of the Python documentation recommends returning this constant when comparing with __gt__, __lt__, and other comparison operators to “to indicate that the operation is not implemented with respect to the other type”.
#319: Introduce stages in .travis.yml.
#322: Switch from Travis CI to GitHub Actions.
#347: Support Python 3.10 in GitHub Action and other config files.
Start supporting Python 3.10
(in alphabetical order)
Thanks to all! ❤️
Create src/semver/_deprecated.py for the deprecated decorator and other deprecated functions
Related pr: #307
Released
2020-11-01
Maintainer
Tom Schraitle
Documentation: https://python-semver.rtfd.io/en/3.0.0-dev.2/
Full Changelog: 3.0.0-dev.1...3.0.0-dev.2
semver.cli.semver.pysrc/semver/__init__.pysrc/semver/cli.py for all CLI methodssrc/semver/_deprecated.py for the deprecated decorator and other deprecated functionssrc/semver/__main__.py to allow calling the CLI using python -m semversrc/semver/_types.py to hold type aliasessrc/semver/version.py to hold the Version class (old name VersionInfo) and its utility functionssrc/semver/__about__.py for all the metadata variablesVersionInfo to Version but keep an alias for compatibilityVersion rename.#169: Adapted infrastructure code to the new project layout.
setup.py with setup.cfg because thesetup.cfg is easier to usedeprecated to hardcode the semver package name in the warning.Increase coverage to 100% for all non-deprecated APIs
#304: Support PEP-561 py.typed.
According to the mentioned PEP:
"Package maintainers who wish to support type checking of their
code MUST add a marker file namedpy.typedto their
package supporting typing."
Add package_data to setup.cfg to include this marker in dist and whl file.
(in alphabetical order)
Thanks to all! ❤️
Documentation https://python-semver.rtfd.io/en/3.0.0-dev.1/
Related pr: #295
Released
2020-10-26
Maintainer
Tom Schraitle
Documentation https://python-semver.rtfd.io/en/3.0.0-dev.1/
tox.ini and .travis.yml Remove targets py27, py34, py35, and pypy. Add py38, py39, and nightly (allow to fail)setup.py simplified file and remove Tox and Clean classessetup.py simplified file and remove Tox and Clean classesREADME.rst, mention maintenance branch maint/v2.setup.py. Requires Python >=3.6.* Extract metadata directly from source (affects all the __version__, __author__ etc. variables)changelog.d/.gitignore to keep this directorychangelog.d/README.rst with some descriptionschangelog.d/_template.rst as Towncrier template[tool.towncrier] section in pyproject.tomltox.ini. Use it like tox -e changelog -- CMD whereas CMD is a Towncrier command. The default tox -e changelog calls Towncrier to create a draft of the changelog file and output it to stdout.changelog.d/README.rst.VersionInfo arguments for major, minor, and patch.black.(in alphabetical order)
Thanks to all! ❤️
Documentation https://python-semver.rtfd.io/en/2.13.0
Related pr: #295
Released 2020-10-20
Maintainer Tom Schraitle
Documentation https://python-semver.rtfd.io/en/2.13.0
(in alphabetical order)
Thanks to all! :heart:
Documentation https://python-semver.rtfd.io/en/2.12.0
Related pr: #294
Released 2020-10-19
Maintainer Tom Schraitle
Documentation https://python-semver.rtfd.io/en/2.12.0
n/a
n/a
n/a
Documentation https://python-semver.rtfd.io/en/2.11.0
Related pr: #288
Released 2020-10-18
Maintainer Tom Schraitle
Documentation https://python-semver.rtfd.io/en/2.11.0
n/a
n/a
(in alphabetical order)
@Anvil @eli-darkly @tlaferriere
Thanks to all! :heart:
Documentation https://python-semver.rtfd.io/en/2.10.2
Related pr: #272
Released 2020-06-15
Maintainer Tom Schraitle
Documentation https://python-semver.rtfd.io/en/2.10.2
__getitem__ returning None on wrong partssemver.max_ver and semver.min_ver(in alphabetical order)
@tlaferriere
Thanks to all! :heart:
Documentation https://python-semver.rtfd.io/en/2.10.1
Related pr: #257
Released 2020-05-13
Maintainer Tom Schraitle
Documentation https://python-semver.rtfd.io/en/2.10.1
obs://.(in alphabetical order)
@gsakkis @tlaferriere
Thanks to all! :heart:
Documentation https://python-semver.rtfd.io/en/2.10.0/
Related issue: #237
Released 2020-05-05
Maintainer Tom Schraitle
Documentation https://python-semver.rtfd.io/en/2.10.0/
semver.VersionInfo.*VersionInfo.next_version() function__getitem__super() call(in alphabetical order)
@bittner @gsakkis @menschel-d @ppkt @scls19fr @tlaferriere
Thanks to all! :heart:
Documentation https://python-semver.rtfd.io/en/2.9.1/
Related issue: #218
2020-02-16
Maintainer Tom Schraitle
Documentation https://python-semver.rtfd.io/en/2.9.1/
## Features
#177 (PR #178): Fixed repository and CI links (moved https://github.com/k-bx/python-semver/ repository to https://github.com/python-semver/python-semver/)
PR #179: Added note about moving this project to the new python-semver organization on GitHub
#187 (PR #188): Added logo for python-semver organization and documentation
#191 (PR #194): Created manpage for pysemver
#196 (PR #197): Added distribution specific installation instructions
#201 (PR #202): Reformatted source code with black
#208 (PR #209): Introduce new function semver.VersionInfo.isvalid and extend pysemver with check subcommand
#210 (PR #215): Document how to deal with invalid versions
PR #212: Improve docstrings according to PEP257
## Bug Fixes
#192 (PR #193): Fixed "pysemver" and "pysemver bump" when called without arguments
## Removals
not available
Maintainer Sébastien Celles \< \>
Related issue: #134
Released 2019-10-30
Maintainer Sébastien Celles <s.celles@gmail.com>
Documentation https://python-semver.rtfd.io/en/2.9.0/
semver.VersionInfosetup.cfg for pytest and toxtox.inisemver.replace and semver.VersionInfo.replace
functionstox.iniconftest.py to improve doctests.gitignore fileSEMVER_SPEC_VERSIONtox.ini__repr__ and derive class name from typesemver.format_versionpython setup.py testMaintainer Sébastien Celles \< \>
Documentation https://python-semver.rtfd.io/en/2.8.1/
VersionInfopytest.mark.parametrizen/a
Maintainer Sébastien Celles \< \>
__str__ and __hash__test.py to test_semver.py so py.test can autodiscover test filen/a
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →