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
This commit is contained in:
parent
ab23a4b796
commit
65a316be18
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a
|
||||
size 167226
|
3
jsonschema-4.4.0.tar.gz
Normal file
3
jsonschema-4.4.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:636694eb41b3535ed608fe04129f26542b59ed99808b4f688aa32dcf55317a83
|
||||
size 313519
|
@ -1,3 +1,70 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 26 11:54:11 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- 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 <schubi@suse.de>
|
||||
|
||||
|
@ -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}
|
||||
|
@ -1,41 +0,0 @@
|
||||
From 0d192e192526252c30c16b3651c293bb5f21a99f Mon Sep 17 00:00:00 2001
|
||||
From: Julian Berman <Julian@GrayVines.com>
|
||||
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)
|
Loading…
x
Reference in New Issue
Block a user