Browse Source

clean up py3 info more

pull/1890/head
David Lord 8 years ago
parent
commit
baa2689658
  1. 6
      docs/advanced_foreword.rst
  2. 40
      docs/python3.rst

6
docs/advanced_foreword.rst

@ -47,9 +47,9 @@ Flask is no different from any other framework in that you the developer must
build with caution, watching for exploits when building to your requirements. build with caution, watching for exploits when building to your requirements.
Python 3 Support in Flask Python 3 Support in Flask
---------------------- -------------------------
If you think of using Flask with Python 3 have a look at the Flask, its dependencies, and most Flask extensions all support Python 3.
:ref:`python3-support` page. If you want to use Flask with Python 3 have a look at the :ref:`python3-support` page.
Continue to :ref:`installation` or the :ref:`quickstart`. Continue to :ref:`installation` or the :ref:`quickstart`.

40
docs/python3.rst

@ -3,32 +3,22 @@
Python 3 Support Python 3 Support
================ ================
Flask and all of its dependencies support Python 3 so you can in theory Flask, its dependencies, and most Flask extensions support Python 3.
start working on it already. There are however a few things you should be You should start using Python 3 for your next project,
aware of before you start using Python 3 for your next project. but there are a few things to be aware of.
If you want to use Flask with Python 3 you will need to use Python 3.3 or You need to use Python 3.3 or higher. 3.2 and older are *not* supported.
higher. 3.2 and older are *not* supported.
In addition to that you need to use the latest and greatest versions of You should use the latest versions of all Flask-related packages.
`itsdangerous`, `Jinja2` and `Werkzeug`. Flask 0.10 and Werkzeug 0.9 were Flask 0.10 and Werkzeug 0.9 were the first versions to introduce Python 3 support.
the first versions to introduce Python 3 support.
Some of the decisions made in regards to unicode and byte utilization on Python 3 changed how unicode and bytes are handled,
Python 3 make it hard to write low level code. This mainly affects WSGI which complicated how low level code handles HTTP data.
middlewares and interacting with the WSGI provided information. Werkzeug This mainly affects WSGI middleware interacting with the WSGI ``environ`` data.
wraps all that information in high-level helpers but some of those were Werkzeug wraps that information in high-level helpers,
specifically added for the Python 3 support and are quite new. so encoding issues should not effect you.
Unless you require absolute compatibility, you should be fine with Python 3 The majority of the upgrade work is in the lower-level libraries like
nowadays. Most libraries and Flask extensions have been ported by now and Flask and Werkzeug, not the high-level application code.
using Flask with Python 3 is generally a smooth ride. However, keep in mind For example, all of the examples in the Flask repository work on both Python 2 and 3
that most libraries (including Werkzeug and Flask) might not quite as stable and did not require a single line of code changed.
on Python 3 yet. You might therefore sometimes run into bugs that are
usually encoding-related.
The majority of the upgrade pain is in the lower-level libraries like
Flask and Werkzeug and not in the actual high-level application code. For
instance all of the Flask examples that are in the Flask repository work
out of the box on both 2.x and 3.x and did not require a single line of
code changed.

Loading…
Cancel
Save