Skip to content

Comments

Add support for PySNMP 7#122

Merged
vincentbernat merged 4 commits intomasterfrom
fix/pysnmp7
Feb 13, 2026
Merged

Add support for PySNMP 7#122
vincentbernat merged 4 commits intomasterfrom
fix/pysnmp7

Conversation

@vincentbernat
Copy link
Owner

Snimpy was broken since quite a time with more recent versions of PySNMP. PySNMP 6 did remove the oneliner API we relied upon, but PySNMP 7 reintroduced it. There other small API changes, notably all methods are using the snake case. The update is not too invasive. A commit also update the build system to be a bit more modern.

Fix #111.

The lib is now async-only and we use the new high level API. There seems
to be a bug in SetCommandResponder. Reported here:
lextudio/pysnmp#230
We need a loop, otherwise we get blocked forever.

There is still warnings about pending tasks:

```
task: <Task cancelling name='Task-586' coro=<AsyncioDispatcher.handle_timeout() running at /home/bernat/code/free/snimpy/.tox/py314/lib/python3.14/site-packages/pysnmp/carrier/asyncio/dispatch.py:66> wait_for=<Future cancelled>>
Task was destroyed but it is pending!
task: <Task cancelling name='Task-607' coro=<AsyncioDispatcher.handle_timeout() running at /home/bernat/code/free/snimpy/.tox/py314/lib/python3.14/site-packages/pysnmp/carrier/asyncio/dispatch.py:66> wait_for=<Future cancelled>>
Task was destroyed but it is pending!
task: <Task cancelling name='Task-615' coro=<AsyncioDispatcher.handle_timeout() running at /home/bernat/code/free/snimpy/.tox/py314/lib/python3.14/site-packages/pysnmp/carrier/asyncio/dispatch.py:66> wait_for=<Future cancelled>>
Task was destroyed but it is pending!
task: <Task pending name='Task-4' coro=<AsyncioDispatcher.handle_timeout() running at /home/bernat/code/free/snimpy/.tox/py314/lib/python3.14/site-packages/pysnmp/carrier/asyncio/dispatch.py:66> wait_for=<Future pending cb=[Task.task_wakeup()]>>
Task was destroyed but it is pending!
task: <Task pending name='Task-720' coro=<AsyncioDispatcher.handle_timeout() running at /home/bernat/code/free/snimpy/.tox/py314/lib/python3.14/site-packages/pysnmp/carrier/asyncio/dispatch.py:66> wait_for=<Future pending cb=[Task.task_wakeup()]>>
Task was destroyed but it is pending!
task: <Task pending name='Task-874' coro=<AsyncioDispatcher.handle_timeout() running at /home/bernat/code/free/snimpy/.tox/py314/lib/python3.14/site-packages/pysnmp/carrier/asyncio/dispatch.py:66> wait_for=<Future pending cb=[Task.task_wakeup()]>>
```
@vincentbernat vincentbernat merged commit 853f4d1 into master Feb 13, 2026
7 checks passed
@coveralls
Copy link

Coverage Status

coverage: 88.802% (+0.3%) from 88.517%
when pulling 1648091 on fix/pysnmp7
into a2b4b38 on master.

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

Successfully merging this pull request may close these issues.

Occasional stucks with snimpy 1.0.2, working with 1.0.0

2 participants