Author vstinner
Recipients petr.viktorin, pitrou, vstinner
Date 2020-12-25.23:48:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1608940087.88.0.458230907712.issue42747@roundup.psfhosted.org>
In-reply-to
Content
Since the PyTypeObject structure is excluded from the limited C API and the stable ABI on purpose (PEP 384), I don't see the purpose of the Py_TPFLAGS_HAVE_VERSION_TAG flag.

Moreover, a new flag was added recently:

#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030A0000
/* Type has am_send entry in tp_as_async slot */
#define Py_TPFLAGS_HAVE_AM_SEND (1UL << 21)
#endif

Should it be also removed?


For example, Py_TPFLAGS_HAVE_FINALIZE was deprecated in bpo-32388 by:

commit ada319bb6d0ebcc68d3e0ef2b4279ea061877ac8
Author: Antoine Pitrou <antoine@python.org>
Date:   Wed May 29 22:12:38 2019 +0200

    bpo-32388: Remove cross-version binary compatibility requirement in tp_flags (GH-4944)
    
    It is now allowed to add new fields at the end of the PyTypeObject struct without having to allocate a dedicated compatibility flag i
n tp_flags.
    
    This will reduce the risk of running out of bits in the 32-bit tp_flags value.


By the way, is it worth it to remove Py_TPFLAGS_HAVE_FINALIZE? Or is it going to break too many extension modules?
History
Date User Action Args
2020-12-25 23:48:07vstinnersetrecipients: + vstinner, pitrou, petr.viktorin
2020-12-25 23:48:07vstinnersetmessageid: <1608940087.88.0.458230907712.issue42747@roundup.psfhosted.org>
2020-12-25 23:48:07vstinnerlinkissue42747 messages
2020-12-25 23:48:07vstinnercreate