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 support for Python 3.8 #35404

Merged
merged 5 commits into from
Aug 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dist.yml
Original file line number Diff line number Diff line change
@@ -100,7 +100,7 @@ jobs:
#
CIBW_ARCHS: ${{ matrix.arch }}
# https://cibuildwheel.readthedocs.io/en/stable/options/#requires-python
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8"
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.9"
# Environment during wheel build
CIBW_ENVIRONMENT: "PATH=$(pwd)/local/bin:$PATH CPATH=$(pwd)/local/include:$CPATH LIBRARY_PATH=$(pwd)/local/lib:$LIBRARY_PATH PKG_CONFIG_PATH=$(pwd)/local/share/pkgconfig:$PKG_CONFIG_PATH ACLOCAL_PATH=/usr/share/aclocal"
# Use 'build', not 'pip wheel'
6 changes: 1 addition & 5 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -18,7 +18,6 @@ on:
default: >-
["ubuntu-trusty-toolchain-gcc_9",
"ubuntu-xenial-toolchain-gcc_9",
"ubuntu-bionic-gcc_8-python3.8",
"ubuntu-focal",
"ubuntu-jammy",
"ubuntu-kinetic",
@@ -28,16 +27,13 @@ on:
"debian-bullseye",
"debian-bookworm",
"debian-sid",
"linuxmint-19-gcc_8-python3.8",
"linuxmint-19.3-gcc_8-python3.8",
"linuxmint-20.1",
"linuxmint-20.2",
"linuxmint-20.3",
"linuxmint-21",
"linuxmint-21.1",
"linuxmint-21.2",
"fedora-29-python3.8",
"fedora-30-python3.8",
"fedora-30",
"fedora-31",
"fedora-32",
"fedora-33",
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.9
- name: Install pycodestyle
run: pip install tox pycodestyle
- name: Lint using pycodestyle
@@ -31,7 +31,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.9
- name: Install relint
run: pip install tox relint
- name: Lint using relint
@@ -45,7 +45,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.9
- name: Install tox
run: pip install tox
- name: Lint using tox -e rst
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -201,7 +201,7 @@ in the Installation Guide.
more details.

- Python 3.4 or later, or Python 2.7, a full installation including
`urllib`; but ideally version 3.8.x, 3.9.x, or 3.10.x, which
`urllib`; but ideally version 3.9.x, 3.10.x, or 3.11.x, which
will avoid having to build Sage's own copy of Python 3.
See [build/pkgs/python3/SPKG.rst](build/pkgs/python3/SPKG.rst)
for more details.
1 change: 0 additions & 1 deletion build/pkgs/_python3.8/distros/arch.txt

This file was deleted.

1 change: 0 additions & 1 deletion build/pkgs/_python3.8/distros/cygwin.txt

This file was deleted.

4 changes: 0 additions & 4 deletions build/pkgs/_python3.8/distros/debian.txt

This file was deleted.

2 changes: 0 additions & 2 deletions build/pkgs/_python3.8/distros/fedora.txt

This file was deleted.

1 change: 0 additions & 1 deletion build/pkgs/_python3.8/distros/freebsd.txt

This file was deleted.

1 change: 0 additions & 1 deletion build/pkgs/_python3.8/distros/homebrew.txt

This file was deleted.

1 change: 0 additions & 1 deletion build/pkgs/_python3.8/distros/macports.txt

This file was deleted.

2 changes: 0 additions & 2 deletions build/pkgs/_python3.8/distros/opensuse.txt

This file was deleted.

18 changes: 0 additions & 18 deletions build/pkgs/backports_zoneinfo/SPKG.rst

This file was deleted.

5 changes: 0 additions & 5 deletions build/pkgs/backports_zoneinfo/checksums.ini

This file was deleted.

4 changes: 0 additions & 4 deletions build/pkgs/backports_zoneinfo/dependencies

This file was deleted.

1 change: 0 additions & 1 deletion build/pkgs/backports_zoneinfo/distros/conda.txt

This file was deleted.

1 change: 0 additions & 1 deletion build/pkgs/backports_zoneinfo/install-requires.txt

This file was deleted.

1 change: 0 additions & 1 deletion build/pkgs/backports_zoneinfo/package-version.txt

This file was deleted.

6 changes: 0 additions & 6 deletions build/pkgs/backports_zoneinfo/spkg-install.in

This file was deleted.

1 change: 0 additions & 1 deletion build/pkgs/backports_zoneinfo/type

This file was deleted.

2 changes: 1 addition & 1 deletion build/pkgs/python3/SPKG.rst
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ By default, Sage will try to use system's ``python3`` to set up a virtual
environment, a.k.a. `venv <https://docs.python.org/3.10/library/venv.html>`_
rather than building a Python 3 installation from scratch.

Sage will accept versions 3.8.x to 3.10.x.
Sage will accept versions 3.9.x to 3.10.x.

You can also use ``--with-python=/path/to/python3_binary`` to tell Sage to use
``/path/to/python3_binary`` to set up the venv. Note that setting up the venv requires
4 changes: 2 additions & 2 deletions build/pkgs/python3/spkg-configure.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SAGE_SPKG_CONFIGURE([python3], [
m4_pushdef([MIN_VERSION], [3.8.0])
m4_pushdef([MIN_NONDEPRECATED_VERSION], [3.8.0])
m4_pushdef([MIN_VERSION], [3.9.0])
m4_pushdef([MIN_NONDEPRECATED_VERSION], [3.9.0])
m4_pushdef([LT_STABLE_VERSION], [3.12.0])
m4_pushdef([LT_VERSION], [3.12.0])
AC_ARG_WITH([python],
2 changes: 1 addition & 1 deletion build/pkgs/tzlocal/dependencies
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$(PYTHON) backports_zoneinfo pytz_deprecation_shim | $(PYTHON_TOOLCHAIN)
$(PYTHON) pytz_deprecation_shim | $(PYTHON_TOOLCHAIN)

----------
All lines of this file are ignored except the first.
1 change: 0 additions & 1 deletion m4/setup_cfg_metadata.m4
Original file line number Diff line number Diff line change
@@ -13,7 +13,6 @@ classifiers =
Operating System :: POSIX
Operating System :: MacOS :: MacOS X
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
1 change: 0 additions & 1 deletion pkgs/sage-docbuild/setup.cfg
Original file line number Diff line number Diff line change
@@ -17,7 +17,6 @@ classifiers =
Operating System :: POSIX
Operating System :: MacOS :: MacOS X
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
2 changes: 1 addition & 1 deletion pkgs/sage-setup/setup.cfg
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ packages =
sage_setup.autogen.interpreters.specs
sage_setup.command

python_requires = >=3.8, <3.12
python_requires = >=3.9, <3.12

install_requires =
pkgconfig
2 changes: 1 addition & 1 deletion pkgs/sagemath-categories/setup.cfg.m4
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ long_description_content_type = text/x-rst
include(`setup_cfg_metadata.m4')dnl'

[options]
python_requires = >=3.8, <3.12
python_requires = >=3.9, <3.12
install_requires =
SPKG_INSTALL_REQUIRES_sagemath_objects

2 changes: 1 addition & 1 deletion pkgs/sagemath-environment/setup.cfg.m4
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ long_description_content_type = text/x-rst
include(`setup_cfg_metadata.m4')dnl'

[options]
python_requires = >=3.8, <3.12
python_requires = >=3.9, <3.12
install_requires =

py_modules =
2 changes: 1 addition & 1 deletion pkgs/sagemath-objects/setup.cfg.m4
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ include(`setup_cfg_metadata.m4')dnl'

[options]
include(`sage_spkg_versions.m4')dnl'
python_requires = >=3.8, <3.12
python_requires = >=3.9, <3.12
install_requires =
SPKG_INSTALL_REQUIRES_gmpy2
SPKG_INSTALL_REQUIRES_cysignals
2 changes: 1 addition & 1 deletion pkgs/sagemath-repl/setup.cfg.m4
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ long_description_content_type = text/x-rst
include(`setup_cfg_metadata.m4')dnl'

[options]
python_requires = >=3.8, <3.12
python_requires = >=3.9, <3.12
install_requires =
SPKG_INSTALL_REQUIRES_sagemath_objects
SPKG_INSTALL_REQUIRES_sagemath_environment
2 changes: 1 addition & 1 deletion pyrightconfig.json
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
"root": "src"
}
],
"pythonVersion": "3.8",
"pythonVersion": "3.9",
"exclude": ["venv"],
"venvPath": "./venv/",
"venv": "./",
2 changes: 1 addition & 1 deletion src/doc/en/developer/coding_basics.rst
Original file line number Diff line number Diff line change
@@ -945,7 +945,7 @@ written.
for both examples.

- **Preparsing:** As in Sage's console, `4/3` returns `4/3` and not
`1.3333333333333333` as in Python 3.8. Testing occurs with full Sage
`1.3333333333333333` as in Python. Testing occurs with full Sage
preparsing of input within the standard Sage shell environment, as
described in :ref:`section-preparsing`.

10 changes: 5 additions & 5 deletions src/doc/en/developer/coding_in_python.rst
Original file line number Diff line number Diff line change
@@ -16,18 +16,18 @@ that Sage supports. The information regarding the supported versions
can be found in the files ``build/pkgs/python3/spkg-configure.m4`` and
``src/setup.cfg.m4``.

As of Sage 9.7, Python 3.8 is the oldest supported version. Hence,
all language and library features that are available in Python 3.8 can
be used; but features introduced in Python 3.9 cannot be used. If a
Python 3.9 is the oldest supported version. Hence,
all language and library features that are available in Python 3.9 can
be used; but features introduced in Python 3.10 cannot be used. If a
feature is deprecated in a newer supported version, it must be ensured
that deprecation warnings issued by Python do not lead to failures in
doctests.

Some key language and library features have been backported to Python 3.8
Some key language and library features have been backported to older Python versions
using one of two mechanisms:

- ``from __future__ import annotations`` (see Python reference for
`__future__ <https://docs.python.org/3.8/library/__future__.html>`_)
`__future__ <https://docs.python.org/3/library/__future__.html>`_)
modernizes type annotations according to `PEP 563
<https://www.python.org/dev/peps/pep-0563>`_ (Postponed evaluation
of annotations). All Sage library code that uses type annotations
5 changes: 0 additions & 5 deletions src/sage/algebras/fusion_rings/f_matrix.py
Original file line number Diff line number Diff line change
@@ -1229,11 +1229,6 @@ def start_worker_pool(self, processes=None):
:meth:`shutdown_worker_pool` to close the pool and properly dispose
of shared memory resources.

.. NOTE::

Python 3.8+ is required, since the ``multiprocessing.shared_memory``
module must be imported.

INPUT:

- ``processes`` -- an integer indicating the number of workers
2 changes: 1 addition & 1 deletion src/sage/algebras/fusion_rings/fusion_ring.py
Original file line number Diff line number Diff line change
@@ -1289,7 +1289,7 @@ def get_braid_generators(self,
we don't run the solver again.
- ``use_mp`` -- (default: ``True``) a boolean indicating whether
to use multiprocessing to speed up the computation; this is
highly recommended. Python 3.8+ is required.
highly recommended.
- ``verbose`` -- (default: ``True``) boolean indicating whether
to be verbose with the computation

6 changes: 1 addition & 5 deletions src/sage/algebras/fusion_rings/shm_managers.pyx
Original file line number Diff line number Diff line change
@@ -55,8 +55,7 @@ cdef class KSHandler:
- ``n_slots`` -- the total number of F-symbols
- ``field`` -- F-matrix's base cyclotomic field
- ``use_mp`` -- a boolean indicating whether to construct a shared
memory block to back ``self``. Requires Python 3.8+, since we
must import the ``multiprocessing.shared_memory`` module.
memory block to back ``self``.
- ``init_data`` -- a dictionary or :class:`KSHandler` object containing
known squares for initialization, e.g., from a solver checkpoint
- ``name`` -- the name of a shared memory object (used by child processes
@@ -391,9 +390,6 @@ cdef class FvarsHandler:
``name`` attribute. Children processes use the ``name`` attribute,
accessed via ``self.shm.name`` to attach to the shared memory block.

Multiprocessing requires Python 3.8+, since we must import the
``multiprocessing.shared_memory`` module.

INPUT:

- ``n_slots`` -- number of generators of the underlying polynomial ring
2 changes: 1 addition & 1 deletion src/setup.cfg.m4
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ license_files = LICENSE.txt
include(`setup_cfg_metadata.m4')dnl'

[options]
python_requires = >=3.8, <3.12
python_requires = >=3.9, <3.12
install_requires =
SPKG_INSTALL_REQUIRES_sage_conf
SPKG_INSTALL_REQUIRES_six
9 changes: 4 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -527,24 +527,23 @@ setenv =
# to "--with-system-python3=force" as originally proposed in #32060
PYTHON_MAJOR=3
PYTHON_MINOR=10
python3.8: PYTHON_MINOR=8
python3.9: PYTHON_MINOR=9
python3.10: PYTHON_MINOR=10
python3.11: PYTHON_MINOR=11
python3.12: PYTHON_MINOR=12
CONFIG_CONFIGURE_ARGS_1=--with-system-python3=yes
python3_spkg: CONFIG_CONFIGURE_ARGS_1=--without-system-python3
python3.8,python3.9,python3.10,python3.11,python3.12: CONFIG_CONFIGURE_ARGS_1=--with-system-python3=force --with-python=python{env:PYTHON_MAJOR}.{env:PYTHON_MINOR}
python3.8,python3.9,python3.10,python3.11,python3.12: EXTRA_SAGE_PACKAGES_5=_python{env:PYTHON_MAJOR}.{env:PYTHON_MINOR} _bootstrap liblzma bzip2 libffi libpng zlib
python3.9,python3.10,python3.11,python3.12: CONFIG_CONFIGURE_ARGS_1=--with-system-python3=force --with-python=python{env:PYTHON_MAJOR}.{env:PYTHON_MINOR}
python3.9,python3.10,python3.11,python3.12: EXTRA_SAGE_PACKAGES_5=_python{env:PYTHON_MAJOR}.{env:PYTHON_MINOR} _bootstrap liblzma bzip2 libffi libpng zlib
macos-python3_xcode: CONFIG_CONFIGURE_ARGS_1=--with-system-python3=force --with-python=/usr/bin/python3
macos-{python3_xcode,nohomebrew}-{python3.8}: CONFIG_CONFIGURE_ARGS_1=--with-system-python3=force --with-python=/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/{env:PYTHON_MAJOR}.{env:PYTHON_MINOR}/bin/python3
# Homebrew keg installs
homebrew-{python3.8,python3.9,python3.10,python3.11,python3.12}: CONFIG_CONFIGURE_ARGS_1=--with-system-python3=force --with-python={env:HOMEBREW}/opt/python@{env:PYTHON_MAJOR}.{env:PYTHON_MINOR}/bin/python3
homebrew-{python3.9,python3.10,python3.11,python3.12}: CONFIG_CONFIGURE_ARGS_1=--with-system-python3=force --with-python={env:HOMEBREW}/opt/python@{env:PYTHON_MAJOR}.{env:PYTHON_MINOR}/bin/python3
# Installers from https://www.python.org/downloads/macos/ (must manually download and install)
macos-python3_pythonorg: CONFIG_CONFIGURE_ARGS_1=--with-system-python3=force --with-python=/Library/Frameworks/Python.framework/Versions/{env:PYTHON_MAJOR}.{env:PYTHON_MINOR}/bin/python3
# https://github.com/pypa/manylinux
manylinux-standard: CONFIG_CONFIGURE_ARGS_1=--with-system-python3=force --with-python=/opt/python/cp{env:PYTHON_MAJOR}{env:PYTHON_MINOR}-cp{env:PYTHON_MAJOR}{env:PYTHON_MINOR}/bin/python3
manylinux-{python3.8,python3.9,python3.10,python3.11,python3.12}: EXTRA_SAGE_PACKAGES_5=_bootstrap liblzma bzip2 libffi libpng
manylinux-{python3.9,python3.10,python3.11,python3.12}: EXTRA_SAGE_PACKAGES_5=_bootstrap liblzma bzip2 libffi libpng
conda: CONFIG_CONFIGURE_ARGS_1=--with-system-python3=force --with-python=python3
#
# - toolchain