diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-06-29 08:00:25 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-06-29 08:00:25 +0100 |
commit | d855918b46ba8714cf1320fe63b55fd0ed1748a6 (patch) | |
tree | 4d7d0e86122a07796a660310d507f93e1b7747b9 /dev-python/pykwalify | |
parent | b8325835c82367d22428eb41afa0f2d375338d3c (diff) |
gentoo auto-resync : 29:06:2024 - 08:00:25
Diffstat (limited to 'dev-python/pykwalify')
-rw-r--r-- | dev-python/pykwalify/Manifest | 3 | ||||
-rw-r--r-- | dev-python/pykwalify/files/pykwalify-1.8.0-ruamel-yaml-1.18.patch | 90 | ||||
-rw-r--r-- | dev-python/pykwalify/pykwalify-1.8.0-r3.ebuild | 8 |
3 files changed, 97 insertions, 4 deletions
diff --git a/dev-python/pykwalify/Manifest b/dev-python/pykwalify/Manifest index 152616a73c59..8c2b3d1ab88b 100644 --- a/dev-python/pykwalify/Manifest +++ b/dev-python/pykwalify/Manifest @@ -1,4 +1,5 @@ AUX pykwalify-1.4.0-S.patch 862 BLAKE2B d92c4e8d4d85d28f6df574bfe2f1ab0aa82c32ba8ce2b4a2d6ecdc21fe1db4056351b6aa6dde04d897525ce596ed492781bd7dcf0fba2ca5970a3af79a9abf3b SHA512 f7d9189993cd73a0412ef01fcb01a99fcbc61edc6863a1997333de085294b9c5772d026f7ab8f16703568404f2ff76bb1aeed760d7908c7865e0891ad5752dc9 +AUX pykwalify-1.8.0-ruamel-yaml-1.18.patch 3356 BLAKE2B 0aa7c5e784aac6c2deea76704c0b8f8b6470c688d22fca9620b7b23dbb4e865f910cd613ad63ea7eecf7c050f7a346bea387005e9377eabb7120e38f5ad56fa6 SHA512 cd27c845e9dd6f2c72cddf40c3458264d9a8a70afee9eb2b4833e17ae0a77a18698dbcc0bdc0fa651b758fc5717d5a00f009966c197925b3a305e57aca1031d2 DIST pykwalify-1.8.0.tar.gz 62462 BLAKE2B 1593f5e3e15188929574ece60bf6818438258bf024d105ae26323a97a202ac69001a15ca6daaa430970af3659c49da745bcf1f77c23ac72bed2ddca14440d943 SHA512 c77d3072995bb3f61336e725227eeece1dafe2182513e5f67eedeeca3437825b53ac691a991055aad8298db252e2012bc9a61c23d766335fcfbb10a3b587b45d -EBUILD pykwalify-1.8.0-r3.ebuild 755 BLAKE2B 954213fc2d5de0f87f9a75bd96756b3e33fecde951ed2d347235a60cb156026633ea84b71df5b612227070e86e6aaf671e3fde2f26cb6e99fda5370c4847c9f8 SHA512 ed7f1298c78a82a344e3463a2a31df39ff8aeea01945abe8f1a496fc5581bfa6baa34f6a2d843d3cb6909ecdb118115c12e468bc181d30881c31de906c2e1679 +EBUILD pykwalify-1.8.0-r3.ebuild 865 BLAKE2B 405d4014154e92a29cef19462b55428350c39b2a3f0ac90436e5c9f36f35be31334a63116aa3ba625aaf86f8947649c2a681c17060636ecba7d103b78e6f3dbe SHA512 a205dc38c8fd38a5fff959b1865d5fc61c5ab46ba52ec468c37cd386283dced5b19af2a434e1ffd537e097c9e624af3a394eb1cfad4adcc150d6d0fe1bf043e9 MISC metadata.xml 394 BLAKE2B e7262ef0692f68f8fd8c2d8b45cc7a18efc5c2759a7998d3c065f17450d2f4de09d4432961c7327f68fbd52cd61a9183122f19fc829a9c93a6a40b36ac3d9952 SHA512 0d96c9c00d4cd4a64afd790df32cc1536afaeb952d6172a7c3efd227c9686c7fe743e30f94c218e73ef5911c59b23aa40a9e5f19ded5474987d79e7337fcc6b1 diff --git a/dev-python/pykwalify/files/pykwalify-1.8.0-ruamel-yaml-1.18.patch b/dev-python/pykwalify/files/pykwalify-1.8.0-ruamel-yaml-1.18.patch new file mode 100644 index 000000000000..d3e5cd65f6ee --- /dev/null +++ b/dev-python/pykwalify/files/pykwalify-1.8.0-ruamel-yaml-1.18.patch @@ -0,0 +1,90 @@ +From 57bb2ba5c28b6928edb3f07ef581a5a807524baf Mon Sep 17 00:00:00 2001 +From: Lily Foster <lily@lily.flowers> +Date: Sat, 20 Jan 2024 21:14:16 -0500 +Subject: [PATCH] Fixing tests for ruamel yaml 0.18+ + +Upstream-Issue: https://github.com/Grokzen/pykwalify/issues/198 +Upstream-PR: https://github.com/Grokzen/pykwalify/pull/199 + +diff --git a/tests/test_core.py b/tests/test_core.py +index cc84f3e..43271d4 100644 +--- a/tests/test_core.py ++++ b/tests/test_core.py +@@ -12,7 +12,7 @@ + + # 3rd party imports + import pytest +-from pykwalify.compat import yaml ++from pykwalify.compat import yml + from testfixtures import compare + + +@@ -579,7 +579,7 @@ def test_core_files(self): + for passing_test_file in pass_tests: + f = self.f(os.path.join("success", passing_test_file)) + with open(f, "r") as stream: +- yaml_data = yaml.safe_load_all(stream) ++ yaml_data = yml.load_all(stream) + + for document_index, document in enumerate(yaml_data): + data = document["data"] +@@ -600,7 +600,7 @@ def test_core_files(self): + for failing_test, exception_type in _fail_tests: + f = self.f(os.path.join("fail", failing_test)) + with open(f, "r") as stream: +- yaml_data = yaml.safe_load_all(stream) ++ yaml_data = yml.load_all(stream) + + for document_index, document in enumerate(yaml_data): + data = document["data"] +diff --git a/tests/test_unicode.py b/tests/test_unicode.py +index 36f5549..74e2908 100644 +--- a/tests/test_unicode.py ++++ b/tests/test_unicode.py +@@ -12,7 +12,7 @@ + from pykwalify.errors import SchemaError + + # 3rd party imports +-from pykwalify.compat import yaml ++from pykwalify.compat import yml + from testfixtures import compare + + +@@ -47,7 +47,8 @@ def test_files_with_unicode_content_success(self, tmpdir): + } + + source_f = tmpdir.join(u"2så.json") +- source_f.write(yaml.safe_dump(fail_data_2s_yaml, allow_unicode=True)) ++ with source_f.open('w') as stream: ++ yml.dump(fail_data_2s_yaml, stream) + + _pass_tests = [ + # Test mapping with unicode key and value +@@ -65,7 +66,7 @@ def test_files_with_unicode_content_success(self, tmpdir): + f = self.f(passing_test_files) + + with open(f, "r") as stream: +- yaml_data = yaml.safe_load(stream) ++ yaml_data = yml.load(stream) + data = yaml_data["data"] + schema = yaml_data["schema"] + +@@ -102,7 +103,8 @@ def test_files_with_unicode_content_failing(self, tmpdir): + } + + source_f = tmpdir.join(u"2få.json") +- source_f.write(yaml.safe_dump(fail_data_2f_yaml, allow_unicode=True)) ++ with source_f.open('w') as stream: ++ yml.dump(fail_data_2f_yaml, stream) + + _fail_tests = [ + # Test mapping with unicode key and value but wrong type +@@ -120,7 +122,7 @@ def test_files_with_unicode_content_failing(self, tmpdir): + f = self.f(failing_test) + + with open(f, "r") as stream: +- yaml_data = yaml.safe_load(stream) ++ yaml_data = yml.load(stream) + data = yaml_data["data"] + schema = yaml_data["schema"] + errors = yaml_data["errors"] diff --git a/dev-python/pykwalify/pykwalify-1.8.0-r3.ebuild b/dev-python/pykwalify/pykwalify-1.8.0-r3.ebuild index 3276aa080f7a..1e5b8ef2a08e 100644 --- a/dev-python/pykwalify/pykwalify-1.8.0-r3.ebuild +++ b/dev-python/pykwalify/pykwalify-1.8.0-r3.ebuild @@ -1,10 +1,10 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{10..12} ) +PYTHON_COMPAT=( python3_{10..13} ) inherit distutils-r1 pypi @@ -14,8 +14,8 @@ HOMEPAGE=" https://pypi.org/project/pykwalify/ " -SLOT="0" LICENSE="MIT" +SLOT="0" KEYWORDS="amd64 ~arm arm64 ~riscv x86 ~amd64-linux ~x86-linux" RDEPEND=" @@ -33,4 +33,6 @@ distutils_enable_tests pytest PATCHES=( "${FILESDIR}"/${PN}-1.4.0-S.patch + # fix tests for >=dev-python/ruamel-yaml-1.18, see #923136 + "${FILESDIR}"/${PN}-1.8.0-ruamel-yaml-1.18.patch ) |