From adfa36e15f5a8a677de9b8f14b4cc11e6e8ed479 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 --- asdf/_jsonschema/exceptions.py | 2 +- asdf/_jsonschema/tests/_suite.py | 6 +++--- pyproject.toml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) 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]