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; add support for Python 3.14 #223

Merged
merged 4 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,14 @@ jobs:
name: Python compatibility test
needs: [ pre-commit, towncrier, package ]
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
continue-on-error: ${{ matrix.experimental || false }}
strategy:
fail-fast: false
matrix:
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13-dev" ]
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13", "3.14" ]
include:
- experimental: false
# Development Python can fail without failing the entire job
- python-version: "3.13-dev"
- python-version: "3.14"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's clearer to keep the default experimental value in the matrix section, because:

  • It allows you to derive all the values from that section alone.
  • It avoids needing to repeat the default value if it was used in more than one place.

experimental: true
steps:
- name: Checkout
Expand All @@ -58,6 +57,7 @@ jobs:
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true

- name: Get Packages
uses: actions/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ repos:
rev: v3.18.0
hooks:
- id: pyupgrade
args: [--py38-plus]
args: [--py39-plus]
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.10.0
hooks:
Expand Down
1 change: 1 addition & 0 deletions changes/223.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Support for Python 3.14 was added.
1 change: 1 addition & 0 deletions changes/223.removal.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Python 3.8 is no longer supported.
8 changes: 3 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dynamic = ["version"]
name = "travertino"
description = "A set of constants and base classes for describing user interface layouts."
readme = "README.rst"
requires-python = ">= 3.8"
requires-python = ">= 3.9"
license.text = "New BSD"
authors = [
{name="Russell Keith-Magee", email="[email protected]"},
Expand All @@ -29,12 +29,12 @@ classifiers = [
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Software Development",
"Topic :: Software Development :: User Interfaces",
Expand All @@ -44,9 +44,7 @@ classifiers = [
# Extras used by developers *of* Travertino are pinned to specific versions to
# ensure environment consistency.
dev = [
# Pre-commit 3.6.0 deprecated support for Python 3.8
"pre-commit == 3.5.0 ; python_version < '3.9'",
"pre-commit == 4.0.1 ; python_version >= '3.9'",
"pre-commit == 4.0.1",
"pytest == 8.3.3",
"setuptools_scm == 8.1.0",
"tox == 4.21.2",
Expand Down
6 changes: 1 addition & 5 deletions src/travertino/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
# it's been pip installed non-editable) the call to get_version() will fail.
# If either of these occurs, read version from the installer metadata.

# importlib.metadata.versoin was added in Python 3.8
try:
from importlib.metadata import version
except ModuleNotFoundError:
from importlib_metadata import version
from importlib.metadata import version

__version__ = version("travertino")
2 changes: 1 addition & 1 deletion src/travertino/declaration.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from collections import defaultdict
from typing import Mapping, Sequence
from collections.abc import Mapping, Sequence
from warnings import filterwarnings, warn

from .colors import color
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ignore =
W503,

[tox]
envlist = towncrier-check,pre-commit,py{38,39,310,311,312,313}
envlist = towncrier-check,pre-commit,py{39,310,311,312,313,314}
skip_missing_interpreters = true

[testenv:pre-commit]
Expand All @@ -23,7 +23,7 @@ wheel_build_env = .pkg
extras = dev
commands = pre-commit run --all-files --show-diff-on-failure --color=always

[testenv:py{,38,39,310,311,312,313}]
[testenv:py{,39,310,311,312,313,314}]
package = wheel
wheel_build_env = .pkg
depends =
Expand Down