#29669 closed enhancement (fixed)

For Sage 9.2: Remove Python 2 support from the build system and CI scripts

Reported by: mkoeppe Owned by:
Priority: major Milestone: sage-9.2
Component: build Keywords:
Cc: dimpase, mjo, embray, chapoton, jhpalmieri, vbraun Merged in:
Authors: Matthias Koeppe Reviewers: Michael Orlitzky
Report Upstream: N/A Work issues:
Branch: ff41817 (Commits, GitHub, GitLab) Commit: ff4181753269bd64d4b27da0a13936c88d041aaf
Dependencies: #29633 Stopgaps:

Status badges

Description (last modified by mkoeppe)

The ticket makes it an error (with a clear message) when ./configure --with-python=2 is invoked.

checking Python version to install... configure: error: the only allowed value for --with-python is 3.  Support for Python 2 has been removed in Sage 9.2.

The ticket keeps variables such as SAGE_PYTHON_VERSION and SAGE_PYTHON3 unchanged, for compatibility.

Also, to clarify in light of the discussion in https://groups.google.com/d/msg/sage-devel/fgsSsJmVVXo/ZIcJq9x3AAAJ, this ticket does not affect which versions of Python are sufficient as sage-system-python (this is still all versions listed in build/tox.ini, which includes various 2.x and 3.x).

Part of meta-ticket #29141.

Change History (16)

comment:1 Changed 18 months ago by mkoeppe

  • Dependencies set to #29633

comment:2 Changed 18 months ago by mkoeppe

  • Branch set to u/mkoeppe/for_sage_9_2__remove_python_2_support_from_the_build_system

comment:3 Changed 18 months ago by git

  • Commit set to 96a5e762dc6f229e2280b9e6bf5be5cb1b8a137b

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

96a5e76Remove python2 from tox and GitHub CI scripts

comment:4 Changed 18 months ago by mkoeppe

  • Summary changed from For Sage 9.2: Remove Python 2 support from the build system to For Sage 9.2: Remove Python 2 support from the build system and CI scripts

comment:5 Changed 18 months ago by mkoeppe

  • Authors set to Matthias Koeppe
  • Status changed from new to needs_review

comment:6 Changed 18 months ago by mkoeppe

  • Description modified (diff)

comment:7 follow-ups: Changed 18 months ago by mjo

  • Reviewers set to Michael Orlitzky
  • Status changed from needs_review to positive_review

This was never quite right,

case "$with_python" in
     3*) SAGE_PYTHON_VERSION=3;;

because it accepts --with-python=3.9 and ignores everything after the 3 (it should throw an error in my opinion). Not a big deal now since it will be deleted soon.

There's a lot of other python-2.x stuff to be removed in the build system, scripts, docs, and SPKGs, but I think you are aware of that and plan to deal with it later? If so this is fine as a first step.

comment:8 in reply to: ↑ 7 Changed 18 months ago by mkoeppe

Replying to mjo:

This was never quite right,

case "$with_python" in
     3*) SAGE_PYTHON_VERSION=3;;

because it accepts --with-python=3.9 and ignores everything after the 3 (it should throw an error in my opinion).

Good point. Let me make this a warning actually.

comment:9 Changed 18 months ago by git

  • Commit changed from 96a5e762dc6f229e2280b9e6bf5be5cb1b8a137b to ff4181753269bd64d4b27da0a13936c88d041aaf
  • Status changed from positive_review to needs_review

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

ea7df3econfigure.ac: Remove message 'Checking for Python version to install...'
ff41817configure.ac: Warn on 'configure --with-python=3.x'

comment:10 in reply to: ↑ 7 Changed 18 months ago by mkoeppe

Replying to mjo:

There's a lot of other python-2.x stuff to be removed in the build system, scripts, docs, and SPKGs, but I think you are aware of that and plan to deal with it later? If so this is fine as a first step.

Yes, there's a lot to be done, and there is a meta-ticket for that: #29141.

comment:11 Changed 18 months ago by mkoeppe

  • Description modified (diff)

comment:12 Changed 18 months ago by mjo

  • Status changed from needs_review to positive_review

comment:13 Changed 18 months ago by mkoeppe

Thanks!

comment:14 Changed 17 months ago by mkoeppe

  • Cc vbraun added
  • Description modified (diff)

comment:15 Changed 17 months ago by mkoeppe

  • Description modified (diff)

comment:16 Changed 17 months ago by vbraun

  • Branch changed from u/mkoeppe/for_sage_9_2__remove_python_2_support_from_the_build_system to ff4181753269bd64d4b27da0a13936c88d041aaf
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.