@@ -11,39 +11,75 @@ This actually made the above easier and less-likely to break.
1111
1212#As a user
1313
14+ ##Install Pip 9.0
15+
1416If you are already a Python 3 user, you should not encounter a lot of
15- disruption. Please check that the libraries you use follow best practices not
16- to break for Python 3 users.
17+ disruption. Please still check that the libraries you use follow best practices
18+ not to break for Python 2 users. Python is a community regardless of which
19+ python version you have to a decide to run, making sure that things works make
20+ the community strong.
21+
22+ Make sure you have Pip >= 9.0, this is especially important if you have Python
23+ 2 installations. Having pip 9.0+ will not insure that you install will not
24+ break, but they are more likely not to. Having a version off pip <9.0 can lead
25+ your system to try to upgrade to non-compatible versions of Python packages
26+ even if these are marked as non-compatible.
27+
28+ Make as many other_ users_ as possible to install pip >=9.0, for the
29+ transition, it is the slowest part of the ecosystem to update, and is the only
30+ piece that concern all all installations.
31+
32+ ##Setuptools
33+
34+ If you are on a system that will not install python wheel and use` setuptools ` ,
35+ make sure you have setuptools >=24.2.0, or building Python 3 only libraries
36+ might fail, even on Python 2.
1737
18- Make sure you have Pip >= 9.0
38+ ## Local package index
1939
2040If you are using a custom local package index, for example if you are working
21- at a company, make sure it implement correctly pep-512 and let pip knows about
22- the` python_requires ` field.
41+ at a company with private packages , make sure it implement correctly pep-503
42+ and let pip knows about the` python_requires ` field.
2343
44+ ##The state of PyPI
2445
46+ Note that at the time of this writing the patches to` pypi.python.org ` are not
47+ deployed yet but should hopefully be deployed soon.
2548
2649
2750#Preparing your library
2851
29- Things to speak about:
3052
31- - Be on recent enough setuptools, since[ This
32- PR] ( https://github.com/pypa/setuptools/pull/631 ) , 24.2.0 (or above, July 20,
33- 2016, Xavier Fernandez PR.)
3453
35- Add the followign to your setup.py
54+ As a library author one of the most important factor in a smooth transition is
55+ planning and communication, letting your user base know in advance that the
56+ transition is happening and what step to take is critical for a transition.
57+
58+ For your library code here the steps you need to take to ensure that
59+ installation will fail in the least number of case:
60+
61+ You need to release your new packages version with[ setuptools] version 24.2.0
62+ or above, or use one of the alternate package manager that can set the
63+ [ ` python_require ` ] metadata field. Without this, pip 9.0** will try** to
64+ install non-compatible version of your software on Python 2. This version of
65+ setuptools is recent (July 20, 2016) and this possible thank to the[ work of
66+ Xavier Fernandez] ( https://github.com/pypa/setuptools/pull/631 )
67+
68+ Add the following to your` setup.py `
3669
3770```
38- setup(
39- ...
40- python_requires='>=3.3'
41- ...
42- )
71+ setup(
72+ ...
73+ python_requires='>=3.3'
74+ ...
75+ )
4376```
4477
45- change >=
78+ Changes` >=3.3 ` accordingly depending on what version your library decides to
79+ support.
4680
81+ This will make[ PyPI aware] (linkto mike's PR on warehouse) that your package is
82+ Python 3 only, and[ allow pip] (link to pip's PR) to be[ made aware of this] (link to PyPI PR).
4783
4884
4985- Add a warning at_ runtime_ early on master (before switching to Python 3
@@ -102,9 +138,17 @@ This this page for more information : url to here for example.
102138
103139 `^([1-9]\\d*!)?(0|[1-9]\\d*)(\\.(0|[1-9]\\d*))*((a|b|rc)(0|[1-9]\\d*))?(\\.post(0|[1-9]\\d*))?(\\.dev(0|[1-9]\\d*))?`
104140
141+ - depend on setuptools greater than 24.3
142+
105143
106144
107- # Mitigations
145+ # Recommende Mitigations
146+
147+ Of course regardless of all the care you will take for your library to no break
148+ and to install only on python 2, you will likely have cases where it still end
149+ up being installed on incompatible versions of Python. Simply because users
150+ upgrades rarely and only an old version of pip or setuptools is enough to make
151+ the all update process broken.
108152
109153- Leave `setup.py` python 2 compatible and fail early. If you detect Python 2
110154 raise a clear error message and ask user to make sure they have pip >9.0 (or
@@ -115,5 +159,22 @@ This this page for more information : url to here for example.
115159 dependencies depending on the version of Python.
116160
117161
162+ # Non recommended mitigation
163+
164+ This is a collection of "mitigation" or "solutions" you will find on the web
165+ and that you will hear about. This is an attempt to acknowlege them, and
166+ explain why they can't work and what are their drawbacks before you attempt to
167+ implement them.
168+
169+ ### Use a meta-package.
170+
171+
172+
173+
174+ # Why all that ?
175+
176+ You might wonder why all thi, it's 2016 already, so how come all these issues ?
177+ Python 3 has been out for 8+ years now !
118178
179+ Well there are many reasons to this,
119180