.. meta:: :description: Learn why ezsnmp transitioned from 2.x SemVer to PEP 440-compliant YYYY.M.D CalSemVer, how prereleases and release_tools work, and how to pin ezsnmp safely in production. :keywords: ezsnmp, CalSemVer, CalVer, SemVer, Python, Packaging, PEP 440, Networking, DevOps :author: Carlos Santos (@carlkidcrypto) :property=og:title: Adopting CalSemVer: ezsnmp's Transition to SemVer-Compliant CalVer :property=og:description: Learn why ezsnmp transitioned from 2.x SemVer to PEP 440-compliant YYYY.M.D CalSemVer, how prereleases and release_tools work, and how to pin ezsnmp safely in production. :property=og:type: article :property=og:url: https://carlkidcrypto.github.io/blog/ezsnmp-calsemver-versioning-transition.html :property=og:image: https://carlkidcrypto.github.io/_static/logo.png :name=twitter:card: summary :name=twitter:title: Adopting CalSemVer: ezsnmp's Transition to SemVer-Compliant CalVer :name=twitter:description: Learn why ezsnmp transitioned from 2.x SemVer to PEP 440-compliant YYYY.M.D CalSemVer, how prereleases and release_tools work, and how to pin ezsnmp safely in production. :name=twitter:image: https://carlkidcrypto.github.io/_static/logo.png ================================================================== 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: .. code-block:: text 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: .. code-block:: bash 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``: .. code-block:: python 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``): .. code-block:: toml 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.