diff --git a/.python-yaql.metadata b/.python-yaql.metadata index c130418..70c3806 100644 --- a/.python-yaql.metadata +++ b/.python-yaql.metadata @@ -1 +1 @@ -21ccfe7c1fdb1ee51be9811831b94cdb0f59b1de SOURCES/yaql-1.1.3.tar.gz +1b90a2bc17dd8d55d5a75757b5bf116b5d83468a SOURCES/yaql-2.0.0.tar.gz diff --git a/SOURCES/0001-Replace-assertItemsEqual-with-assertCountEqual.patch b/SOURCES/0001-Replace-assertItemsEqual-with-assertCountEqual.patch new file mode 100644 index 0000000..28d0b82 --- /dev/null +++ b/SOURCES/0001-Replace-assertItemsEqual-with-assertCountEqual.patch @@ -0,0 +1,37 @@ +From b4c39c58746334912f9a89941f967e296f1e0b5b Mon Sep 17 00:00:00 2001 +From: Dirk Mueller +Date: Tue, 16 Feb 2021 10:29:21 +0100 +Subject: [PATCH] Replace assertItemsEqual with assertCountEqual + +assertItemsEqual was removed from Python's unittest.TestCase in +Python 3.3 [1][2]. We have been able to use them since then, because +testtools required unittest2, which still included it. With testtools +removing Python 2.7 support [3][4], we will lose support for +assertItemsEqual, so we should switch to use assertCountEqual. + +[1] - https://bugs.python.org/issue17866 +[2] - https://hg.python.org/cpython/rev/d9921cb6e3cd +[3] - testing-cabal/testtools#286 +[4] - testing-cabal/testtools#277 + +Change-Id: I6ebd93aa093caad6f2d3db6e43beb8bc8d9cedb7 +--- + yaql/tests/test_strings.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/yaql/tests/test_strings.py b/yaql/tests/test_strings.py +index 3e51189..4af8812 100644 +--- a/yaql/tests/test_strings.py ++++ b/yaql/tests/test_strings.py +@@ -174,7 +174,7 @@ class TestStrings(yaql.tests.TestCase): + self.assertEqual(['a', 'b', 'c'], self.eval('abc.toCharArray()')) + + def test_characters(self): +- self.assertItemsEqual( ++ self.assertCountEqual( + ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], + self.eval('characters(octdigits => true, digits => true)')) + +-- +2.31.1 + diff --git a/SPECS/python-yaql.spec b/SPECS/python-yaql.spec index 8b43621..1c7edc7 100644 --- a/SPECS/python-yaql.spec +++ b/SPECS/python-yaql.spec @@ -5,13 +5,14 @@ %global with_docs 0 Name: python-%{pypi_name} -Version: 1.1.3 -Release: 16%{?dist} +Version: 2.0.0 +Release: 2%{?dist} Summary: Yet Another Query Language License: ASL 2.0 URL: https://pypi.python.org/pypi/%{pypi_name} Source0: https://tarballs.openstack.org/%{pypi_name}/%{pypi_name}-%{version}.tar.gz +Patch0001: 0001-Replace-assertItemsEqual-with-assertCountEqual.patch BuildArch: noarch @@ -28,6 +29,9 @@ BuildRequires: python3-tools BuildRequires: python3-pbr BuildRequires: python3-sphinx BuildRequires: python3-oslo-sphinx +BuildRequires: python3-testtools +BuildRequires: python3-ply +BuildRequires: python3-dateutil Requires: python3-six Requires: python3-pbr @@ -49,7 +53,7 @@ Documentation for YAQL library %prep -%autosetup -n %{pypi_name}-%{version} +%autosetup -n %{pypi_name}-%{version} -p1 # Remove bundled egg-info rm -rf %{pypi_name}.egg-info # Let RPM handle the dependencies @@ -57,7 +61,7 @@ rm -f test-requirements.txt requirements.txt rm -rf %{py3dir} cp -a . %{py3dir} -2to3 --write --nobackups %{py3dir} +2to3 -p --write --nobackups %{py3dir} %build pushd %{py3dir} @@ -65,7 +69,7 @@ pushd %{py3dir} popd %if 0%{?with_docs} -# generate html docs +# generate html docs sphinx-build-3 doc/source html # remove the sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} @@ -84,11 +88,13 @@ for i in %{pypi_name}-{3,%{?python3_version}}; do done popd +%check +%{python3} -W ignore::ResourceWarning setup.py test # Delete tests rm -fr %{buildroot}%{python3_sitelib}/yaql/tests - -%files -n python3-%{pypi_name} + +%files -n python3-%{pypi_name} %license LICENSE %doc doc/source/readme.rst README.rst %{_bindir}/python3-%{pypi_name} @@ -104,6 +110,23 @@ rm -fr %{buildroot}%{python3_sitelib}/yaql/tests %endif %changelog +* Tue Oct 12 2021 Joel Capitao - 2.0.0-2 +- Replace remaining asserItemsEqual with asserCountEqual + +* Mon Jul 26 2021 Joel Capitao - 2.0.0-1 +- Update to latest release (#1981310) + +* Fri Jul 23 2021 Fedora Release Engineering - 1.1.3-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Wed Jun 16 2021 Joel Capitao - 1.1.3-18 +- Switch to collections.abc +- Replace asserItemsEqual with asserCountEqual +- Enable tests + +* Fri Jun 04 2021 Python Maint - 1.1.3-17 +- Rebuilt for Python 3.10 + * Wed Jan 27 2021 Fedora Release Engineering - 1.1.3-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild