From 83336e0622195d8e1d0b9578d08a585813c755ae Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Tue, 2 Dec 2014 18:13:02 +0100 Subject: [PATCH 1/4] Update information about Python 3 Python 3 and Flask is a good combination nowadays that works rather well. In fact, [most PyPI libs](https://regebro.wordpress.com/2014/10/23/59-of-maintained-packages-support-python-3/) are now ported and it's generally ok to encourage people to use Python 3 for new projects. --- docs/python3.rst | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/docs/python3.rst b/docs/python3.rst index 34fec4e9..be10a8fb 100644 --- a/docs/python3.rst +++ b/docs/python3.rst @@ -30,30 +30,12 @@ details as it was written before WSGI was updated to Python 3. While the API for Werkzeug and Flask on Python 2.x should not change much we cannot guarantee that this won't happen on Python 3. -Few Users ---------- - -Although moving to Python 3 should be done someday, most people still use -Python 2 for now. As a result many of the problems you will encounter are -probably hard to search for on the internet if they are Python 3 specific. - -Small Ecosystem ---------------- - -Some Flask extensions, documentation and PyPI provided libraries do not -support Python 3 yet. - -Even if you start your project with knowing that all you will need is -supported by Python 3 you don't know what happens six months from now. -But if you are familiar with Python 3 and Flask extension, you can start -porting libraries on your own. - Recommendations --------------- -Unless you are already familiar with the differences in the versions we -recommend sticking to current versions of Python until the ecosystem -caught up. +Unless you require absolute compatibility, you should be fine with Python 3 +nowadays. Most libraries and Flask extensions have been ported by now and +using Flask with Python 3 is a stable affair. The majority of the upgrade pain is in the lower-level libararies like Flask and Werkzeug and not in the actual high-level application code. For From aaa3a0454593ad4dc4c4e4c5e2f19618e181c750 Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Tue, 2 Dec 2014 19:40:12 +0100 Subject: [PATCH 2/4] Admit the occasional encoding problem --- docs/python3.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/python3.rst b/docs/python3.rst index be10a8fb..2764df8f 100644 --- a/docs/python3.rst +++ b/docs/python3.rst @@ -35,7 +35,8 @@ Recommendations Unless you require absolute compatibility, you should be fine with Python 3 nowadays. Most libraries and Flask extensions have been ported by now and -using Flask with Python 3 is a stable affair. +using Flask with Python 3 is generally a smooth ride. However, you might +occasionally encounter encoding problems. The majority of the upgrade pain is in the lower-level libararies like Flask and Werkzeug and not in the actual high-level application code. For From eb6df3ddf110be5bcf74771ff15e63d9972729be Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Tue, 2 Dec 2014 20:46:46 +0100 Subject: [PATCH 3/4] Describe the nature of Python 3 roughness --- docs/python3.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/python3.rst b/docs/python3.rst index 2764df8f..26b8a8b3 100644 --- a/docs/python3.rst +++ b/docs/python3.rst @@ -35,8 +35,10 @@ Recommendations Unless you require absolute compatibility, you should be fine with Python 3 nowadays. Most libraries and Flask extensions have been ported by now and -using Flask with Python 3 is generally a smooth ride. However, you might -occasionally encounter encoding problems. +using Flask with Python 3 is generally a smooth ride. However, keep in mind +that most libraries (including Werkzeug and Flask) might not quite as stable +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 libararies like Flask and Werkzeug and not in the actual high-level application code. For From a5d24ac0d96a4e464d37c86267b4813c2f236ee8 Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Tue, 2 Dec 2014 21:09:45 +0100 Subject: [PATCH 4/4] Remove head lines and add versions of first Python 3 support --- docs/python3.rst | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/docs/python3.rst b/docs/python3.rst index 26b8a8b3..8318b85b 100644 --- a/docs/python3.rst +++ b/docs/python3.rst @@ -7,17 +7,12 @@ Flask and all of its dependencies support Python 3 so you can in theory start working on it already. There are however a few things you should be aware of before you start using Python 3 for your next project. -Requirements ------------- - If you want to use Flask with Python 3 you will need to use Python 3.3 or higher. 3.2 and older are *not* supported. In addition to that you need to use the latest and greatest versions of -`itsdangerous`, `Jinja2` and `Werkzeug`. - -API Stability -------------- +`itsdangerous`, `Jinja2` and `Werkzeug`. Flask 0.10 and Werkzeug 0.9 were +the first versions to introduce Python 3 support. Some of the decisions made in regards to unicode and byte utilization on Python 3 make it hard to write low level code. This mainly affects WSGI @@ -25,14 +20,6 @@ middlewares and interacting with the WSGI provided information. Werkzeug wraps all that information in high-level helpers but some of those were specifically added for the Python 3 support and are quite new. -A lot of the documentation out there on using WSGI leaves out those -details as it was written before WSGI was updated to Python 3. While the -API for Werkzeug and Flask on Python 2.x should not change much we cannot -guarantee that this won't happen on Python 3. - -Recommendations ---------------- - Unless you require absolute compatibility, you should be fine with Python 3 nowadays. Most libraries and Flask extensions have been ported by now and using Flask with Python 3 is generally a smooth ride. However, keep in mind