summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorJeroen Demeyer <J.Demeyer@UGent.be>2019-06-25 10:58:58 (GMT)
committerPetr Viktorin <encukou@gmail.com>2019-06-25 10:58:58 (GMT)
commitd917cfe4051d45b2b755c726c096ecfcc4869ceb (patch)
tree5a215b0791f2b96e222f233c98c9f96e936daa3b /Include
parentd32594ad27f48a898d42a0ea30b9d007b1c57de9 (diff)
downloadcpython-d917cfe4051d45b2b755c726c096ecfcc4869ceb.zip
cpython-d917cfe4051d45b2b755c726c096ecfcc4869ceb.tar.gz
cpython-d917cfe4051d45b2b755c726c096ecfcc4869ceb.tar.bz2
[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
Diffstat (limited to 'Include')
-rw-r--r--Include/cpython/object.h3
1 files changed, 3 insertions, 0 deletions
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 @@ typedef struct _typeobject {
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;