-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Added properties of default ClientSession params to ClientSession class #4240
Conversation
…ss so it is available for introspection now
Codecov Report
@@ Coverage Diff @@
## master #4240 +/- ##
=======================================
Coverage 97.55% 97.55%
=======================================
Files 43 43
Lines 8841 8841
Branches 1383 1383
=======================================
Hits 8625 8625
Misses 93 93
Partials 123 123 Continue to review full report at Codecov.
|
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.
The code is correct.
Please document added public attributes in ./docs/client_reference.rst
.
Please use .. versionadded:: 3.7
tag
aiohttp/client.py
Outdated
@@ -918,6 +919,60 @@ def timeout(self) -> Union[object, ClientTimeout]: | |||
"""Timeout for the session.""" | |||
return self._timeout | |||
|
|||
@property | |||
def default_headers(self) -> 'CIMultiDict[str]': |
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.
def default_headers(self) -> 'CIMultiDict[str]': | |
def headers(self) -> 'CIMultiDict[str]': |
Let's keep property names in sync with constructor parameters
…default_headers property to headers so that it matches the constructor of the ClientSession
Thanks! |
What do these changes do?
Added properties of default ClientSession params to ClientSession class so it is available for introspection now
Are there changes in behavior for the user?
Users can now see which default parameters were initialized with ClientSession
Related issue number
This commit fixes #3882
Checklist
CONTRIBUTORS.txt
CHANGES
folder<issue_id>.<type>
for example (588.bugfix)issue_id
change it to the pr id after creating the pr.feature
: Signifying a new feature..bugfix
: Signifying a bug fix..doc
: Signifying a documentation improvement..removal
: Signifying a deprecation or removal of public API..misc
: A ticket has been closed, but it is not of interest to users.