[Python-Dev] PEP 690: Lazy Imports

2022-05-03 Thread Germán M . Bravo
Hello, PEP 690 is now live! It proposes an exciting new feature to transparently defer the execution of imported modules until the moment when an imported object is used. Since Python programs commonly import many more modules than a single invocation of the pro

[Python-Dev] Re: Using the Python C API in C++

2022-05-03 Thread Victor Stinner
Hi Antoine, I'm in favor of making the C API more strict. The limited C API of Python 3.11 no longer cast arguments to PyObject* ! The caller must now cast to PyObject*: see PEP 670 "convert macros to functions". Converting macros to static inline functions (PEP 670) is already an important chang

[Python-Dev] Re: Using the Python C API in C++

2022-05-03 Thread Antoine Pitrou
On Mon, 2 May 2022 15:21:24 +0200 Victor Stinner wrote: > > 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 Doesn