Skip to content

Commit

Permalink
fix for py 3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
tlambert03 committed Jan 2, 2025
1 parent 47f58b1 commit 6efcdcf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
11 changes: 6 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ test = [
"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 +158,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 @@ -3,6 +3,7 @@
import copy
import datetime
import io
import sys
import warnings
from pathlib import Path
from typing import Any
Expand Down Expand Up @@ -235,6 +236,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 6efcdcf

Please sign in to comment.