From c1d18c396bcf11d7e2901b76b475c035cca86c3c Mon Sep 17 00:00:00 2001 From: Nicholas Hairs Date: Sat, 1 Feb 2025 14:15:55 +1100 Subject: [PATCH 1/3] Update tests for msgspec 0.19.0 --- pyproject.toml | 3 +-- tests/test_formatters.py | 10 ++++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 08adbde..2cfce70 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,8 +47,7 @@ GitHub = "https://github.com/nhairs/python-json-logger" dev = [ ## Optional but required for dev "orjson;implementation_name!='pypy'", - "msgspec;implementation_name!='pypy' and python_version<'3.13'", - "msgspec-python313-pre;implementation_name!='pypy' and python_version=='3.13'", + "msgspec;implementation_name!='pypy'", ## Lint "validate-pyproject[all]", "black", diff --git a/tests/test_formatters.py b/tests/test_formatters.py index 2212429..b15c911 100644 --- a/tests/test_formatters.py +++ b/tests/test_formatters.py @@ -568,8 +568,14 @@ def test_common_types_encoded( if pythonjsonlogger.MSGSPEC_AVAILABLE and class_ is MsgspecFormatter: # Dataclass: https://github.com/jcrist/msgspec/issues/681 # Enum: https://github.com/jcrist/msgspec/issues/680 - if obj is SomeDataclass or ( - isinstance(obj, enum.Enum) and obj in {MultiEnum.BYTES, MultiEnum.NONE, MultiEnum.BOOL} + # These have been fixed in msgspec 0.19.0, however they also dropped python 3.8 support. + # https://github.com/jcrist/msgspec/releases/tag/0.19.0 + if sys.version_info < (3, 9) and ( + obj is SomeDataclass + or ( + isinstance(obj, enum.Enum) + and obj in {MultiEnum.BYTES, MultiEnum.NONE, MultiEnum.BOOL} + ) ): pytest.xfail() From b97a29f3c29110aba71a6ed6afd68afd3ae66be5 Mon Sep 17 00:00:00 2001 From: Nicholas Hairs Date: Sat, 1 Feb 2025 14:29:31 +1100 Subject: [PATCH 2/3] Make this a patch release --- docs/changelog.md | 7 +++++++ pyproject.toml | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/changelog.md b/docs/changelog.md index 82d1cc7..b8a8839 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.2.2](https://github.com/nhairs/python-json-logger/compare/v3.2.1...v3.2.2) - 2025-02-01 + +### Changed + +- Update tests for `msgspec` [`0.19.0`](https://github.com/jcrist/msgspec/releases/tag/0.19.0) + + ## [3.2.1](https://github.com/nhairs/python-json-logger/compare/v3.2.0...v3.2.1) - 2024-12-16 ### Fixed diff --git a/pyproject.toml b/pyproject.toml index 2cfce70..180adfc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "python-json-logger" -version = "3.2.1" +version = "3.2.2" description = "JSON Log Formatter for the Python Logging Package" authors = [ {name = "Zakaria Zajac", email = "zak@madzak.com"}, From 68275582dec05cc13757c1ae28d262559482d2bd Mon Sep 17 00:00:00 2001 From: Nicholas Hairs Date: Sat, 1 Feb 2025 14:31:29 +1100 Subject: [PATCH 3/3] Revert "Make this a patch release" This reverts commit b97a29f3c29110aba71a6ed6afd68afd3ae66be5. --- docs/changelog.md | 7 ------- pyproject.toml | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index b8a8839..82d1cc7 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -4,13 +4,6 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [3.2.2](https://github.com/nhairs/python-json-logger/compare/v3.2.1...v3.2.2) - 2025-02-01 - -### Changed - -- Update tests for `msgspec` [`0.19.0`](https://github.com/jcrist/msgspec/releases/tag/0.19.0) - - ## [3.2.1](https://github.com/nhairs/python-json-logger/compare/v3.2.0...v3.2.1) - 2024-12-16 ### Fixed diff --git a/pyproject.toml b/pyproject.toml index 180adfc..2cfce70 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "python-json-logger" -version = "3.2.2" +version = "3.2.1" description = "JSON Log Formatter for the Python Logging Package" authors = [ {name = "Zakaria Zajac", email = "zak@madzak.com"},