summaryrefslogtreecommitdiff
path: root/dev-python/fastjsonschema
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-04-02 20:14:09 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-04-02 20:14:09 +0100
commitdd955a48d88d9b98d49a61f10ab4b52f53cf83a0 (patch)
treede2fa72b509cdf2371fc67b9ec231bdad7d03b5b /dev-python/fastjsonschema
parent29e3ef4590d6bee24c4a3798d12a3cfef750bd54 (diff)
gentoo auto-resync : 02:04:2024 - 20:14:09
Diffstat (limited to 'dev-python/fastjsonschema')
-rw-r--r--dev-python/fastjsonschema/Manifest3
-rw-r--r--dev-python/fastjsonschema/fastjsonschema-2.19.1.ebuild5
-rw-r--r--dev-python/fastjsonschema/files/fastjsonschema-2.19.1-pytest-8.patch67
3 files changed, 74 insertions, 1 deletions
diff --git a/dev-python/fastjsonschema/Manifest b/dev-python/fastjsonschema/Manifest
index 05774052b24d..911932643da4 100644
--- a/dev-python/fastjsonschema/Manifest
+++ b/dev-python/fastjsonschema/Manifest
@@ -1,3 +1,4 @@
+AUX fastjsonschema-2.19.1-pytest-8.patch 1907 BLAKE2B 510c0a15e1d8b644d8d2ea89c24406273fee8086a187b3af06d59446cd7d969fed6a05aeb8bd70c72a41594aecf59d7a43eb2aea2b6fc2d3867a44fcc9b4f85b SHA512 4ac8e849399e06ec89e31eccf708dbd2aa2a44cfcd2fcac30137d4a73e552e52625401408593ae0f8b975623a64c5ea81822037b799d8ce903c29e6550715dab
DIST fastjsonschema-2.19.1.tar.gz 372732 BLAKE2B f028e027483e02969c4d750a888659add9dd7f661776ab42242f74492272267b93a2248cdc50b78389091cc1a1fd7661abbf377d81edf73df35ed1e222be7328 SHA512 b276788ebe1d3a6bc5d1463c2a4940fbe5c9e0a7919c813b78f385faa406527cac34d4042e6a69e0ca1631f3e5ed0bc351e13d9d1e245132a1607e010a5a2346
-EBUILD fastjsonschema-2.19.1.ebuild 563 BLAKE2B c961ffddeb6342d85e8069c2eb0942978ef27c767f2dffccd39b67a727a599a52eff3bb2dcfb146d8d0e8181ef1a0d7dfe910b84c63ca89d92e95dbfc60c1e60 SHA512 c6d82e9291ae9300e1258b0b9bfc8e7a6324ac20b238585984f694c9ddb267dab57b6c9d11727dee6a4dc04906563b6527bb60882a3542d2ffda62ba805d5aef
+EBUILD fastjsonschema-2.19.1.ebuild 673 BLAKE2B e7e4fe1b1ce6ab64e533c0451b60eff0eb8a207e7b034f248bbab12c9887edd10970ac288f721391911353cf22054b9168f1c25f85d692d7e5722706094878df SHA512 4e4378792a0364193206003d564492221e6b2af1439fef6e2c5b6aafdcd6690d54811a61f3846f9d53dd306022d886090966eb5911917d8d33608c48cece98d2
MISC metadata.xml 390 BLAKE2B d29071ddcb0aea8db343c2924de51e8fdbf9295898c687ca0f474e007007407c9a402cd2fa74f0f2142dfb2f14a2cfd0c51c05f5fad6891734328a003283821f SHA512 db3339aaba0218ebea0ea4cd5b950dbf74572b18341f595fbbbe1f67c0c9c23413f4a98aeec5b49b036533cfea46e8f2a74f5f999c3b4c472a66297346139b05
diff --git a/dev-python/fastjsonschema/fastjsonschema-2.19.1.ebuild b/dev-python/fastjsonschema/fastjsonschema-2.19.1.ebuild
index 602928a877f2..2308e701735e 100644
--- a/dev-python/fastjsonschema/fastjsonschema-2.19.1.ebuild
+++ b/dev-python/fastjsonschema/fastjsonschema-2.19.1.ebuild
@@ -23,3 +23,8 @@ distutils_enable_tests pytest
EPYTEST_IGNORE=(
tests/benchmarks
)
+
+PATCHES=(
+ # https://github.com/horejsek/python-fastjsonschema/pull/180
+ "${FILESDIR}/${P}-pytest-8.patch"
+)
diff --git a/dev-python/fastjsonschema/files/fastjsonschema-2.19.1-pytest-8.patch b/dev-python/fastjsonschema/files/fastjsonschema-2.19.1-pytest-8.patch
new file mode 100644
index 000000000000..40cd057f6299
--- /dev/null
+++ b/dev-python/fastjsonschema/files/fastjsonschema-2.19.1-pytest-8.patch
@@ -0,0 +1,67 @@
+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', [
+--
+2.44.0
+