Skip to content

docs: correct outdated MappingProxyType docstrings #30281

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

Merged
merged 1 commit into from
Jan 19, 2022
Merged

Conversation

jab
Copy link
Contributor

@jab jab commented Dec 28, 2021

The docstrings for MappingProxyType's keys(), values(), and items() methods were never updated to reflect the changes that Python 3 brought to these APIs, namely returning views rather than lists.

It looks like these docstrings were originally copy-pasted from dict's in the Python 2 days, but were never updated to match dict's updated docstrings when these APIs changed.

Ideally these would be DRY'd to prevent future drift, but will leave that for another day.

Looks like creating a BPO issue for this would not be normative for such a trivial PR, so I've skipped doing that.

Hope this helps!

The docstrings for MappingProxyType's keys(), values(), and items()
methods were never updated to reflect the changes that Python 3 brought
to these APIs, namely returning views rather than lists.
Copy link
Contributor

@kumaraditya303 kumaraditya303 left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

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

Good catch! We should probably backport these.

@miss-islington
Copy link
Contributor

Thanks @jab for the PR, and @gvanrossum for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10.
🐍🍒⛏🤖

@bedevere-bot
Copy link

@gvanrossum: Please replace # with GH- in the commit message next time. Thanks!

@bedevere-bot
Copy link

GH-30709 is a backport of this pull request to the 3.10 branch.

@bedevere-bot
Copy link

GH-30710 is a backport of this pull request to the 3.9 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Jan 19, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 19, 2022
The docstrings for MappingProxyType's keys(), values(), and items()
methods were never updated to reflect the changes that Python 3 brought
to these APIs, namely returning views rather than lists.
(cherry picked from commit 2d10fa9)

Co-authored-by: Joshua Bronson <jabronson@gmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 19, 2022
The docstrings for MappingProxyType's keys(), values(), and items()
methods were never updated to reflect the changes that Python 3 brought
to these APIs, namely returning views rather than lists.
(cherry picked from commit 2d10fa9)

Co-authored-by: Joshua Bronson <jabronson@gmail.com>
miss-islington added a commit that referenced this pull request Jan 19, 2022
The docstrings for MappingProxyType's keys(), values(), and items()
methods were never updated to reflect the changes that Python 3 brought
to these APIs, namely returning views rather than lists.
(cherry picked from commit 2d10fa9)

Co-authored-by: Joshua Bronson <jabronson@gmail.com>
miss-islington added a commit that referenced this pull request Jan 19, 2022
The docstrings for MappingProxyType's keys(), values(), and items()
methods were never updated to reflect the changes that Python 3 brought
to these APIs, namely returning views rather than lists.
(cherry picked from commit 2d10fa9)

Co-authored-by: Joshua Bronson <jabronson@gmail.com>
hello-adam pushed a commit to hello-adam/cpython that referenced this pull request Jun 2, 2022
The docstrings for MappingProxyType's keys(), values(), and items()
methods were never updated to reflect the changes that Python 3 brought
to these APIs, namely returning views rather than lists.
(cherry picked from commit 2d10fa9)

Co-authored-by: Joshua Bronson <jabronson@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip issue skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants