STINNER Victor <[email protected]> added the comment:
me:
> 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:
https://github.com/cython/cython/commit/f10a0a391edef10bd37095af87f521808cb362f7
But again, this problem is not about correctness, but more about practical
backward compatibility issues (see my first message).
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue37250>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com