- 
          
- 
                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
base: master
Are you sure you want to change the base?
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.39%   91.58%   +0.18%     
==========================================
  Files          74       74              
  Lines        7855     7864       +9     
==========================================
+ Hits         7179     7202      +23     
+ Misses        676      662      -14     
 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 | 
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?
1dd91f7    to
    b904ba1      
    Compare
  
    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 | 
…ons-once-aexited # Conflicts: # CHANGES.rst # aiobotocore/__init__.py
| Bumped major + updated branch :) | 
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)