gh-89519: Remove classmethod descriptor chaining, deprecated since 3.11#110163
Conversation
|
I'm still working on the doctest for the descriptor howto. It looks like the classmethod emulation is imperfect after the classproperty has been removed. |
|
Will this break the pattern described as an alternative to |
|
@KevinMGranger The examples for combining Note, these examples have worked since Python 3.3 which was long before the broken descriptor chaining arrived in Python 3.9. So, they are independent of the change being reverted. Thanks for asking. |
…11 (#110163) Summary: backporting [Raymond Hettinger's `remove_classmethod_descriptor_chaining` branch](https://github.com/rhettinger/cpython/tree/remove_classmethod_descriptor_chaining) (pending upstream PR [GH-110163](python/cpython#110163)), part of upstream issue [GH-89519](python/cpython#89519) Reviewed By: swtaarrs Differential Revision: D50534886 fbshipit-source-id: 05b29193ce220f0d91fd0df8d5cef34d7e923456
|
Looking forward to see this getting merged! fwiw, I ran into an issue related to classmethod descriptor chaining in the Meta codebase -- some code (that was written for Python 3.8, doing a bunch of signature and type inspection of decorated methods) started breaking under Python 3.10. If it helps with confidence in the removal - this PR (cleanly backported to 3.10) is running in production (in Instagram and other Meta Python services), after all internal test suites passed (including the full Instagram test suite). |
|
@itamaro Thank you for your comment. Indeed, it does increase the confidence in the PR. |
|
🤖 New build scheduled with the buildbot fleet by @rhettinger for commit 291ed52 🤖 If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
…ted since 3.11) Summary: backport upstream PRs python/cpython#110163 and python/cpython#113233 upstream issues: python/cpython#89519 (Calling help executes classmethod property decorated methods) and python/cpython#113157 (Changed behavior of <instancemethod>.__get__ in Python 3.11) upstream commits: [`7f9a99e8549b792662f2cd28bf38a4d4625bd402`](python/cpython@7f9a99e) and [`d058eaeed44766a8291013b275ad22f153935d3b`](python/cpython@d058eae) Reviewed By: aleivag Differential Revision: D52014322 fbshipit-source-id: 87de6d9587bd9cc49f053ca340adfc469b041f91
…a new dedicated `AutoConfigClassMethod` descriptor. This is necessary because Python 3.13 no longer recognizes descriptor chaining: python/cpython#110163 PiperOrigin-RevId: 855235679
…a new dedicated `AutoConfigClassMethod` descriptor. This is necessary because Python 3.13 no longer recognizes descriptor chaining: python/cpython#110163 PiperOrigin-RevId: 855235679
…a new dedicated `AutoConfigClassMethod` descriptor. This is necessary because Python 3.13 no longer recognizes descriptor chaining: python/cpython#110163 PiperOrigin-RevId: 855235679
…a new dedicated `AutoConfigClassMethod` descriptor. This is necessary because Python 3.13 no longer recognizes descriptor chaining: python/cpython#110163 PiperOrigin-RevId: 855235679
…a new dedicated `AutoConfigClassMethod` descriptor. This is necessary because Python 3.13 no longer recognizes descriptor chaining: python/cpython#110163 PiperOrigin-RevId: 855235679
…a new dedicated `AutoConfigClassMethod` descriptor. This is necessary because Python 3.13 no longer recognizes descriptor chaining: python/cpython#110163 PiperOrigin-RevId: 855235679
…a new dedicated `AutoConfigClassMethod` descriptor. This is necessary because Python 3.13 no longer recognizes descriptor chaining: python/cpython#110163 PiperOrigin-RevId: 856608179
helpexecutes @classmethod @property decorated methods #89519📚 Documentation preview 📚: https://cpython-previews--110163.org.readthedocs.build/