gh-135906: Test the internal C API in test_cext#136247
Conversation
|
I tried to check for C++ compiler warnings in internal Python C headers, but I got many C++ compiler errors in In file included from /usr/include/features.h:524,
from /usr/include/assert.h:35,
from /home/vstinner/python/main/Include/Python.h:19,
from extension.cpp:13:
/home/vstinner/python/main/Include/internal/mimalloc/mimalloc/types.h:73:33: error: expected unqualified-id before 'noexcept'
73 | #define mi_decl_throw __THROW
| ^~~~~~~
/home/vstinner/python/main/Include/internal/mimalloc/mimalloc/types.h:611:31: note: in expansion of macro 'mi_decl_throw'
611 | mi_decl_noreturn mi_decl_cold mi_decl_throw
| ^~~~~~~~~~~~~and In file included from /home/vstinner/python/main/Include/internal/pycore_mimalloc.h:44,
from /home/vstinner/python/main/Include/internal/pycore_tstate.h:13,
from /home/vstinner/python/main/Include/internal/pycore_pystate.h:13,
from extension.cpp:20:
/home/vstinner/python/main/Include/internal/mimalloc/mimalloc/internal.h: In function 'bool _mi_is_aligned(void*, size_t)':
/home/vstinner/python/main/Include/internal/mimalloc/mimalloc/types.h:613:49: error: '_mi_assert_fail' was not declared in this scope; did you mean '__assert_fail'?
613 | #define mi_assert(expr) ((expr) ? (void)0 : _mi_assert_fail(#expr,__FILE__,__LINE__,__func__))
| ^~~~~~~~~~~~~~~
/home/vstinner/python/main/Include/internal/mimalloc/mimalloc/types.h:619:31: note: in expansion of macro 'mi_assert'
619 | #define mi_assert_internal mi_assert
| ^~~~~~~~~
/home/vstinner/python/main/Include/internal/mimalloc/mimalloc/internal.h:273:3: note: in expansion of macro 'mi_assert_internal'
273 | mi_assert_internal(alignment != 0);
| ^~~~~~~~~~~~~~~~~~ |
|
I updated test_cppext to have a bare minimum test of the internal C API for now: test including |
|
Note to mysel: GitHub Action skips these tests which require the |
|
🤖 New build scheduled with the buildbot fleet by @vstinner for commit 69588da 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F136247%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
|
test_cext fails on on multiple buildbots (s390x Fedora Stable Clang PR, AMD64 FreeBSD PR, x86-64 macOS PR, ...) with: |
atexit_datacallbackfunc type is already defined by Include/cpython/pylifecycle.h.
|
🤖 New build scheduled with the buildbot fleet by @vstinner for commit 49faa0c 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F136247%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
|
test_cext fails on ARM64 Windows Non-Debug PR: |
|
🤖 New build scheduled with the buildbot fleet by @vstinner for commit 7870668 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F136247%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
|
ARM64 Windows Non-Debug PR failed. .TestInteralCAPI.test_build() failed with: and TestInteralCAPI.test_build_c11() fails with: |
|
!buildbot Windows |
|
🤖 New build scheduled with the buildbot fleet by @vstinner for commit 30c6265 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F136247%2Fmerge The command will test the builders whose names match following regular expression: The builders matched are:
|
|
On ARM64 Windows Non-Debug PR, TestInteralCAPI.test_build_c11() failed with: |
|
🤖 New build scheduled with the buildbot fleet by @vstinner for commit 9d4d697 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F136247%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
Remove duplicated definition: atexit_datacallbackfunc type is already defined by Include/cpython/pylifecycle.h.
Remove duplicated definition: atexit_datacallbackfunc type is already defined by Include/cpython/pylifecycle.h.
Remove duplicated definition: atexit_datacallbackfunc type is already defined by Include/cpython/pylifecycle.h.
Remove duplicated definition: atexit_datacallbackfunc type is already defined by Include/cpython/pylifecycle.h.
Uh oh!
There was an error while loading. Please reload this page.