Skip to content
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

Split up _testcapimodule.c #93649

Open
encukou opened this issue Jun 9, 2022 · 2 comments
Open

Split up _testcapimodule.c #93649

encukou opened this issue Jun 9, 2022 · 2 comments
Labels
expert-C-API tests

Comments

@encukou
Copy link
Member

@encukou encukou commented Jun 9, 2022

Modules/_testcapimodule.c is a nearly-8000-line behemoth with no clear structure or organization. It is getting hard to maintain.

It also doesn't work well with testing (a) feature macros that affect Python.h and (b) module initialization, so we have additional C-API testing modules: _testmultiphase, _testimportmultiple, _testinternalcapi.
_testbuffer is already split out, but there are many other aspects of the API that would use a similar dedicated test suite.

We should split and combine these, ideally without polluting the namespace of top-level modules.

@encukou encukou added tests expert-C-API labels Jun 9, 2022
@arhadthedev
Copy link
Contributor

@arhadthedev arhadthedev commented Jun 9, 2022

ideally without polluting the namespace of top-level modules

Can hypothetical Lib/_testcapimodule/*.c export their objects as test.capi.*?

@encukou
Copy link
Member Author

@encukou encukou commented Jun 10, 2022

As far as I know they can, as long as test.capi itself is not an extension module. It would need some extra support in both make and Windows builds, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
expert-C-API tests
Projects
None yet
Development

No branches or pull requests

2 participants