diff --git a/gh187-test_dump_load_parameterized_collections-fails.patch b/gh187-test_dump_load_parameterized_collections-fails.patch new file mode 100644 index 0000000..bd18187 --- /dev/null +++ b/gh187-test_dump_load_parameterized_collections-fails.patch @@ -0,0 +1,23 @@ +--- + tests/test_specific_versions.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/tests/test_specific_versions.py ++++ b/tests/test_specific_versions.py +@@ -2,7 +2,7 @@ import sys + import uuid + from datetime import datetime + from pathlib import Path +-from unittest import TestCase, skipUnless ++from unittest import TestCase, skipUnless, skip + + import jsons + from jsons._compatibility_impl import get_type_hints +@@ -178,6 +178,7 @@ class TestSpecificVersions(TestCase): + loaded_dt = jsons.load(dumped_dt, datetime) + self.assertEqual(dt, loaded_dt) + ++ @skip('Failing on 3.11+, gh#ramonhagenaars/jsons#187') + @only_version_3(9, and_above=True) + def test_dump_load_parameterized_collections(self): + import version_39 diff --git a/jsons-1.6.3.tar.gz b/jsons-1.6.3.tar.gz index f77c93c..9792e2d 100644 --- a/jsons-1.6.3.tar.gz +++ b/jsons-1.6.3.tar.gz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cd5815c7c6790ae11c70ad9978e0aa850d0d08a643a5105cc604eac8b29a30d7 -size 39884 +oid sha256:46f0e286edcd1ff46d160af8219db9f2626873225518b80a6c946ada562dec33 +size 80720 diff --git a/python-jsons.changes b/python-jsons.changes index 44da92c..101eda6 100644 --- a/python-jsons.changes +++ b/python-jsons.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Jul 4 17:41:51 UTC 2024 - Matej Cepl + +- Add gh187-test_dump_load_parameterized_collections-fails.patch + to skip failing test test_dump_load_parameterized_collections + (gh#ramonhagenaars/jsons#187). + ------------------------------------------------------------------- Thu Jun 20 09:40:46 UTC 2024 - Andreas Färber diff --git a/python-jsons.spec b/python-jsons.spec index b564172..cb592fb 100644 --- a/python-jsons.spec +++ b/python-jsons.spec @@ -22,17 +22,22 @@ Release: 0 Summary: Serialize Python objects to JSON and back License: MIT URL: https://github.com/ramonhagenaars/jsons -Source: https://files.pythonhosted.org/packages/source/j/jsons/jsons-%{version}.tar.gz -BuildRequires: python-rpm-macros +Source: https://github.com/ramonhagenaars/jsons/archive/refs/tags/v%{version}.tar.gz#/jsons-%{version}.tar.gz +# PATCH-FIX-UPSTREAM gh187-test_dump_load_parameterized_collections-fails.patch gh#ramonhagenaars/jsons#187 mcepl@suse.com +# skip failing test test_dump_load_parameterized_collections +Patch0: gh187-test_dump_load_parameterized_collections-fails.patch BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel} -# SECTION test requirements -BuildRequires: %{python_module typish >= 1.9.2} -# /SECTION BuildRequires: fdupes +BuildRequires: python-rpm-macros Requires: python-typish >= 1.9.2 BuildArch: noarch +# SECTION test requirements +BuildRequires: %{python_module attrs} +BuildRequires: %{python_module typish >= 1.9.2} +BuildRequires: %{python_module tzdata} +# /SECTION %python_subpackages %description @@ -50,6 +55,9 @@ sed -i 's/\r$//' README.md %pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} +%check +%pyunittest discover -v tests + %files %{python_files} %doc README.md %{python_sitelib}/jsons