Skip to content

Commit 86525d9

Browse files
committed
Merge pull request pallets#1264 from svenstaro/patch-1
Update information about Python 3
2 parents 3bf9c2e + a5d24ac commit 86525d9

File tree

1 file changed

+8
-36
lines changed

1 file changed

+8
-36
lines changed

docs/python3.rst

Lines changed: 8 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -7,53 +7,25 @@ Flask and all of its dependencies support Python 3 so you can in theory
77
start working on it already. There are however a few things you should be
88
aware of before you start using Python 3 for your next project.
99

10-
Requirements
11-
------------
12-
1310
If you want to use Flask with Python 3 you will need to use Python 3.3 or
1411
higher. 3.2 and older are *not* supported.
1512

1613
In addition to that you need to use the latest and greatest versions of
17-
`itsdangerous`, `Jinja2` and `Werkzeug`.
18-
19-
API Stability
20-
-------------
14+
`itsdangerous`, `Jinja2` and `Werkzeug`. Flask 0.10 and Werkzeug 0.9 were
15+
the first versions to introduce Python 3 support.
2116

2217
Some of the decisions made in regards to unicode and byte utilization on
2318
Python 3 make it hard to write low level code. This mainly affects WSGI
2419
middlewares and interacting with the WSGI provided information. Werkzeug
2520
wraps all that information in high-level helpers but some of those were
2621
specifically added for the Python 3 support and are quite new.
2722

28-
A lot of the documentation out there on using WSGI leaves out those
29-
details as it was written before WSGI was updated to Python 3. While the
30-
API for Werkzeug and Flask on Python 2.x should not change much we cannot
31-
guarantee that this won't happen on Python 3.
32-
33-
Few Users
34-
---------
35-
36-
Although moving to Python 3 should be done someday, most people still use
37-
Python 2 for now. As a result many of the problems you will encounter are
38-
probably hard to search for on the internet if they are Python 3 specific.
39-
40-
Small Ecosystem
41-
---------------
42-
43-
Some Flask extensions, documentation and PyPI provided libraries do not
44-
support Python 3 yet.
45-
46-
Even if you start your project with knowing that all you will need is
47-
supported by Python 3 you don't know what happens six months from now.
48-
But if you are familiar with Python 3 and Flask extension, you can start
49-
porting libraries on your own.
50-
51-
Recommendations
52-
---------------
53-
54-
Unless you are already familiar with the differences in the versions we
55-
recommend sticking to current versions of Python until the ecosystem
56-
caught up.
23+
Unless you require absolute compatibility, you should be fine with Python 3
24+
nowadays. Most libraries and Flask extensions have been ported by now and
25+
using Flask with Python 3 is generally a smooth ride. However, keep in mind
26+
that most libraries (including Werkzeug and Flask) might not quite as stable
27+
on Python 3 yet. You might therefore sometimes run into bugs that are
28+
usually encoding-related.
5729

5830
The majority of the upgrade pain is in the lower-level libararies like
5931
Flask and Werkzeug and not in the actual high-level application code. For

0 commit comments

Comments
 (0)