Skip to content

Commit

Permalink
build: drop python 3.8, support python 3.13 (#260)
Browse files Browse the repository at this point in the history
* drop 38 add 3.13

* updates

* drop test

* fix workflow

* allow prerelease

* bump min pydantic

* pin test deps

* change pin

* change pin

* add secret

* fix for py 3.13
  • Loading branch information
tlambert03 authored Jan 2, 2025
1 parent 83c0308 commit a17bf57
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
platform: [ubuntu-latest, macos-latest, windows-latest]

steps:
Expand All @@ -43,6 +43,7 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true

- name: Install
run: |
Expand Down Expand Up @@ -74,7 +75,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.12"]
python-version: ["3.9", "3.10", "3.12"]

test-widget:
name: test-widget
Expand Down
16 changes: 9 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dynamic = ["version"]
dependencies = [
Expand All @@ -48,19 +49,19 @@ pint = ["Pint >=0.15"]
lxml = ["lxml >=4.8.0"]
docs = ["mkdocs-material", "mkdocstrings-python"]
test = [
"lxml",
"mypy",
"numpy",
"pint",
"lxml; python_version <= '3.12'",
"pint; python_version <= '3.12'",
"pytest-codspeed",
"pytest-cov",
"pytest-mypy-plugins",
"pytest",
"ruff",
"xmlschema <2.5", # FIXME: determine why
"xmlschema <2.5", # FIXME: determine why
"xsdata[cli]",
"types-lxml",
"pdbpp; sys_platform != 'win32'", # for debugging
"pdbpp; sys_platform != 'win32'", # for debugging
]
test-qt = ["qtpy", "pytest-qt"]
# pin ruff for builds because it changes often
Expand Down Expand Up @@ -158,9 +159,10 @@ filterwarnings = [
"ignore:Casting invalid AnnotationID:UserWarning",
# FIXME: i think this might be an xsdata issue?
"ignore::ResourceWarning",
"ignore:pkg_resources is deprecated", # paquo tests
"ignore:::paquo", # paquo tests
"ignore:the imp module is deprecated", # omero tests
"ignore:pkg_resources is deprecated", # paquo tests
"ignore:::paquo", # paquo tests
"ignore:the imp module is deprecated", # omero tests
"ignore:Failing to pass a value:DeprecationWarning", # xsdata
]

# https://mypy.readthedocs.io/en/stable/config_file.html
Expand Down
4 changes: 4 additions & 0 deletions tests/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import datetime
import io
import sys
import warnings
from pathlib import Path
from typing import Any
Expand Down Expand Up @@ -212,6 +213,9 @@ def test_transformations() -> None:
# should not warn
with warnings.catch_warnings():
warnings.simplefilter("error")
# this is needed for xsdata usage of private typing attribute
if sys.version_info >= (3, 13):
warnings.simplefilter("ignore", DeprecationWarning)
from_xml(DATA / "MMStack.ome.xml", transformations=etree_fixes.ALL_FIXES)

# SHOULD warn
Expand Down

0 comments on commit a17bf57

Please sign in to comment.