Hello community,

here is the log from the commit of package python-pytest-randomly for 
openSUSE:Factory checked in at 2019-03-28 22:48:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-randomly (Old)
 and      /work/SRC/openSUSE:Factory/.python-pytest-randomly.new.25356 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pytest-randomly"

Thu Mar 28 22:48:43 2019 rev:3 rq:689139 version:2.1.1

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-pytest-randomly/python-pytest-randomly.changes
    2019-02-25 17:51:15.146756551 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-pytest-randomly.new.25356/python-pytest-randomly.changes
 2019-03-28 22:48:49.375053260 +0100
@@ -1,0 +2,16 @@
+Tue Mar 26 10:08:08 UTC 2019 - John Vandenberg <[email protected]>
+
+- Downgrade Faker dependency to Recommends
+- Add Suggests for numpy
+- Add tests-restore-python2.7.patch to re-add support for Python 2.7
+- Use PYTHONDONTWRITEBYTECODE=true to fix file-contains-buildroot
+  on Leap 42.3
+- Update to v2.1.1
+  * Fix including tests in sdist after re-arrangement in 2.1.0
+- from v2.1.0
+  * Add the option --randomly-seed=last to reuse the last used value
+    for the seed
+- from v2.0.0
+  * Drop Python 2 support, only Python 3.4+ is supported now
+
+-------------------------------------------------------------------
@@ -9 +25 @@
-- Initial version
+- Initial version for v1.2.3

Old:
----
  pytest-randomly-1.2.3.tar.gz

New:
----
  pytest-randomly-2.1.1.tar.gz
  tests-restore-python2.7.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-pytest-randomly.spec ++++++
--- /var/tmp/diff_new_pack.UQIsFw/_old  2019-03-28 22:48:51.251052920 +0100
+++ /var/tmp/diff_new_pack.UQIsFw/_new  2019-03-28 22:48:51.287052913 +0100
@@ -18,24 +18,28 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-pytest-randomly
-Version:        1.2.3
+Version:        2.1.1
 Release:        0
 Summary:        Pytest plugin to randomly order tests and control random.seed
 License:        BSD-3-Clause
 Group:          Development/Languages/Python
 URL:            https://github.com/adamchainz/pytest-randomly
 Source:         
https://files.pythonhosted.org/packages/source/p/pytest-randomly/pytest-randomly-%{version}.tar.gz
+# Reverse of https://github.com/pytest-dev/pytest-randomly/commit/7ca48ad.patch
+Patch0:         tests-restore-python2.7.patch
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
-Requires:       python-Faker
 Requires:       python-pytest
+Recommends:     python-Faker
+Suggests:       python-numpy
 BuildArch:      noarch
 # SECTION test requirements
 BuildRequires:  %{python_module Faker}
 BuildRequires:  %{python_module factory_boy}
 BuildRequires:  %{python_module numpy}
 BuildRequires:  %{python_module pytest}
+BuildRequires:  %{python_module six}
 # /SECTION
 %python_subpackages
 
@@ -61,6 +65,9 @@
 
 %prep
 %setup -q -n pytest-randomly-%{version}
+%patch0 -p1
+# Disregard Python 3.4+ restriction
+sed -i '/python_requires/d' setup.py
 
 %build
 %python_build
@@ -70,6 +77,7 @@
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
 %check
+export PYTHONDONTWRITEBYTECODE=true
 %python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} 
py.test-%{$python_bin_suffix} -v
 
 %files %{python_files}

++++++ pytest-randomly-1.2.3.tar.gz -> pytest-randomly-2.1.1.tar.gz ++++++
++++ 1796 lines of diff (skipped)

++++++ tests-restore-python2.7.patch ++++++
--- a/test_pytest_randomly.py
+++ b/test_pytest_randomly.py
@@ -1,6 +1,13 @@
+# -*- encoding:utf-8 -*-
+from __future__ import absolute_import, division, print_function, 
unicode_literals
+
 import pytest
+import six
 
-pytest_plugins = ['pytester']
+if six.PY3:
+    pytest_plugins = ['pytester']
+else:
+    pytest_plugins = [b'pytester']
 
 
 @pytest.fixture
@@ -221,7 +228,11 @@
         test_c=code,
         test_d=code,
     )
-    args = ['-v', '--randomly-seed=15']
+    args = ['-v']
+    if six.PY3:  # Python 3 random changes
+        args.append('--randomly-seed=15')
+    else:
+        args.append('--randomly-seed=41')
 
     out = ourtestdir.runpytest(*args)
 
@@ -245,7 +256,11 @@
         test_c=code,
         test_d=code,
     )
-    args = ['-v', '--randomly-seed=15']
+    args = ['-v']
+    if six.PY3:  # Python 3 random changes
+        args.append('--randomly-seed=15')
+    else:
+        args.append('--randomly-seed=41')
 
     args.append('--randomly-dont-reset-seed')
     out = ourtestdir.runpytest(*args)
@@ -285,7 +300,11 @@
                 pass
         """
     )
-    args = ['-v', '--randomly-seed=15']
+    args = ['-v']
+    if six.PY3:  # Python 3 random changes
+        args.append('--randomly-seed=15')
+    else:
+        args.append('--randomly-seed=41')
 
     out = ourtestdir.runpytest(*args)
 
@@ -317,7 +336,11 @@
                 pass
         """
     )
-    args = ['-v', '--randomly-seed=15']
+    args = ['-v']
+    if six.PY3:  # Python 3 random changes
+        args.append('--randomly-seed=15')
+    else:
+        args.append('--randomly-seed=41')
 
     out = ourtestdir.runpytest(*args)
 
@@ -346,7 +369,11 @@
             pass
         """
     )
-    args = ['-v', '--randomly-seed=15']
+    args = ['-v']
+    if six.PY3:  # Python 3 random changes
+        args.append('--randomly-seed=15')
+    else:
+        args.append('--randomly-seed=41')
 
     out = ourtestdir.runpytest(*args)
 
@@ -380,7 +407,11 @@
             pass
         """
     )
-    args = ['-v', '--randomly-seed=15']
+    args = ['-v']
+    if six.PY3:  # Python 3 random changes
+        args.append('--randomly-seed=15')
+    else:
+        args.append('--randomly-seed=41')
 
     out = ourtestdir.runpytest(*args)
 
@@ -411,7 +442,11 @@
             return 9002
         """
     )
-    args = ['-v', '--doctest-modules', '--randomly-seed=5']
+    args = ['-v', '--doctest-modules']
+    if six.PY3:  # Python 3 random changes
+        args.append('--randomly-seed=5')
+    else:
+        args.append('--randomly-seed=2')
 
     out = ourtestdir.runpytest(*args)
     out.assert_outcomes(passed=2)
@@ -474,7 +509,11 @@
         >>> 2 - 2
         0
         ''')
-    args = ['-v', '--randomly-seed=1']
+    args = ['-v']
+    if six.PY3:  # Python 3 random changes
+        args.append('--randomly-seed=1')
+    else:
+        args.append('--randomly-seed=4')
 
     out = ourtestdir.runpytest(*args)
     out.assert_outcomes(passed=2)

Reply via email to