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

DeprecationWarning: asyncore (to be removed in Python 3.12) #10

Closed
Bastian-Krause opened this issue Apr 2, 2023 · 10 comments
Closed

DeprecationWarning: asyncore (to be removed in Python 3.12) #10

Bastian-Krause opened this issue Apr 2, 2023 · 10 comments
Labels
area:pysnmp PySNMP package enhancement New feature or request

Comments

@Bastian-Krause
Copy link

This line..

..causes warnings such as:

[...]/python3.11/site-packages/pysnmp/carrier/asyncore/base.py:9: DeprecationWarning: The asyncore module is deprecated and will be removed in Python 3.12. The recommended replacement is asyncio

See also https://docs.python.org/3/library/asyncore.html. Python 3.12 will probably be released in October 2023.

Btw, thanks for taking over this project!

@lextm
Copy link

lextm commented Apr 2, 2023

Thanks for opening this. We do have a local version with such removed, but it has quite a lot of impact on documentation and so on, so we are now testing with a few clients and evaluate how to move on.

Will provide an update in a few weeks.

@lextm lextm added area:documentation Improvements or additions to documentation enhancement New feature or request area:pysnmp PySNMP package labels Apr 5, 2023
@Bastian-Krause
Copy link
Author

Any update on this?

@Bastian-Krause
Copy link
Author

@lextm The Python 3.12 release is expected in less than a month. It would be nice to have a pysnmp release with 3.12 support until then. Do you have any update on this?

@lextm
Copy link

lextm commented Sep 6, 2023

Our internal Python 3.12 compliant build works for a few clients. However, they don't use every features of PySNMP, so not impacted by removal of the deprecated bits very much.

My team still works on porting as many examples as possible away from the deprecated API surface, but no promise right now on when we can finish that task.

More to disclose when Python 3.12 is released, and we don't aim to ship Python 3.12 support on day 1. More likely to have a Python 3.12 target release by the end of this year.

@lextm lextm pinned this issue Sep 6, 2023
@Bastian-Krause
Copy link
Author

Thanks for sharing this info.

@dmiller7
Copy link

dmiller7 commented Sep 7, 2023

Yup, thanks for sharing and for taking the time to keep PySNMP going. I appreciate you + team not just keeping the development work internal!

@lextm
Copy link

lextm commented Oct 21, 2023

After internal discussion, our current plan has some slight changes.

First, we will use a different version 6.0.x and make it solely available for Python 3.12.

Second, 6.0.x release will provide a much smaller API surface since the underlying legacy APIs were removed.

Still aim to ship a stable release (6.0.3 or 6.0.4) by the end of 2023, but a few preview releases (starting from 6.0.0) will be published soon. The goal of the initial releases is to preview the API surface changes and collect feedback on the missing features and documentation.

@TimotheusBachinger
Copy link

TimotheusBachinger commented Dec 8, 2023

Hi @lextm,
as we're approaching the end of the year, I just want to know if you could give us a short heads-up regarding the 6.0.x release.

We at Checkmk are just about to lift Python to 3.12 and are heavily using pysnmp in our product.
To all others which do want to migrate soon to 3.12 - I found this quite helpful to use as interim solution (brings back asyncore for 3.12): https://github.com/simonrob/pyasyncore

Thanks for your great work!
Timi

@lextm
Copy link

lextm commented Dec 10, 2023

@TimotheusBachinger Thanks for the advice.

We tested the workaround (by using pyasyncore) and it worked well. This buys us more time to work on the asyncore free 6.0 release.

Just shipped release 5.0.31 that contains the necessary changes, so please let us know if it works well for you.

@lextm lextm closed this as completed Dec 10, 2023
@lextm lextm removed the area:documentation Improvements or additions to documentation label Dec 10, 2023
@lextm lextm unpinned this issue Feb 13, 2024
lextm added a commit that referenced this issue Mar 23, 2024
@lextm
Copy link

lextm commented Mar 31, 2024

We decided to completely dump asyncore bits in 6.0+ releases, and urge all 5.0.x users to ugprade.

The guide is https://docs.lextudio.com/pysnmp/upgrade

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:pysnmp PySNMP package enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants