Checking compatibility of a script across Python versions automatically

Terry Reedy tjreedy at udel.edu
Mon Jun 18 21:44:38 EDT 2012


On 6/18/2012 3:24 PM, Andrew Berg wrote:
> Are there any tools out there that will parse a script and tell me if it
> is compatible with an arbitrary version of Python and highlight any

Not that I know of.

> incompatibilities? I need to check a few of my scripts that target 3.2
> to see if I can make them compatible with 3.0 and 3.1 if they aren't
> already.

Forget about 3.0. Really. As for 3.1 versus 3.2, there were no core 
syntax changes in 3.2. There were a few, but only a few, enhancements in 
builtin classes. If you have a decent test suite, just run it under 3.1.



-- 
Terry Jan Reedy






More information about the Python-list mailing list