1.. highlight:: c
2
3.. _cporting-howto:
4
5*************************************
6Porting Extension Modules to Python 3
7*************************************
8
9We 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* The `Cython`_ and `CFFI`_ libraries offer abstractions over
18  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
25.. _Cython: http://cython.org/
26.. _CFFI: https://cffi.readthedocs.io/en/latest/
27