[3.8] bpo-37250: put back tp_print for backwards compatibility (GH-14193)
This is a 3.8-only compatibility measure for third-party Cython-based sdists.
https://bugs.python.org/issue37250
diff --git a/Include/cpython/object.h b/Include/cpython/object.h
index a65aaf6..5a0ac4a 100644
--- a/Include/cpython/object.h
+++ b/Include/cpython/object.h
@@ -256,6 +256,9 @@
destructor tp_finalize;
vectorcallfunc tp_vectorcall;
+ /* bpo-37250: kept for backwards compatibility in CPython 3.8 only */
+ Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
+
#ifdef COUNT_ALLOCS
/* these must be last and never explicitly initialized */
Py_ssize_t tp_allocs;