etingof / pysnmp

Python SNMP library
http://snmplabs.com/pysnmp/
BSD 2-Clause "Simplified" License
576 stars 196 forks source link

AttributeError: module 'asyncio' has no attribute 'coroutine' -- Python 3.11 #434

Open sulbig opened 1 year ago

sulbig commented 1 year ago

Upgraded to Python 3.11 and started getting the following exception when using async features of PySNMP 4.4.12.

AttributeError: module 'asyncio' has no attribute 'coroutine'

Support for generator-based coroutines, used in PySNMP, is deprecated and is removed in Python 3.11.

Had to downgrade to Python 3.10 as a workaround.

lextm commented 1 year ago

It is impossible to patch PyPI package pysnmp at this moment.

You can try the package pysnmp-lextudio 5.0.22. More details can be found in #429.

lextm commented 1 year ago

You might close this issue if my answer helps. The repo owner passed away, so closing new issues here can help clean up the list.

lextm commented 4 weeks ago

After closing #429, time to revisit this.

As new maintainers of PySNMP, my team has been able to ship new releases, so if you migrate to any recent releases 6.x/7.x, this error is gone.