Skip to content

Experiment with using Coccinelle to port Python extension module C source from Python 2 to Python 2

Notifications You must be signed in to change notification settings

davidmalcolm/2to3c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

2to3c

2to3c is a tool to help with porting Python 2 extensions written in C so that they will compile against both 2.6 and 3.1 (and possibly other versions of CPython)

It uses the [http://coccinelle.lip6.fr/ Coccinelle] tool to apply a series of "semantic patches" to .c files.

The aim of 2to3c is to simplify the porting process and reduce the amount of effort needed. Unfortunately it's impossible to fully automate this process: typically you will need to decide whether your Python 2 "str" instances are bytes or encoded string data (Hopefully 2to3c makes the process much easier)

The project is in an early stage of development; it may or may not work, but has already saved time on at least one port to python 3 ([http://www.j5live.com/2010/02/03/the-quest-for-python-3/ dbus-python]).

Fixes that 2to3c can make

About

Experiment with using Coccinelle to port Python extension module C source from Python 2 to Python 2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages