Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 33.9k
gh-106016: Support customizing of module attributes access with __setattr__/__delattr__ (PEP 726)#108261
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
skirpichev commented Aug 22, 2023 • edited by github-actions bot
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by github-actions bot
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.
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.
Misc/NEWS.d/next/Core and Builtins/2023-08-22-09-57-59.gh-issue-106016.lpbUq8.rstShow resolvedHide resolved
Uh oh!
There was an error while loading. Please reload this page.
bedevere-bot commented Aug 22, 2023
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 |
skirpichev commented Aug 22, 2023
@vstinner, I have made the requested changes; please review again. But please see remarks about PyDict_GetItemRef() & PEP 562 test layout above. |
bedevere-bot commented Aug 22, 2023
Thanks for making the requested changes! @vstinner: please review the changes made to this pull request. |
vstinner commented Aug 22, 2023
I created PR #108293 to add Lib/test/test_module/ directory. Once it will be merged, you can rebased your PR on top of it. |
vstinner commented Aug 22, 2023
Can you please rebase your PR on the main branch to get my #108293 change? (New Lib/test/test_module/ directory.) |
… __setattr__/__delattr__
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
7e72a68 to 47d93ceCompareskirpichev commented Aug 22, 2023
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.
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.
vstinner commented Aug 23, 2023
With proposed fixed, |
Co-authored-by: Victor Stinner <vstinner@python.org>
vstinner left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
skirpichev commented Aug 24, 2023
@vstinner, wait! Are you sure this pr doesn't require a PEP? |
Uh oh!
There was an error while loading. Please reload this page.
AA-Turner commented Aug 24, 2023
We have a PEP for adding only one attribute ( A |
skirpichev commented Aug 24, 2023
This seems to be broken on the main branch as well.
And PEP 562 (two attributes). Fair enough.
I've a draft PEP: https://raw.githubusercontent.com/skirpichev/peps/7cc52e7/pep-9999.rst |
AA-Turner commented Aug 24, 2023
I'm happy to sponsor if you'd like? A |
skirpichev commented Aug 24, 2023 via email • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
On Wed, Aug 23, 2023 at 06:21:16PM -0700, Adam Turner wrote: I'm happy to sponsor Ok. I'll prepare a PR today. UPD: python/peps#3301 |
vstinner commented Oct 7, 2023
Update: PEP 726 – Module |
terryjreedy commented Dec 20, 2023
Even though Victor closed #106016, I think that this can remain open until the SC decides on the PEP. If it says no, close this. If yes, open a new issue and retarget this by editing the title with the new number. And edit further if required. |
skirpichev commented Dec 21, 2023
Not sure I got idea of this bureaucracy:) If it's required to have an issue for a pr (as it seems) - we already have an associated issue, #106016. |
skirpichev commented Feb 25, 2024
Merge conflict was fixed & added the reference to pep in docs. |
skirpichev commented Feb 28, 2024
Thanks for review and sponsoring the pep. |
I'm not sure if this does require a PEP (e.g. Brett Cannon on d.p.o discussion thread told me that it "not necessarily"). If so, I've a draft PEP here: https://github.com/skirpichev/peps/tree/setdelattr (And I'm looking for feedback and a sponsor.)
@vstinner
References
__delattr__method.)📚 Documentation preview 📚: https://cpython-previews--108261.org.readthedocs.build/