From 14ea0af00693c8ac0fe29e89006674be1dd631d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Robert?= Date: Sun, 4 Aug 2024 09:22:22 +0200 Subject: [PATCH] MNT: handle a deprecation warning from attrs v24.1.0 --- CHANGES.rst | 2 ++ asdf/_jsonschema/exceptions.py | 2 +- asdf/_jsonschema/tests/_suite.py | 6 +++--- pyproject.toml | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 74ce0414b..ec5771a66 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -11,6 +11,8 @@ - Drop ``importlib_metadata`` as a dependency on Python 3.12 and newer [#1810] +- Bumped minimal requirement on ``attrs`` from ``20.1.0`` to ``22.2.0`` [#1815] + 3.3.0 (2024-07-12) ------------------ diff --git a/asdf/_jsonschema/exceptions.py b/asdf/_jsonschema/exceptions.py index 7114167c7..68a8688e1 100644 --- a/asdf/_jsonschema/exceptions.py +++ b/asdf/_jsonschema/exceptions.py @@ -176,7 +176,7 @@ class SchemaError(_Error): _word_for_instance_in_error_message = "schema" -@attr.s(hash=True) +@attr.s(unsafe_hash=True) class RefResolutionError(Exception): """ A ref could not be resolved. diff --git a/asdf/_jsonschema/tests/_suite.py b/asdf/_jsonschema/tests/_suite.py index bf07556fa..f70324229 100644 --- a/asdf/_jsonschema/tests/_suite.py +++ b/asdf/_jsonschema/tests/_suite.py @@ -35,7 +35,7 @@ def _find_suite(): return root -@attr.s(hash=True) +@attr.s(unsafe_hash=True) class Suite: _root = attr.ib(default=attr.Factory(_find_suite)) @@ -62,7 +62,7 @@ def version(self, name): ) -@attr.s(hash=True) +@attr.s(unsafe_hash=True) class Version: _path = attr.ib() @@ -139,7 +139,7 @@ def _tests_in(self, subject, path): ) -@attr.s(hash=True, repr=False) +@attr.s(unsafe_hash=True, repr=False) class _Test: version = attr.ib() diff --git a/pyproject.toml b/pyproject.toml index 698d908e5..dc347ab0d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ dependencies = [ "pyyaml>=5.4.1", "semantic_version>=2.8", # for vendorized jsonschema - "attrs>=20.1.0", + "attrs>=22.2.0", # end of vendorized jsonschema deps ] [project.optional-dependencies]