Adopting CalSemVer: ezsnmp’s Transition to SemVer-Compliant CalVer

Note

  • Published: November 26, 2026

  • Authors: Written by Gemini 3.8 Flash, Co-Authored & Reviewed by Carlos Santos (@carlkidcrypto)

  • Estimated Reading Time: 7 minutes

  • Tags: ezsnmp • CalSemVer • CalVer • SemVer • Python • Packaging • PEP 440

Beginning with the 2026.10.28a0 prerelease after V2.5.0 and culminating in the first stable 2026.11.28 release, ezsnmp adopted a SemVer-compliant Calendar Versioning (CalSemVer) scheme. For network automation engineers pinning dependencies in requirements.txt or pyproject.toml, this shift changes how release tags look on PyPI, GitHub Releases, and Homebrew—while preserving full PEP 440 compatibility.

In this post—part one of a three-part series on the ezsnmp modernization—we will examine why ezsnmp moved from 2.x.y to YYYY.M.D CalSemVer, how PEP 440 prereleases (a0, b0) map to the new scheme, how release_tools automates version verification, and how to pin or test the new releases safely.

Why ezsnmp Moved from Traditional SemVer to CalSemVer

Traditional Semantic Versioning (MAJOR.MINOR.PATCH) works well for pure libraries with stable external dependencies. However, ezsnmp sits at the intersection of two fast-moving ecosystems:

  • Upstream CPython Releases: ezsnmp actively builds and tests across Python 3.10 through 3.15 (including free-threaded builds).

  • Upstream Net-SNMP & OpenSSL Toolchains: Recent releases migrate test containers and macOS wheels to Net-SNMP 5.10 alongside updated OpenSSL builds across Linux, macOS ARM64, and Windows (x86, x86-64, and ARM64).

Under V2.5.0, a minor version bump did not tell operators how recently the underlying Net-SNMP bindings, SWIG wrappers, or platform wheels were refreshed. With CalSemVer (introduced in PRs #1369 and #1393), the version number itself communicates release recency at a glance:

Legacy SemVer:    V2.5.0        (Oct 2026)
CalSemVer Alpha:  2026.10.28a0  (Oct 2026)
CalSemVer Alpha:  2026.11.4a0   (Nov 2026)
CalSemVer Beta:   2026.11.9b0   (Nov 2026)
CalSemVer Stable: 2026.11.28    (Nov 2026)

How CalSemVer Stays PEP 440 & SemVer Compliant

CalSemVer formats releases as YYYY.M.D (without leading zeroes, matching PEP 440 normalization) with optional PEP 440 prerelease segments (a0, b0, rc0) or post-release suffixes:

  1. Monotonic Ordering for ``pip`` and ``uv``:

    • Because 2026.11.9b0 > 2026.11.4a0 > 2026.10.28a0 > 2.5.0, Python package resolvers automatically treat every CalSemVer release as a clean upgrade over the 2.x series.

  2. Standard Prerelease Isolation:

    • Standard pip install ezsnmp skips alpha (aN) and beta (bN) tags unless you explicitly opt in with --pre or pin the exact version.

    • To test the latest beta prerelease in staging:

    pip install --upgrade --pre ezsnmp
    # Or pin a specific prerelease build:
    pip install ezsnmp==2026.11.9b0
    
  3. Automated Version Bumping via ``release_tools``:

    • Manually editing version strings across pyproject.toml, setup.cfg, CHANGELOG.md, Homebrew Formula/, and sphinx_docs_build invites drift. The release_tools directory (added in PR #1397) centralizes version bumping and cross-file validation in CI.

Checking the Runtime Version in Python

Remember that ezsnmp does not expose a __version__ attribute on the top-level module. Always inspect the installed CalSemVer string using Python’s standard library importlib.metadata:

from importlib.metadata import version
from ezsnmp import Session
from ezsnmp.exceptions import ConnectionError, GenericError, TimeoutError

pkg_version = version("ezsnmp")
print(f"Running ezsnmp {pkg_version}")

with Session(
    hostname="localhost",
    community="public",
    version=2,
    timeout=2,
    retries=1,
    set_max_repeaters_to_num=25,
) as session:
    try:
        sys_descr = session.get("sysDescr.0")[0]
        print(f"sysDescr ({sys_descr.type}): {sys_descr.value}")
    except (TimeoutError, ConnectionError, GenericError) as err:
        print(f"SNMP query failed: {err}")

📥 Download this script: checking_the_runtime_version_in_python.py

Dependency Pinning Guidelines for Production

When migrating your requirements.txt or pyproject.toml to CalSemVer:

  1. Avoid ``~=`` Compatible-Release Surprises:

    • Under PEP 440, ezsnmp~=2026.11.9 only allows 2026.11.* patches and blocks December (2026.12.*) or 2027.* releases.

    • Instead, use lower/upper bounds or a lockfile (uv.lock / poetry.lock):

    dependencies = [
        "ezsnmp>=2026.10.28,<2028.0.0",
    ]
    
  2. Test Beta Builds in CI Before Promoting:

    • Run your SNMP polling test suite against ezsnmp==2026.11.9b0 in a staging workflow to verify Net-SNMP 5.10 behavior before updating production lockfiles.

Summary & What’s Next

Adopting CalSemVer aligns ezsnmp with the cadence of modern Python and Net-SNMP releases while keeping pip resolution and prerelease testing predictable.

In part two of this series tomorrow, we will examine how ezsnmp is transitioning to standalone cross-platform wheels—eliminating external Net-SNMP and SWIG build dependencies across Linux, macOS ARM64, and Windows.


Warning

AI-generated content may contain misinformation or mistakes. A human does review this, but we are only human.