sagemath/sage

Remove packages that handle backporting from Python 3 to Python 2

jhpalmieri opened this issue · 55 comments

Remove

  • backports_abc
  • backports_functools_lru_cache
  • backports_shutil_get_terminal_size
  • backports_ssl_match_hostname
  • configparser
  • enum34
  • functools32
  • future
  • ipaddress
  • pathlib2
  • singledispatch
  • subprocess32
  • typing

Let's also remove sagenb, since it doesn't build with Python 3. That lets us remove

  • flask
  • flask_autoindex
  • flask_babel
  • flask_oldsessions
  • flask_openid
  • flask_silk
  • sagenb
  • twisted (it may be used by terminado when it is present, but terminado seems to function fine without it)
  • werkzeug

Component: packages: standard

Keywords: sd109

Author: John Palmieri

Branch/Commit: 0578937

Reviewer: Dima Pasechnik, Matthias Koeppe

Issue created by migration from https://trac.sagemath.org/ticket/29754

comment:1

sagenb should go, too, it doesn't work in py3.

Description changed:

--- 
+++ 
@@ -1,4 +1,8 @@
 Remove
+
+- python2
+
+and
 
 - backports_abc
 - backports_functools_lru_cache

Description changed:

--- 
+++ 
@@ -20,7 +20,7 @@
 
 Also remove the use of `six` in the build process. (There are still many uses of `six` in the Sage library, and also the package `traitlets` uses it, so we cannot delete `six` now.)
 
-Should we also remove `sagenb`? That would let us remove
+Let's also remove `sagenb`, since it doesn't build with Python 3. That lets us remove
 
 - flask
 - flask_autoindex
@@ -32,4 +32,3 @@
 - twisted ? (it may be used by terminado when it is present, but terminado may function fine without it)
 - werkzeug
 
-If the sagenb removal is a good idea, it could also be done on a separate ticket.

Dependencies: #29752

Commit: 27b3d91

New commits:

56444d6trac 29752: convert werkzeug from standard to optional
27b3d91trac 29754: remove packages backported Python 3 components to Python 2.

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

ddca85atrac 29752: convert werkzeug from standard to optional

Changed commit from 27b3d91 to ddca85a

Changed commit from ddca85a to 27b3d91

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

56444d6trac 29752: convert werkzeug from standard to optional
27b3d91trac 29754: remove packages backported Python 3 components to Python 2.

Changed commit from 27b3d91 to 9385b73

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

ddca85atrac 29752: convert werkzeug from standard to optional
9385b73trac 29754: remove packages backported Python 3 components to Python

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

Changed commit from 9385b73 to ddca85a

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

e1a0c8ctrac 29752: convert werkzeug from standard to optional
406a030trac 29754: remove packages backported Python 3 components to Python

Changed commit from ddca85a to 406a030

comment:12

I have to test my new branch. I'll set it back to "needs review" when that's done.

Changed branch from u/jhpalmieri/werkzeug-optional to none

Changed dependencies from #29752 to none

Changed commit from 406a030 to none

Commit: 2903b22

comment:15

Okay, ready for review.


New commits:

2903b22trac 29754: remove packages which backport Python 3 components:
comment:16

lgtm

Reviewer: Dima Pasechnik

comment:17

Thanks, but as you and Matthias noted on another ticket, this needs rebasing. I'll work on that.

Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:

32bb2feMerge tag '9.1.rc3' into t/29633/src_doc_bootstrap__generate_list_of_packages__with_links_to_documentation__for_ref_manual_from_build_pkgs
7555ba6Merge branch 't/29633/src_doc_bootstrap__generate_list_of_packages__with_links_to_documentation__for_ref_manual_from_build_pkgs' into t/29669/for_sage_9_2__remove_python_2_support_from_the_build_system
520078abuild/pkgs/python2: Remove
f712bb5configure.ac: Remove option --with-python=2
96a5e76Remove python2 from tox and [GitHub](../wiki/GitHub) CI scripts
ea7df3econfigure.ac: Remove message 'Checking for Python version to install...'
ff41817configure.ac: Warn on 'configure --with-python=3.x'
378bf54Merge branch 't/29669/for_sage_9_2__remove_python_2_support_from_the_build_system' into t/29757/_github_workflows_tox_gcc_spkg_yml__remove_python2
225f730.github/workflows/tox-gcc_spkg.yml: Remove python2
c182f48trac 29754: remove packages backporting Python 3 components to Python 2.

Changed commit from 2903b22 to c182f48

Description changed:

--- 
+++ 
@@ -1,8 +1,4 @@
 Remove
-
-- python2
-
-and
 
 - backports_abc
 - backports_functools_lru_cache
@@ -18,8 +14,6 @@
 - subprocess32
 - typing
 
-Also remove the use of `six` in the build process. (There are still many uses of `six` in the Sage library, and also the package `traitlets` uses it, so we cannot delete `six` now.)
-
 Let's also remove `sagenb`, since it doesn't build with Python 3. That lets us remove
 
 - flask
@@ -29,6 +23,6 @@
 - flask_openid
 - flask_silk
 - sagenb
-- twisted ? (it may be used by terminado when it is present, but terminado may function fine without it)
+- twisted (it may be used by terminado when it is present, but terminado seems to function fine without it)
 - werkzeug
 

Dependencies: #29757

comment:19

Rebased to #29757.

comment:20

Can zope_interface also be removed?

$ grep zope_interface build/pkgs/*/dependencies
build/pkgs/twisted/dependencies:$(PYTHON) | $(PYTHON_TOOLCHAIN) zope_interface
comment:21

I tested this meanwhile, it works. Most probably zope_interface may go too, it only is mentioned in doctests (and as a dependence of removed here twisted)

comment:22

If this version here works, let's get this ticket in, and do the zope_interface removal on a follow-up ticket.

comment:23

This could happen on #29803.

comment:24

Removal of zope_interface is now done on #29803, actually I changed it to a dummy script package there so that #29803 is independent of this one here.

comment:25

lgtm

comment:26

Conflicts with #29745

Changed reviewer from Dima Pasechnik to Dima Pasechnik, Matthias Koeppe

New commits:

4672d55trac 29633: fixes for PDF docbuilding
2ee9befMerge tag '9.1' into t/29633/src_doc_bootstrap__generate_list_of_packages__with_links_to_documentation__for_ref_manual_from_build_pkgs
9c7ea5ftrac 29633: fix SQLite doctests in cmdline.py
8baef11trac 29745: clean up various SPKG.rst files
c559f26Merge branch 't/29669/for_sage_9_2__remove_python_2_support_from_the_build_system' into t/29745/cleanup-spkg-rst-files
05a6937Merge commit 'c559f26caf56378c8c4a5652f577986b4f5d431c' of git://trac.sagemath.org/sage into t/29754/no-py2-backports

Changed commit from c182f48 to 05a6937

comment:29

Follow-up: #29823

comment:30

Another follow-up: #29878

comment:31

And another: #29885 (remove "sage -n sagenb" as an advertised option, and strip the SageNB code from the sage-notebook script).

comment:32

Merge conflict

Changed commit from 05a6937 to cc61541

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

8387b7badd forgotten doctest fix.
2ddcd31change upstream_url to a (hopefully) more stable and easy to decipher address for sphinx packages
649289emove sphinx packages from pip to PYTHON_TOOLCHAIN
e5415datrac 28856: fix apostrophes in wikipedia links
b9d44e3Merge branch 'ticket-28000' into sphinx3
8f66113Minor upgdrade to Sphinx 3.0.3
321e2bfBump to 3.0.4
ee7195cMerge branch 'matplotlib3.2.1' into sphinx3
bd99462Merge branch 'develop' into sphinx3
cc61541Merge commit 'bd99462f6f89757b9b1674fbeb55743ce7f6fab6' of git://trac.sagemath.org/sage into t/29754/no-py2-backports

Changed dependencies from #29757 to #29757, #28856

Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:

0578937Merge tag '9.2.beta2' into t/29754/no-py2-backports

Changed commit from cc61541 to 0578937

Changed dependencies from #29757, #28856 to none

comment:36

merged in the latest beta

Changed branch from u/mkoeppe/no-py2-backports to 0578937