- update to 2.21.1:
* Fixed ResourceWarning where file was not properly closed * Fixed regexp for date format * Updated test suite * Fixed detecting when infinity is reached with multipleOf * Fixed that min/max items/lenght/properties can be float * Fixed that everything with empty `not` is invalid * Fixed missing re import when using regex pattern * Improved regexp for email format to comfort test suite * Improved regexp for date format to comfort test suite * Improved regexp for ipv4 format to comfort test suite * Added partial support of idn-hostname format * Added `detailed_exceptions` flag (default to True to avoid breaking change) - when used, results are twice as fast OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-fastjsonschema?expand=0&rev=24
This commit is contained in:
commit
a822a38f4b
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal 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
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
BIN
fastjsonschema-2.19.1.tar.gz
(Stored with Git LFS)
Normal file
BIN
fastjsonschema-2.19.1.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
3
fastjsonschema-2.20.0.tar.gz
Normal file
3
fastjsonschema-2.20.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3d48fc5300ee96f5d116f10fe6f28d938e6008f59a6a025c2649475b87f76a23
|
||||
size 373056
|
3
fastjsonschema-2.21.1.tar.gz
Normal file
3
fastjsonschema-2.21.1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:794d4f0a58f848961ba16af7b9c85a3e88cd360df008c59aac6fc5ae9323b5d4
|
||||
size 373939
|
131
python-fastjsonschema.changes
Normal file
131
python-fastjsonschema.changes
Normal file
@ -0,0 +1,131 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 5 09:35:07 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 2.21.1:
|
||||
* Fixed ResourceWarning where file was not properly closed
|
||||
* Fixed regexp for date format
|
||||
* Updated test suite
|
||||
* Fixed detecting when infinity is reached with multipleOf
|
||||
* Fixed that min/max items/lenght/properties can be float
|
||||
* Fixed that everything with empty `not` is invalid
|
||||
* Fixed missing re import when using regex pattern
|
||||
* Improved regexp for email format to comfort test suite
|
||||
* Improved regexp for date format to comfort test suite
|
||||
* Improved regexp for ipv4 format to comfort test suite
|
||||
* Added partial support of idn-hostname format
|
||||
* Added `detailed_exceptions` flag (default to True to avoid
|
||||
breaking change) - when used, results are twice as fast
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 20 09:47:35 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
|
||||
|
||||
- Update to 2.20.0:
|
||||
- Added validations at compile time:
|
||||
- `required` must have unique items
|
||||
- checking if schema is not allowing `required` items (item
|
||||
is required, but is not listed in properties)
|
||||
- Remove upstreamed patch:
|
||||
- support-pytest-8.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 7 07:15:45 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Add patch support-pytest-8.patch:
|
||||
* Support pytest >= 8.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 29 16:18:55 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 2.19.1:
|
||||
* Fixed date format to accept only two digit months and days
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 27 18:48:55 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 2.19.0:
|
||||
* Added `use_formats` parameter to allow disable automatic assertions
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 26 19:04:36 UTC 2023 - Torsten Gruner <simmphonie@opensuse.org>
|
||||
|
||||
- update to 2.18.0
|
||||
* Improved error message for required props - only missing are reported
|
||||
* Fixed support of boolean schema in if-then-else application
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 29 14:28:04 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 2.17.1:
|
||||
* Fixed tests in sdist
|
||||
* Added support for Decimals
|
||||
* Added tests in sdist
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 12 10:18:43 UTC 2023 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
- add sle15_python_module_pythons (jsc#PED-68)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 6 21:23:34 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 2.16.3:
|
||||
* Fix variable name resolving with references
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 6 14:32:39 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 2.16.2:
|
||||
* Use temporary dir in tests for compiled code
|
||||
* Add comments to Python versions in Github workflow
|
||||
* Add conditional test that uses $ref
|
||||
* Add conditional tests just to make sure the baseline works
|
||||
* Recursively expand all $ref strings in schemas
|
||||
* Add test case capturing the desired behaviour
|
||||
* Expand $ref when assiging the definition field in JsonSchemaValueExce
|
||||
* Add an assertion before removing 'data' from variable name
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 18 13:11:48 UTC 2022 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Cleanup the SPEC file.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jul 16 15:33:14 UTC 2022 - Arun Persaud <arun@gmx.de>
|
||||
|
||||
- specfile:
|
||||
* update copyright
|
||||
|
||||
- update to version 2.15.3:
|
||||
* Fix swapping handlers
|
||||
* Fix tests
|
||||
* Readable regexps in generated code
|
||||
|
||||
- changes from version 2.15.2:
|
||||
* Fix nested oneOf and anyOf
|
||||
* Fix if-else block in anyOf block
|
||||
* Fix uniqueItems including lists or dicts
|
||||
* Add option to pass custom formats in generated code
|
||||
|
||||
- changes from version 2.15.1:
|
||||
* Fix parsing date-time with +hhmm format
|
||||
* Fix generating code with custom regular expressions
|
||||
|
||||
- changes from version 2.15.0:
|
||||
* Fix additional property equal to empty object is the same as True
|
||||
* Fix const with "
|
||||
* Add const to error message
|
||||
* Add JsonSchemaValueException (replacement for JsonSchemaException)
|
||||
+ JsonSchemaException is base exception
|
||||
+ JsonSchemaDefinitionException no longer inherits from
|
||||
JsonSchemaValueException
|
||||
* New option `use_default` to have option turn off default feature
|
||||
(`True` by default to be compatible)
|
||||
|
||||
- changes from version 2.14.5:
|
||||
* Fix missing dependencies
|
||||
* Fix schema cache
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 12 04:52:10 PM UTC 2020 - John Vandenberg <jayvdb@gmail.com>
|
||||
|
||||
- Initial spec for v2.14.4
|
62
python-fastjsonschema.spec
Normal file
62
python-fastjsonschema.spec
Normal file
@ -0,0 +1,62 @@
|
||||
#
|
||||
# spec file for package python-fastjsonschema
|
||||
#
|
||||
# Copyright (c) 2024 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/
|
||||
#
|
||||
|
||||
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-fastjsonschema
|
||||
Version: 2.21.1
|
||||
Release: 0
|
||||
Summary: Fastest Python implementation of JSON schema
|
||||
License: BSD-3-Clause
|
||||
URL: https://github.com/horejsek/python-fastjsonschema
|
||||
Source: https://files.pythonhosted.org/packages/source/f/fastjsonschema/fastjsonschema-%{version}.tar.gz
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module pytest-benchmark}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Suggests: python-json-spec
|
||||
Suggests: python-jsonschema
|
||||
Suggests: python-validictory
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
Fastest Python implementation of JSON schema
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n fastjsonschema-%{version}
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
|
||||
%check
|
||||
%pytest
|
||||
|
||||
%install
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%files %{python_files}
|
||||
%doc README.rst
|
||||
%license LICENSE
|
||||
%{python_sitelib}/fastjsonschema
|
||||
%{python_sitelib}/fastjsonschema-%{version}.dist-info
|
||||
|
||||
%changelog
|
64
support-pytest-8.patch
Normal file
64
support-pytest-8.patch
Normal file
@ -0,0 +1,64 @@
|
||||
From 427a34e9ef409fefd8f1f7ae7e1c2a2bb7eb4496 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Edgar=20Ram=C3=ADrez=20Mondrag=C3=B3n?=
|
||||
<edgarrm358@gmail.com>
|
||||
Date: Tue, 14 Nov 2023 18:05:17 -0600
|
||||
Subject: [PATCH] Use `warnings.catch_warnings` instead of `pytest.warns(None)`
|
||||
in tests
|
||||
|
||||
---
|
||||
tests/test_pattern_properties.py | 7 ++++---
|
||||
tests/test_string.py | 7 ++++---
|
||||
2 files changed, 8 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/tests/test_pattern_properties.py b/tests/test_pattern_properties.py
|
||||
index ae86946..945315b 100644
|
||||
--- a/tests/test_pattern_properties.py
|
||||
+++ b/tests/test_pattern_properties.py
|
||||
@@ -1,3 +1,5 @@
|
||||
+import warnings
|
||||
+
|
||||
import pytest
|
||||
|
||||
|
||||
@@ -59,12 +61,11 @@ def test_pattern_with_escape_no_warnings(asserter):
|
||||
'bar': {}
|
||||
}
|
||||
|
||||
- with pytest.warns(None) as record:
|
||||
+ with warnings.catch_warnings():
|
||||
+ warnings.simplefilter("error")
|
||||
asserter({
|
||||
'type': 'object',
|
||||
'patternProperties': {
|
||||
'\\w+': {'type': 'object'}
|
||||
}
|
||||
}, value, value)
|
||||
-
|
||||
- assert len(record) == 0
|
||||
diff --git a/tests/test_string.py b/tests/test_string.py
|
||||
index a8e8318..12fc3c9 100644
|
||||
--- a/tests/test_string.py
|
||||
+++ b/tests/test_string.py
|
||||
@@ -1,3 +1,5 @@
|
||||
+import warnings
|
||||
+
|
||||
import pytest
|
||||
|
||||
from fastjsonschema import JsonSchemaValueException
|
||||
@@ -74,14 +76,13 @@ def test_pattern_with_space(asserter, pattern):
|
||||
|
||||
|
||||
def test_pattern_with_escape_no_warnings(asserter):
|
||||
- with pytest.warns(None) as record:
|
||||
+ with warnings.catch_warnings():
|
||||
+ warnings.simplefilter("error")
|
||||
asserter({
|
||||
'type': 'string',
|
||||
'pattern': '\\s'
|
||||
}, ' ', ' ')
|
||||
|
||||
- assert len(record) == 0
|
||||
-
|
||||
|
||||
exc = JsonSchemaValueException('data must be a valid regex', value='{data}', name='data', definition='{definition}', rule='format')
|
||||
@pytest.mark.parametrize('value, expected', [
|
Loading…
x
Reference in New Issue
Block a user