Hitting the Python Porting Problem for a Six

Anand B Pillai (~pythonhacker)


Description:

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.

Briefly,

  1. 2to3 tool
  2. Understanding "six"
  3. Using six to translate between string and byte types.
  4. The module mutation problem
  5. Writing tests

I will explain this mostly in the context of an open source projects I ported to python3 - pyjavaproperties and txsocksx along with general tips and hints.

The target platform for this talk is Python 3.6 to 3.7.

Prerequisites:

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.

Content URLs:

TBD

Speaker Info:

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

Id: 1321
Section: Core Python
Type: Talks
Target Audience: Intermediate
Last Updated: