1
0

6 Commits

Author SHA256 Message Date
8d77fc6a1c Accepting request 1307730 from devel:languages:python
-update to 2.21.2:
  * correct the escaping of periods in the ipv6 format regex

OBS-URL: https://build.opensuse.org/request/show/1307730
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-fastjsonschema?expand=0&rev=12
2025-09-30 15:34:38 +00:00
4554d259ca -update to 2.21.2:
* correct the escaping of periods in the ipv6 format regex

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-fastjsonschema?expand=0&rev=26
2025-09-29 10:38:28 +00:00
e8284a515d Accepting request 1228480 from devel:languages:python
- 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/request/show/1228480
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-fastjsonschema?expand=0&rev=11
2024-12-06 13:25:07 +00:00
a822a38f4b - 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
2024-12-05 09:35:39 +00:00
bc087e46a4 Accepting request 1225676 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1225676
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-fastjsonschema?expand=0&rev=10
2024-11-22 22:50:46 +00:00
bab64eeeee - 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

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-fastjsonschema?expand=0&rev=22
2024-11-21 22:31:46 +00:00
5 changed files with 40 additions and 71 deletions

Binary file not shown.

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b1eb43748041c880796cd077f1a07c3d94e93ae84bba5ed36800a33554ae05de
size 374130

View File

@@ -1,3 +1,38 @@
-------------------------------------------------------------------
Mon Sep 29 10:38:05 UTC 2025 - Dirk Müller <dmueller@suse.com>
-update to 2.21.2:
* correct the escaping of periods in the ipv6 format regex
-------------------------------------------------------------------
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>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-fastjsonschema
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,14 +18,12 @@
%{?sle15_python_module_pythons}
Name: python-fastjsonschema
Version: 2.19.1
Version: 2.21.2
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
# PATCH-FIX-UPSTREAM gh#horejsek/python-fastjsonschema#180
Patch0: support-pytest-8.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest-benchmark}

View File

@@ -1,64 +0,0 @@
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', [