NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #958 most downloaded on PyPI
Dynamic version generation
Last release 2 months ago
02 Aug 2026
Ships fairly regularly
a new release about every 2 months
Nearly every release is documented
notes for 60 of 60 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
60 releases · first in 2019
Fixed: With highest_tag enabled, a pattern / pattern_prefix that only some tags matched could select a non-matching tag and fall back to the default v
highest_tag enabled, a pattern/pattern_prefix that only some tags matched could select a non-matching tag and fall back to the default version (e.g. 0.0.0) instead of the highest matching tag. (Contributed by Flourish3)Fixed: The highest_tag argument was ignored in Version.from_any_vcs() . ( Contributed by ninoseki )
highest_tag argument was ignored in Version.from_any_vcs(). (Contributed by ninoseki)1.0.0-beta.11.One column per quarter.
Added --highest-tag option to select the numerically highest version, even if it is not the chronologically latest tag.
--highest-tag option to select the numerically highest version, even if it is not the chronologically latest tag.Added commit_prefix option to Version.serialize() to insert a prefix when serializing commit IDs.
commit_prefix option to Version.serialize() to insert a prefix when serializing commit IDs.escape_with option to Version.serialize() to customize how branch names are escaped.Fixed: Deprecation warning from re.sub() using Python 3.13+. (Contributed by emmanuel-ferdman)
re.sub() using Python 3.13+. (Contributed by emmanuel-ferdman)Changed: Previously, for Git 2.7+, if the initial commit were both tagged and empty, Dunamai would raise an exception due to Git not reporting that ta
git log --simplify-by-decoration. Now, if a tag is missing from that list, Dunamai treats it as the oldest tag.Fixed: Version.from_git would fail if the GIT_TRACE environment variable were set, due to unexpected output from Git.
Version.from_git would fail if the GIT_TRACE environment variable were set, due to unexpected output from Git.Fixed: Version.__lt__ checked if *all* fields were less than the other instance, rather than using the proper field precedence and version ordering.
Version.__lt__ checked if all fields were less than the other instance, rather than using the proper field precedence and version ordering.Added: {major}, {minor}, and {patch} format placeholders.
{major}, {minor}, and {patch} format placeholders.Fixed: The --ignore-untracked CLI flag was ignored.
--ignore-untracked CLI flag was ignored.--commit-length option.Fixed: Some timestamps could fail to parse on Python 3.5 and 3.6.
Fixed: Distance was calculated inconsistently for Git when there were some tags and none matched the version pattern.
Generally, when Dunamai can detect the VCS in use, but there's no version set yet, then Dunamai uses 0.0.0 as a fallback, unless strict mode is enable
Generally, when Dunamai can detect the VCS in use, but there's no version set yet, then Dunamai uses 0.0.0 as a fallback, unless strict mode is enabled. This is useful for new projects that do not yet have a release.
However, if there were some tags and none matched the version pattern, then Dunamai would yield an error. That wouldn't be helpful for a new project with some non-version tag, and it could be incorrect for a monorepo with different tags for different packages.
Now, Dunamai will use 0.0.0 in this case as well, unless strict mode is enabled.
You can now specify a pattern prefix. For example, --pattern default --pattern-prefix some-package- would match tags like some-package-v1.2.3. This is useful if you just want a custom prefix without writing a whole pattern.
Added --ignore-untracked option to control checking whether the repository is dirty.
Updated Version.bump() to add a smart argument, which only bumps when distance != 0. This will also make Version.serialize() use pre-release formattin
Version.bump() to add a smart argument, which only bumps when distance != 0. This will also make Version.serialize() use pre-release formatting automatically, like calling Version.serialize(bump=True).Fixed an exception when a Git repository had a broken ref. Git would print a warning that Dunamai failed to parse.
Relaxed Python bounds from ^3.5 to >=3.5 since Python does not follow Semantic Versioning.
^3.5 to >=3.5 since Python does not follow Semantic Versioning.git log commands that did not include -c log.showsignature=false. (Contributed by pdecat)Added a --path option to inspect a directory other than the current one. The Version.from_* methods now also take a path argument.
--path option to inspect a directory other than the current one. The Version.from_* methods now also take a path argument.For Git 2.16+, --decorate-refs=refs/tags/ is now specified for git log in case you've configured log.excludeDecoration=refs/tags/.
--decorate-refs=refs/tags/ is now specified for git log in case you've configured log.excludeDecoration=refs/tags/.Added a vcs attribute to Version to indicate which VCS was detected.
vcs attribute to Version to indicate which VCS was detected.The from command will print a warning for shallow Git repositories. This becomes an error with --strict.
from command will print a warning for shallow Git repositories. This becomes an error with --strict.Version class has a new concerns field to indicate warnings with the version. Right now, the only possibility is Concern.ShallowRepository.Fixed outdated reference to pkg_resources in the docstring for get_version.
pkg_resources in the docstring for get_version.CHANGELOG.md and tests are now included in sdists.Updated Version.parse to better handle PEP 440 versions produced by Dunamai itself. Specifically, in 1.2.3.post4.dev5, the post number becomes the dis
Version.parse to better handle PEP 440 versions produced by Dunamai itself. Specifically, in 1.2.3.post4.dev5, the post number becomes the distance and the dev number is ignored. In 1.2.3.dev5, the dev number becomes the distance.increment argument to bump_version and Version.bump. (Contributed by legendof-selda)from git would report that it was not a Git project, and from any would report that it could not detect a VCS. Now, both commands report that there is dubious ownership.from any VCS detection. The error now specifies which VCSes were checked and which were not found to be installed.Added compatibility with Git versions as old as 1.8.2.3.
Fixed Git 2.7.0 compatibility by changing git log --no-show-signature to git -c log.showsignature=false log.
git log --no-show-signature to git -c log.showsignature=false log.Added a strict option to prevent falling back to 0.0.0 when there are no tags.
strict option to prevent falling back to 0.0.0 when there are no tags..git_archival.json files created by git archive..hg_archival.txt files created by hg archive.Fixed an error when parsing Git output with showSignature = true configured. (Contributed by riton)
showSignature = true configured. (Contributed by riton)Made pattern-related error messages more readable by moving the pattern after the primary message instead of mixing them.
* Added support for Pijul.
Added Pattern type for named pattern presets. Currently, this includes:
Pattern type for named pattern presets. Currently, this includes:
Pattern.Default (CLI: --pattern default) for the existing default.Pattern.DefaultUnprefixed (CLI: --pattern default-unprefixed) for the existing default, but without requiring the v prefix.tag_branch option (CLI: --tag-branch) for Git repositories. This is particularly useful for Gitflow without fast forward, where develop does not contain the tag history, so you can specify --tag-branch master.full_commit option (CLI: --full-commit) for Git and Mercurial repositories to obtain the full commit hash instead of the short form.Version.parse so that it better handles versions without the v prefix when the pattern does not (or may not) require it.from any not passing the --tag-dir option along for Subversion repositories.Fixed the --bump CLI option and the bump argument of Version.serialize bumping even on a commit with a version tag. Now, no bumping occurs on such a c
--bump CLI option and the bump argument of Version.serialize bumping even on a commit with a version tag. Now, no bumping occurs on such a commit.Explicitly specified Optional[...] typing on arguments with a default of None. (Contributed by jonathangreen)
Optional[...] typing on arguments with a default of None. (Contributed by jonathangreen)VERSION_SOURCE_PATTERN public for consumption by other tools.Added branch and timestamp to the Version class, along with associated format placeholders (branch, branch_escaped, timestamp). Branch info is not pop
Added branch and timestamp to the Version class, along with associated format placeholders (branch, branch_escaped, timestamp). Branch info is not populated for Darcs and Subversion repositories.
Fixed validation for PEP 440, where the local segment was allowed to contain any characters.
Fixed validation for Semantic Versioning, where some segments were allowed to contain these additional characters:
[ \ ] ^ _ `
Changed Version.serialize's format argument to support passing a callback. (Contributed by marnikow)
Version.serialize's format argument to support passing a callback. (Contributed by marnikow)ignore option to get_version(). (Contributed by marnikow)parser option to get_version().Version.parse(). (Contributed by marnikow)Version.bump(). (Contributed by marnikow)Changed the build backend to poetry-core. (Contributed by fabaff)
importlib-metadata for compatibility with Poetry.epoch to Version class, default tag pattern, and format placeholders.post/dev stages so that they are serialized and bumped correctly when using PEP 440.Broadened the default version tag pattern to allow more separator styles recognized in PEP 440 pre-normalized forms (-, ., and _).
-, ., and _).serialize_pep440() to normalize the alternative prerelease names (alpha -> a, beta -> b, c/pre/preview -> rc) and capitalizations (RC -> rc, etc).py.typed file for PEP-561. (Contributed by wwuck)pkg_resources dependency with packaging and importlib_metadata. (Contributed by flying-sheep)__all__.Fixed an oversight where the default version tag pattern would only find tags with exactly three parts in the base (e.g., v1.0.0 and v1.2.3). This is
Fixed an oversight where the default version tag pattern would only find tags with exactly three parts in the base (e.g., v1.0.0 and v1.2.3). This is now relaxed so that v1, v1.2.3.4, and so on are also recognized.
If you prefer the old default, you can pass a custom --pattern on the command line or a custom pattern to the Version.from_* methods. Specifically, the previous default used ^v(?P<base>\d+\.\d+\.\d+) instead of the new ^v(?P<base>\d+(\.\d+)*), but the rest of the pattern is the same in both defaults.
Added support for execution via python -m dunamai. (Contributed by jstriebel)
Fixed handling of Git tags that contain slashes. (Contributed by ioben)
Fixed handling of Git tags that contain commas.
Fixed Semantic Versioning enforcement to allow metadata segments with more than two dot-separated identifiers.
For Git, avoided use of --decorate-refs to maintain compatibility with older Git versions.
--decorate-refs to maintain compatibility with older Git versions.Improved ordering of Git tags, particularly when commit dates were not chronological. (Contributed by mariusvniekerk)
Added the --tagged-metadata option and corresponding attribute on the Version class. (Contributed by mariusvniekerk)
--tagged-metadata option and corresponding attribute on the Version class. (Contributed by mariusvniekerk)pkg_resources) for environments where it is not installed by default.For Git, replaced --porcelain=v1 with --porcelain to maintain compatibility with older Git versions.
--porcelain=v1 with --porcelain to maintain compatibility with older Git versions.Added the --bump command line option and the bump argument to Version.serialize().
--bump command line option and the bump argument to Version.serialize().Fixed ambiguous reference error when using Git if a tag and branch name were identical.
Previously, when there were not yet any version-like tags, the distance would be set to 0, so the only differentiator was the commit ID. Now, the dist
Previously, when there were not yet any version-like tags, the distance would be set to 0, so the only differentiator was the commit ID. Now, the distance will be set to the number of commits so far. For example:
Added --debug flag in the from command.
--debug flag in the from command.Added these functions to the public API:
serialize_pep440serialize_semverserialize_pvpbump_versionChanged the Version class to align with Dunamai's own semantics instead of PEP 440's semantics.
Changed the Version class to align with Dunamai's own semantics instead of PEP 440's semantics.
Previously, Version implemented all of PEP 440's features, like epochs and dev releases, even though Dunamai itself did not use epochs (unless you created your own Version instance with one and serialized it) and always set dev to 0 in the from_git/etc methods. The serialize method then tried to generalize those PEP 440 concepts to other versioning schemes, as in 0.1.0-epoch.1 for Semantic Versioning, even though that doesn't have an equivalent meaning in that scheme.
Now, the Version class implements the semantics used by Dunamai, giving it more power in the serialization to map those concepts in an appropriate way for each scheme. For example, dev0 is now only added for PEP 440 (in order to be compatible with Pip's --pre flag), but dev.0 is no longer added for Semantic Versioning because it served no purpose there.
API changes:
post has been renamed to distance, and its type is simply int rather than Optional[int]epoch and dev have been removedpre_type has been renamed to stagepre_number has been renamed to revision, and it is no longer required when specifying a stageImproved error reporting when the version control system cannot be detected and when a specified VCS is unavailable.
Improved the default regular expression for tags:
base and stage are separated by a hyphen.stage and revision are separated by a dot.stage without a revision.Fixed case with Git/Mercurial/Subversion/Bazaar where, if you checked out an older commit, then Dunamai would consider tags for commits both before an
.fslckout on Linux and _FOSSIL_ on Windows)Fixed handling of annotated Git tags, which were previously ignored.
Changed Version.from_any_vcs to accept the tag_dir argument, which will only be used if Subversion is the detected VCS. Likewise, dunamai from any now
Version.from_any_vcs to accept the tag_dir argument,
which will only be used if Subversion is the detected VCS.
Likewise, dunamai from any now accepts --tag-dir.Version.from_vcs to make it easier for other tools to map from a
user's VCS configuration to the appropriate function.Fixed issue on Linux where shell commands were not interpreted correctly.
Added the dunamai check command and the corresponding check_version function.
dunamai check command and the corresponding check_version
function.with_metadata and with_dirty arguments of Version.serialize
to metadata and dirty respectively.Version to consider all attributes.
dirty and commit were ignored previously if neither post nor dev
were set, and dirty=None and dirty=False were not distinguished.Added support for the PVP style.
style argument in Version.serialize from str to Style.Added built-in Semantic Versioning output style in addition to PEP 440.
Added support for custom serialization formats.
Renamed Version.from_git_describe to Version.from_git.
Version.from_git_describe to Version.from_git.Version.serialize argument with_metadata so that,
by default, metadata is excluded when post and dev are not set.with_dirty argument to Version.serialize and removed flag_dirty
argument from Version.from_git. The information should always be collected,
and it is up to the serialization step to decide what to do with it.Version.from_any_vcs.source attribute of Version since some VCSes may require multiple
commands in conjunction and therefore not have a single source string.Fixed a wrong Git command being used.
* Initial release.
Your coding agent can read these notes before it upgrades. Set up the MCP server →