Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop Python 3.6 support #30551

Closed
slel opened this issue Sep 10, 2020 · 57 comments
Closed

Drop Python 3.6 support #30551

slel opened this issue Sep 10, 2020 · 57 comments

Comments

@slel
Copy link
Member

slel commented Sep 10, 2020

This can be a dependency for other tickets.

For instance tickets updating dependencies to
versions that dropped support for Python 3.6.

Related:

Depends on #30913

CC: @fchapoton @mkoeppe @orlitzky @dimpase @vbraun

Component: python3

Author: Tobias Diez, Matthias Koeppe

Branch/Commit: b06731c

Reviewer: Matthias Koeppe, Dima Pasechnik

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

@slel slel added this to the sage-9.3 milestone Sep 10, 2020
@mkoeppe
Copy link
Contributor

mkoeppe commented Sep 10, 2020

comment:1

I don't think there is anything that says that we "should" drop Python 3.6 support.

@mkoeppe mkoeppe removed this from the sage-9.3 milestone Sep 10, 2020
@mkoeppe

This comment has been minimized.

@slel
Copy link
Member Author

slel commented Sep 10, 2020

comment:3

Replying to @mkoeppe:

I don't think there is anything that says
that we "should" drop Python 3.6 support.

Oh good, then let's support it as long as we can.

By the way #15530 and #15980 which started support
for Python 3.6 are almost ready to be closed.

@slel

This comment has been minimized.

@dimpase
Copy link
Member

dimpase commented Sep 15, 2020

comment:4

#30053 says that we must drop Python 3.6 - unless you want to have a go at it.

it seems that some of our code related to docbuilding is too new for 3.6, and perhaps our Sphinx is too new too.

Besides, the EOL for 3.6 is late 2021, which is soon.

@dimpase

This comment has been minimized.

@tobiasdiez
Copy link
Contributor

comment:6

What do you think about adopting the Python version strategy of numpy, according to which "a project with a major or minor version release in November 2020 should support Python 3.7 and newer"?

@mkoeppe
Copy link
Contributor

mkoeppe commented Dec 5, 2020

comment:7

Replying to @tobiasdiez:

What do you think about adopting the Python version strategy of numpy, according to which "a project with a major or minor version release in November 2020 should support Python 3.7 and newer"?

That's #30384

@tobiasdiez
Copy link
Contributor

comment:8

According to NEP 29, "a project with a major or minor version release in November 2020 should support Python 3.7 and newer." and thus this ticket can be closed in my opinion.

(Documentation for following NEP 29 is added in #30384.)

@mkoeppe
Copy link
Contributor

mkoeppe commented Dec 7, 2020

comment:9

??!

This ticket is for dropping support for Python 3.6 -- this involves changing what system python versions we accept (build/pkgs/python3/spkg-configure.m4) and removing python3.6 workarounds from the code.

NEP 29 would already allow us to drop support now -- but I don't think we want to do it now (because of Sage's traditional role of providing a distribution that people can install onto ancient machines) -- hence the milestone is set to "pending".

@tobiasdiez
Copy link
Contributor

Commit: c5436df

@tobiasdiez
Copy link
Contributor

comment:11

Sorry, it wasn't clear to me from the ticket description that this is more than a placeholder to mark dependencies on Python 3.6.

NEP 29 is actually quite explicit about that one should drop support after the 42 months, e.g "On Jun 23, 2020 drop support for Python 3.6 (initially released on Dec 23, 2016)". Of course, it could be sage's policy to support also older python versions, but that's then no longer NEP 29 (in it's strict form). However, one should also keep in mind that supporting old Python versions results in technical debt that might be bigger than the gains from supporting old systems.

Also correct me if I'm wrong, but since sage is also installing its own python version, sage can still be used on older systems, right? It is just that the system python is not used.

Anyway, I've tried to locate all workarounds that are in place for Python 3.6 support, and removed them (I've probably missed a few, but maybe its good anyway to pay of the technical debt in follow up tickets). Moreover, I've upgraded the requirements to 3.7 (again, I might have missed something).


New commits:

7d97a56Partially revert "Allow Sage to work with a system Python 3.6."
2ed040bRevert #30576
01000e8Partially revert #30008
c5436dfRequire at least Python 3.7

@tobiasdiez
Copy link
Contributor

Branch: public/python3/drop36

@slel
Copy link
Member Author

slel commented Dec 17, 2020

comment:12

Other projects dropping support for Python 3.6:

@mkoeppe
Copy link
Contributor

mkoeppe commented Dec 19, 2020

comment:13

In this change:

 - **ar** and **ranlib**: can be obtained as part of GNU binutils.
 - **tar**: GNU tar version 1.17 or later, or BSD tar.
-- **python**: Python 3, 3.6 or later, or Python 2.7 (deprecated).
+- **python**: Python 3.7 or later (Python 2.7 or Python <= 3.6 support is deprecated).

Both the original text and the new one are not correct. This part refers to the sage-bootstrap-python which has much wider range of supported python versions, including Python >= 2.6 and Python >= 3.4 - according to build/tox.ini.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 19, 2020

Changed commit from c5436df to 5c9983d

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 19, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

5c9983dCorrect versions for installation from source

@tobiasdiez
Copy link
Contributor

comment:15

Replying to @mkoeppe:

In this change:

 - **ar** and **ranlib**: can be obtained as part of GNU binutils.
 - **tar**: GNU tar version 1.17 or later, or BSD tar.
-- **python**: Python 3, 3.6 or later, or Python 2.7 (deprecated).
+- **python**: Python 3.7 or later (Python 2.7 or Python <= 3.6 support is deprecated).

Both the original text and the new one are not correct. This part refers to the sage-bootstrap-python which has much wider range of supported python versions, including Python >= 2.6 and Python >= 3.4 - according to build/tox.ini.

I've changed the versions now.

@slel
Copy link
Member Author

slel commented May 16, 2021

comment:38

There are two relevant Python minimum versions (see comment:13):

  • the minimum Python version Sage can use as its underlying Python
  • the minimum Python version Sage can use to bootstrap,
    building is own Python if necessary

On Ubuntu 18.04, building from source will still work,
but if the system Python is 3.6, Sage will build a more
recent Python to base itself on.

@dimpase
Copy link
Member

dimpase commented May 17, 2021

comment:39

no need to build it on !Debian/Ubuntu, even the old LTS provide modern pythons. E.g.

sudo apt-get install python3.8 python3.8-dev python3.8-distutils python3.8-venv

and if you don't have root you can use pyenv to get modern python.

We should be thinking about stopping with shipping CPython sources, we don't patch them, and there are enough ways to get it in binary.

@dimpase
Copy link
Member

dimpase commented May 17, 2021

comment:40

a slight inconvenience is that you'd need to specify the Python to use to ./configure

@mkoeppe
Copy link
Contributor

mkoeppe commented May 18, 2021

comment:41

Commit 721ede1 is not good.

@dimpase
Copy link
Member

dimpase commented May 19, 2021

comment:43

Replying to @mkoeppe:

Commit 721ede1 is not good.

this is

Author: Tobias Diez <[email protected]>
Date:   Tue Dec 8 00:05:41 2020 +0100

    Partially revert #30008

diff --git a/build/bin/sage-bootstrap-python b/build/bin/sage-bootstrap-python
index faee444e8d..c3afc1261a 100755
--- a/build/bin/sage-bootstrap-python
+++ b/build/bin/sage-bootstrap-python
@@ -30,15 +30,6 @@ fi
 # is accessible by this python; this is to guard on Cygwin against Pythons
 # installed somewhere else in Windows.
 
-# Trac #30008: Make it work even if the environment tries to sabotage UTF-8
-# operation in Python 3.0.x-3.6.x by setting LC_ALL=C or similar.
-
-if [ "$LC_ALL" = "C" -o "$LANG" = "C" -o "$LC_CTYPE" = "C" ]; then
-    LC_ALL=$(locale -a | grep -E -i '^(c|en_us)[-.]utf-?8$' | head -n 1)
-    LANG=$LC_ALL
-    export LC_ALL
-    export LANG
-fi
 
 PYTHONS="python python3 python3.8 python3.7 python2.7 python3.6 python2"
 for PY in $PYTHONS; do

what's the problem here?

@mkoeppe
Copy link
Contributor

mkoeppe commented May 19, 2021

comment:44

Replying to @dimpase:

what's the problem here?

It is a change to sage-bootstrap-python; but we are NOT changing support for bootstrapping with old Python versions.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 19, 2021

Changed commit from b06731c to bc27c45

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 19, 2021

Branch pushed to git repo; I updated commit sha1. New commits:

bc27c45Revert "Partially revert #30008"

@mkoeppe
Copy link
Contributor

mkoeppe commented May 19, 2021

comment:47

@vbraun - if it's too late for this change, I can also put this reverting commit on a new ticket.

@dimpase
Copy link
Member

dimpase commented May 19, 2021

comment:48

ok.

@mkoeppe
Copy link
Contributor

mkoeppe commented May 26, 2021

comment:49

Looks like the earlier version, b06731c, was merged in 9.4.beta0.


New commits:

bc27c45Revert "Partially revert #30008"

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 26, 2021

Changed commit from bc27c45 to b06731c

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 26, 2021

Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. This was a forced push. New commits:

@mkoeppe
Copy link
Contributor

mkoeppe commented May 26, 2021

comment:51

I've put the missing commit on #31860.

@vbraun
Copy link
Member

vbraun commented May 27, 2021

Changed branch from public/python3/drop36 to b06731c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants