Add symbols of the stable ABI to python3dll.c#23598
Conversation
Sorry, something went wrong.
|
Can we please stop exposing There is no way to prevent race conditions when used from without the GIL held. The lifetime of a |
Sorry, something went wrong.
I guess that you are talking about bpo-39947. Functions are added to the limited C API in Python 3.9. The purpose of this issue is to make the PyThreadState structure opaque, currently C extensions access directly PyThreadState members. I suggest you to discuss on bpo-39947 directly. This issue is only about fixing the Windows implementation for the stable ABI. |
Sorry, something went wrong.
|
I like this PR, but GH-23415 is already open for the addition of |
Sorry, something went wrong.
|
Are these already exposed in the headers with |
Sorry, something went wrong.
This PR doesn't move any function to the stable ABI. They are already part of the stable API. This PR only fix the Windows implementation of the stable ABI. |
Sorry, something went wrong.
alex
left a comment
There was a problem hiding this comment.
We really need to find a way to make sure we're not constantly leaving windows abi3 in a broken state.
Sorry, something went wrong.
|
@alex: "We really need to find a way to make sure we're not constantly leaving windows abi3 in a broken state." Pablo is working on a Linux tool for that: Tools/scripts/stable_abi.py It shouldn't be too hard to check that Doc/data/stable_abi.dat and PC/python3dll.c are kept in sync (in the "Tests / Check if generated files are up to date" CI job). |
Sorry, something went wrong.
|
Wonderful!
…On Wed, Dec 16, 2020 at 9:08 AM Victor Stinner ***@***.***> wrote:
@alex <https://github.com/alex>: "We really need to find a way to make
sure we're not constantly leaving windows abi3 in a broken state."
Pablo is working on a Linux tool for that: Tools/scripts/stable_abi.py
It shouldn't be too hard to check that Doc/data/stable_abi.dat and
PC/python3dll.c are kept in sync (in the "Tests / Check if generated files
are up to date" CI job).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#23598 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAGBBZGBK24C6RYD5TVP3SVC5MZANCNFSM4UJE7ZSQ>
.
--
All that is necessary for evil to succeed is for good people to do nothing.
|
Sorry, something went wrong.
|
I manually backported the change to 3.9 which uses a different format for the Windows stable ABI: PR #23801. |
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot AMD64 Fedora Stable LTO 3.x has failed when building commit fcc6935. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/271/builds/935 Failed tests:
Summary of the results of the build (if available): == Click to see traceback logsremote: Enumerating objects: 7, done.
remote: Counting objects: 14% (1/7)
remote: Counting objects: 28% (2/7)
remote: Counting objects: 42% (3/7)
remote: Counting objects: 57% (4/7)
remote: Counting objects: 71% (5/7)
remote: Counting objects: 85% (6/7)
remote: Counting objects: 100% (7/7)
remote: Counting objects: 100% (7/7), done.
remote: Compressing objects: 25% (1/4)
remote: Compressing objects: 50% (2/4)
remote: Compressing objects: 75% (3/4)
remote: Compressing objects: 100% (4/4)
remote: Compressing objects: 100% (4/4), done.
remote: Total 4 (delta 3), reused 0 (delta 0), pack-reused 0
From https://github.com/python/cpython
* branch master -> FETCH_HEAD
Reset branch 'master'
In function ‘emit_pair’,
inlined from ‘emit_delta’ at Objects/codeobject.c:423:14,
inlined from ‘code_getlnotab’ at Objects/codeobject.c:462:18:
Objects/codeobject.c:414:15: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
414 | *lnotab++ = b;
| ~~~~~~~~~~^~~
In function ‘emit_pair’,
inlined from ‘emit_delta’ at Objects/codeobject.c:436:14,
inlined from ‘code_getlnotab’ at Objects/codeobject.c:462:18:
Objects/codeobject.c:414:15: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
414 | *lnotab++ = b;
| ~~~~~~~~~~^~~
In function ‘emit_pair’,
inlined from ‘emit_delta’ at Objects/codeobject.c:429:14,
inlined from ‘code_getlnotab’ at Objects/codeobject.c:462:18:
Objects/codeobject.c:414:15: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
414 | *lnotab++ = b;
| ~~~~~~~~~~^~~
In function ‘assemble_emit_linetable_pair’,
inlined from ‘assemble_line_range’ at Python/compile.c:5577:18:
Python/compile.c:5549:15: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
5549 | *lnotab++ = ldelta;
| ~~~~~~~~~~^~~~~~~~
In function ‘assemble_emit_linetable_pair’,
inlined from ‘assemble_line_range’ at Python/compile.c:5571:18:
Python/compile.c:5549:15: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
5549 | *lnotab++ = ldelta;
| ~~~~~~~~~~^~~~~~~~
In function ‘assemble_emit_linetable_pair’,
inlined from ‘assemble’ at Python/compile.c:5992:10:
Python/compile.c:5549:15: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
5549 | *lnotab++ = ldelta;
| ~~~~~~~~~~^~~~~~~~
In function ‘assemble_emit_linetable_pair’,
inlined from ‘assemble_line_range’ at Python/compile.c:5577:18:
Python/compile.c:5549:15: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
5549 | *lnotab++ = ldelta;
| ^
In function ‘assemble_emit_linetable_pair’,
inlined from ‘assemble_line_range’ at Python/compile.c:5571:18:
Python/compile.c:5549:15: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
5549 | *lnotab++ = ldelta;
| ^
In function ‘assemble_emit_linetable_pair’,
inlined from ‘assemble_line_range’ at Python/compile.c:5577:18:
Python/compile.c:5549:15: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
5549 | *lnotab++ = ldelta;
| ^
In function ‘assemble_emit_linetable_pair’,
inlined from ‘assemble_line_range’ at Python/compile.c:5571:18:
Python/compile.c:5549:15: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
5549 | *lnotab++ = ldelta;
| ^
In function ‘emit_pair’,
inlined from ‘emit_delta’ at Objects/codeobject.c:423:14,
inlined from ‘code_getlnotab’ at Objects/codeobject.c:462:18:
Objects/codeobject.c:414:15: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
414 | *lnotab++ = b;
| ^
In function ‘emit_pair’,
inlined from ‘emit_delta’ at Objects/codeobject.c:436:14,
inlined from ‘code_getlnotab’ at Objects/codeobject.c:462:18:
Objects/codeobject.c:414:15: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
414 | *lnotab++ = b;
| ^
In function ‘emit_pair’,
inlined from ‘emit_delta’ at Objects/codeobject.c:429:14,
inlined from ‘code_getlnotab’ at Objects/codeobject.c:462:18:
Objects/codeobject.c:414:15: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
414 | *lnotab++ = b;
| ^
In function ‘emit_pair’,
inlined from ‘emit_delta’ at Objects/codeobject.c:423:14,
inlined from ‘code_getlnotab’ at Objects/codeobject.c:462:18:
Objects/codeobject.c:414:15: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
414 | *lnotab++ = b;
| ^
In function ‘emit_pair’,
inlined from ‘emit_delta’ at Objects/codeobject.c:436:14,
inlined from ‘code_getlnotab’ at Objects/codeobject.c:462:18:
Objects/codeobject.c:414:15: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
414 | *lnotab++ = b;
| ^
In function ‘emit_pair’,
inlined from ‘emit_delta’ at Objects/codeobject.c:429:14,
inlined from ‘code_getlnotab’ at Objects/codeobject.c:462:18:
Objects/codeobject.c:414:15: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
414 | *lnotab++ = b;
| ^
In function ‘assemble_emit_linetable_pair’,
inlined from ‘assemble’ at Python/compile.c:5992:0:
Python/compile.c:5549:15: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
5549 | *lnotab++ = ldelta;
| ^
In function ‘assemble_emit_linetable_pair’,
inlined from ‘assemble’ at Python/compile.c:5992:0:
Python/compile.c:5549:15: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
5549 | *lnotab++ = ldelta;
| ^
test_tk skipped -- Tk unavailable due to TclError: no display name and no $DISPLAY environment variab [...]
test_tix skipped -- Tk unavailable due to TclError: no display name and no $DISPLAY environment variab [...]
test_ioctl skipped -- Unable to open /dev/tty
test_ttk_guionly skipped -- Tk unavailable due to TclError: no display name and no $DISPLAY environment variab [...]
test_winconsoleio skipped -- test only relevant on win32
test_startfile skipped -- object <module 'os' from '/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/os.py'> has no attribute 'startfile'
test_flock (__main__.FNTLEINTRTest) ... ok
test_lockf (__main__.FNTLEINTRTest) ... ok
test_read (__main__.OSEINTRTest) ... ok
test_wait (__main__.OSEINTRTest) ... ok
test_wait3 (__main__.OSEINTRTest) ... ok
test_wait4 (__main__.OSEINTRTest) ... ok
test_waitpid (__main__.OSEINTRTest) ... ok
test_write (__main__.OSEINTRTest) ... ok
test_devpoll (__main__.SelectEINTRTest) ... skipped 'need select.devpoll'
test_epoll (__main__.SelectEINTRTest) ... ok
test_kqueue (__main__.SelectEINTRTest) ... skipped 'need select.kqueue'
test_poll (__main__.SelectEINTRTest) ... ok
test_select (__main__.SelectEINTRTest) ... ok
test_sigtimedwait (__main__.SignalEINTRTest) ... ok
test_sigwaitinfo (__main__.SignalEINTRTest) ... ok
test_accept (__main__.SocketEINTRTest) ... ok
test_open (__main__.SocketEINTRTest) ... ok
test_os_open (__main__.SocketEINTRTest) ... ok
test_recv (__main__.SocketEINTRTest) ... ok
test_recvmsg (__main__.SocketEINTRTest) ... ok
test_send (__main__.SocketEINTRTest) ... ok
test_sendall (__main__.SocketEINTRTest) ... ok
test_sendmsg (__main__.SocketEINTRTest) ... ok
test_sleep (__main__.TimeEINTRTest) ... ok
----------------------------------------------------------------------
Ran 24 tests in 6.436s
OK (skipped=2)
test_winreg skipped -- No module named 'winreg'
test_msilib skipped -- No module named '_msi'
test_kqueue skipped -- test works only on BSD
test_zipfile64 skipped -- test requires loads of disk-space bytes and a long time to run
test_ossaudiodev skipped -- [Errno 2] No such file or directory: '/dev/dsp'
test_badargs (__main__.GeneralTest) ... ok
test_bound_methods (__main__.GeneralTest) ... ok
test_clear (__main__.GeneralTest) ... ok
test_exit (__main__.GeneralTest) ... ok
test_order (__main__.GeneralTest) ... ok
test_raise (__main__.GeneralTest) ... ok
test_raise_unnormalized (__main__.GeneralTest) ... ok
test_stress (__main__.GeneralTest) ... ok
test_unregister (__main__.GeneralTest) ... ok
----------------------------------------------------------------------
Ran 9 tests in 0.002s
OK
test_devpoll skipped -- test works only on Solaris OS family
test_winsound skipped -- No module named 'winsound'
Timeout (0:15:00)!
Thread 0x00007f5522df4740 (most recent call first):
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/selectors.py", line 469 in select
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/asyncio/base_events.py", line 1845 in _run_once
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/asyncio/base_events.py", line 595 in run_forever
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/asyncio/base_events.py", line 628 in run_until_complete
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/test/test_asyncio/test_subprocess.py", line 190 in test_terminate
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/unittest/case.py", line 549 in _callTestMethod
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/unittest/case.py", line 592 in run
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/unittest/case.py", line 652 in __call__
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/unittest/suite.py", line 122 in run
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/unittest/suite.py", line 84 in __call__
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/unittest/suite.py", line 122 in run
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/unittest/suite.py", line 84 in __call__
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/unittest/suite.py", line 122 in run
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/unittest/suite.py", line 84 in __call__
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/unittest/suite.py", line 122 in run
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/unittest/suite.py", line 84 in __call__
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/unittest/suite.py", line 122 in run
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/unittest/suite.py", line 84 in __call__
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/unittest/runner.py", line 176 in run
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/test/support/__init__.py", line 959 in _run_suite
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/test/support/__init__.py", line 1082 in run_unittest
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/test/libregrtest/runtest.py", line 211 in _test_module
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/test/libregrtest/runtest.py", line 236 in _runtest_inner2
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/test/libregrtest/runtest.py", line 272 in _runtest_inner
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/test/libregrtest/runtest.py", line 142 in _runtest
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/test/libregrtest/runtest.py", line 195 in runtest
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/test/libregrtest/runtest_mp.py", line 81 in run_tests_worker
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/test/libregrtest/main.py", line 659 in _main
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/test/libregrtest/main.py", line 639 in main
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/test/libregrtest/main.py", line 717 in main
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/test/regrtest.py", line 43 in _main
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/test/regrtest.py", line 47 in <module>
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/runpy.py", line 87 in _run_code
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/runpy.py", line 197 in _run_module_as_main
Timeout (0:15:00)!
Thread 0x00007f3fdafde740 (most recent call first):
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/selectors.py", line 469 in select
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/asyncio/base_events.py", line 1845 in _run_once
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/asyncio/base_events.py", line 595 in run_forever
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/asyncio/base_events.py", line 628 in run_until_complete
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/test/test_asyncio/test_subprocess.py", line 177 in test_kill
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/unittest/case.py", line 549 in _callTestMethod
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/unittest/case.py", line 592 in run
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/unittest/case.py", line 652 in __call__
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/unittest/suite.py", line 122 in run
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/unittest/suite.py", line 84 in __call__
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/unittest/suite.py", line 122 in run
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/unittest/suite.py", line 84 in __call__
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/unittest/suite.py", line 122 in run
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/unittest/suite.py", line 84 in __call__
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/unittest/suite.py", line 122 in run
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/unittest/suite.py", line 84 in __call__
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/unittest/suite.py", line 122 in run
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/unittest/suite.py", line 84 in __call__
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/unittest/runner.py", line 176 in run
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/test/support/__init__.py", line 959 in _run_suite
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/test/support/__init__.py", line 1082 in run_unittest
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/test/libregrtest/runtest.py", line 211 in _test_module
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/test/libregrtest/runtest.py", line 236 in _runtest_inner2
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/test/libregrtest/runtest.py", line 272 in _runtest_inner
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/test/libregrtest/runtest.py", line 155 in _runtest
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/test/libregrtest/runtest.py", line 195 in runtest
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/test/libregrtest/main.py", line 319 in rerun_failed_tests
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/test/libregrtest/main.py", line 696 in _main
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/test/libregrtest/main.py", line 639 in main
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/test/libregrtest/main.py", line 717 in main
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/test/__main__.py", line 2 in <module>
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/runpy.py", line 87 in _run_code
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/Lib/runpy.py", line 197 in _run_module_as_main
make: *** [Makefile:1212: buildbottest] Error 1
Cannot open file '/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto/build/test-results.xml' for upload |
Sorry, something went wrong.
Add the following symbols to python3dll.c: * PyFrame_GetCode (bpo-40421) * PyFrame_GetLineNumber (bpo-40421) * PyModule_AddObjectRef (bpo-1635741) * PyObject_CallNoArgs (bpo-37194) * PyThreadState_GetFrame (bpo-39947) * PyThreadState_GetID (bpo-39947) * PyThreadState_GetInterpreter (bpo-39947)
Add the following symbols to python3dll.c: