8000 bpo-24766: doc= argument to subclasses of property not handled correctly by embray · Pull Request #2487 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-24766: doc= argument to 8000 subclasses of property not handled correctly #2487

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 5 commits into from
Jun 10, 2024

Conversation

embray
Copy link
Contributor
@embray embray commented Jun 29, 2017

Here's a PR for a small fix I've had languishing for it looks like a couple years now. Do I need to add a blurb as well?

https://bugs.python.org/issue24766

#68954

@mscuthbert
Copy link

should this have "awaiting merge" as a tag?

@embray
Copy link
Contributor Author
embray commented Oct 6, 2017

I don't know. I guess?

@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I didn't expect the Spanish Inquisition!. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@embray
Copy link
Contributor Author
embray commented Oct 9, 2018

Forgot about this for a ah, long time.
Rebased on latest master and addressed Serhiy's review comments.

@serhiy-storchaka
Copy link
Member
>>> class NoDoc:
...     @property
...     def __doc__(self):
...         raise AttributeError
... 
>>> class PropertySub(property):
...     """This is a subclass of property"""
... 
>>> property(NoDoc()).__doc__
>>> PropertySub(NoDoc()).__doc__
'This is a subclass of property'

@embray
Copy link
Contributor Author
embray commented Oct 9, 2018

I see... is there a test for this (bizarre) case? Perhaps there should be?

@embray
Copy link
Contributor Author
embray commented Oct 9, 2018

In fact, I'm not really sure what you're suggesting be done here.

@serhiy-storchaka
Copy link
Member

I suggest that the property subclass should be consistent with property, i.e. return None.

There is no test for this case, and I suggest to add one.

@embray
Copy link
Contributor Author
embray commented Oct 9, 2018

I agree, though this appears to be a different issue. Your case is broken the same way with or without this patch and is not the same as the specific issue that this is fixing. Though I don't mind fixing both as long as I'm monkeying around in there...

@serhiy-storchaka
Copy link
Member

It looks just as a corner case of the original. I think it should be fixed in this PR.

@csabella
Copy link
Contributor

@embray, please address Serhiy's last comment and also resolve the merge conflict. Thank you!

@embray
Copy link
Contributor Author
embray commented Jan 28, 2020

@csabella Rebased, and addressed @serhiy-storchaka's corner case, which I agree was related.

@serhiy-storchaka serhiy-storchaka added needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes and removed stale Stale PR or inactive for long period of time. labels Dec 15, 2023
@serhiy-storchaka serhiy-storchaka enabled auto-merge (squash) December 15, 2023 13:09
@terryjreedy
Copy link
Member

@embray Please click the button in #2487 (comment) to re-sign the CLA with your current GH email. It is needed to merge here.

Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Jan 16, 2024
@serhiy-storchaka serhiy-storchaka added needs backport to 3.13 bugs and security fixes and removed needs backport to 3.11 only security fixes labels May 9, 2024
@github-actions github-actions bot removed the stale Stale PR or inactive for long period of time. label May 9, 2024
Copy link
github-actions bot commented Jun 9, 2024

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Jun 9, 2024
@serhiy-storchaka serhiy-storchaka merged commit 4829522 into python:main Jun 10, 2024
3 checks passed
@miss-islington-app
Copy link

Thanks @embray for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 10, 2024
…tly (pythonGH-2487)

(cherry picked from commit 4829522)

Co-authored-by: E. M. Bray <erik.bray@lri.fr>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@miss-islington-app
Copy link

Sorry, @embray and @serhiy-storchaka, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 4829522b8d3e1a28930f1cccfcc9635e035a0eb4 3.12

@bedevere-app
Copy link
bedevere-app bot commented Jun 10, 2024

GH-120305 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Jun 10, 2024
@embray embray deleted the bpo-24766 branch June 10, 2024 08:57
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Jun 10, 2024
… correctly (pythonGH-2487)

(cherry picked from commit 4829522)

Co-authored-by: E. M. Bray <erik.bray@lri.fr>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-app
Copy link
bedevere-app bot commented Jun 10, 2024

GH-120312 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Jun 10, 2024
serhiy-storchaka added a commit that referenced this pull request Jun 10, 2024
… correctly (GH-2487) (GH-120312)

(cherry picked from commit 4829522)

Co-authored-by: E. M. Bray <erik.bray@lri.fr>
serhiy-storchaka added a commit that referenced this pull request Jun 11, 2024
… correctly (GH-2487) (GH-120305)

(cherry picked from commit 4829522)

Co-authored-by: E. M. Bray <erik.bray@lri.fr>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
mrahtz pushed a commit to mrahtz/cpython that referenced this pull request Jun 30, 2024
…tly (pythonGH-2487)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
noahbkim pushed a commit to hudson-trading/cpython that referenced this pull request Jul 11, 2024
…tly (pythonGH-2487)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
…tly (pythonGH-2487)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Stale PR or inactive for long period of time.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants
0