Skip to content
Myr

python3.rst

This file

Path

docs/python3.rst

23 lines · 1001 bytes

Last changed by

resolve merge conflictsKenneth Reitzbefore adoption31174fe

History of this file

Take it

The walk stopped after 200 commits: lines older than bd51d2b point at it.

Merge pull request #1052 from miguelgrinberg/masterKenneth Reitzbefore adoptionbd51d2b

lines 1–5why, one step back
1.. _python3-support:
23Python 3 Support4================5

resolve merge conflictsKenneth Reitzbefore adoption31174fe

lines 6–8why, one step back
6Flask, its dependencies, and most Flask extensions support Python 3.
7You should start using Python 3 for your next project,8but there are a few things to be aware of.

Merge pull request #1052 from miguelgrinberg/masterKenneth Reitzbefore adoptionbd51d2b

line 9why, one step back
9

resolve merge conflictsKenneth Reitzbefore adoption31174fe

line 10why, one step back
10You need to use Python 3.3 or higher. 3.2 and older are *not* supported.

Merge pull request #1052 from miguelgrinberg/masterKenneth Reitzbefore adoptionbd51d2b

line 11why, one step back
11

resolve merge conflictsKenneth Reitzbefore adoption31174fe

lines 12–13why, one step back
12You should use the latest versions of all Flask-related packages.
13Flask 0.10 and Werkzeug 0.9 were the first versions to introduce Python 3 support.

Merge pull request #1052 from miguelgrinberg/masterKenneth Reitzbefore adoptionbd51d2b

line 14why, one step back
14

resolve merge conflictsKenneth Reitzbefore adoption31174fe

lines 15–18why, one step back
15Python 3 changed how unicode and bytes are handled, which complicates how low
16level code handles HTTP data. This mainly affects WSGI middleware interacting17with the WSGI ``environ`` data. Werkzeug wraps that information in high-level18helpers, so encoding issues should not affect you.

Merge pull request #1052 from miguelgrinberg/masterKenneth Reitzbefore adoptionbd51d2b

line 19why, one step back
19

resolve merge conflictsKenneth Reitzbefore adoption31174fe

lines 20–23why, one step back
20The majority of the upgrade work is in the lower-level libraries like
21Flask and Werkzeug, not the high-level application code.22For example, all of the examples in the Flask repository work on both Python 2 and 323and did not require a single line of code changed.