Skip to content Skip to sidebar Skip to footer

How To Migrate Your Codebase From Python2 To Python3?

I'm thinking to migrate my Python2.x codebase to python3.x. My anticipation is to do the following things: Migrate Python2 syntax in Python3 Migrate all used packages and librarie

Solution 1:

The project 2to3 is very helpful with this.

It can take care of the most common Python2->Python3 code changes that need to take place. You can run this on your tests also. From there I'd get a Python3 virtual environment, install pylint, and lint your codebase.

The migration process from 2 to 3 can be a bit cumbersome for large codebases. This article does a great job with in-depth explanations.


Post a Comment for "How To Migrate Your Codebase From Python2 To Python3?"