diff --git a/parse_type-0.4.2.tar.gz b/parse_type-0.4.2.tar.gz deleted file mode 100644 index 1cbae9a..0000000 --- a/parse_type-0.4.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f596bdc75d3dd93036fbfe3d04127da9f6df0c26c36e01e76da85adef4336b3c -size 264473 diff --git a/parse_type-0.5.2.tar.gz b/parse_type-0.5.2.tar.gz new file mode 100644 index 0000000..d233a44 --- /dev/null +++ b/parse_type-0.5.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7f690b18d35048c15438d6d0571f9045cffbec5907e0b1ccf006f889e3a38c0b +size 272082 diff --git a/python-parse_type.changes b/python-parse_type.changes index 5b34d9e..d9d0d75 100644 --- a/python-parse_type.changes +++ b/python-parse_type.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Aug 27 13:57:32 UTC 2019 - Marketa Calabkova + +- update to version 0.5.2 + * requires parse >= 1.12.0 + * test fixes +- shortened patch testsuite-fix.patch + ------------------------------------------------------------------- Thu Feb 14 00:56:44 UTC 2019 - Jan Engelhardt diff --git a/python-parse_type.spec b/python-parse_type.spec index 7d834e8..938e2bb 100644 --- a/python-parse_type.spec +++ b/python-parse_type.spec @@ -18,35 +18,34 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-parse_type -Version: 0.4.2 +Version: 0.5.2 Release: 0 Summary: Extension to the parse module License: BSD-3-Clause Group: Development/Languages/Python -Url: https://github.com/jenisys/parse_type +URL: https://github.com/jenisys/parse_type Source: https://files.pythonhosted.org/packages/source/p/parse_type/parse_type-%{version}.tar.gz Patch0: testsuite-fix.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} +BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: python2-enum34 +Requires: python-parse >= 1.12.0 +Requires: python-six >= 1.11 +Suggests: python-coverage +Suggests: python-enum34 +Suggests: python-ordereddict +Suggests: python-pytest >= 3.0 +Suggests: python-pytest-cov +Suggests: python-sphinx >= 1.2 +Suggests: python-tox +BuildArch: noarch # SECTION test requirements -BuildRequires: %{python_module parse >= 1.11} +BuildRequires: %{python_module parse >= 1.12.0} BuildRequires: %{python_module pytest >= 3.0} BuildRequires: %{python_module six >= 1.11} # /SECTION -BuildRequires: fdupes -Requires: python-parse >= 1.11 -Requires: python-six >= 1.11 -Suggests: python-enum34 -Suggests: python-ordereddict -Suggests: python-coverage -Suggests: python-pytest >= 3.0 -Suggests: python-pytest-cov -Suggests: python-tox -Suggests: python-sphinx >= 1.2 -BuildArch: noarch - %python_subpackages %description @@ -63,7 +62,7 @@ the following features: %prep %setup -q -n parse_type-%{version} -%autopatch -p1 +%patch0 -p1 # Remove bundled parse.py rm -fv parse_type/parse.py @@ -76,7 +75,7 @@ rm -fv parse_type/parse.py %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -%python_expand py.test-%{$python_bin_suffix} -v -k 'not (test_parse_with_many0_and_unnamed_fields or test_parse_with_many_and_unnamed_fields or test_parse_with_optional_and_unnamed_fields or test_pm_overflow_issue16)' +%pytest -k 'not (test_parse_with_many0_and_unnamed_fields or test_parse_with_many_and_unnamed_fields or test_parse_with_optional_and_unnamed_fields or test_pm_overflow_issue16)' %files %{python_files} %license LICENSE diff --git a/testsuite-fix.patch b/testsuite-fix.patch index 892cfb7..eb14e0d 100644 --- a/testsuite-fix.patch +++ b/testsuite-fix.patch @@ -1,61 +1,5 @@ ---- a/tests/test_cardinality.py -+++ b/tests/test_cardinality.py -@@ -5,11 +5,12 @@ Test suite to test the :mod:`parse_type. - """ - - from __future__ import absolute_import --from .parse_type_test import ParseTypeTestCase, parse_number --from parse_type import Cardinality, TypeBuilder, build_type_dict --from parse_type.parse import Parser as ParserExt - import parse - import unittest -+from parse import Parser as ParserExt -+ -+from .parse_type_test import ParseTypeTestCase, parse_number -+from parse_type import Cardinality, TypeBuilder, build_type_dict - - # ----------------------------------------------------------------------------- - # TEST CASE: TestCardinality ---- a/tests/test_builder.py -+++ b/tests/test_builder.py -@@ -495,35 +495,6 @@ Person: Alice - self.assertIsNotNone(result) - self.assertEqual(result.fixed, tuple(expected)) - -- def test_parse_with_many_unnamed_fields_with_variants(self): -- from parse_type.parse import Parser as Parser2 -- type_dict = build_type_dict(self.TYPE_CONVERTERS) -- schema = """\ --Number: {:Number} --YesNo: {:YesNo} --Color: {:Color} --Person: {:PersonChoice} --Variant2: {:Color_or_PersonChoice} --Variant1: {:Number_or_YesNo} --""" -- # -- OMIT: XFAIL, due to group_index delta counting => Parser problem. -- parser = Parser2(schema, type_dict) -- -- text = """\ --Number: 12 --YesNo: yes --Color: red --Person: Alice --Variant2: Bob --Variant1: 42 --""" -- expected = [ 12, True, Color.red, "Alice", "Bob", 42 ] -- -- result = parser.parse(text) -- self.assertIsNotNone(result) -- self.assertEqual(result.fixed, tuple(expected)) -- -- - # ----------------------------------------------------------------------------- - # MAIN: - # ----------------------------------------------------------------------------- ---- a/tests/test_parse_type_parse.py -+++ b/tests/test_parse_type_parse.py +--- a/tests/test_parse.py ++++ b/tests/test_parse.py @@ -22,14 +22,7 @@ from datetime import datetime, time import re