Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
gh-91321: Add _testcppext C++ extension#32175
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 ourterms of service andprivacy 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
vstinner commentedMar 29, 2022
By the way, using |
iritkatriel commentedApr 11, 2022
https://bugs.python.org/issue39355 is closed. What is the status of this PR? |
vstinner commentedApr 19, 2022
This PR is now forhttps://bugs.python.org/issue47165 I'm working on fixing C++ compiler warnings:https://bugs.python.org/issue47164 |
vstinner commentedApr 26, 2022
I updated this PR for#91320 |
vstinner commentedApr 26, 2022
Oops, sorry, this PR is for#91321 |
vstinner commentedApr 26, 2022
I created#91959 for the "CAST" commit. |
vstinner commentedApr 27, 2022
Oh, the build fails with MSVC: I initialize structures with |
vstinner commentedApr 27, 2022
Error: |
steve-s commentedApr 28, 2022
FYI we were/are trying to address the same issue with HPy headers. My understanding is that this only tests the static inline functions and macros that are used in the example extension. It is still possible that some other macro or static inline function could cause warnings or for macros even errors. So my conclusion so far has been that to have a fully C++ compat tested headers, one has to write a C++ extension(s) that use all the static inline functions and macros from the headers. Something tested is way better than nothing tested, so no objections to this PR -- just wanted to check if you see it the same way? |
vstinner commentedApr 29, 2022
Sadly, my experience is the same: a C++ compiler doesn't complain when a static inline function is defined. Only when it's being used. My practical plan is:
Right now, my main blocker issue is to test if Python has a working C++ compiler. For example, the "Tests / Windows (x64)" fails with |
bedevere-bot commentedApr 29, 2022
🤖 New build scheduled with the buildbot fleet by@vstinner for commit 31b7a4f7ab6092998865e06dd0f4b0d5ea79b13f 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
vstinner commentedApr 29, 2022
I simplified |
vstinner commentedApr 29, 2022
Oh, when Python is installed, the test fails with: For example, it failed on these buildbots:
|
Build a basic C++ test extension to check that the Python C API iscompatible with C++ and does not emit C++ compiler warnings.* Add Modules/_testcppext.cpp: C++ extension* Add Lib/test/test_cppext.py: test building the C++ extension.
vstinner commentedApr 29, 2022
I rewrote the PR to build the C++ extension in a temporary directory and fix the test on installed Python: _testcppext.cpp is now part of Lib/test/ and so is installed. |
bedevere-bot commentedMay 2, 2022
vstinner commentedMay 2, 2022
The error is unrelated to my change: |
Uh oh!
There was an error while loading.Please reload this page.
Build a C++ test extension to check that the Python C API is
compatible with C++ and does not emit C++ compiler warnings.
Add test_cppext.py and setup_testcppext.py to Lib/test/.
https://bugs.python.org/issue39355