Slide 1

Slide 1 text

{ Python 2 vs. Python 3 "author": "Pablo Enfedaque", "twitter": "@pablitoev56"

Slide 2

Slide 2 text

{ "author": "Pablo Enfedaque", "twitter": "@pablitoev56"} > December 1989: Guido Van Rossum starts Python implementation > January 1994: Version 1.0 released > October 2000: Version 2.0 released > December 2008: Version 3.0 released > June 2009: Version 3.1 released > July 2010: Version 2.7 released with backports > 2014: Latest versions were 2.7.6 and 3.4 > January 2017: Current versions are 2.7.13 and 3.6.0, versions <2.7 and 3.0 - 3.2 are deprecated Python versions

Slide 3

Slide 3 text

{ "author": "Pablo Enfedaque", "twitter": "@pablitoev56"} > December 1989: Guido Van Rossum starts Python implementation > January 1994: Version 1.0 released > October 2000: Version 2.0 released > December 2008: Version 3.0 released > June 2009: Version 3.1 released > July 2010: Version 2.7 released with backports > 2014: Latest versions were 2.7.6 and 3.4 > January 2017: Current versions are 2.7.13 and 3.6.0 , versions <2.7 and 3.0 - 3.2 are deprecated WTF?!

Slide 4

Slide 4 text

{ "author": "Pablo Enfedaque", "twitter": "@pablitoev56"} Python 3 is backwards incompatible

Slide 5

Slide 5 text

{ "author": "Pablo Enfedaque", "twitter": "@pablitoev56"} > Backwards incompatibilities > print and exec become functions > All classes are new-style > Massive usage of generators instead of lists > All text (str) is Unicode and encoded text is binary data (bytes) > Other minor changes in std lib Python 3.0

Slide 6

Slide 6 text

{ "author": "Pablo Enfedaque", "twitter": "@pablitoev56"} Why Python 3?

Slide 7

Slide 7 text

{ "author": "Pablo Enfedaque", "twitter": "@pablitoev56"} Mainly because of encodings Why Python 3?

Slide 8

Slide 8 text

{ "author": "Pablo Enfedaque", "twitter": "@pablitoev56"} Google: Python encoding sucks

Slide 9

Slide 9 text

{ "author": "Pablo Enfedaque", "twitter": "@pablitoev56"} Google: Python 3 sucks

Slide 10

Slide 10 text

{ "author": "Pablo Enfedaque", "twitter": "@pablitoev56"} Really because of encodings?? Why Python 3?

Slide 11

Slide 11 text

{ "author": "Pablo Enfedaque", "twitter": "@pablitoev56"} Why should I move to Python 3?

Slide 12

Slide 12 text

{ "author": "Pablo Enfedaque", "twitter": "@pablitoev56"} > Proper encoding > asyncio > enums > Standard library virtualenvs > Exception chaining > Single-dispatch > unittest.mock > contextlib > "Better" GIL > concurrent.futures > selectors module > Qualified names > Type hints support > New optimised dicts implementation > Formatted strings literals > secrets module > Generalised unpacking Python 3.6 new features (vs. 2.7)

Slide 13

Slide 13 text

{ "author": "Pablo Enfedaque", "twitter": "@pablitoev56"} Why people don’t use Python 3?

Slide 14

Slide 14 text

{ "author": "Pablo Enfedaque", "twitter": "@pablitoev56"} Why people don’t use Python 3? No dependencies ported

Slide 15

Slide 15 text

{ "author": "Pablo Enfedaque", "twitter": "@pablitoev56"} Why people don’t use Python 3? Laziness?

Slide 16

Slide 16 text

{ "author": "Pablo Enfedaque", "twitter": "@pablitoev56"} Why people don’t use Python 3? Mitsuhiko / Armin Ronacher??

Slide 17

Slide 17 text

{ "author": "Pablo Enfedaque", "twitter": "@pablitoev56"} > Great features are waiting us in Python 3 > We are beyond half the planned life of Python 2.7 > Python 2.6 is officially retired with 2.6.9 release > Most 3rd party dependencies already in Python 3 > Or we could return to OSS all that we have been given > https://caniusepython3.com > Porting to Python 3 is not such a big deal > In most of the cases > So, no more excuses > It’s time to start moving to Python 3 Conclusions

Slide 18

Slide 18 text

{ "author": "Pablo Enfedaque", "twitter": "@pablitoev56"} Conclusions

Slide 19

Slide 19 text

{ "author": "Pablo Enfedaque", "twitter": "@pablitoev56"} Q&A Thanks for coming! Slides: https://speakerdeck.com/pablito56/python- 2-vs-python-3