Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
gh-95991: Add some infrastructure for testing Limited API in _testcapi#95992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Conversation
encukou commented Aug 15, 2022 • edited by bedevere-bot
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by bedevere-bot
Uh oh!
There was an error while loading. Please reload this page.
…estcapi - Limited API needs to be enabled per source file - Some builds don't support Limited API, so Limited API tests must be skipped on those builds (currently this is `Py_TRACE_REFS`, but that may change.) - `Py_LIMITED_API` must be defined before `<Python.h>` is included. This puts the hoop-jumping in `testcapi/parts.h`, so individual test files can be relatively simple. (Currently that's only `vectorcall_limited.c`, imagine more.)
encukou commented Aug 15, 2022
I'm not sure about best practices for |
encukou commented Aug 15, 2022
I also plan to add some instructions for the devguide, mentioning the structure for a #definePy_LIMITED_API 0x03... #include"parts.h"#ifdefLIMITED_API_AVAILABLE (allcontentgoeshere) #endifand |
erlend-aasland left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! You might want to document the test decorator in Doc/library/test.rst.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Erlend E. Aasland <[email protected]>
encukou commented Aug 16, 2022
This happens to move |
bedevere-bot commented Aug 16, 2022
encukou commented Aug 16, 2022
I don't understand the failure on the Windows buildbot: |
Windows failures need to be resolved
encukou commented Aug 16, 2022 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
@python/windows-team, do you know what's wrong here, by any chance? |
zooba commented Aug 16, 2022
It's probably getting built before the limited API DLL ( Add the below to |
bedevere-bot commented Aug 16, 2022
encukou commented Aug 17, 2022
vstinner commented Aug 17, 2022
When Py_TRACE_REFS is defined, it was discussed once to move the double linked list of objects out of PyObject, to keep the ABI compatiiblity. It shouldn't be hard to store it somewhere else. But so far, nobody proposed a concrete implementation of this idea. |
(currently this is
Py_TRACE_REFS, but that may change.)Py_LIMITED_APImust be defined before<Python.h>is included.This puts the hoop-jumping in
testcapi/parts.h, so individualtest files can be relatively simple. (Currently that's only
vectorcall_limited.c, imagine more.)