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

DEP: drop support for CPython 3.9 #84

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
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/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: "Set up Python"
uses: "actions/setup-python@v4"
with:
python-version: "3.9"
python-version: "3.10"

- name: "Install build tool"
run: "pip install --user build"
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ jobs:
unit-test-and-typecheck:
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
python-version:
- "3.13"
- "3.12"
- "3.11"
- "3.10"
- "3.9"
pyqt-dependency:
- "PyQt6"
- "PySide6"
- "PyQt"
- "PySide"

steps:
- uses: "actions/checkout@v3"
Expand All @@ -30,17 +32,19 @@ jobs:
run: |
# Project dependencies from pyproject.toml
# NOTE: Also builds viscm. How do we avoid this?
pip install .
pip install .[${{ matrix.pyqt-dependency }}]

# Test dependencies
pip install pytest pytest-cov pytest-qt pytest-xvfb ${{ matrix.pyqt-dependency }}
pip install pytest pytest-cov pytest-qt pytest-xvfb
# pytest-qt CI dependencies: https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html#github-actions
sudo apt update
sudo apt install -y \
xvfb libegl1 \
libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 x11-utils \
libxcb-cursor0

- run: pip list

- name: "Run tests"
run: "make test"
env:
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Contact:
Nathaniel J. Smith <[email protected]> and Stéfan van der Walt <[email protected]>

Dependencies:
* Python 3.9+
* Python 3.10+
* `colorspacious <https://pypi.python.org/pypi/colorspacious>`_ 1.1+
* Matplotlib 3.5+
* NumPy 1.22+
Expand Down
12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ classifiers = [
"Programming Language :: Python :: 3",
]

requires-python = "~=3.9"
requires-python = ">=3.10"
dependencies = [
"numpy ~=1.22",
"matplotlib ~=3.5",
"colorspacious ~=1.1",
"scipy ~=1.8",
"numpy >=1.22",
"matplotlib >=3.5",
"colorspacious >=1.1",
"scipy >=1.8",
]

[project.optional-dependencies]
Expand Down Expand Up @@ -51,7 +51,7 @@ package-data = {viscm = ["examples/*"]}


[tool.mypy]
python_version = "3.9"
python_version = "3.10"

# These libraries don't have type stubs. Mypy will see them as `Any` and not
# throw an [import] error.
Expand Down
2 changes: 1 addition & 1 deletion viscm/bezierbuilder/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"""

import numpy as np
from matplotlib.backends.qt_compat import QtCore
from matplotlib.backends.qt_compat import QtCore # type: ignore [attr-defined]
from matplotlib.lines import Line2D

from viscm.bezierbuilder.curve import curve_method
Expand Down
6 changes: 5 additions & 1 deletion viscm/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@
# matplotlib.rcParams['backend'] = "QtAgg"
# Do this first before any other matplotlib imports, to force matplotlib to
# use a Qt backend
from matplotlib.backends.qt_compat import QtCore, QtGui, QtWidgets
from matplotlib.backends.qt_compat import ( # type: ignore [attr-defined]
QtCore,
QtGui,
QtWidgets,
)
from matplotlib.colors import ListedColormap
from matplotlib.gridspec import GridSpec

Expand Down
Loading