Skip to content

Commit 4042012

Browse files
harshitethicharshitethic
authored andcommitted
docs: point C extension authors to implementation and legacy-porting guides
1 parent d1ad4ad commit 4042012

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎source/guides/packaging-binary-extensions.rst‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,15 @@ The CPython :doc:`Extending and Embedding <python:extending/index>`
228228
guide includes an introduction to writing a
229229
:doc:`custom extension module in C <python:extending/extending>`.
230230

231+
For practical examples of reference-count ownership, error handling, and
232+
creating safe extension objects, see the
233+
`Python Extension Patterns guide <https://pythonextensionpatterns.readthedocs.io/en/latest/>`_.
234+
235+
If you maintain a *legacy* C extension that must run on both Python 2 and
236+
Python 3, the `py3c porting guide <https://py3c.readthedocs.io/en/latest/>`_
237+
documents compatibility macros and migration steps. Python 2 has reached
238+
end-of-life; new extensions should target supported Python 3 releases.
239+
231240
FIXME: Elaborate that all this is one of the reasons why you probably
232241
*don't* want to handcode your extension modules :)
233242

0 commit comments

Comments
 (0)