Skip to content

Commit

Permalink
Drop support for Python 3.9 (#406)
Browse files Browse the repository at this point in the history
specutils has dropped support for Python 3.9, so we will also

Note also that we are explicitly dropping support for Python 3.13+, because our maximum-supported Astropy version is incompatible with 3.13+
  • Loading branch information
tchamberlin authored Oct 25, 2024
1 parent 7ba4daf commit 4ea555e
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 46 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: "3.10"
cache: pip
- run: pip install --upgrade coverage[toml]
- uses: actions/download-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Python ubuntu-latest
uses: actions/setup-python@v4
with:
python-version: '3.9' # Should always be the minimum supported Python version
python-version: '3.10' # Should always be the minimum supported Python version
cache: 'pip'
cache-dependency-path': 'requirements.txt'
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# See https://pre-commit.com for more information
default_language_version:
python: python3.9
python: python3.10

# See https://pre-commit.com/hooks.html for more hooks
repos:
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.9"
python: "3.10"
# You can also specify other tool versions:
# nodejs: "19"
# rust: "1.64"
Expand Down
2 changes: 1 addition & 1 deletion docs/source/for_beta_testers/beta_testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ We provide steps for working in one of `GBO data reduction hosts <https://greenb
.. tab:: Outside of GBO

Create a `Python3.9+` virtual environment
Create a `Python3.10+` virtual environment

.. code:: bash
Expand Down
10 changes: 5 additions & 5 deletions docs/source/for_developers/manage_requirements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ You first need to add the package to `pyproject.toml`. Locate the section of the
Step 2: Compile `requirements.txt`
==================================

Using the lowest supported version of Python (currently 3.9), do the following:
Using the lowest supported version of Python (currently 3.10), do the following:

.. code-block:: bash
$ cd /path/to/dysh
$ source /path/to/dysh-venv-py3.9/bin/activate
(dysh-venv-py3.9) $ pip install pip-tools
(dysh-venv-py3.9) $ pip-compile -o requirements.txt pyproject.toml
$ source /path/to/dysh-venv-py3.10/bin/activate
(dysh-venv-py3.10) $ pip install pip-tools
(dysh-venv-py3.10) $ pip-compile -o requirements.txt pyproject.toml
Step 3: Validate new requirements
=================================
Expand All @@ -86,7 +86,7 @@ Compiling requirements on Windows
Sometimes, compiling `requirements.txt` on a Windows machine can result in requirements which fail on the other operating systems. This will result in your GitHub Actions only succeeding on Windows machines, like so:

.. figure:: img/requirements_fail_windows.png
:alt: A screenshot of a GitHub Actions summary of 12 tests. The "windows-latest" tests have green check marks, indicating success, for all 4 versions of Python (3.9 to 3.12). The "ubuntu-latest" and "macos-latest" ones all have red x's, indicating failure.
:alt: A screenshot of a GitHub Actions summary of 9 tests. The "windows-latest" tests have green check marks, indicating success, for all 3 versions of Python (3.10 to 3.12). The "ubuntu-latest" and "macos-latest" ones all have red x's, indicating failure.

**Solution:** Compile `requirements.txt` on a non-Windows machine, like the Linux ones at GBO.

Expand Down
8 changes: 2 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "dysh"
description = ''
readme = "README.md"
requires-python = ">=3.9"
requires-python = ">=3.10,<3.13"
license = {file = "LICENSE"}
keywords = []
dynamic = ["version"]
Expand All @@ -16,10 +16,6 @@ authors = [
classifiers = [
"Development Status :: 3 - Alpha",
"Programming Language :: Python",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
]
dependencies = [
Expand Down Expand Up @@ -96,7 +92,7 @@ cov = "pytest --cov-report=xml --cov-config=pyproject.toml --cov=src/dysh --cov=

# Run tests across all supported version of Python
[[tool.hatch.envs.test.matrix]]
python = ["39", "310", "311", "312"]
python = ["310", "311", "312"]

[tool.hatch.build.targets.sdist]
include = ["/src", "/tests", "/bin"]
Expand Down
31 changes: 2 additions & 29 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.9
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --extra=dev --extra=nb --no-emit-trusted-host --output-file=requirements.txt pyproject.toml
Expand Down Expand Up @@ -121,11 +121,6 @@ docutils==0.18.1
# myst-parser
# pydata-sphinx-theme
# sphinx
exceptiongroup==1.2.0
# via
# anyio
# ipython
# pytest
executing==2.0.1
# via stack-data
fastjsonschema==2.19.0
Expand Down Expand Up @@ -161,17 +156,8 @@ imagesize==1.4.1
importlib-metadata==6.8.0
# via
# asdf
# build
# jupyter-cache
# jupyter-client
# jupyter-lsp
# jupyterlab
# jupyterlab-server
# myst-nb
# nbconvert
# sphinx
importlib-resources==6.1.1
# via matplotlib
iniconfig==2.0.0
# via pytest
ipdb==0.13.13
Expand Down Expand Up @@ -558,15 +544,6 @@ terminado==0.18.0
# jupyter-server-terminals
tinycss2==1.2.1
# via nbconvert
tomli==2.0.1
# via
# build
# coverage
# ipdb
# jupyterlab
# numpydoc
# pip-tools
# pytest
tornado==6.3.3
# via
# ipykernel
Expand Down Expand Up @@ -597,8 +574,6 @@ types-python-dateutil==2.8.19.14
# via arrow
typing-extensions==4.8.0
# via
# async-lru
# ipython
# myst-nb
# pydata-sphinx-theme
# sqlalchemy
Expand All @@ -625,9 +600,7 @@ wheel==0.43.0
widgetsnbextension==4.0.9
# via ipywidgets
zipp==3.17.0
# via
# importlib-metadata
# importlib-resources
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
# pip
Expand Down

0 comments on commit 4ea555e

Please sign in to comment.