Registry / devops / calver

calver

JSON →
library2025.10.20pypypiunverified

CalVer is a setuptools extension that enables the use of Calendar Versioning (CalVer) for Python packages. It integrates seamlessly with `pyproject.toml` to dynamically generate package versions based on the current date, ensuring consistency with the CalVer specification. The current version is 2025.10.20, and it follows a calendar-versioned release cadence.

pip install calver
INSTALL
IMPORT
SIG · CALVER
C
calver
devopspythonv2025.10.20
Install
1.5s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2025.10.20 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 1.5s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

__build_backend__
build-backend = "calver:__build_backend__"
This is not a Python import statement, but rather the entry point specified in `pyproject.toml` for setuptools to use CalVer as the build backend.
version
version = {attr = "calver.version"}
This is used within the `[tool.setuptools.dynamic]` section of `pyproject.toml` to instruct setuptools to retrieve the version dynamically from `calver.version`.

CalVer is configured declaratively in your `pyproject.toml` file. This example demonstrates how to set `calver` as the build backend and use it to dynamically set your project's version.

# pyproject.toml [build-system] requires = ["setuptools>=61", "calver"] build-backend = "calver:__build_backend__" [project] name = "my-calver-package" authors = [ {name = "Your Name", email = "your.email@example.com"} ] description = "A package using CalVer" readme = "README.md" requires-python = ">=3.9" dynamic = ["version"] [tool.setuptools.dynamic] version = {attr = "calver.version"}
Debug
Known issues
breakingPython 3.5, 3.6, 3.7, and 3.8 support has been dropped in recent versions. Earlier versions supported these, but new releases require Python 3.9 or newer.
fix
Upgrade your Python environment to 3.9 or newer, or pin `calver` to an older version compatible with your Python interpreter (e.g., `<2025.03.31` for 3.5/3.6, `<2025.04.01` for 3.7/3.8).
affects: Before 2025.03.31 (supported 3.5-3.6); 2025.03.31 (dropped 3.7-3.8); 2025.04.01 and later (requires >=3.9).
breakingSignificant changes were made to adopt `pyproject.toml` fully, deprecating older `setup.py` based configurations. Projects using `setup.py` or older `pyproject.toml` configurations might need updates.
fix
Migrate your project configuration to the modern `pyproject.toml` structure as shown in the quickstart example and the official documentation.
affects: Versions prior to 2025.04.01.
gotchaThe internal use of `datetime.datetime.utcnow()` was deprecated and could cause `DeprecationWarning` in specific Python environments or when warnings are treated as errors during builds.
fix
Upgrade `calver` to version `2025.10.20` or newer to resolve the `DeprecationWarning`.
affects: All versions prior to 2025.10.20.
gotchaFor reproducible builds, `calver` supports the `SOURCE_DATE_EPOCH` environment variable. If not set, the build will use the current timestamp.
fix
Set the `SOURCE_DATE_EPOCH` environment variable to a Unix timestamp in your build environment (e.g., CI/CD pipelines) to ensure consistent versioning across builds.
affects: All versions.
Upgrade
Version history
2025.10.20latest on PyPI · released Oct 20, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
6
Resources
calver — pip install calver · libregistry