Sync from SUSE:ALP:Source:Standard:1.0 python-jsonschema revision aa9fda56339eb974065d2f6cf6583e3c

This commit is contained in:
Adrian Schröter 2023-10-20 14:09:27 +02:00
commit d2e5831436
6 changed files with 818 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

4
_service Normal file
View File

@ -0,0 +1,4 @@
<services>
<service name="download_files" mode="manual">
</service>
</services>

BIN
jsonschema-4.19.1.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

612
python-jsonschema.changes Normal file
View File

@ -0,0 +1,612 @@
-------------------------------------------------------------------
Thu Sep 21 13:30:47 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>
- update to 4.19.1:
* Allow single label hostname in format string by @swaeberle in
#1164
-------------------------------------------------------------------
Thu Sep 7 06:16:46 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>
- update to 4.19.0:
* Importing the |Validator| protocol directly from the package
root is deprecated. Import it from
|jsonschema.protocols.Validator| instead.
* Automatic retrieval of remote references (which is still
deprecated) now properly succeeds even if the retrieved
resource does not declare which version of JSON Schema it uses.
Such resources are assumed to be 2020-12 schemas. This more
closely matches the pre-|referencing| library behavior.
-------------------------------------------------------------------
Thu Aug 3 18:38:22 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>
- update to 4.18.6:
* Set a jsonschema specific user agent when automatically
retrieving remote references (which is deprecated).
-------------------------------------------------------------------
Thu Aug 3 17:44:21 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>
- update to 4.18.5:
* Declare support for Py3.12
-------------------------------------------------------------------
Tue Jul 18 09:05:26 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>
- update to 4.18.4:
no changelog available, only a diff:
https://github.com/python-jsonschema/jsonschema/compare/v4.18.3...v4.18.4
-------------------------------------------------------------------
Fri Jul 14 05:28:43 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>
- upgrade to 4.18.3:
no changelog available, only a diff:
https://github.com/python-jsonschema/jsonschema/compare/v4.18.2...v4.18.3
-------------------------------------------------------------------
Thu Jul 13 04:52:36 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>
- upgrade to 4.18.2:
* Fix an additional regression with the deprecated
jsonschema.RefResolver and pointer resolution.
-------------------------------------------------------------------
Wed Jul 12 10:39:42 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>
- upgrade to 4.18.1:
* Fix a regression with jsonschema.RefResolver based resolution
when used in combination with a custom validation dialect (via
jsonschema.validators.create).
-------------------------------------------------------------------
Thu Jul 6 09:34:43 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>
- update to 4.18.0
* Use only ``autodoc`` to generate the API documentation by
@DanielNoord in
https://github.com/python-jsonschema/jsonschema/pull/1021
* Replace codecov with coverage (7)'s native markdown support by
@Julian in
https://github.com/python-jsonschema/jsonschema/pull/1025
* Add annotations for `_Error` by @DanielNoord in
https://github.com/python-jsonschema/jsonschema/pull/1022
* Replace `$ref` & `$dynamicRef` support / `RefResolver` with the
new referencing library by @Julian in
https://github.com/python-jsonschema/jsonschema/pull/1049
* Maybe fix PDF builds (in ReadTheDocs). by @Julian in
https://github.com/python-jsonschema/jsonschema/pull/1055
* documentation mistype fix by @aryanA101a in
https://github.com/python-jsonschema/jsonschema/pull/1063
* fix: Python 3.11 date.fromisoformat() allows extra formats by
@jvtm in
https://github.com/python-jsonschema/jsonschema/pull/1076
* Do not validate for unevaluatedProperties by @ikonst in
https://github.com/python-jsonschema/jsonschema/pull/1075
-------------------------------------------------------------------
Fri Apr 21 12:27:36 UTC 2023 - Dirk Müller <dmueller@suse.com>
- add sle15_python_module_pythons (jsc#PED-68)
-------------------------------------------------------------------
Thu Apr 13 22:42:21 UTC 2023 - Matej Cepl <mcepl@suse.com>
- Make calling of %{sle15modernpython} optional.
-------------------------------------------------------------------
Mon Dec 26 11:13:34 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Create subpackages for [format] and [format-nongpl] extras
* required by the tests for python-jupyter-server
- Test in _multibuild in order to check that the rpm requirements
are set correctly
-------------------------------------------------------------------
Wed Nov 30 13:41:12 UTC 2022 - Johannes Kastl <kastl@b1-systems.de>
- update to 4.17.3:
* No nice changelog provided upstream
Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.17.2...v4.17.3
-------------------------------------------------------------------
Wed Nov 30 13:38:53 UTC 2022 - Johannes Kastl <kastl@b1-systems.de>
- update to 4.17.2:
* No nice changelog provided upstream
Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.17.1...v4.17.2
-------------------------------------------------------------------
Wed Nov 23 07:15:21 UTC 2022 - Johannes Kastl <kastl@b1-systems.de>
- update to 4.17.1:
* No nice changelog provided upstream
Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.17.0...v4.17.1
-------------------------------------------------------------------
Tue Nov 15 09:56:17 UTC 2022 - Johannes Kastl <kastl@b1-systems.de>
- update to 4.17.0:
* The check_schema method on jsonschema.protocols.Validator instances now enables format validation by default when run. This can catch some additional invalid schemas (e.g. containing invalid regular expressions) where the issue is indeed uncovered by validating against the metaschema with format validation enabled as an assertion.
* The jsonschema CLI (along with jsonschema.cli the module) are now deprecated. Use check-jsonschema instead, which can be installed via pip install check-jsonschema and found here.
* Make ErrorTree have a more grammatically correct repr.
-------------------------------------------------------------------
Tue Oct 11 21:10:52 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Clean up specfile
* remove obsolete setuptools BuildRequirements
* remove old distro python <= 3.6 directives
* update outdated description
-------------------------------------------------------------------
Tue Oct 4 05:29:39 UTC 2022 - Johannes Kastl <kastl@b1-systems.de>
- change dependency from hatch_fancy_pypi_readme to hatch-fancy-pypi-readme
-------------------------------------------------------------------
Sun Oct 2 09:08:59 UTC 2022 - Johannes Kastl <kastl@b1-systems.de>
- update to 4.16.0:
* Improve the base URI behavior when resolving a $ref to a resolution URI
which is different from the resolved schema's declared $id.
* Accessing jsonschema.draftN_format_checker is deprecated. Instead, if you
want access to the format checker itself, it is exposed as
jsonschema.validators.DraftNValidator.FORMAT_CHECKER on any
jsonschema.protocols.Validator.
-------------------------------------------------------------------
Sun Oct 2 09:08:13 UTC 2022 - Johannes Kastl <kastl@b1-systems.de>
- update to 4.15.0:
* Enable dedicated API documentation page(s) by @Julian in #989
-------------------------------------------------------------------
Sun Oct 2 08:57:47 UTC 2022 - Johannes Kastl <kastl@b1-systems.de>
- update to 4.14.0:
* FormatChecker.cls_checks is deprecated. Use FormatChecker.checks on
an instance of FormatChecker instead.
* unevaluatedItems has been fixed for draft 2019. It's nonetheless
discouraged to use draft 2019 for any schemas, new or old.
* Fix a number of minor annotation issues in protocols.Validator
-------------------------------------------------------------------
Sun Oct 2 08:44:21 UTC 2022 - Johannes Kastl <kastl@b1-systems.de>
- update to 4.13.0:
* Add support for creating validator classes whose metaschema uses a different
dialect than its schemas. In other words, they may use draft2020-12 to define
which schemas are valid, but the schemas themselves use draft7 (or a custom
dialect, etc.) to define which instances are valid. Doing this is likely
not something most users, even metaschema authors, may need, but occasionally
will be useful for advanced use cases.
-------------------------------------------------------------------
Sun Oct 2 08:33:20 UTC 2022 - Johannes Kastl <kastl@b1-systems.de>
- update to 4.12.1:
* Use rST markers in README by @hynek in #987
-------------------------------------------------------------------
Sun Oct 2 08:26:42 UTC 2022 - Johannes Kastl <kastl@b1-systems.de>
- update to 4.12.0:
- Warn at runtime when subclassing validator classes. Doing so was not
intended to be public API, though it seems some downstream libraries
do so. A future version will make this an error, as it is brittle and
better served by composing validator objects instead. Feel free to reach
out if there are any cases where changing existing code seems difficult
and I can try to provide guidance.
-------------------------------------------------------------------
Mon Sep 26 05:01:31 UTC 2022 - Johannes Kastl <kastl@b1-systems.de>
- update to 4.11.0:
- jsonschema deserves a fancy readme by @hynek in #983
- add new dependency hatch_fancy_pypi_readme
-------------------------------------------------------------------
Mon Sep 26 05:00:38 UTC 2022 - Johannes Kastl <kastl@b1-systems.de>
- update to 4.10.3:
- jsonschema.validators.validator_for now properly uses the explicitly
provided default validator even if the $schema URI is not found.
-------------------------------------------------------------------
Mon Sep 26 04:56:19 UTC 2022 - Johannes Kastl <kastl@b1-systems.de>
- update to 4.10.2:
- Fix a second place where subclasses may have added attrs attributes (#982).
-------------------------------------------------------------------
Sun Sep 25 17:47:32 UTC 2022 - Johannes Kastl <kastl@b1-systems.de>
- update to 4.10.1:
- Fix Validator.evolve (and APIs like iter_errors which call it) for cases
where the validator class has been subclassed. Doing so wasn't intended to be
public API, but given it didn't warn or raise an error it's of course
understandable. The next release however will make it warn (and a future one
will make it error). If you need help migrating usage of inheriting from a
validator class feel free to open a discussion and I'll try to give some
guidance (#982).
-------------------------------------------------------------------
Sun Sep 25 17:37:47 UTC 2022 - Johannes Kastl <kastl@b1-systems.de>
- accept SR#1005905 to convert this to using Twisted instead of
pytest
-------------------------------------------------------------------
Sun Sep 25 07:37:16 UTC 2022 - Johannes Kastl <kastl@b1-systems.de>
- update to 4.10.0:
Add support for referencing schemas with $ref across different versions
of the specification than the referrer's
-------------------------------------------------------------------
Sun Sep 25 07:34:59 UTC 2022 - Johannes Kastl <kastl@b1-systems.de>
- update to 4.9.1:
Update some documentation examples to use newer validator releases in their
sample code.
-------------------------------------------------------------------
Sun Sep 25 07:31:57 UTC 2022 - Johannes Kastl <kastl@b1-systems.de>
- update to 4.9.0:
- Fix relative $ref resolution when the base URI is a URN or other scheme (#544).
- pkgutil.resolve_name is now used to retrieve validators
provided on the command line. This function is only available on
3.9+, so 3.7 and 3.8 (which are still supported) now rely on the
pkgutil_resolve_name <https://pypi.org/project/pkgutil_resolve_name/>_
backport package. Note however that the CLI itself is due
to be deprecated shortly in favor of check-jsonschema
<https://github.com/python-jsonschema/check-jsonschema>_.
-------------------------------------------------------------------
Fri Jul 29 06:28:16 UTC 2022 - Johannes Kastl <kastl@b1-systems.de>
- update to 4.8.0:
* ``best_match`` no longer traverses into ``anyOf`` and ``oneOf`` when all of
the errors within them seem equally applicable. This should lead to clearer
error messages in some cases where no branches were matched.
-------------------------------------------------------------------
Tue Jul 19 11:08:23 UTC 2022 - Johannes Kastl <kastl@b1-systems.de>
- update to 4.7.2:
* Fix best_match's type matching when it's an array.
- update to 4.7.1:
* Minor case correction for PyPI links
- update to 4.7.0:
* Enhance best match to prefer errors from matching types. by @Julian in #972
- update to 4.6.2:
* docs: Fix a few typos by @timgates42 in #969
- update to 4.6.1:
* Type annotate format checker methods by @sirosen in #958
* Fix fuzzer to include instrumentation by @DavidKorczynski in #965
* [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #967
-------------------------------------------------------------------
Tue Jul 19 08:44:07 UTC 2022 - Johannes Kastl <kastl@b1-systems.de>
- update to 4.6.0:
* Add package_url for changelog by @fhightower in #950
* Only validate unevaluated properties/items on applicable types by @EpicWink in #949
* Add v4.5.1 to changelog by @sirosen in #956
* Modernize the packaging setup via PEP 621 and Hatch. by @Julian in #957
-------------------------------------------------------------------
Sun Jun 5 00:14:03 UTC 2022 - Dirk Müller <dmueller@suse.com>
- update to 4.5.1:
* Revert changes to ``$dynamicRef`` which caused a performance regression
in v4.5.0
* Validator classes for each version now maintain references to the correct
corresponding format checker (#905)
* Development has moved to a `GitHub organization
<https://github.com/python-jsonschema/>`_.
No functional behavior changes are expected from the change.
-------------------------------------------------------------------
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>
- Use libalternatives instead of update-alternatives.
-------------------------------------------------------------------
Tue May 25 07:59:29 UTC 2021 - pgajdos@suse.com
- %check: use %pytest rpm macro
-------------------------------------------------------------------
Fri Jan 15 13:12:18 UTC 2021 - Benjamin Greiner <code@bnavigator.de>
- Disable python2 build as indirect build dependencies to
python2-cffi are not resolvable anymore
-------------------------------------------------------------------
Thu Mar 12 07:44:16 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
- Add patch to fix build with new webcolors:
* webcolors.patch
-------------------------------------------------------------------
Fri Nov 22 06:06:52 UTC 2019 - Arun Persaud <arun@gmx.de>
- update to version 3.2.0 (jsc#SLE-18756):
* Added a format_nongpl setuptools extra, which installs only format
dependencies that are non-GPL (#619).
-------------------------------------------------------------------
Sat Nov 16 16:45:36 UTC 2019 - Arun Persaud <arun@gmx.de>
- specfile:
* be more explicit in %files section
* require python-importlib-metadata
- update to version 3.1.1:
* Temporarily revert the switch to js-regex until #611 and #612 are
resolved.
- changes from version 3.1.0:
* Regular expressions throughout schemas now respect the ECMA 262
dialect, as recommended by the specification (#609).
-------------------------------------------------------------------
Mon Oct 14 13:49:28 UTC 2019 - Matej Cepl <mcepl@suse.com>
- Replace %fdupes -s with plain %fdupes; hardlinks are better.
-------------------------------------------------------------------
Tue Sep 17 05:31:26 UTC 2019 - John Vandenberg <jayvdb@gmail.com>
- Activate more of the test suite
- Remove tests and benchmarking from the runtime package
- Update to v3.0.2
* Fixed a bug where 0 and False were considered equal by
const and enum
- from v3.0.1
* Fixed a bug where extending validators did not preserve their
notion of which validator property contains $id information.
- from v3.0.0
* Support for Draft 6 and Draft 7
* Draft 7 is now the default
* New TypeChecker object for more complex type definitions
(and overrides)
* Falling back to isodate for the date-time format checker is
no longer attempted, in accordance with the specification
-------------------------------------------------------------------
Tue Apr 16 16:17:12 UTC 2019 - Matej Cepl <mcepl@suse.com>
- Add non-updating note to the SPEC file
-------------------------------------------------------------------
Mon Apr 8 19:16:49 UTC 2019 - Dirk Mueller <dmueller@suse.com>
- downgrade to < 3.0.0 again to fix all openstack clients
-------------------------------------------------------------------
Thu Mar 28 14:57:16 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Update to 3.0.1:
* Support for Draft 6 and Draft 7
* Draft 7 is now the default
* New TypeChecker object for more complex type definitions (and overrides)
* Falling back to isodate for the date-time format checker is no longer attempted, in accordance with the specification
-------------------------------------------------------------------
Mon Jan 14 15:34:35 CET 2019 - kukuk@suse.de
- Use %license instead of %doc [bsc#1082318]
-------------------------------------------------------------------
Wed Jan 24 10:24:27 UTC 2018 - tchvatal@suse.com
- Add condition around the python2 code to make sure we can build
in python3 only enviroment
-------------------------------------------------------------------
Wed Apr 19 22:13:57 UTC 2017 - toddrme2178@gmail.com
- Source url must be https.
-------------------------------------------------------------------
Sat Apr 15 23:06:18 UTC 2017 - toddrme2178@gmail.com
- Fix source url.
-------------------------------------------------------------------
Fri Apr 7 20:58:55 UTC 2017 - toddrme2178@gmail.com
- Update to 2.6.0
* Improved performance on CPython by adding caching around ref resolution
(#203)
- Implement single-spec version
-------------------------------------------------------------------
Mon Oct 5 13:28:12 UTC 2015 - mcihar@suse.cz
- Adjust dependencies for Python 2.6 based SLE 11
-------------------------------------------------------------------
Mon Jun 15 02:16:17 UTC 2015 - arun@gmx.de
- update to version 2.5.1:
(no changelog available)
- update to version 2.5.0:
* Improved performance on CPython by adding caching around ref
resolution (#203)
- specfile:
* add python-vcversioner
- drop test requirements and %check section, which is broken
- Fix update-alternatives usage
-------------------------------------------------------------------
Sat Nov 08 17:38:00 UTC 2014 - Led <ledest@gmail.com>
- fix bashism in pre script
-------------------------------------------------------------------
Mon Sep 15 10:57:54 UTC 2014 - tbechtold@suse.com
- update to version 2.4.0:
* Added a CLI (#134)
* Added absolute path and absolute schema path to errors (#120)
* Added ``relevance``
* Meta-schemas are now loaded via ``pkgutil``
* Added ``by_relevance`` and ``best_match`` (#91)
* Fixed ``format`` to allow adding formats for non-strings (#125)
* Fixed the ``uri`` format to reject URI references (#131)
- BuildRequires python-setuptools
- Install /usr/bin/jsonschema with update-alternatives support
-------------------------------------------------------------------
Thu Feb 13 10:27:36 UTC 2014 - dmueller@suse.com
- remove dependency on unittest2
-------------------------------------------------------------------
Mon Oct 21 13:30:13 UTC 2013 - dmueller@suse.com
- update to 2.2.0:
* Compile the host name regex (#127)
* Allow arbitrary objects to be types (#129)
* Support RFC 3339 datetimes in conformance with the spec
* Fixed error paths for additionalItems + items (#122)
* Fixed wording for min / maxProperties (#117)
-------------------------------------------------------------------
Mon Jun 10 12:42:14 UTC 2013 - dmueller@suse.com
- update to 2.0.0:
* Added ``create`` and ``extend`` to ``jsonschema.validators``
* Removed ``ValidatorMixin``
* Fixed array indices ref resolution (#95)
* Fixed unknown scheme defragmenting and handling (#102)
-------------------------------------------------------------------
Mon Apr 29 12:38:33 UTC 2013 - dmueller@suse.com
- update to 1.3.0:
* Better error tracebacks (#83)
* Raise exceptions in ``ErrorTree``\s for keys not in the instance (#92)
* More attributes for ValidationError (#86)
* Added ``ValidatorMixin.descend``
* Fixed bad ``RefResolutionError`` message (#82)
* Canonicalize URIs (#70)
-------------------------------------------------------------------
Sat Apr 13 10:11:29 UTC 2013 - toddrme2178@gmail.com
- Remove pre_checkin.sh since the two packages are not the same
-------------------------------------------------------------------
Mon Feb 25 09:17:22 UTC 2013 - p.drouand@gmail.com
- Add python3 support
Tests with python3 fails for instance
-------------------------------------------------------------------
Mon Feb 25 08:34:55 UTC 2013 - p.drouand@gmail.com
- Update to version 1.0.0:
+ Support for Draft 4
+ Support for format
+ Longs are ints too!
+ Fixed a number of issues with ``$ref`` support (#66)
+ Draft4Validator is now the default
+ ``ValidationError.path`` is now in sequential order
+ Added ``ValidatorMixin``
-------------------------------------------------------------------
Thu Nov 22 15:41:35 UTC 2012 - saschpe@suse.de
- Update to version 0.7:
+ Partial support for (JSON Pointer) $ref
+ Deprecations
+ Validator is replaced by Draft3Validator with a slightly different
interface
+ validator(meta_validate=False)
- Changes from version 0.6:
+ Issue #30 - Wrong behavior for the dependencies property validation
+ Fix a miswritten test
-------------------------------------------------------------------
Fri Jul 27 10:19:13 UTC 2012 - saschpe@suse.de
- Add BuildRequires: python-unittest2 for SLE-11-SP2
-------------------------------------------------------------------
Thu Jul 26 13:54:29 UTC 2012 - saschpe@suse.de
- Initial version

173
python-jsonschema.spec Normal file
View File

@ -0,0 +1,173 @@
#
# spec file
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
%if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
%{?sle15_python_module_pythons}
Name: python-jsonschema%{psuffix}
Version: 4.19.1
Release: 0
Summary: An implementation of JSON-Schema validation for Python
License: MIT
URL: https://github.com/python-jsonschema/jsonschema
Source: https://files.pythonhosted.org/packages/source/j/jsonschema/jsonschema-%{version}.tar.gz
BuildRequires: %{python_module base >= 3.8}
BuildRequires: %{python_module hatch-fancy-pypi-readme}
BuildRequires: %{python_module hatch_vcs}
BuildRequires: %{python_module hatchling}
BuildRequires: %{python_module pip}
BuildRequires: fdupes
BuildRequires: python-rpm-macros >= 20210929
%if %{with test}
BuildRequires: %{python_module jsonschema = %{version}}
BuildRequires: %{python_module jsonschema-format = %{version}}
BuildRequires: %{python_module jsonschema-format-nongpl = %{version}}
BuildRequires: %{python_module jsonschema-specifications}
BuildRequires: %{python_module rpds-py}
BuildRequires: %{python_module virtue}
BuildRequires: git-core
%endif
Requires: python-attrs >= 17.4.0
Requires: python-jsonschema-specifications
Requires: python-pyrsistent >= 0.14.0
Requires: python-referencing
Requires: python-rpds-py
%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
Requires: python-pkgutil-resolve-name >= 1.3.10
%endif
%if %{with libalternatives}
Requires: alts
BuildRequires: alts
%else
Requires(post): update-alternatives
Requires(preun):update-alternatives
%endif
BuildArch: noarch
%python_subpackages
%description
jsonschema is an implementation of the JSON Schema specification for Python
The validator can be used as python module and from console:
$ jsonschema --instance sample.json sample.schema
%package format
Summary: An implementation of JSON-Schema validation for Python [format] extra
Requires: python-fqdn
Requires: python-idna
Requires: python-isoduration
Requires: python-jsonpointer > 1.13
Requires: python-jsonschema = %{version}
Requires: python-rfc3339-validator
Requires: python-rfc3987
Requires: python-uri_template
Requires: python-webcolors >= 1.11
%description format
jsonschema is an implementation of the JSON Schema specification for Python.
This subpackage provides the [format] extra
%package format-nongpl
Summary: An implementation of JSON-Schema validation for Python [format-nongpl] extra
Requires: python-fqdn
Requires: python-idna
Requires: python-isoduration
Requires: python-jsonpointer > 1.13
Requires: python-jsonschema = %{version}
Requires: python-rfc3339-validator
Requires: python-rfc3986-validator > 0.1.0
Requires: python-uri_template
Requires: python-webcolors >= 1.11
%description format-nongpl
jsonschema is an implementation of the JSON Schema specification for Python.
This subpackage provides the [format-nongpl] extra
%prep
%setup -q -n jsonschema-%{version}
%if !%{with test}
%build
%pyproject_wheel
%install
%pyproject_install
# Remove benchmark tests
%{python_expand rm -r %{buildroot}%{$python_sitelib}/jsonschema/benchmarks %{buildroot}%{$python_sitelib}/jsonschema/tests
%fdupes %{buildroot}%{$python_sitelib}
}
# Prepare for libalternatives/update-alternatives usage
%python_clone -a %{buildroot}%{_bindir}/jsonschema
%endif
%if %{with test}
%check
export JSON_SCHEMA_TEST_SUITE=$PWD/json
%{python_expand # see tox.ini
export PYTHONPATH=%{buildroot}%{$python_sitelib}
$python -B -m virtue jsonschema
}
%endif
%pre
# If libalternatives is used: Removing old update-alternatives entries.
%python_libalternatives_reset_alternative jsonschema
%post
%python_install_alternative jsonschema
%preun
%python_uninstall_alternative jsonschema
%if !%{with test}
%files %{python_files}
%license COPYING
%doc README.rst
%python_alternative %{_bindir}/jsonschema
%{python_sitelib}/jsonschema
%{python_sitelib}/jsonschema-%{version}*-info
%files %{python_files format}
%license COPYING
%files %{python_files format-nongpl}
%license COPYING
%endif
%changelog