From fc59b335993a7ed257ef9bc464b06901f572e6cd Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Aug 02 2019 10:31:45 +0000 Subject: Fix Python 3.8 compatibility --- diff --git a/fix-py38-compat.patch b/fix-py38-compat.patch new file mode 100644 index 0000000..19f0943 --- /dev/null +++ b/fix-py38-compat.patch @@ -0,0 +1,14 @@ +diff --git a/test/test_process_code.py b/test/test_process_code.py +index 5f1564e..49d3700 100644 +--- a/test/test_process_code.py ++++ b/test/test_process_code.py +@@ -50,8 +50,7 @@ class TestReadSrc: + + def test_module_with_1250(self): + code_repr = Module(None, 'test/samples/print1250r.py').blocks[0].code +- assert "Str('\\xc5\\xa1')" in code_repr or "Str('š')" in Module(None, 'test/samples/print1250r.py').blocks[ +- 0].code ++ assert "Str('\\xc5\\xa1')" in code_repr or "Str('š')" in code_repr or "Constant('š', None)" in code_repr + + + class TestSourceIntoBlocks(object): diff --git a/python-pytest-testmon.spec b/python-pytest-testmon.spec index aa6d876..4f33f3d 100644 --- a/python-pytest-testmon.spec +++ b/python-pytest-testmon.spec @@ -2,13 +2,18 @@ Name: python-%{pypi_name} Version: 0.9.16 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A py.test plug-in which executes only tests affected by recent changes License: MIT URL: http://testmon.org/ Source0: %pypi_source BuildArch: noarch + +# Fix Python 3.8 compatibility +# https://github.com/tarpas/pytest-testmon/commit/4c47a28d355842ec1f5e97c1f6d2253fae28909f +Patch0: fix-py38-compat.patch + BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pytest @@ -34,7 +39,7 @@ executes only tests affected by recent changes. This a Python 3 version of the package. %prep -%autosetup -n %{pypi_name}-%{version} +%autosetup -n %{pypi_name}-%{version} -p1 %build %py3_build @@ -52,6 +57,9 @@ PYTHONPATH=$PWD py.test-3 %{python3_sitelib}/pytest_testmon-%{version}-py?.?.egg-info %changelog +* Fri Aug 02 2019 Charalampos Stratakis - 0.9.16-4 +- Fix Python 3.8 compatibility + * Fri Jul 26 2019 Fedora Release Engineering - 0.9.16-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild