mirror of
https://github.com/pybind/pybind11.git
synced 2026-04-20 06:49:25 +00:00
chore: drop support for PyPy < 7.3.1 and clean up old PyPy workarounds (#2456)
* Remove code inside 'PYPY_VERSION_NUM < 0x06000000' preprocessor if branch * fix: more cleanup * Remove more references to PyPy 5.7 and 5.9 in the docs * Update comment on PyUnicode_UTF* in PyPy Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
@@ -223,7 +223,7 @@ avoids this issue involves weak reference with a cleanup callback:
|
||||
|
||||
.. code-block:: cpp
|
||||
|
||||
// Register a callback function that is invoked when the BaseClass object is colelcted
|
||||
// Register a callback function that is invoked when the BaseClass object is collected
|
||||
py::cpp_function cleanup_callback(
|
||||
[](py::handle weakref) {
|
||||
// perform cleanup here -- this function is called with the GIL held
|
||||
@@ -237,9 +237,9 @@ avoids this issue involves weak reference with a cleanup callback:
|
||||
|
||||
.. note::
|
||||
|
||||
PyPy (at least version 5.9) does not garbage collect objects when the
|
||||
interpreter exits. An alternative approach (which also works on CPython) is to use
|
||||
the :py:mod:`atexit` module [#f7]_, for example:
|
||||
PyPy does not garbage collect objects when the interpreter exits. An alternative
|
||||
approach (which also works on CPython) is to use the :py:mod:`atexit` module [#f7]_,
|
||||
for example:
|
||||
|
||||
.. code-block:: cpp
|
||||
|
||||
|
||||
Reference in New Issue
Block a user