drop deprecated tornado.netutil.ExecutorResolver#6031
Merged
Conversation
ExecutorResolver was deprecated in tornado v5.0 and causes a number of problems for us: - it results in a thread leak as the executor is never shutdown and so requires a .warmup() from the resource tracker - .warmup() instantiates the resolver and attaches an io_loop tornadoweb/tornado@43bd9ce this results in a DeprecationWarning on 3.10 because there's no loop running this swaps it for a backport of DefaultLoopResolver from tornado v6.2 that uses get_running_loop().getaddrinfo for resolving DNS
Contributor
Member
|
I don't know enough about this space to give a full review, but in general I'm happy to trust you on this one :) |
fjetter
reviewed
Apr 5, 2022
Member
fjetter
left a comment
There was a problem hiding this comment.
I'm surprised that we no longer need the warmup but if it works, I'm OK with it
Comment on lines
1614
to
-1616
| """Context manager to ensure we haven't leaked any threads""" | ||
| # "TCP-Executor" threads are never stopped once they are started | ||
| BaseTCPConnector.warmup() |
Member
Author
There was a problem hiding this comment.
the threads used by await asyncio.get_running_loop().getaddrinfo( are shutdown when the event loop is closed
fjetter
approved these changes
Apr 5, 2022
graingert
added a commit
to graingert/distributed
that referenced
this pull request
Apr 13, 2022
This reverts commit f4c52e9.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ExecutorResolver was deprecated in tornado v5.0 and causes
a number of problems for us:
and so requires a .warmup() from the resource tracker
tornadoweb/tornado@43bd9ce
this results in a DeprecationWarning on 3.10 because there's no
loop running
this swaps it for a backport of DefaultLoopResolver from tornado v6.2
that uses get_running_loop().getaddrinfo for resolving DNS
pre-commit run --all-files