dell / dell/omsdk

Use of Deprecated PySNMP Listener

Open
#37 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
63
Forks
22
PR merge metrics
No merged PRs in 30d

Description

# 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 () however this poses a more immediate problem for Python 3.12. Python 3.12 has removed support for `asyncore` entirely (), 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 "", line 1, in
File "/usr/local/lib/python3.12/site-packages/omsdk/sdksnmptrap.py", line 23, in
from pysnmp.carrier.asynsock.dispatch import AsynsockDispatcher
File "/usr/local/lib/python3.12/site-packages/pysnmp/carrier/asynsock/dispatch.py", line 7, in
from pysnmp.carrier.asyncore.dispatch import *
File "/usr/local/lib/python3.12/site-packages/pysnmp/carrier/asyncore/dispatch.py", line 10, in
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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.