QwikContext
omsdk.sdksnmptrap uses pysnmp.carrier.asynsock, which will be removed in future pysnmp releases and does not work on Python 3.12.
Details
omsdk.sdksnmptrap and omsdk.sdktrapreceiver import pysnmp.carrier.asynsock. This will be removed from PySNMP soon (etingof/pysnmp@b186168) however this poses a more immediate problem for Python 3.12. Python 3.12 has removed support for asyncore entirely (python/cpython#96580), so it'd probably be best to switch to the asyncio support in PySNMP on Python 3.
Repro Steps
- Install Python 3.12 (a Fedora Rawhide container is probably the fastest way).
pip install omsdk
- Import
omsdk.sdksnmptrap in a Python file.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.12/site-packages/omsdk/sdksnmptrap.py", line 23, in <module>
from pysnmp.carrier.asynsock.dispatch import AsynsockDispatcher
File "/usr/local/lib/python3.12/site-packages/pysnmp/carrier/asynsock/dispatch.py", line 7, in <module>
from pysnmp.carrier.asyncore.dispatch import *
File "/usr/local/lib/python3.12/site-packages/pysnmp/carrier/asyncore/dispatch.py", line 10, in <module>
from asyncore import socket_map
ModuleNotFoundError: No module named 'asyncore'
Impact
Unable to use omsdk.sdksnmptrap or omsdk.sdktrapreceiver on Python 3.12.
NeedBy
Before Python 3.12 becomes mainstream.
Severity
Medium
QwikContext
omsdk.sdksnmptrapusespysnmp.carrier.asynsock, which will be removed in futurepysnmpreleases and does not work on Python 3.12.Details
omsdk.sdksnmptrapandomsdk.sdktrapreceiverimportpysnmp.carrier.asynsock. This will be removed from PySNMP soon (etingof/pysnmp@b186168) however this poses a more immediate problem for Python 3.12. Python 3.12 has removed support forasyncoreentirely (python/cpython#96580), so it'd probably be best to switch to theasynciosupport in PySNMP on Python 3.Repro Steps
pip install omsdkomsdk.sdksnmptrapin a Python file.Impact
Unable to use
omsdk.sdksnmptraporomsdk.sdktrapreceiveron Python 3.12.NeedBy
Before Python 3.12 becomes mainstream.
Severity
Medium