From 65a316be18ea195349b4e20a9e7f14421c8f82d37dee58ab79e7871cbfe717d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Wed, 27 Apr 2022 13:48:44 +0000 Subject: [PATCH] Accepting request 972873 from home:bnavigator:branches:devel:languages:python:numeric - Update to 4.4.0 * Add mypy support (#892) * Add support for Python 3.11 - Release 4.3.3 * Properly report deprecation warnings at the right stack level (#899) - Release 4.3.2 * Additional performance improvements for resolving refs (#896) - Release 4.3.1 * Resolving refs has had performance improvements (#893) - Release 4.3.0 * Fix undesired fallback to brute force container uniqueness check on certain input types (#893) * Implement a PEP544 Protocol for validator classes (#890) - Release 4.2.1 * Pin importlib.resources from below (#877) - Release 4.2.0 * Use importlib.resources to load schemas (#873) * Ensure all elements of arrays are verified for uniqueness by uniqueItems (#866) - Release 4.1.2 * Fix dependentSchemas to properly consider non-object instances to be valid (#850) - Release 4.1.1 * Fix prefixItems not indicating which item was invalid within the instance path (#862) - Release 4.1.0 * Add Python 3.10 to the list of supported Python versions - Release 4.0.1 * Fix the declaration of minimum supported Python version (#846) OBS-URL: https://build.opensuse.org/request/show/972873 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-jsonschema?expand=0&rev=49 --- jsonschema-3.2.0.tar.gz | 3 -- jsonschema-4.4.0.tar.gz | 3 ++ python-jsonschema.changes | 67 +++++++++++++++++++++++++++++++++++++++ python-jsonschema.spec | 59 ++++++++++++++++++++++------------ webcolors.patch | 41 ------------------------ 5 files changed, 108 insertions(+), 65 deletions(-) delete mode 100644 jsonschema-3.2.0.tar.gz create mode 100644 jsonschema-4.4.0.tar.gz delete mode 100644 webcolors.patch diff --git a/jsonschema-3.2.0.tar.gz b/jsonschema-3.2.0.tar.gz deleted file mode 100644 index 7c93f80..0000000 --- a/jsonschema-3.2.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a -size 167226 diff --git a/jsonschema-4.4.0.tar.gz b/jsonschema-4.4.0.tar.gz new file mode 100644 index 0000000..8dc59f0 --- /dev/null +++ b/jsonschema-4.4.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:636694eb41b3535ed608fe04129f26542b59ed99808b4f688aa32dcf55317a83 +size 313519 diff --git a/python-jsonschema.changes b/python-jsonschema.changes index f771acc..6373ad7 100644 --- a/python-jsonschema.changes +++ b/python-jsonschema.changes @@ -1,3 +1,70 @@ +------------------------------------------------------------------- +Tue Apr 26 11:54:11 UTC 2022 - Ben Greiner + +- Update to 4.4.0 + * Add mypy support (#892) + * Add support for Python 3.11 +- Release 4.3.3 + * Properly report deprecation warnings at the right stack level + (#899) +- Release 4.3.2 + * Additional performance improvements for resolving refs (#896) +- Release 4.3.1 + * Resolving refs has had performance improvements (#893) +- Release 4.3.0 + * Fix undesired fallback to brute force container uniqueness + check on certain input types (#893) + * Implement a PEP544 Protocol for validator classes (#890) +- Release 4.2.1 + * Pin importlib.resources from below (#877) +- Release 4.2.0 + * Use importlib.resources to load schemas (#873) + * Ensure all elements of arrays are verified for uniqueness by + uniqueItems (#866) +- Release 4.1.2 + * Fix dependentSchemas to properly consider non-object instances + to be valid (#850) +- Release 4.1.1 + * Fix prefixItems not indicating which item was invalid within + the instance path (#862) +- Release 4.1.0 + * Add Python 3.10 to the list of supported Python versions +- Release 4.0.1 + * Fix the declaration of minimum supported Python version (#846) +- Release 4.0.0 + * Partial support for Draft 2020-12 (as well as 2019-09). Thanks + to Thomas Schmidt and Harald Nezbeda. + * False and 0 are now properly considered non-equal even + recursively within a container (#686). As part of this change, + uniqueItems validation may be slower in some cases. Please feel + free to report any significant performance regressions, though + in some cases they may be difficult to address given the + specification requirement. + * The CLI has been improved, and in particular now supports a + --output option (with plain (default) or pretty arguments) to + control the output format. Future work may add additional + machine-parsable output formats. + * Code surrounding DEFAULT_TYPES and the legacy mechanism for + specifying types to validators have been removed, as per the + deprecation policy. Validators should use the TypeChecker + object to customize the set of Python types corresponding to + JSON Schema types. + * Validation errors now have a json_path attribute, describing + their location in JSON path format + * Support for the IP address and domain name formats has been + improved + * Support for Python 2 and 3.6 has been dropped, with + python_requires properly set. + * multipleOf could overflow when given sufficiently large + numbers. Now, when an overflow occurs, jsonschema will fall + back to using fraction division (#746). + * jsonschema.__version__, jsonschema.validators.validators, + jsonschema.validators.meta_schemas and + jsonschema.RefResolver.in_scope have been deprecated, as has + passing a second-argument schema to Validator.iter_errors and + Validator.is_valid. +- Drop webcolors.patch + ------------------------------------------------------------------- Sun Aug 22 21:08:31 UTC 2021 - Stefan Schubert diff --git a/python-jsonschema.spec b/python-jsonschema.spec index 26a96e5..f8133bd 100644 --- a/python-jsonschema.spec +++ b/python-jsonschema.spec @@ -1,7 +1,7 @@ # # spec file for package python-jsonschema # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -22,35 +22,53 @@ %bcond_with libalternatives %endif -%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%{?!python_module:%define python_module() python3-%{**}} %define skip_python2 1 Name: python-jsonschema -Version: 3.2.0 +Version: 4.4.0 Release: 0 Summary: An implementation of JSON-Schema validation for Python License: MIT -URL: https://github.com/Julian/jsonschema +URL: https://github.com/python-jsonschema/jsonschema Source: https://files.pythonhosted.org/packages/source/j/jsonschema/jsonschema-%{version}.tar.gz -Patch0: webcolors.patch -BuildRequires: %{python_module Twisted} -BuildRequires: %{python_module attrs >= 17.4.0} -BuildRequires: %{python_module idna} -BuildRequires: %{python_module importlib-metadata} -BuildRequires: %{python_module jsonpointer > 1.13} -BuildRequires: %{python_module pyrsistent >= 0.14.0} -BuildRequires: %{python_module pytest} -BuildRequires: %{python_module rfc3987} +# SECTION build +BuildRequires: %{python_module base >= 3.7} +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools_scm} BuildRequires: %{python_module setuptools} -BuildRequires: %{python_module six >= 1.11.0} -BuildRequires: %{python_module strict-rfc3339} -BuildRequires: %{python_module webcolors} +BuildRequires: %{python_module tomli} +BuildRequires: %{python_module wheel} +# /SECTION +# SECTION runtime +BuildRequires: %{python_module attrs >= 17.4.0} +BuildRequires: %{python_module importlib-metadata if %python-base < 3.8} +BuildRequires: %{python_module importlib-resources >= 1.4.0 if %python-base < 3.9} +BuildRequires: %{python_module pyrsistent >= 0.14.0} +BuildRequires: %{python_module typing-extensions if %python-base < 3.8} +# SECTION test +BuildRequires: %{python_module pytest} +# /SECTION +# SECTION extras (if available) +#BuildRequires: %%{python_module fqdn} +BuildRequires: %{python_module idna} +#BuildRequires: %%{python_module isoduration} +BuildRequires: %{python_module jsonpointer > 1.13} +#BuildRequires: %%{python_module rfc3339-validator} +BuildRequires: %{python_module rfc3987} +#BuildRequires: %%{python_module uri_template} +BuildRequires: %{python_module webcolors >= 1.11} +# /SECTION BuildRequires: fdupes BuildRequires: python-rpm-macros >= 20210929 Requires: python-attrs >= 17.4.0 -Requires: python-importlib-metadata Requires: python-pyrsistent >= 0.14.0 -Requires: python-six >= 1.11.0 +%if 0%{python_version_nodots} < 38 +Requires: python-importlib-metadata +Requires: python-typing-extensions +%endif +%if 0%{python_version_nodots} < 39 +Requires: python-importlib-resources >= 1.4.0 +%endif %if %{with libalternatives} Requires: alts BuildRequires: alts @@ -67,13 +85,12 @@ for Python (supporting 2.6+ including Python 3). %prep %setup -q -n jsonschema-%{version} -%patch0 -p1 %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install # Remove benchmark tests %{python_expand rm -r %{buildroot}%{$python_sitelib}/jsonschema/benchmarks %{buildroot}%{$python_sitelib}/jsonschema/tests %fdupes %{buildroot}%{$python_sitelib} diff --git a/webcolors.patch b/webcolors.patch deleted file mode 100644 index 4289608..0000000 --- a/webcolors.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 0d192e192526252c30c16b3651c293bb5f21a99f Mon Sep 17 00:00:00 2001 -From: Julian Berman -Date: Fri, 21 Feb 2020 09:56:13 -0500 -Subject: [PATCH] Sigh... but also drops Py2 compat. - ---- - jsonschema/_format.py | 11 ++++++++--- - setup.cfg | 4 ++-- - 2 files changed, 10 insertions(+), 5 deletions(-) - -Index: jsonschema-3.2.0/jsonschema/_format.py -=================================================================== ---- jsonschema-3.2.0.orig/jsonschema/_format.py -+++ jsonschema-3.2.0/jsonschema/_format.py -@@ -342,10 +342,15 @@ def is_draft3_time(instance): - return datetime.datetime.strptime(instance, "%H:%M:%S") - - --try: -+try: # webcolors>=1.11 -+ from webcolors import CSS21_NAMES_TO_HEX - import webcolors - except ImportError: -- pass -+ try: # webcolors<1.11 -+ from webcolors import css21_names_to_hex as CSS21_NAMES_TO_HEX -+ import webcolors -+ except ImportError: -+ pass - else: - def is_css_color_code(instance): - return webcolors.normalize_hex(instance) -@@ -354,7 +359,7 @@ else: - def is_css21_color(instance): - if ( - not isinstance(instance, str_types) or -- instance.lower() in webcolors.css21_names_to_hex -+ instance.lower() in CSS21_NAMES_TO_HEX - ): - return True - return is_css_color_code(instance)