Python 2 to 3: How to Upgrade and What Features to Start Using

By Trey Hunner

Elevator Pitch

The end of life for Python 2 is 2020. Python 3 is the future and you’ll need to prepare an upgrade plan soon. During this talk we’ll discuss how to start the process of upgrading your code to Python 3 and what features to start embracing after you’ve upgraded.

Description

The end of life for Python 2 is 2020. Python 3 is the future and you’ll need to consider both your upgrade plan and what steps you’ll take after upgrading to start leveraging Python 3 features.

During this talk we’ll briefly discuss how to start the process of upgrading your code to Python 3. We’ll then dive into some of the most useful Python 3 features that you’ll be able to start embracing once you drop Python 2 support.

A number of the most powerful Python 3 features are syntactic features that are Python 3 only. You won’t get any experience using these features until you fully upgrade. These features are an incentive to drop Python 2 support in existing 2 and 3 compatible code. You can consider this talk as a teaser of Python 3 features that you may have never used.

After this talk I hope you’ll be inspired to fully upgrade your code to Python 3.

Notes

This talk is aimed at Python 2 programmers who know they need to upgrade to Python 3 but they see upgrading as a chore and not an exciting opportunity. The talk is for experienced Python 2 programmers who haven’t yet written Python 3 exclusive code: Python experience is required.

Python 2 programmers who’ve never written code meant to run in Python 3 will have knowledge of the tools they need to start upgrading their code to Python 3. Python programmers who are maintaining code that is both 2 and 3 compatible will be inspired to drop Python 2 support so they can start writing more readable and maintainable Python 3 code.

I do on-site corporate training for Python and Django teams as my day job. I also teach Python in free webcasts every week and I mentor folks at my local Python study group on a weekly basis.

I spoke at 8 Python and Django conferences in 2016 and 2017. This talk is a new one and I am hoping it will be well-received because Python 2 is very close to on its way out and Python 3 is improving greatly in each new release.