| 1 |
.. highlight:: c |
| 2 |
|
| 3 |
.. _cporting-howto: |
| 4 |
|
| 5 |
************************************* |
| 6 |
Porting Extension Modules to Python 3 |
| 7 |
************************************* |
| 8 |
|
| 9 |
We recommend the following resources for porting extension modules to Python 3: |
| 10 |
|
| 11 |
* The `Migrating C extensions`_ chapter from |
| 12 |
*Supporting Python 3: An in-depth guide*, a book on moving from Python 2 |
| 13 |
to Python 3 in general, guides the reader through porting an extension |
| 14 |
module. |
| 15 |
* The `Porting guide`_ from the *py3c* project provides opinionated |
| 16 |
suggestions with supporting code. |
| 17 |
* :ref:`Recommended third party tools <c-api-tools>` offer abstractions over |
| 18 |
the Python's C API. |
| 19 |
Extensions generally need to be re-written to use one of them, |
| 20 |
but the library then handles differences between various Python |
| 21 |
versions and implementations. |
| 22 |
|
| 23 |
.. _Migrating C extensions: http://python3porting.com/cextensions.html |
| 24 |
.. _Porting guide: https://py3c.readthedocs.io/en/latest/guide.html |