Skip to content

Commit 1ce81a3

Browse files
authored
[tests] Update tests for msgspec 0.19.0 (#41)
per title ### Test Plan - Run GHA, check only py38 has xfail tests
1 parent e7761e5 commit 1ce81a3

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

pyproject.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ GitHub = "https://github.com/nhairs/python-json-logger"
4747
dev = [
4848
## Optional but required for dev
4949
"orjson;implementation_name!='pypy'",
50-
"msgspec;implementation_name!='pypy' and python_version<'3.13'",
51-
"msgspec-python313-pre;implementation_name!='pypy' and python_version=='3.13'",
50+
"msgspec;implementation_name!='pypy'",
5251
## Lint
5352
"validate-pyproject[all]",
5453
"black",

tests/test_formatters.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -568,8 +568,14 @@ def test_common_types_encoded(
568568
if pythonjsonlogger.MSGSPEC_AVAILABLE and class_ is MsgspecFormatter:
569569
# Dataclass: https://github.com/jcrist/msgspec/issues/681
570570
# Enum: https://github.com/jcrist/msgspec/issues/680
571-
if obj is SomeDataclass or (
572-
isinstance(obj, enum.Enum) and obj in {MultiEnum.BYTES, MultiEnum.NONE, MultiEnum.BOOL}
571+
# These have been fixed in msgspec 0.19.0, however they also dropped python 3.8 support.
572+
# https://github.com/jcrist/msgspec/releases/tag/0.19.0
573+
if sys.version_info < (3, 9) and (
574+
obj is SomeDataclass
575+
or (
576+
isinstance(obj, enum.Enum)
577+
and obj in {MultiEnum.BYTES, MultiEnum.NONE, MultiEnum.BOOL}
578+
)
573579
):
574580
pytest.xfail()
575581

0 commit comments

Comments
 (0)