14
0
forked from pool/python-pysnmp
Files
python-pysnmp/support-new-pyasn1.patch
Markéta Machová fd83e12feb - Update to version 7.1.1
* Reimplemented walkCmd and bulkWalkCmd.
- Update to version 7.1.0
  * Removed pyasn1.compat dependency.
  * Switched to async DNS resolver.
- Update to version 7.0.3
  * The high-level API (hlapi) extended to cover lightweight SNMP
    v1arch in hope to ease the use of packet-level SNMP API.
  * The signature of the hlapi .sendNotification() call has changed
    to accept *varBinds instead of a sequence of varBinds.
- Update to version 7.0.2
  * Fixed a duplicate item issue in bulkWalkCmd.
- Update to version 7.0.1
  * Many really old backward-compatibility code snippets removed.
    Most importantly, everything related to (non-standard) UNIX
    domain socket transport are gone.
  * The MIB instrumentation API overhauled in backward incompatible
    way:
    + MIB instrumentation methods signatures simplified to accept
      just var-binds (as var-arg), the rest of the parameters
      packed into opaque kwargs
    + CommandResponder application passes snmpEngine and optionally
      user-supplied cbCtx object throughout the MIB instrumentation
      methods. The goal is to let MIB objects access/modify whatever
      custom Python objects they need while being called back.
  * Cherry-picked many minor fixes from etingof/master branch.
- Update to version 7.0.0
  * Applied PEP8 recommended names.
    This breaks backward compatibility.
- Update to version 6.2.6

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pysnmp?expand=0&rev=57
2024-09-13 12:32:23 +00:00

42 lines
1.5 KiB
Diff

Index: pysnmp-5.0.28/pysnmp/proto/api/verdec.py
===================================================================
--- pysnmp-5.0.28.orig/pysnmp/proto/api/verdec.py
+++ pysnmp-5.0.28/pysnmp/proto/api/verdec.py
@@ -6,19 +6,20 @@
#
from pyasn1.type import univ
from pyasn1.codec.ber import decoder, eoo
+from pyasn1.codec.streaming import readFromStream
from pyasn1.error import PyAsn1Error
from pysnmp.proto.error import ProtocolError
def decodeMessageVersion(wholeMsg):
try:
- seq, wholeMsg = decoder.decode(
+ wholeMsg, seq = decoder.decode(
wholeMsg, asn1Spec=univ.Sequence(),
- recursiveFlag=False, substrateFun=lambda a, b, c: (a, b[:c])
+ recursiveFlag=False, substrateFun=lambda a, b, c, d: readFromStream(b, c)
)
ver, wholeMsg = decoder.decode(
wholeMsg, asn1Spec=univ.Integer(),
- recursiveFlag=False, substrateFun=lambda a, b, c: (a, b[:c])
+ recursiveFlag=False, substrateFun=lambda a, b, c, d: readFromStream(b, c)
)
if eoo.endOfOctets.isSameTypeWith(ver):
raise ProtocolError('EOO at SNMP version component')
Index: pysnmp-5.0.28/pyproject.toml
===================================================================
--- pysnmp-5.0.28.orig/pyproject.toml
+++ pysnmp-5.0.28/pyproject.toml
@@ -27,7 +27,7 @@ include = ["docs", "tests", "examples"]
[tool.poetry.dependencies]
python = "^3.7"
-pyasn1 = ">=0.4.8, <0.5.0"
+pyasn1 = "^0.5.0"
pysnmpcrypto = "^0.0.4"
pysmi-lextudio = "^1.0.4"