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

Update docs on request cookies #5725

Merged
merged 2 commits into from
May 25, 2021
Merged

Update docs on request cookies #5725

merged 2 commits into from
May 25, 2021

Conversation

RasmusWL
Copy link
Contributor

@RasmusWL RasmusWL commented May 20, 2021

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."

@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label May 20, 2021
@RasmusWL RasmusWL marked this pull request as ready for review May 20, 2021 12:02
@RasmusWL
Copy link
Contributor Author

I did my best on wording, but I'm not normally a documentation writer 😊

@codecov

This comment has been minimized.


Read-only :class:`~multidict.MultiDictProxy` lazy property.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to have an intersphinx reference to the actual type in the CPython docs. https://webknjaz.github.io/intersphinx-untangled/docs.python.org should help you construct it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Should be fixed by 767f6f5

@webknjaz webknjaz enabled auto-merge (squash) May 25, 2021 11:59
@webknjaz webknjaz merged commit 4f48e3f into aio-libs:master May 25, 2021
@patchback
Copy link
Contributor

patchback bot commented May 25, 2021

Backport to 3.8: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.8/4f48e3f74549053dda7ea359c34e063660a7ead0/pr-5725

Backported as #5735

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request May 25, 2021
* 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)
webknjaz pushed a commit that referenced this pull request May 25, 2021
* 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)

Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
@RasmusWL RasmusWL deleted the patch-1 branch May 25, 2021 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot:chronographer:provided There is a change note present in this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants