Uh oh!
There was an error while loading. Please reload this page.
bpo-41287: Handle doc argument of property.__init__ in subclasses - #23205
Conversation
the-knights-who-say-ni
commented
Nov 9, 2020
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). CLA MissingOur records indicate the following people have not signed the CLA: For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. If you have recently signed the CLA, please wait at least one business day You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
c33eb5a to
73e81e4CompareThis PR is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days |
sizmailov
commented
Dec 16, 2020
unstale |
This PR is stale because it has been open for 30 days with no activity. |
MaxwellDupre
left a comment
There was a problem hiding this comment.
Works for me.
./python -m test -v test_pydoc
Ran 74 tests in 32.947s
OK (skipped=3)
test_pydoc passed in 33.1 sec
== Tests result: SUCCESS ==
1 test OK.
Total duration: 33.1 sec
Tests result: SUCCESS
cpython on fix-issue41287 [$?] via 🐍 v3.11.0a5+ took 33s
JelleZijlstra
left a comment
There was a problem hiding this comment.
Thanks, and sorry this took so long! Unfortunately this needs a merge conflict fixed now. It also needs a NEWS entry.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
sizmailov
commented
Apr 3, 2022
Rebased branch on current |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
bedevere-bot
commented
Apr 5, 2022
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 |
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
sizmailov
commented
May 22, 2022
I think I found the leak. Can we run CI one more time, please? |
bedevere-bot
commented
May 22, 2022
🤖 New build scheduled with the buildbot fleet by @JelleZijlstra for commit fb8c2d4 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
There was a problem hiding this comment.
Here are the last two things I want to add to this PR:
- add a comment about
prop_docand - shortened version for the property branch.
I don't want to disrupt the current CI, so I'll push changes once it finishes.
EDIT: I pushed two more commits when CI reached 81 successful, 1 failure (same as in current main), and 1 stuck jobs.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
sizmailov
commented
May 27, 2022
@JelleZijlstra Could you please take another look at the PR :) This time everything should be in place. |
bedevere-bot
commented
May 27, 2022
🤖 New build scheduled with the buildbot fleet by @JelleZijlstra for commit 36fc1b0 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
JelleZijlstra
commented
May 27, 2022
I triggered the buildbots to make sure, I'll review the PR again tonight. Thanks for your work! |
JelleZijlstra
left a comment
There was a problem hiding this comment.
Looks good, just a few typos in the comments
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Fix typos in comments Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
JelleZijlstra
commented
May 29, 2022
Congratulations on your first contribution to Python! |
encukou
commented
Nov 3, 2022
This breaks subclasses that don't have a writable |
gpshead
commented
Jun 3, 2023
Please see #105262 which restores the behavior this broke. |
This PR extracts docstrings from static fields defined via `def_property_readonly_static` and `def_property_static`. This is based on the observation that the docstring for these fields is reachable from Python: ``` py >>> demo._bindings.properties.WithPropDoc.def_property_readonly_static 0 >>> demo._bindings.properties.WithPropDoc.__dict__['def_property_readonly_static'] <pybind11_builtins.pybind11_static_property object at 0x7bd623d73a70> >>> demo._bindings.properties.WithPropDoc.__dict__['def_property_readonly_static'].__doc__ 'prop doc token' ``` For each `Field` detected by pybind11-stubgen, `FixMissingFieldDocString` checks whether `__dict__[...]` is different from `obj`, which should only be the case for static properties. It then tries to use the dcostring in `__doc__`. ### Version compatibility This approach requires cpython 3.12+ as it relies on python/cpython#23205 and pybind11 2.10.1+ due to pybind/pybind11#4168
Process explicit
docargument ofproperty(...)in the same manner as docstring of getter function in property subclasses.This eliminates behavior differences between dummy
class Property(property): passandproperty(see test case for example)https://bugs.python.org/issue41287