-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
A lot of deprecation warnings in python 3.10 #3033
Comments
Ugh, that one will be painful because it leaks out into application code. I've replied on https://bugs.python.org/issue39529 Will look at the other ones later. |
The options are |
Can use |
Oh, that would be convenient if that's going to continue to be supported. But my understanding of the changes in https://bugs.python.org/issue39529 is that they intend to get rid of anything that exposes the idea of a "current" event loop except while a loop is running. This would also imply changing the behavior of |
Thanks for fixing this! Any idea when a new release with these changes will be tagged? |
I've just released the first beta of Tornado 6.2. Try it out with |
Tornado 6.2 is out today. |
Thank you for the update. I installed Tornado 6.2 today, with Python 3.10.5, I have 2 deprecated warning:
And
My environment is Debian 10 on WSL. |
Yes, you'll need to make changes to your application code to avoid all of the deprecation errors. The changes made in Python 3.10 are unfortunately not something I'm able to completely hide within Tornado. You'll need to change your startup code from something like You're not doing anything wrong, by the way. For now, these are just warnings; nothing will actually break until some (unspecified) future version of python. So you can also just ignore the warnings for a while (and I would be delighted if the asyncio team could be convinced to change their mind about this, because it's a lot of disruption for a benefit that is hard for me to see). |
Thank you, I'm using Bottlepy so I think that the problem is coming from this library. I will check. |
In 3.10, many things that tornado uses were deprecated. This affects things that use tornado, as well as tests that assume there are no deprecation warnings.
Problems I noticed when running tests are:
asyncio.get_event_loop
, the suggested way is to create a loop manually if needed and otherwise useget_running_loop
.ssl.wrap_socket
, which is deprecated in favor of usingssl.SSLContext.wrap_socket
PROTOCOL_TLS
is deprecated, no clear alternative is provided in documentationResourceWarning: unclosed <socket.socket fd=543, family=AF_INET, type=SOCK_STREAM, proto=6, laddr=('127.0.0.1', different numbers here)>
The text was updated successfully, but these errors were encountered: