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 vstinner
Recipients jdemeyer, petr.viktorin, scoder, vstinner
Date 2019-06-12.13:36:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> I understand that tp_vectorcall_offset=0 is fine and the expected value for a type which doesn't have the flag _Py_TPFLAGS_HAVE_VECTORCALL.

Jeroen Demeyer:
> Not necessarily. There are subtleties involved when subclassing: there are cases where tp_vectorcall_offset needs to be non-zero despite _Py_TPFLAGS_HAVE_VECTORCALL not being set. See also PR 13858.

Cython generates C code which looks like:

if (PyType_Ready(type) < 0) { ... handle error ... }
type->tp_print = 0;

This code can cause subtle and annoying issue if PR 13858 is merged. So that's another argument in favor of reintroducing tp_print in Python 3.8.


Cython has already been fixed to no longer set tp_print to 0 on Python 3.8:

But again, this problem is not about correctness, but more about practical backward compatibility issues (see my first message).
Date User Action Args
2019-06-12 13:36:43vstinnersetrecipients: + vstinner, scoder, petr.viktorin, jdemeyer
2019-06-12 13:36:43vstinnersetmessageid: <>
2019-06-12 13:36:43vstinnerlinkissue37250 messages
2019-06-12 13:36:42vstinnercreate