Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
nitzmahone committed Nov 20, 2023
2 parents 364621f + 49127c6 commit ea6a122
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
11 changes: 6 additions & 5 deletions doc/source/cdef.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ In order of complexity:

* Finally, you can (but don't have to) use CFFI's **Distutils** or
**Setuptools integration** when writing a ``setup.py``. For
Distutils (only in out-of-line API mode):
Distutils (only in out-of-line API mode; deprecated since
Python 3.10):

.. code-block:: python
Expand All @@ -94,7 +95,7 @@ In order of complexity:
ext_modules=[foo_build.ffibuilder.distutils_extension()],
)
For Setuptools (out-of-line, but works in ABI or API mode;
For Setuptools (out-of-line only, but works in ABI or API mode;
recommended):

.. code-block:: python
Expand Down Expand Up @@ -431,9 +432,9 @@ list of extra .c files compiled and linked together (the file
first argument to ``sources``). See the distutils documentations for
`more information about the other arguments`__.

.. __: http://docs.python.org/distutils/setupscript.html#library-options
.. _distutils: http://docs.python.org/distutils/setupscript.html#describing-extension-modules
.. _setuptools: https://pythonhosted.org/setuptools/setuptools.html
.. __: https://setuptools.pypa.io/en/stable/userguide/ext_modules.html#building-extension-modules
.. _distutils: http://docs.python.org/3.11/distutils/setupscript.html#describing-extension-modules
.. _setuptools: https://setuptools.pypa.io/

An extra keyword argument processed internally is
``source_extension``, defaulting to ``".c"``. The file generated will
Expand Down
4 changes: 4 additions & 0 deletions src/c/_cffi_backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -6118,7 +6118,11 @@ static void _my_PyErr_WriteUnraisable(PyObject *t, PyObject *v, PyObject *tb,

PyErr_Restore(t, v, tb);
if (s != NULL) {
#if PY_VERSION_HEX >= 0x030D0000
PyErr_FormatUnraisable("Exception ignored %S", s);
#else
_PyErr_WriteUnraisableMsg(PyText_AS_UTF8(s), NULL);
#endif
Py_DECREF(s);
}
else
Expand Down

0 comments on commit ea6a122

Please sign in to comment.