Hi,

I merged the best basic tests to make sure that using the Python C API in C++ does not emit compiler warnings:

* Code: https://github.com/python/cpython/blob/main/Lib/test/_testcppext.cpp
* Test: https://github.com/python/cpython/blob/main/Lib/test/test_cppext.py

The code is only built to check for compiler warnings. Later, I plan to build this C++ extension to be able to *execute* it at runtime. For now, a C++ compiler is required to run the Python 3.11 test suite. Maybe it should be made optional, but so far I failed to test if distutils has an available C++ compiler.

Slowly, more and more tests can be added. For example, this change fixing compiler warnings when passing "const PyObject*" to Python C API functions adds tests to _testcppext.cpp:
https://github.com/python/cpython/pull/92138

Victor