Hitting the Python Porting Problem for a Six
Anand B Pillai (~pythonhacker) |
Python 2k is going to be EOL in 2020. A number of Python libraries are still in Python 2.x and developers are scurrying to port them over to Python3. And yes, it is not just those pesky "print(...)" statements!
As part of my open source and consulting gig, I recently completed ports of two projects to Python3 from 2 and is currently involved in porting a few more libraries. In this talk we will take a quick look at strategies and techniques for smart 2 to 3 porting.
- 2to3 tool
- Understanding "six"
- Using six to translate between string and byte types.
- The module mutation problem
- Writing tests
The target platform for this talk is Python 3.6 to 3.7.
A good awareness of the Python2 and 3 string types and their nuances - str, unicode, bytes. An interest in the Python2->3 porting problem. Knowledge of the 2to3 tool and/or six is good.
Anand B Pillai is a technology professional with 20 years of software development, design and architecture. He has worked in a number of companies over the years in fields ranging from Security, Search Engines, Large Scale Web Portals and Big Data. He is the founder of the Bangalore Python User's Group and the author of Software Architecture with Python (PacktPub, April 2017).
Anand is the Founder and Director of "Anvetsu Technologies", a consulting software company specializing in areas like Web Crawling, Machine Learning and Domain Specific Languages (DSL) with an expertise in Python and Clojure. He blogs at https://blog.anvetsu.com