diff options
-rw-r--r-- | meta/recipes-devtools/python/python3-jsonschema/d71f96a6523875c9694fcdf468c9f458323d07f2.patch | 44 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python3-jsonschema_4.24.0.bb (renamed from meta/recipes-devtools/python/python3-jsonschema_4.23.0.bb) | 4 |
2 files changed, 1 insertions, 47 deletions
diff --git a/meta/recipes-devtools/python/python3-jsonschema/d71f96a6523875c9694fcdf468c9f458323d07f2.patch b/meta/recipes-devtools/python/python3-jsonschema/d71f96a6523875c9694fcdf468c9f458323d07f2.patch deleted file mode 100644 index 65cc2b4cf0..0000000000 --- a/meta/recipes-devtools/python/python3-jsonschema/d71f96a6523875c9694fcdf468c9f458323d07f2.patch +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | From d71f96a6523875c9694fcdf468c9f458323d07f2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Julian Berman <Julian@GrayVines.com> | ||
3 | Date: Thu, 17 Oct 2024 09:36:35 -0400 | ||
4 | Subject: [PATCH] Fix the annotation for validator_for's default. | ||
5 | |||
6 | This still doesn't seem to satisfy mypy, so tell it to be quiet. | ||
7 | |||
8 | Upstream-Status: Backport [https://github.com/python-jsonschema/jsonschema/commit/d71f96a6523875c9694fcdf468c9f458323d07f2] | ||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | jsonschema/validators.py | 6 +++--- | ||
12 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
13 | |||
14 | diff --git a/jsonschema/validators.py b/jsonschema/validators.py | ||
15 | index 85c39160..b8ca3bd4 100644 | ||
16 | --- a/jsonschema/validators.py | ||
17 | +++ b/jsonschema/validators.py | ||
18 | @@ -857,7 +857,7 @@ def extend( | ||
19 | version="draft2020-12", | ||
20 | ) | ||
21 | |||
22 | -_LATEST_VERSION = Draft202012Validator | ||
23 | +_LATEST_VERSION: type[Validator] = Draft202012Validator | ||
24 | |||
25 | |||
26 | class _RefResolver: | ||
27 | @@ -1334,7 +1334,7 @@ def validate(instance, schema, cls=None, *args, **kwargs): # noqa: D417 | ||
28 | |||
29 | def validator_for( | ||
30 | schema, | ||
31 | - default: Validator | _utils.Unset = _UNSET, | ||
32 | + default: type[Validator] | _utils.Unset = _UNSET, | ||
33 | ) -> type[Validator]: | ||
34 | """ | ||
35 | Retrieve the validator class appropriate for validating the given schema. | ||
36 | @@ -1396,7 +1396,7 @@ class is returned: | ||
37 | DefaultValidator = _LATEST_VERSION if default is _UNSET else default | ||
38 | |||
39 | if schema is True or schema is False or "$schema" not in schema: | ||
40 | - return DefaultValidator | ||
41 | + return DefaultValidator # type: ignore[return-value] | ||
42 | if schema["$schema"] not in _META_SCHEMAS and default is _UNSET: | ||
43 | warn( | ||
44 | ( | ||
diff --git a/meta/recipes-devtools/python/python3-jsonschema_4.23.0.bb b/meta/recipes-devtools/python/python3-jsonschema_4.24.0.bb index 82b7bb23ed..7a5f4a09a6 100644 --- a/meta/recipes-devtools/python/python3-jsonschema_4.23.0.bb +++ b/meta/recipes-devtools/python/python3-jsonschema_4.24.0.bb | |||
@@ -4,9 +4,7 @@ LICENSE = "MIT" | |||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=7a60a81c146ec25599a3e1dabb8610a8 \ | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=7a60a81c146ec25599a3e1dabb8610a8 \ |
5 | file://json/LICENSE;md5=9d4de43111d33570c8fe49b4cb0e01af" | 5 | file://json/LICENSE;md5=9d4de43111d33570c8fe49b4cb0e01af" |
6 | 6 | ||
7 | SRC_URI += "file://d71f96a6523875c9694fcdf468c9f458323d07f2.patch" | 7 | SRC_URI[sha256sum] = "0b4e8069eb12aedfa881333004bccaec24ecef5a8a6a4b6df142b2cc9599d196" |
8 | |||
9 | SRC_URI[sha256sum] = "d71497fef26351a33265337fa77ffeb82423f3ea21283cd9467bb03999266bc4" | ||
10 | 8 | ||
11 | inherit pypi python_hatchling | 9 | inherit pypi python_hatchling |
12 | 10 | ||