-
-
Notifications
You must be signed in to change notification settings - Fork 206
Disallow creating new sessions if client exits context #1402
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
Disallow creating new sessions if client exits context #1402
Conversation
7f25d08 to
f8b59ce
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1402 +/- ##
==========================================
+ Coverage 91.65% 91.70% +0.04%
==========================================
Files 75 76 +1
Lines 8067 8078 +11
==========================================
+ Hits 7394 7408 +14
+ Misses 673 670 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@cepedus you'll need to sign and force push the commits |
jakob-keller
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I understand it, this PR enforces using AIOHTTPSession as an asynchronous context manager, which was strongly recommended, but optional before. IMO, this might need to be considered a breaking change. Any thoughts? Why is the current situation problematic again?
b904ba1 to
fe9084f
Compare
|
@jakob-keller The current behavior is prone to loose sessions that are potentially never closed in the default use-case ( @thehesiod I signed all commmits, review was dismissed though |
|
Up, should I continue this MR? |
|
@cepedus sorry about delay, been sick. Lets do a major bump to obey semver rules, and merge this puppy |
|
Bumped major + updated branch :) |
|
@cepedus: Could you please do another update? I am planning to do a 3.0.0 release in the near future and would like to finally include this. Thanks! |
1c52a86 to
ace07cf
Compare
|
Thanks for your patience! |
Description of Change
Once an
AioBaseClientis used as a context manager and exits, forbid any following attempt to create a new session.If
AioBaseClientis never used as a context manager, this restriction does not apply.Assumptions
Checklist for All Submissions
Checklist when updating botocore and/or aiohttp versions
(not applicable)