What’s New & Fixed in the ezsnmp 2026 Beta Cycle¶
Note
Published: November 28, 2026
Authors: Written by Gemini 4 Neon, Co-Authored & Reviewed by Carlos Santos (@carlkidcrypto)
Estimated Reading Time: 8 minutes
Tags: ezsnmp • Net-SNMP • Python • C++17 • IPv6 • Valgrind • Release Notes
Across the late-2026 release cycle—spanning V2.5.0, v2026.10.28a0,
v2026.11.4a0, and the v2026.11.9b0 beta, and culminating in the first
stable CalSemVer release v2026.11.28—ezsnmp delivered substantial runtime,
concurrency, and quality-assurance upgrades alongside its shift to CalSemVer
and standalone wheels.
In this final installment of our three-part ezsnmp modernization series, we
will review what is new and fixed in the C++17 core, inspect updated
Session and SessionBase behaviors, and walk through the expanded
Valgrind and IPv6 test hardening.
Net-SNMP 5.10 Migration & Legacy Pruning¶
One of the largest infrastructure milestones in v2026.10.28a0 and
v2026.11.4a0 is standardizing on Net-SNMP 5.10:
Container & Wheel Alignment (PRs #1396, #1445, #1450): Test containers and macOS wheel builds now target Net-SNMP 5.10 while pruning legacy unmaintained Net-SNMP versions.
OpenSSL Discovery Fixes (PR #1402): Fixed macOS wheel OpenSSL discovery for revisioned Homebrew Net-SNMP installations, ensuring SNMPv3
authPriv(SHA-256 / AES-128) builds link cleanly.
Per-Session OID Formatting & Fine-Grained Locking¶
In earlier Net-SNMP wrappers, toggling global output formatting flags on one session could leak across concurrent operations in other threads. The 2026 cycle addresses this directly in the C++17 runtime:
Per-Session Formatting Preservation (PR #1279 & #1322): Preserved per-session OID formatting across concurrent SNMP operations and restored multi-threaded concurrency using a fine-grained formatting lock.
Hex-String Output (``print_hex_strings``): Added and tested
-Oxhex-string formatting getters/setters onSessionBase(PRs #1100, #1385, #1415, #1441) so binary OCTET STRINGs (like MACs andPortListbitmasks) decode cleanly withbytes.fromhex().
Keep in mind that Net-SNMP still maintains process-global C state protected by
internal mutexes. A single Session instance rebuilds its internal argument
vector per call and must not be shared across threads without a
threading.Lock(); for fleet-wide polling, ProcessPoolExecutor remains
the cleanest scaling pattern.
Bug Fixes & Edge-Case Hardening¶
Scanning the V2.5.0 through v2026.11.9b0 changelogs highlights several
important runtime and API fixes:
IPv6 & ``udp6`` Duplicate-Port Validation (PR #1356):
Added C++ regression coverage for duplicate-port detection when using
udp6or bracketed IPv6 hostnames (such asudp6:[::1]:161).
``Session.set()`` & ``Session.walk()`` Error Handling (PRs #1353, #1440):
Verified exception propagation across
Session.set()(including nonzero agenterrstatresponses raisingPacketError) andSession.walk()error paths.Remember that
ezsnmp.exceptionsclasses (GenericError,ConnectionError,TimeoutError,PacketError) intentionally shadow Python builtins—always import them explicitly fromezsnmp.exceptions(PRs #1274 and #1401).
``Session.get_next()`` Dispatch & Numeric Branches (PRs #991, #1281):
Fixed
Session.get_next()string OID dispatch to prevent unintended character-splitting, and added C++ branch tests for empty/overflow numeric conversions indatatypes.cpp.
Demonstrating the Modern 2026 Beta API¶
The snippet below showcases print_hex_strings, print_enums_numerically,
Session.get() tuple unpacking, and ezsnmp.exceptions handling:
from importlib.metadata import version
from ezsnmp import Session
from ezsnmp.exceptions import (
ConnectionError,
GenericError,
PacketError,
TimeoutError,
)
print(f"Testing ezsnmp {version('ezsnmp')}")
with Session(
hostname="127.0.0.1",
community="public",
version=2,
timeout=2,
retries=1,
set_max_repeaters_to_num=25,
print_enums_numerically=True,
print_hex_strings=True,
) as session:
try:
# Unpack scalar Result tuple returned by session.get()
mac_var = session.get("1.3.6.1.2.1.2.2.1.6.1")[0]
if mac_var.type not in ("NOSUCHOBJECT", "NOSUCHINSTANCE"):
hex_clean = (
mac_var.value.replace("Hex-STRING:", "")
.replace(":", "")
.replace(" ", "")
.strip()
)
try:
raw_mac = bytes.fromhex(hex_clean)
formatted = ":".join(f"{b:02x}" for b in raw_mac)
print(f"Interface 1 MAC: {formatted}")
except ValueError:
print(f"Interface 1 raw value: {mac_var.value}")
except (TimeoutError, ConnectionError, PacketError, GenericError) as err:
print(f"SNMP query failed: {err}")
📥 Download this script: demonstrating_the_modern_2026_beta_api.py
CI, Valgrind & Security Hardening¶
Beyond runtime code, the 2026 beta releases strengthened automated verification:
Valgrind Across All Python Versions (PR #1447): Restored Valgrind memory-leak detection across the full CPython matrix (3.10–3.15) to catch C++17 / SWIG / Net-SNMP allocation issues before release.
Unified Python & C++ Coverage (PR #1387): Fixed C++
lcovcoverage reporting in Codecov alongsidepytestcoverage carryforward.Security & Documentation Hygiene (PRs #1460, #1464): Resolved security vulnerabilities, scoped static analysis, and restored versioned Sphinx documentation.
Summary & What’s Next¶
Together, CalSemVer, standalone cross-platform wheels, Net-SNMP 5.10 support,
and Valgrind-verified C++ concurrency make the 2026 ezsnmp beta cycle—and its first stable
v2026.11.28 CalSemVer release—a major step forward for Python SNMP
automation.
With our three-part ezsnmp series complete, our next post rotates to
ezsnmp_data_logger,
diving into high-throughput 64-bit SNMP counter ingestion into TimescaleDB
hypertables.
Warning
AI-generated content may contain misinformation or mistakes. A human does review this, but we are only human.