Migration from Python 2 to 3
summary
Shows exact migration steps: create two conda envs with Python 2.7 and 3.8, run JupyterLab, run futurize/pasteurize to apply staged fixes, and commit tests. Demonstrates converting a sample file (next() replacement, bytes/unicode literals, dict keys -> list, print(), range/zip behavior) so the output runs on both interpreters. Uses the python-future toolchain, documents ~50+ automated fixes (stage1 → stage2) and produces converted code that actually works.
AI-written summary · about
chapters (48)
- 0:00Start
- 0:26About Myself
- 1:35Overview of the Differences between Python 2 and Python 3
- 2:54Development Environments
- 3:47Conda
- 6:21Activate the Environment
- 7:16Starting Jupiter Lab
- 10:56Jupiter Lab
- 11:43Markdown
- 12:45Terminal
- 14:11Differences between Python 2 and Python 3
- 15:08Print Function
- 18:54Iterators
- 30:51Comparisons
- 32:48Integers
- 34:52Floor Division
- 37:14Strings
- 38:37Python 3
- 42:44Hash Ability
- 43:30Hash Ability
- 49:16Metaclass
- 57:33Rounding
- 58:17Merchant Rounding
- 59:37Scoping of Exceptions
- 1:01:13New Syntax
- 1:05:24Unpacking
- 1:08:33List Comprehensions
- 1:10:10Built in Module
- 1:11:27Virus Operator
- 1:12:10Standard Library
- 1:14:13Solutions
- 1:17:49Cleaning Up Your Python 2 Code
- 1:19:06Classic Classes
- 1:22:26Not Equal Operator
- 1:23:21Exceptions
- 1:26:15No Leading Zero Numbers in Python 2
- 1:34:51Raw Input
- 1:35:48Python 3 Input
- 1:36:22Reload Module
- 1:44:06Converting Strategies
- 1:44:49External Libraries
- 1:48:01Absolute Absolute Imports
- 1:53:02Unicode Literal
- 1:54:14Version Testing
- 1:55:23Override Built-Ins
- 1:55:38Overwrite Built-Ins
- 1:59:05Back Ports
- 2:34:11Pasteurize
related talks
45mWriting Python 2/3 compatible code
24mJourney to migrate python2 projects to 3
44mHow to Build a Plan to Migrate to Python 3
26mPython 2 is dead! Drag your old code into the modern age
26mPython 2 to 3: How to Upgrade and What Features to Start Using
27mHow We Migrated 3.8 Million Lines of Python 2 Without Interrupting Deve...
41mPorting a Project from Python 2 to 3
31mIntroduce Syntax and History of Python from 2.4 to 3.6
