PyGC_HEAD is private in Python 3.9

Bug #1899379 reported by Jelmer Vernooij
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Meliae
New
Undecided
Unassigned

Bug Description

As of Python 3.9, PyGC_HEAD (which meliae relies on) is private.

See https://bugs.python.org/issue40241 for background

Compilation error:

creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/meliae
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c meliae/_scanner.c -o build/temp.linux-x86_64-3.9/meliae/_scanner.o
meliae/_scanner.c: In function ‘__pyx_pymod_exec__scanner’:
meliae/_scanner.c:3435:46: error: ‘PyGC_Head’ undeclared (first use in this function)
 3435 | __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(PyGC_Head))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error)
      | ^~~~~~~~~
meliae/_scanner.c:3435:46: note: each undeclared identifier is reported only once for each function it appears in
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1

An obvious fix would be to import PyGC_HEAD from internal/pycore_gc.h, but that would leave meliae open to ABI changes between minor releases.

Revision history for this message
themusicgod1 (themusicgod1) wrote :

According to the bug linked above ...they set it to the public again

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.