File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -865,9 +865,15 @@ approaches to creating C and C++ extensions for Python:
865865* `PyO3 <https://pyo3.rs/ >`_ (Rust)
866866* `SWIG <https://www.swig.org >`_
867867
868- It is recommended to use these abstractions, rather than using directly the
869- Python C API. These abstractions are built on top of the C API and handle API
870- differences between the different Python versions.
868+ Using tools such as these can help avoid writing code that is tightly bound to
869+ a particular version of CPython, avoid reference counting errors, and focus
870+ more on your own code than on using the CPython API. In general, new versions
871+ of Python can be supported by updating the tool, and your code will often use
872+ newer and more efficient APIs automatically. Some tools also support compiling
873+ for other implementations of Python from a single set of sources.
874+
875+ Directly coding against the CPython C API should, in most cases, be your last
876+ resort rather than the first.
871877
872878These projects are not supported by the same people who maintain Python, and
873879issues need to be raised with the projects directly. Remember to check that the
Original file line number Diff line number Diff line change @@ -275,7 +275,7 @@ class CAPIToolsBanner(SphinxDirective):
275275
276276 text = sphinx_gettext (
277277 "It is recommended to use "
278- ":ref:`C API abstractions <c-api-tools>`, "
278+ ":ref:`third party tools <c-api-tools>`, "
279279 "rather than using the Python C API directly."
280280 )
281281
You can’t perform that action at this time.
0 commit comments