Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-pysnmp for openSUSE:Factory checked in at 2026-04-25 21:36:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pysnmp (Old) and /work/SRC/openSUSE:Factory/.python-pysnmp.new.11940 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pysnmp" Sat Apr 25 21:36:49 2026 rev:25 rq:1349065 version:7.1.25 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pysnmp/python-pysnmp.changes 2026-04-20 16:13:36.334889470 +0200 +++ /work/SRC/openSUSE:Factory/.python-pysnmp.new.11940/python-pysnmp.changes 2026-04-25 21:37:34.066253061 +0200 @@ -1,0 +2,6 @@ +Thu Apr 23 13:52:22 UTC 2026 - Martin Hauke <[email protected]> + +- Update to version 7.1.25 + * Fixed an error handling bug in walk_cmd. + +------------------------------------------------------------------- Old: ---- pysnmp-7.1.24.tar.gz New: ---- pysnmp-7.1.25.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pysnmp.spec ++++++ --- /var/tmp/diff_new_pack.X2q1tt/_old 2026-04-25 21:37:34.674277863 +0200 +++ /var/tmp/diff_new_pack.X2q1tt/_new 2026-04-25 21:37:34.678278026 +0200 @@ -17,7 +17,7 @@ Name: python-pysnmp -Version: 7.1.24 +Version: 7.1.25 Release: 0 Summary: A pure-Python SNMPv1/v2c/v3 library License: BSD-2-Clause ++++++ pysnmp-7.1.24.tar.gz -> pysnmp-7.1.25.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pysnmp-7.1.24/.bumpversion.cfg new/pysnmp-7.1.25/.bumpversion.cfg --- old/pysnmp-7.1.24/.bumpversion.cfg 2026-04-19 01:53:31.000000000 +0200 +++ new/pysnmp-7.1.25/.bumpversion.cfg 2026-04-23 08:36:26.000000000 +0200 @@ -1,5 +1,5 @@ [bumpversion] -current_version = 7.1.24 +current_version = 7.1.25 commit = False tag = False tag_name = {new_version} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pysnmp-7.1.24/CHANGES.rst new/pysnmp-7.1.25/CHANGES.rst --- old/pysnmp-7.1.24/CHANGES.rst 2026-04-19 01:53:31.000000000 +0200 +++ new/pysnmp-7.1.25/CHANGES.rst 2026-04-23 08:36:26.000000000 +0200 @@ -1,7 +1,12 @@ +Revision 7.1.25, released on Apr 23, 2026 +----------------------------------------- + +- Fixed an error handling bug in walk_cmd. + Revision 7.1.24, released on Apr 18, 2026 ----------------------------------------- -- Fixed Counter32 and TimeTicks overflow handling +- Fixed Counter32 and TimeTicks overflow handling. - Improved type hints and test coverage for SET command functions. - Improved `AsyncioDispatcher` to track loop state and ensure proper event loop closure. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pysnmp-7.1.24/SECURITY.md new/pysnmp-7.1.25/SECURITY.md --- old/pysnmp-7.1.24/SECURITY.md 2026-04-19 01:53:31.000000000 +0200 +++ new/pysnmp-7.1.25/SECURITY.md 2026-04-23 08:36:26.000000000 +0200 @@ -6,7 +6,7 @@ | Version | Latest Release | End of Life | Notes | | ------- | -------------- | ----------- | ---------------------------------- | -| 7.1 | 7.1.24 | TBD | EOL to be determined | +| 7.1 | 7.1.25 | TBD | EOL to be determined | | 7.0 | 7.0.4 | 2025-03-11 | Reached EOL | | 6.2 | 6.2.6 | 2025-08-22 | Reached EOL | | 6.1 | 6.1.4 | 2025-01-12 | Reached EOL | diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pysnmp-7.1.24/docs/source/conf.py new/pysnmp-7.1.25/docs/source/conf.py --- old/pysnmp-7.1.24/docs/source/conf.py 2026-04-19 01:53:31.000000000 +0200 +++ new/pysnmp-7.1.25/docs/source/conf.py 2026-04-23 08:36:26.000000000 +0200 @@ -74,7 +74,7 @@ # built documents. # # The full version, including alpha/beta/rc tags. -release = "7.1.24" +release = "7.1.25" # The short X.Y version. version = ".".join(release.split(".")[:2]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pysnmp-7.1.24/pyproject.toml new/pysnmp-7.1.25/pyproject.toml --- old/pysnmp-7.1.24/pyproject.toml 2026-04-19 01:53:31.000000000 +0200 +++ new/pysnmp-7.1.25/pyproject.toml 2026-04-23 08:36:26.000000000 +0200 @@ -1,6 +1,6 @@ [project] name = "pysnmp" -version = "7.1.24" +version = "7.1.25" description = "A Python library for SNMP" authors = [ {name = "Ilya Etingof", email = "[email protected]"}, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pysnmp-7.1.24/pysnmp/__init__.py new/pysnmp-7.1.25/pysnmp/__init__.py --- old/pysnmp-7.1.24/pysnmp/__init__.py 2026-04-19 01:53:31.000000000 +0200 +++ new/pysnmp-7.1.25/pysnmp/__init__.py 2026-04-23 08:36:26.000000000 +0200 @@ -12,7 +12,7 @@ """ # http://www.python.org/dev/peps/pep-0396/ -__version__ = "7.1.24" +__version__ = "7.1.25" # another variable is required to prevent semantic release from updating version in more than one place main_version = __version__ # backward compatibility diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pysnmp-7.1.24/pysnmp/hlapi/v1arch/asyncio/cmdgen.py new/pysnmp-7.1.25/pysnmp/hlapi/v1arch/asyncio/cmdgen.py --- old/pysnmp-7.1.24/pysnmp/hlapi/v1arch/asyncio/cmdgen.py 2026-04-19 01:53:31.000000000 +0200 +++ new/pysnmp-7.1.25/pysnmp/hlapi/v1arch/asyncio/cmdgen.py 2026-04-23 08:36:26.000000000 +0200 @@ -767,6 +767,8 @@ # from SNMPv1 Agent through internal pysnmp proxy. errorStatus = 0 errorIndex = 0 + return + yield (errorIndication, errorStatus, errorIndex, (varBind,)) return else: stopFlag = True diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pysnmp-7.1.24/pysnmp/hlapi/v3arch/asyncio/cmdgen.py new/pysnmp-7.1.25/pysnmp/hlapi/v3arch/asyncio/cmdgen.py --- old/pysnmp-7.1.24/pysnmp/hlapi/v3arch/asyncio/cmdgen.py 2026-04-19 01:53:31.000000000 +0200 +++ new/pysnmp-7.1.25/pysnmp/hlapi/v3arch/asyncio/cmdgen.py 2026-04-23 08:36:26.000000000 +0200 @@ -760,6 +760,8 @@ # from SNMPv1 Agent through internal pysnmp proxy. errorStatus = 0 errorIndex = 0 + return + yield (errorIndication, errorStatus, errorIndex, (varBind,)) return else: stopFlag = True diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pysnmp-7.1.24/tests/hlapi/v1arch/asyncio/manager/cmdgen/test_v1arch_v2_walk.py new/pysnmp-7.1.25/tests/hlapi/v1arch/asyncio/manager/cmdgen/test_v1arch_v2_walk.py --- old/pysnmp-7.1.24/tests/hlapi/v1arch/asyncio/manager/cmdgen/test_v1arch_v2_walk.py 2026-04-19 01:53:31.000000000 +0200 +++ new/pysnmp-7.1.25/tests/hlapi/v1arch/asyncio/manager/cmdgen/test_v1arch_v2_walk.py 2026-04-23 08:36:26.000000000 +0200 @@ -1,5 +1,14 @@ import pytest -from pysnmp.hlapi.v1arch.asyncio import * +from unittest.mock import AsyncMock, patch +from pysnmp.hlapi.v1arch.asyncio import ( + SnmpDispatcher, + CommunityData, + UdpTransportTarget, + ObjectType, + ObjectIdentity, + Integer32, + walk_cmd, +) from tests.agent_context import AGENT_PORT, AgentContextManager @@ -65,3 +74,30 @@ assert varBinds[0][0].prettyPrint() == "SNMPv2-MIB::sysObjectID.0" assert len(objects_list) == 8 + + [email protected] +async def test_v2_walk_yields_error_status(): + """Regression test for issue #236: walk_cmd must yield errorStatus before terminating.""" + with patch( + "pysnmp.hlapi.v1arch.asyncio.cmdgen.next_cmd", + new=AsyncMock(return_value=(None, Integer32(3), Integer32(1), [])), + ): + with SnmpDispatcher() as snmpDispatcher: + objects = walk_cmd( + snmpDispatcher, + CommunityData("public"), + await UdpTransportTarget.create(("localhost", AGENT_PORT)), + ObjectType(ObjectIdentity("SNMPv2-MIB", "sysDescr", 0)), + ) + objects_list = [item async for item in objects] + + assert len(objects_list) == 1, ( + "walk_cmd must yield the error rather than silently terminating" + ) + errorIndication, errorStatus, errorIndex, varBinds = objects_list[0] + assert errorIndication is None + assert errorStatus is not None + assert errorIndex is not None + assert int(errorStatus) == 3 + assert int(errorIndex) == 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pysnmp-7.1.24/tests/hlapi/v3arch/asyncio/manager/cmdgen/test_v2_walk.py new/pysnmp-7.1.25/tests/hlapi/v3arch/asyncio/manager/cmdgen/test_v2_walk.py --- old/pysnmp-7.1.24/tests/hlapi/v3arch/asyncio/manager/cmdgen/test_v2_walk.py 2026-04-19 01:53:31.000000000 +0200 +++ new/pysnmp-7.1.25/tests/hlapi/v3arch/asyncio/manager/cmdgen/test_v2_walk.py 2026-04-23 08:36:26.000000000 +0200 @@ -1,5 +1,15 @@ import pytest -from pysnmp.hlapi.v3arch.asyncio import * +from unittest.mock import AsyncMock, patch +from pysnmp.hlapi.v3arch.asyncio import ( + SnmpEngine, + CommunityData, + ContextData, + UdpTransportTarget, + ObjectType, + ObjectIdentity, + Integer32, + walk_cmd, +) from tests.agent_context import AGENT_PORT, AgentContextManager total_count = 212 # 267 @@ -66,3 +76,31 @@ assert varBinds[0][0].prettyPrint() == "SNMPv2-MIB::sysObjectID.0" assert len(objects_list) == 8 + + [email protected] +async def test_v2_walk_yields_error_status(): + """Regression test for issue #236: walk_cmd must yield errorStatus before terminating.""" + with patch( + "pysnmp.hlapi.v3arch.asyncio.cmdgen.next_cmd", + new=AsyncMock(return_value=(None, Integer32(3), Integer32(1), [])), + ): + with SnmpEngine() as snmpEngine: + objects = walk_cmd( + snmpEngine, + CommunityData("public"), + await UdpTransportTarget.create(("localhost", AGENT_PORT)), + ContextData(), + ObjectType(ObjectIdentity("SNMPv2-MIB", "sysDescr", 0)), + ) + objects_list = [item async for item in objects] + + assert len(objects_list) == 1, ( + "walk_cmd must yield the error rather than silently terminating" + ) + errorIndication, errorStatus, errorIndex, varBinds = objects_list[0] + assert errorIndication is None + assert errorStatus is not None + assert errorIndex is not None + assert int(errorStatus) == 3 + assert int(errorIndex) == 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pysnmp-7.1.24/uv.lock new/pysnmp-7.1.25/uv.lock --- old/pysnmp-7.1.24/uv.lock 2026-04-19 01:53:31.000000000 +0200 +++ new/pysnmp-7.1.25/uv.lock 2026-04-23 08:36:26.000000000 +0200 @@ -692,7 +692,7 @@ [[package]] name = "pysnmp" -version = "7.1.24" +version = "7.1.25" source = { editable = "." } dependencies = [ { name = "pyasn1" },
