From 31d4340783bfb742494c86b5d447379c182e63bd Mon Sep 17 00:00:00 2001 From: Michael Scott Cuthbert Date: Wed, 26 Aug 2020 08:04:10 -1000 Subject: [PATCH 1/6] Add information for lib3to6 to practicalities Also update some prose for 2020; and for people like me who only skim headings, re-wrote the not-recommended mitigations in negative voice. --- _practicalities/intro.md | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/_practicalities/intro.md b/_practicalities/intro.md index ecb877d..776f2a8 100644 --- a/_practicalities/intro.md +++ b/_practicalities/intro.md @@ -11,7 +11,6 @@ is mostly written with the assumption that software are going to stop Python 2 support, it does perfectly apply to a package that wishes to not support Python 3, or is stopping support for any minor version. - This page gathers information and links to resources allowing a library to stop supporting an older version of Python without causing too much disruption for users who haven't upgraded to this new version. @@ -313,7 +312,17 @@ You can look at the [full check](https://github.com/ipython/ipython/blob/6a3e2db0c299dc05e636653c4a43d0aa756fb1c8/setup.py#L23-L58) that attempt to detect which version of pip is in used. -## Upload with Twine. +## If your users absolutely need Py2.7 but you want to move on + +If you have users that still depend on Python 2.7 and you cannot drop support yet, +it may nonetheless be possible to start using Python 3 in your codebase. T +hrough automatic conversion using [lib3to6](https://pypi.org/project/lib3to6/) +(similar to BabelJS for JavaScript) +you can generate distribution files that will work on both Python2 and Python3. +Lib3to6 is also useful if your project needs to support older versions of Python3 +such as 3.5 but you want to use the latest Python syntax. + +## Upload with Twine You _must_ upload your package with ``twine`` and NOT with ``setup.py upload``. If you have an old version of setuptools or ``distutils``, even if @@ -332,7 +341,7 @@ and that you will hear about. This is an attempt to acknowledge them, and explain why they can't work and what are their drawbacks before you attempt to implement them. -### Use a meta-package +### Don't use a meta-package It is possible to release a meta-package that has _virtually_ no code and relies on a conditional dependency to install its actual core code on the user system. @@ -340,13 +349,13 @@ For example, Frob-6.0 could be a meta-package which depends on Frob-real-py2 on Python < 3.0, and Frob-real-py3 on Python ≥ 3.4. While this approach is _doable_ this can make imports confusing. -## Depend on setuptools +## Don't depend on setuptools You can mark your library as dependent on setuptools greater than 24.3 as this will ensure that during the next upgrade (when the packages drop python 2 support) will have the right version of setuptools. -Of course regardless of all the care you will take for your library to no break +Of course regardless of all the care you will take for your library to not break and to install only on python 2, you will likely have cases where it will still end up being installed on incompatible versions of Python. Simply because users upgrade rarely and only an old version of pip or setuptools is enough to make @@ -355,8 +364,7 @@ the update process broken. Plus setuptools is rarely an actual dependency of your project but a requirement to build wheels. - -### Multiple sdist files +### Don't write multiple sdist files Pip (used to) support a "feature" where a sdist ending in `-pyX.Y.tar.gz` would only be seen as compatible on Python X.Y, thus it used to be possible to @@ -365,7 +373,7 @@ publish multiple sdist of a package targeting various python version. It is not possible anymore to upload multiple sdist files on PyPI, so this solution is no longer tenable. -### Wheel only? +### Don't release wheel only Releasing a package only using wheels for a given python version is doable, but this will break downstream packages that may require the original source to @@ -373,8 +381,8 @@ reproduce their build. # Why all *this*?!? -You might wonder why all this, it's 2018 already, so how come this is still an -issue? Python 3 has been out for 9+ years now! +You might wonder why all this, it's 2020 already, so how come this is still an +issue? Python 3 has been out for 11+ years now! Well there are many reasons for this. First of all, this issue mostly affects libraries that are currently python 2 and Python 3 compatible at the same time. @@ -390,10 +398,10 @@ minor versions of Python 3 that saw a majority of single-source projects working both on Python 2 and Python 3. These are the projects that will likely be affected by this issue. -The introduction of Python 3 was chaotic; there are still strong arguments in both +The introduction of Python 3 was chaotic; there were strong arguments in both the Python 2 and Python 3 camps. Regardless of what side you take, the ones suffering -the most from this are users (starting with the fact that inevitably some libraries -will stop supporting for Python 2 and release Python 3 only library). Inevitably, some +the most from this are users (starting with the fact that some libraries +have stopped supporting for Python 2 and released Python 3 only versions). Inevitably, some systems and people will not be upgraded to Python 3, so this document hopefully helps to _ensure_ that users get the _least_ breakage as possible and what are the best practices are to follow. From da4d8e4b84e57cb89b660ca780d77b15277f81ff Mon Sep 17 00:00:00 2001 From: Michael Scott Cuthbert Date: Wed, 26 Aug 2020 14:14:40 -1000 Subject: [PATCH 2/6] Integrate @hugovk and @Carreau suggestions --- _practicalities/intro.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/_practicalities/intro.md b/_practicalities/intro.md index 776f2a8..a4c4cd5 100644 --- a/_practicalities/intro.md +++ b/_practicalities/intro.md @@ -315,11 +315,11 @@ that attempt to detect which version of pip is in used. ## If your users absolutely need Py2.7 but you want to move on If you have users that still depend on Python 2.7 and you cannot drop support yet, -it may nonetheless be possible to start using Python 3 in your codebase. T -hrough automatic conversion using [lib3to6](https://pypi.org/project/lib3to6/) -(similar to BabelJS for JavaScript) -you can generate distribution files that will work on both Python2 and Python3. -Lib3to6 is also useful if your project needs to support older versions of Python3 +it may nonetheless be possible to start using Python 3 in your codebase. +Through automatic conversion using [lib3to6](https://pypi.org/project/lib3to6/) +(similar to Babel for JavaScript) +you can generate distribution files that will work on both Python 2 and Python 3. +Lib3to6 is also useful if your project needs to support older versions of Python 3 such as 3.5 but you want to use the latest Python syntax. ## Upload with Twine @@ -349,7 +349,7 @@ For example, Frob-6.0 could be a meta-package which depends on Frob-real-py2 on Python < 3.0, and Frob-real-py3 on Python ≥ 3.4. While this approach is _doable_ this can make imports confusing. -## Don't depend on setuptools +## Don't depend on setuptools (unless version >=24.3) You can mark your library as dependent on setuptools greater than 24.3 as this will ensure that during the next upgrade (when the packages drop python 2 From 55d417e1a9eb28f2fbdd6805f6bdb026e67dc51b Mon Sep 17 00:00:00 2001 From: Aaron Meurer Date: Wed, 10 Apr 2024 13:51:30 -0600 Subject: [PATCH 3/6] Delete CNAME --- CNAME | 1 - 1 file changed, 1 deletion(-) delete mode 100644 CNAME diff --git a/CNAME b/CNAME deleted file mode 100644 index a365dac..0000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -www.python3statement.org \ No newline at end of file From 83e6131babd80c2a7389fc607e84f8ef78a5cd62 Mon Sep 17 00:00:00 2001 From: Thomas Kluyver Date: Fri, 12 Apr 2024 11:37:03 +0100 Subject: [PATCH 4/6] Add archive section --- _sections/10-archive.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 _sections/10-archive.md diff --git a/_sections/10-archive.md b/_sections/10-archive.md new file mode 100644 index 0000000..f6fe0b1 --- /dev/null +++ b/_sections/10-archive.md @@ -0,0 +1,33 @@ +--- +title: archive +bg: 'white' +--- + +# History + +This page is now an archive of part of the transition from Python 2 to 3. + +By around 2015, when Python 2 support was originally planned to end, many +important Python libraries and tools supported Python 3. But Python 2 still had +a lot of users, and projects needed to support both major versions. The end of +Python 2 support was postponed to 2020, and some people argued that development +of Python 2 should resume. It seemed like a real possibility that the end date +would be postponed again, and we'd need to support two versions of the language +indefinitely. + +The Python 3 statement was drawn up around 2016. Projects pledged to require +Python 3 by 2020, giving other projects confidence that they could plan a similar +transition, and allowing downstream users to figure out their options without a +nasty surprise. We didn't force people to move to Python 3, but if they wanted +to stick with Python 2, they would stop getting new versions of our projects. +The focus was originally on the scientific Python ecosystem, with Jupyter and +matplotlib among the first projects involved, but in late 2017 it was expanded +to any Python projects. +A rapidly growing number of projects signed up as we approached 2020. + +The long-term transition we hoped for has succeeded: in 2024 it is entirely +normal for projects to support only Python 3, simplifying maintainers' lives +and letting us take full advantage of newer language features. + +Thank-you to all of the people, in projects big and small, who contributed +their support to the statement! From b2dca6afec4f9445a0998d4bdcf6f07d33d265f6 Mon Sep 17 00:00:00 2001 From: Thomas Kluyver Date: Thu, 18 Apr 2024 11:06:50 +0100 Subject: [PATCH 5/6] Add archival note to README as well --- README.md | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ffeae69..9587d0c 100755 --- a/README.md +++ b/README.md @@ -3,7 +3,36 @@ This is the main website for a pledge to stop supporting Python 2 for free in open source software. -# Run locally +## History + +This page is now an archive of part of the transition from Python 2 to 3. + +By around 2015, when Python 2 support was originally planned to end, many +important Python libraries and tools supported Python 3. But Python 2 still had +a lot of users, and projects needed to support both major versions. The end of +Python 2 support was postponed to 2020, and some people argued that development +of Python 2 should resume. It seemed like a real possibility that the end date +would be postponed again, and we'd need to support two versions of the language +indefinitely. + +The Python 3 statement was drawn up around 2016. Projects pledged to require +Python 3 by 2020, giving other projects confidence that they could plan a similar +transition, and allowing downstream users to figure out their options without a +nasty surprise. We didn't force people to move to Python 3, but if they wanted +to stick with Python 2, they would stop getting new versions of our projects. +The focus was originally on the scientific Python ecosystem, with Jupyter and +matplotlib among the first projects involved, but in late 2017 it was expanded +to any Python projects. +A rapidly growing number of projects signed up as we approached 2020. + +The long-term transition we hoped for has succeeded: in 2024 it is entirely +normal for projects to support only Python 3, simplifying maintainers' lives +and letting us take full advantage of newer language features. + +Thank-you to all of the people, in projects big and small, who contributed +their support to the statement! + +## Run locally Install Jekyll : `gem install jekyll`, `gem install github-pages` @@ -15,7 +44,9 @@ Modify the various files, refresh your browser and enjoy. PRs welcomed. -# Add your project +## Add your project + +We're no longer adding new projects - see the history section above. If you just want to add your project to the list of participating projects, add a line in [the list of participating projects](_sections/30-projects.md). It's @@ -25,7 +56,7 @@ online](https://github.com/python3statement/python3statement.github.io/edit/mast There is no need to install Jekyll: A check creating a preview will be run on your pull request. Please check this preview. -## Add timeline information +### Add timeline information The front page also has a timeline chart, with past release dates and future (planned) releases. You can also add your project there, if you have a specific @@ -35,7 +66,7 @@ See [site.js](site.js) around [line 100](https://github.com/python3statement/python3statement.github.io/blob/master/site.js#L103) to see how to add this kind of data. -# Base template +## Base template This site is based on [github.com/t413/SinglePaged](https://github.com/t413/SinglePaged). From b8b2310f5302595b9803603fe03903adedd7172e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sviatoslav=20Sydorenko=20=28=D0=A1=D0=B2=D1=8F=D1=82=D0=BE?= =?UTF-8?q?=D1=81=D0=BB=D0=B0=D0=B2=20=D0=A1=D0=B8=D0=B4=D0=BE=D1=80=D0=B5?= =?UTF-8?q?=D0=BD=D0=BA=D0=BE=29?= Date: Sun, 30 Jun 2024 18:02:14 +0200 Subject: [PATCH 6/6] Update CherryPy domain to `.dev` In Sep 2021, cherrypy.org has been hijacked, and the project lost it for good (https://github.com/cherrypy/cherrypy/issues/1872#issuecomment-912895814). Let's update it here to stop pointing to the scam website. --- _sections/30-projects.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_sections/30-projects.md b/_sections/30-projects.md index c4a27c1..640e417 100644 --- a/_sections/30-projects.md +++ b/_sections/30-projects.md @@ -61,7 +61,7 @@ These projects pledge to drop Python 2 support in or before 2020. - [![](assets/weblate.png)Weblate](https://weblate.org/) - [![](assets/pythran.png)Pythran](https://github.com/serge-sans-paille/pythran) - [![](assets/dateutil.png)dateutil](https://github.com/dateutil/dateutil) -- [![](//cherrypy.org/images/cherrypy.png)CherryPy](https://cherrypy.org/) +- [![](https://cherrypy.dev/images/cherrypy.png)CherryPy](https://cherrypy.dev) - [![](assets/tryton.png)Tryton](https://www.tryton.org/) - [![](assets/mne.png)MNE](https://www.martinos.org/mne/stable/index.html) - [![](assets/art_logo.png)Adversarial Robustness Toolbox](https://github.com/IBM/adversarial-robustness-toolbox)