Skip to content
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

[PR #5725/4f48e3f7 backport][3.8] Update docs on request cookies #5735

Conversation

patchback[bot]
Copy link
Contributor

@patchback patchback bot commented May 25, 2021

This is a backport of PR #5725 as merged into master (4f48e3f).

What do these changes do?

Update docs on request cookies type, so it matches what is actually used in the code

@reify
def cookies(self) -> Mapping[str, str]:
"""Return request cookies.
A read-only dictionary-like object.
"""
raw = self.headers.get(hdrs.COOKIE, "")
parsed = SimpleCookie(raw) # type: SimpleCookie[str]
return MappingProxyType({key: val.value for key, val in parsed.items()})

Are there changes in behavior for the user?

No

Related issue number

No (I searched, but did not find any)

Checklist

  • I think the code is well written: N/A
  • Unit tests for the changes exist: N/A
  • Documentation reflects the changes: N/A
  • If you provide code modification, please add yourself to CONTRIBUTORS.txt: N/A
    • The format is <Name> <Surname>.
    • Please keep alphabetical order, the file is sorted by names.
  • Add a new news fragment into the CHANGES folder
    • name it <issue_id>.<type> for example (588.bugfix)
    • if you don't have an issue_id change it to the pr id after creating the pr
    • ensure type is one of the following:
      • .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.
    • Make sure to use full sentences with correct case and punctuation, for example: "Fix issue with non-ascii contents in doctest text files."

* Update docs on request cookies

So it matches what is actually used in the code
See https://github.com/aio-libs/aiohttp/blob/63eb6ff550b2ba9f13cf5248980a4958e14a1af7/aiohttp/web_request.py#L565-L573

* Add docs reference for request.cookies type

(cherry picked from commit 4f48e3f)
@patchback patchback bot mentioned this pull request May 25, 2021
5 tasks
@webknjaz webknjaz enabled auto-merge (squash) May 25, 2021 12:06
@codecov
Copy link

codecov bot commented May 25, 2021

Codecov Report

Merging #5735 (4f48e3f) into 3.8 (8ce3013) will decrease coverage by 0.35%.
The diff coverage is 97.04%.

❗ Current head 4f48e3f differs from pull request most recent head 41464fc. Consider uploading reports for the commit 41464fc to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##              3.8    #5735      +/-   ##
==========================================
- Coverage   97.53%   97.17%   -0.36%     
==========================================
  Files          44       41       -3     
  Lines        8844     8865      +21     
  Branches     1424     1425       +1     
==========================================
- Hits         8626     8615      -11     
- Misses        102      133      +31     
- Partials      116      117       +1     
Flag Coverage Δ
unit 97.06% <96.78%> (-0.31%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
aiohttp/web_protocol.py 86.41% <ø> (-4.20%) ⬇️
aiohttp/web_request.py 95.99% <ø> (-1.57%) ⬇️
aiohttp/web_response.py 98.21% <ø> (-0.06%) ⬇️
aiohttp/web_routedef.py 98.13% <ø> (+0.03%) ⬆️
aiohttp/web_runner.py 97.74% <ø> (+0.11%) ⬆️
aiohttp/web_server.py 94.28% <ø> (-5.72%) ⬇️
aiohttp/web_urldispatcher.py 97.83% <ø> (+0.23%) ⬆️
aiohttp/worker.py 94.91% <ø> (-1.81%) ⬇️
aiohttp/locks.py 92.85% <66.66%> (ø)
aiohttp/resolver.py 93.33% <81.25%> (-1.83%) ⬇️
... and 69 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2e25d38...41464fc. Read the comment docs.

@webknjaz webknjaz merged commit 11cae40 into 3.8 May 25, 2021
@webknjaz webknjaz deleted the patchback/backports/3.8/4f48e3f74549053dda7ea359c34e063660a7ead0/pr-5725 branch May 25, 2021 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants