Skip to content
Myr

python3.rst

This file

Path

docs/python3.rst

60 lines · 2.2 KiB

Last changed by

Update python3.rstINADA Naokibefore adoption931be87

History of this file

Take it

Fixed invalid referenceArmin Ronacherbefore adoptionec5291e

line 1why, one step back
1.. _python3-support:

Added notes on Python 3Armin Ronacherbefore adoption0ac9582

lines 2–9why, one step back
2
3Python 3 Support4================56Flask and all of its dependencies support Python 3 so you can in theory7start working on it already. There are however a few things you should be8aware of before you start using Python 3 for your next project.9

Added requirements for Python 3Armin Ronacherbefore adoptionf9846b9

lines 10–18why, one step back
10Requirements
11------------1213If you want to use Flask with Python 3 you will need to use Python 3.3 or14higher. 3.2 and older are *not* supported.1516In addition to that you need to use the latest and greatest versions of17`itsdangerous`, `Jinja2` and `Werkzeug`.18

Added notes on Python 3Armin Ronacherbefore adoption0ac9582

lines 19–21why, one step back
19API Stability
20-------------21

Merge pull request #1055 from IanConnolly/doc-fixKenneth Reitzbefore adoption332fa79

line 22why, one step back
22Some of the decisions made in regards to unicode and byte utilization on

Added notes on Python 3Armin Ronacherbefore adoption0ac9582

lines 23–42why, one step back
23Python 3 make it hard to write low level code. This mainly affects WSGI
24middlewares and interacting with the WSGI provided information. Werkzeug25wraps all that information in high-level helpers but some of those were26specifically added for the Python 3 support and are quite new.2728A lot of the documentation out there on using WSGI leaves out those29details as it was written before WSGI was updated to Python 3. While the30API for Werkzeug and Flask on Python 2.x should not change much we cannot31guarantee that this won't happen on Python 3.3233Few Users34---------3536Python 3 currently has less than 1% of the users of Python 2 going by PyPI37download stats. As a result many of the problems you will encounter are38probably hard to search for on the internet if they are Python 3 specific.3940Small Ecosystem41---------------42

Update python3.rstINADA Naokibefore adoption931be87

lines 43–47why, one step back
43Some Flask extensions, documentation and PyPI provided libraries do not
44support Python 3 yet. Even if you start your project with knowing that45all you will need is supported by Python 3 you don't know what happens six46months from now. If you are adventurous you can start porting libraries47on your own, but that is nothing for the faint of heart.

Added notes on Python 3Armin Ronacherbefore adoption0ac9582

lines 48–60why, one step back
48
49Recommendations50---------------5152Unless you are already familiar with the differences in the versions we53recommend sticking to current versions of Python until the ecosystem54caught up.5556The majority of the upgrade pain is in the lower-level libararies like57Flask and Werkzeug and not in the actual high-level application code. For58instance all of the Flask examples that are in the Flask repository work59out of the box on both 2.x and 3.x and did not require a single line of60code changed.