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:50:46 +0200 |
commit | aa56a6b108de18138dfcf8722610327024b11dd9 (patch) | |
tree | 7ace0a947428f2e0d09d7e323b4645eea0cb4653 | |
parent | cb1e6e410864d1a8474f2ebd1482f63e59d7b346 (diff) | |
download | cython-aa56a6b108de18138dfcf8722610327024b11dd9.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 8fc20e76d..137ea4eba 100644 --- a/Cython/Compiler/TypeSlots.py +++ b/Cython/Compiler/TypeSlots.py @@ -889,7 +889,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"), ) #------------------------------------------------------------------------------------------ |