Opened 2 years ago
Closed 23 months ago
#29141 closed task (worksforme)
Meta-ticket: Remove Python 2 support for Sage 9.2; upgrades enabled by the removal
Reported by: | mkoeppe | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | python3 | Keywords: | sd109 |
Cc: | chapoton, embray, jdemeyer, slelievre, arojas, fbissey, gh-timokau, jhpalmieri, tscrim, isuruf, nbruin, mjo, vbraun, dimpase, vdelecroix, gh-kliem | Merged in: | |
Authors: | Reviewers: | Dima Pasechnik | |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
From https://groups.google.com/forum/#!topic/sage-devel/vYlbnAwKATM "drop python2 compatibility in 9.1" (thread Jan 5-22, 2020).
Removal of Python 2 support in Sage 9.2 has been announced at https://wiki.sagemath.org/Python3-Switch and https://wiki.sagemath.org/ReleaseTours/sage-9.1
Removal tickets:
- #28000 For Sage 9.2: Remove python 2 support from sagelib
- #29669 For Sage 9.2: Remove Python 2 support from the build system and CI scripts
- #27826 - remove
long
hack for Python 3 indoctest/forker.py
, remove all calls tolong()
- #29754 - remove Python 2 package and packages which backports various parts of Python
Upgrade tickets:
Please check that upgraded packages are compatible with Python >= 3.6 (and note this on the upgrade ticket) because we may wish to support Python 3.6 venv (#29033).
- #28197 - upgrade to ipython 7 / prompt-toolkit 2. See also #29042
- #27754 - Upgrade: Python 3.8.x (see https://trac.sagemath.org/ticket/27754#comment:55 in particular)
- numpy >= 1.17 - #29425 Upgrade Cython to 0.29.16, NumPy? to 1.18.2 to fix numpy build error on local-conda-forge-macos-standard
- #29730 Update sympy to 1.6
- matplotlib-3: #29547. Related: #28449 and https://trac.sagemath.org/ticket/27866#comment:25
- sphinx-2: #28856, #29095
- scipy-1.3+: #29115
- rpy2 3.x: #28988, #29441
- networkx 2.4: #28450
- #29803 - Upgrade setuptools, setuptools_scm, pip
Other:
- compatibility with python 3.8... needs details
- "at this point the major issues are python 3.8 and ipython 7, and I don't see how one could support several versions of them without forking hundreds of doctests. Both updates require multi-thousand-lines patches, due to changes in dict sorting and hashes."
- remove
src/sage/cpython/_py2_random.py
- This was added in #24508 and is only used during doctesting in order to ensure consistent random results between Python 2 and 3.
Reference: Tickets that kept Python 2 compatibility but introduced a performance penalty for Python 2:
- #29103 (get rid of part of itervalues)
See also:
- #29756 Meta-ticket: Review of Python 3 features that sagelib should use systematically
Change History (28)
comment:1 Changed 2 years ago by
comment:2 Changed 2 years ago by
Please feel free to update the ticket description.
comment:3 Changed 2 years ago by
- Description modified (diff)
comment:4 Changed 2 years ago by
- Description modified (diff)
comment:5 Changed 2 years ago by
- Description modified (diff)
comment:6 Changed 2 years ago by
- Cc dimpase added
- Description modified (diff)
comment:7 Changed 2 years ago by
- Cc vdelecroix added
- Description modified (diff)
comment:8 Changed 2 years ago by
I have just updated https://wiki.sagemath.org/Python3-Switch to say that the upcoming 9.1 will still support Python 2
comment:9 Changed 2 years ago by
- Description modified (diff)
comment:10 Changed 2 years ago by
- Description modified (diff)
- Summary changed from Meta-ticket: Upgrades and other changes that require dropping py2 support or separate package versions for py2/py3 to Meta-ticket: Remove Python 2 support for Sage 9.2; upgrades enabled by the removal
comment:11 Changed 2 years ago by
- Description modified (diff)
comment:12 Changed 2 years ago by
comment:13 Changed 2 years ago by
- Description modified (diff)
comment:14 Changed 2 years ago by
- Description modified (diff)
comment:15 Changed 2 years ago by
@fbissey: I don't know of any ticket for removing py2
and py3
tags.
comment:16 follow-up: ↓ 19 Changed 2 years ago by
Another thing that I spotted scanning stuff in #29633. We have a lot python feature backport packages in our tree. We may want to get rid of them as we get rid of python 2.7 and anything older than python 3.7 in fact. Look at enum34
if you don't get what I mean.
comment:17 Changed 2 years ago by
Another thing that I spotted scanning stuff in #29633. We have a lot of Python feature backport packages in our tree. We may want to get rid of them as we get rid of Python 2.7 and anything older than Python 3.7 in fact. Look at
enum34
if you don't get what I mean.
Consider keeping support Python 3.6, whose official support is till 2021-12-23. See #29033.
Python 3.5 support ends in 2020-09, so fine to drop it. See life cycle of Python versions:
- currently or recently supported versions: https://www.python.org/downloads/
- older versions: https://devguide.python.org/devcycle/#end-of-life-branches
comment:18 Changed 2 years ago by
- Keywords sd109 added
comment:19 in reply to: ↑ 16 ; follow-up: ↓ 20 Changed 2 years ago by
Replying to fbissey:
Another thing that I spotted scanning stuff in #29633. We have a lot python feature backport packages in our tree. We may want to get rid of them as we get rid of python 2.7 and anything older than python 3.7 in fact. Look at
enum34
if you don't get what I mean.
I'm working on this. I'll open up a ticket and post a link here some time soon.
comment:20 in reply to: ↑ 19 Changed 2 years ago by
Replying to jhpalmieri:
I'm working on this. I'll open up a ticket and post a link here some time soon.
See #29754.
comment:21 Changed 2 years ago by
- Description modified (diff)
comment:22 Changed 2 years ago by
- Description modified (diff)
comment:23 Changed 2 years ago by
- Description modified (diff)
comment:24 Changed 2 years ago by
- Cc gh-kliem added
- Description modified (diff)
comment:25 Changed 2 years ago by
- Description modified (diff)
comment:26 Changed 23 months ago by
- Milestone changed from sage-9.2 to sage-duplicate/invalid/wontfix
- Status changed from new to needs_review
We can close this ticket as completed.
comment:27 Changed 23 months ago by
- Reviewers set to Dima Pasechnik
- Status changed from needs_review to positive_review
comment:28 Changed 23 months ago by
- Resolution set to worksforme
- Status changed from positive_review to closed
python 3.8 update is tracked in #27754, there is a list of issues that need fixing. rpy3 support is merged already in 9.1.beta2 (#28988), as well as networkx 2.4, which is also py3-only (#28450). IMO #28190 is no longer worth the effort at this point, provided that python2 support is to be dropped at 9.2 in the worst case.