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

Support minimal system Python version 3.6 (for venv) #29033

Closed
embray opened this issue Jan 17, 2020 · 32 comments
Closed

Support minimal system Python version 3.6 (for venv) #29033

embray opened this issue Jan 17, 2020 · 32 comments

Comments

@embray
Copy link
Contributor

embray commented Jan 17, 2020

With #27824 it is possible to create a venv over an existing Python 3.7 instead of building the python3 spkg.

This is designed to work with Python 3.7 (and < 3.8) since that's what's currently used by sage-the-distribution and is best-tested.

However, it turns out an existing Python 3.6 can work just fine as the minimum Python version with a few small fixes (sage-the-distribution used Python 3.6 until last year, so the degree to which we diverged from supporting it was minimal).

This would be a nice-to-have, as it would speed up the build on various distributions that we still support:

(All this is according to https://repology.org/project/python/versions as of 2020-06-05, not verified.)

Maybe since Sage is less tested with 3.6, there could be a warning against using it.

See also: #27754 (Upgrade: Python 3.8.x)

CC: @jhpalmieri @dimpase @kiwifb @orlitzky

Component: python3

Author: Erik Bray, Matthias Koeppe

Branch: abb5607

Reviewer: Matthias Koeppe, Michael Orlitzky

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

@embray embray added this to the sage-9.1 milestone Jan 17, 2020
@mkoeppe
Copy link
Member

mkoeppe commented Jan 17, 2020

comment:2

Related to the question of what Python versions are good is #26457 - "Do not depend on a patched Python"

@mkoeppe
Copy link
Member

mkoeppe commented Apr 14, 2020

comment:3

Batch modifying tickets that will likely not be ready for 9.1, based on a review of the ticket title, branch/review status, and last modification date.

@mkoeppe mkoeppe modified the milestones: sage-9.1, sage-9.2 Apr 14, 2020
@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Member

mkoeppe commented Apr 22, 2020

Changed dependencies from #29032 to none

@mkoeppe
Copy link
Member

mkoeppe commented Apr 22, 2020

comment:4

This would need rebasing

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Member

mkoeppe commented May 28, 2020

comment:5

Edited description to clarify that this is about the venv python3, not sage-system-python.

@mkoeppe mkoeppe changed the title Support minimal system Python version 3.6 Support minimal system Python version 3.6 (for venv) May 28, 2020
@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Member

mkoeppe commented Jun 5, 2020

@mkoeppe
Copy link
Member

mkoeppe commented Jun 5, 2020

comment:9

Tests at https://github.com/mkoeppe/sage/pull/37/checks


New commits:

abb5607Allow Sage to work with a system Python 3.6.

@mkoeppe
Copy link
Member

mkoeppe commented Jun 5, 2020

Changed commit from b4a777e to abb5607

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Member

mkoeppe commented Jun 6, 2020

comment:14

TODO: Check fedora-28 and centos-8 in https://github.com/mkoeppe/sage/actions/runs/126407840

@orlitzky
Copy link
Contributor

orlitzky commented Jun 6, 2020

comment:15

LGTM if those tests pass.

@mkoeppe
Copy link
Member

mkoeppe commented Jun 7, 2020

@orlitzky
Copy link
Contributor

orlitzky commented Jun 7, 2020

Reviewer: Michael Orlitzky

@mkoeppe
Copy link
Member

mkoeppe commented Jun 7, 2020

comment:18

Thank you!

@mkoeppe
Copy link
Member

mkoeppe commented Jun 7, 2020

Changed author from Erik Bray to Erik Bray, Matthias Koeppe

@mkoeppe
Copy link
Member

mkoeppe commented Jun 7, 2020

Changed reviewer from Michael Orlitzky to Matthias Koeppe, Michael Orlitzky

@vbraun
Copy link
Member

vbraun commented Jun 21, 2020

Changed branch from u/mkoeppe/build/configure/python3.6 to abb5607

@antonio-rojas
Copy link
Contributor

Changed commit from abb5607 to none

@antonio-rojas
Copy link
Contributor

comment:21

C.UTF-8 locale is a Debian-specific thing (and maybe Fedora). Please don't assume that it is available. On Arch, this causes lots (as in, one every other line in the compilation output) of warnings

/bin/sh: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)

@dimpase
Copy link
Member

dimpase commented Jul 3, 2020

comment:22

on another ticket, fixing docbuild on non-EN locales, someone using Arch complained that LANG=C causes a lot of warnings.

@orlitzky
Copy link
Contributor

orlitzky commented Jul 3, 2020

comment:23

Replying to @antonio-rojas:

C.UTF-8 locale is a Debian-specific thing (and maybe Fedora). Please don't assume that it is available.

Sorry about that, I didn't realize that Gentoo's glibc was patched (the patches are in an unusual place). It looks like discussion is still ongoing for glibc:

https://sourceware.org/pipermail/libc-alpha/2020-June/115224.html

Musl, on the other hand, already supports it I think?

https://wiki.musl-libc.org/functional-differences-from-glibc.html

In any case, we should probably revert to C in the meantime.

@dimpase
Copy link
Member

dimpase commented Jul 3, 2020

comment:24

the locale issue is being dealt with on #30053

@dimpase
Copy link
Member

dimpase commented Sep 10, 2020

comment:25

This has introduced an unfortunate bug related to a weird search order in AC_PATH_PROGS_FEATURE_CHECK(), which has the outer loop over PATH entries.
Thus, a python on the list [python.foo python.baz ....] of pythons that comes first in PATH and has all the features will be picked, not the first python on the list.

As modifying PATH to put the best python 1st might be error-prone (think about Conda, Homebrew, etc), this should be fixed.

This is of course an autoconf bug, too, as AC_PATH_PROGS() has a sane order, ie. its outer loop is over the list entries.

@dimpase
Copy link
Member

dimpase commented Sep 10, 2020

comment:26

Replying to @dimpase:

This has introduced an unfortunate bug related to a weird search order in AC_PATH_PROGS_FEATURE_CHECK(), which has the outer loop over PATH entries.
Thus, a python on the list [python.foo python.baz ....] of pythons that comes first in PATH and has all the features will be picked, not the first python on the list.

As modifying PATH to put the best python 1st might be error-prone (think about Conda, Homebrew, etc), this should be fixed.

This is of course an autoconf bug, too, as AC_PATH_PROGS() has a sane order, ie. its outer loop is over the list entries.

see #30546 for a fix

@mkoeppe
Copy link
Member

mkoeppe commented Dec 5, 2020

Follow up regarding centos-7:

(because a dependency of python3 is too old):

After #30559, sqlite is no longer the problem, but python3 is still not accepted on this system because of zlib -> libpng:

Checking whether SageMath should install SPKG zlib...
checking for inflateEnd in -lz... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for LIBPNG... no
checking for inflateValidate in -lz... no
configure: no suitable system package found for SPKG zlib
-----------------------------------------------------------------------------
Checking whether SageMath should install SPKG libpng...
checking installing zlib? ... yes; install libpng as well
configure: no suitable system package found for SPKG libpng

@mkoeppe
Copy link
Member

mkoeppe commented Dec 5, 2020

comment:28

#31009 is taking care of this.

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