Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of Deprecated PySNMP Listener #37

Open
thebeanogamer opened this issue Jul 16, 2023 · 0 comments
Open

Use of Deprecated PySNMP Listener #37

thebeanogamer opened this issue Jul 16, 2023 · 0 comments

Comments

@thebeanogamer
Copy link
Contributor

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

  1. Install Python 3.12 (a Fedora Rawhide container is probably the fastest way).
  2. pip install omsdk
  3. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant