diff options
author | Thomas A Caswell <tcaswell@gmail.com> | 2019-10-14 14:48:59 -0400 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2019-10-14 20:48:59 +0200 |
commit | 2d62a208e533cadc98b789d5988ecc86763eb890 (patch) | |
tree | 71d66f45c372439c0956a3182922304df15f0ddf | |
parent | 4d437f24a469fef2424f3fb5bfae58f68eafac1f (diff) | |
download | cython-2d62a208e533cadc98b789d5988ecc86763eb890.tar.gz |
FIX: do not include tp_print for py39 (GH-3186)
This is more follow up to https://bugs.python.org/issue37250
The action taken is:
- restore tp_print to not break all of the sdists on pypi for py38
- remove tp_print for real in py39
In https://github.com/cython/cython/pull/3171 tp_print was initialized
for PY_VERSION_HEX >= 0x030800b4 however, when trying to use cython
with cpython master (aka py39) there are compile time exceptions due
to too many initializers:
error: too many initializers for ‘PyTypeObject’ {aka ‘_typeobject’}
This fixes that by putting an upper bound on the ifdef of including
pt_print at the end of the object.
-rw-r--r-- | Cython/Compiler/TypeSlots.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Cython/Compiler/TypeSlots.py b/Cython/Compiler/TypeSlots.py index dca313ca5..5a84bc89e 100644 --- a/Cython/Compiler/TypeSlots.py +++ b/Cython/Compiler/TypeSlots.py @@ -957,7 +957,7 @@ slot_table = ( EmptySlot("tp_version_tag"), EmptySlot("tp_finalize", ifdef="PY_VERSION_HEX >= 0x030400a1"), EmptySlot("tp_vectorcall", ifdef="PY_VERSION_HEX >= 0x030800b1"), - EmptySlot("tp_print", ifdef="PY_VERSION_HEX >= 0x030800b4"), + EmptySlot("tp_print", ifdef="PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000"), ) #------------------------------------------------------------------------------------------ |