This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author GBeauregard
Recipients GBeauregard, JelleZijlstra, eric.smith
Date 2022-02-11.19:22:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1644607353.75.0.951716063406.issue46511@roundup.psfhosted.org>
In-reply-to
Content
It occurred to be that we do need to add the __call__ to KW_ONLY, but for a different reason than this bpo:

If you call get_type_hints on a dataclass with a KW_ONLY parameter when PEP 563 is enabled, the entire call will fail if KW_ONLY isn't callable(). This can also happen if you stringize KW_ONLY without PEP 563. I made a bpo to suggest removing the callable() check entirely, but it's waiting discussion currently: https://bugs.python.org/issue46644

My feeling is you probably wanted to wait on making changes of this kind for the 5.11 PEP 563 et al decision to play out, but on the other hand I think the KW_ONLY (and similar __call__ method for InitVar this patch already adds) change would likely be backportable so we may want to make them anyway for that purpose. Do you have an opinion on this?

This patch might be backportable to mirror https://bugs.python.org/issue46491 but I don't have a strong opinion on that.
History
Date User Action Args
2022-02-11 19:22:33GBeauregardsetrecipients: + GBeauregard, eric.smith, JelleZijlstra
2022-02-11 19:22:33GBeauregardsetmessageid: <1644607353.75.0.951716063406.issue46511@roundup.psfhosted.org>
2022-02-11 19:22:33GBeauregardlinkissue46511 messages
2022-02-11 19:22:33GBeauregardcreate