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.
Tornado 6 doesn't have stack context mechanism and became asyncio framework. But
TornadoScopeManager
and helperspan_in_stack_context
using stack context explicitly and limiting version of Tornado that can be used. That's why we have upper bound for Tornado.In this PR
TornadoScopeManager
and helpers has been detached and moved to separate module. This changes doesn't breaks backward compatibility and we can use helpers with old Tornado.Using helpers with newest version of Tornado has no sense and will raise runtime error.
Firstly I tried to remove Tornado from dependencies (see #113) but faced at least with two problems:
TornadoScopeManager
. I don't have mush experience with this code, but I think it's possible to untie boto3 from this helpers. In general it's weird, that insturmentation of boto3 forces us to use old Tornado (by the way related issue Should span_in_stack_context be throwing exceptions? #111)So I decided to keep Tornado in dependencies in this PR, but if you interesting, we can try to fix mentioned problems.
Also I add some tests for asyncio. Pathcher for Tornado HTTP client works fine with new versions.