forked from pool/python-pysnmp
- Update to version 6.6.2
* Deleted more obsolete items. * Removed unused dependencies. * Cleaned up sync API leftover. * Retired temporary sync API. * Removed package postfix. A helper release to enable migration. * Merged changes from 4.4.13. * Fixed more access descriptors. * Initial work to support pysmi-lextudio 1.3.0 and above. * Removed package postfix. A helper release to enable migration. * Restricted pysmi-lextudio version to 1.2.0 to avoid breaking changes. * Fixed walkCmd bug. * Fixed bulkWalkCmd bug. * Added sync oneliner back. * Fix annotations. * Added walkCmd() and bulkWalkCmd() to hlapi. * Improved Slim class to support IPv6. * Added some sync API based on asyncio. * Added custom socket support in openServerMode. * Fixed various bugs in RFC3414 error handling. * Reverted some changes in 6.0.2 on asyncio dispatch. * Deleted asyncore related bits. * Simplified asyncio dispatch. * Added ignoreNonIncreasingOid option to nextCmd and bulkCmd. * Fixed a dispatch bug related to "Slim.close". * Improved asyncio "runDispatcher" method to support timeout. * Changed internal defaults to asyncio. * Converted asyncore samples to asyncio. - Update to version 5.1.0 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pysnmp?expand=0&rev=53
This commit is contained in:
41
support-new-pyasn1.patch
Normal file
41
support-new-pyasn1.patch
Normal file
@@ -0,0 +1,41 @@
|
||||
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"
|
||||
|
Reference in New Issue
Block a user