Hello community,

here is the log from the commit of package python-pytest-randomly for 
openSUSE:Factory checked in at 2019-06-03 18:57:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-randomly (Old)
 and      /work/SRC/openSUSE:Factory/.python-pytest-randomly.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pytest-randomly"

Mon Jun  3 18:57:02 2019 rev:4 rq:707093 version:3.0.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-pytest-randomly/python-pytest-randomly.changes
    2019-03-28 22:48:49.375053260 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-pytest-randomly.new.5148/python-pytest-randomly.changes
  2019-06-03 18:57:09.756388968 +0200
@@ -1,0 +2,6 @@
+Mon Jun  3 09:13:50 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update to 3.0.0:
+  * Handle CollectErrors and ImportErrors during collection when accessing 
item.module.
+
+-------------------------------------------------------------------

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

New:
----
  pytest-randomly-3.0.0.tar.gz

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

Other differences:
------------------
++++++ python-pytest-randomly.spec ++++++
--- /var/tmp/diff_new_pack.nYDoRf/_old  2019-06-03 18:57:10.428388719 +0200
+++ /var/tmp/diff_new_pack.nYDoRf/_new  2019-06-03 18:57:10.432388718 +0200
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-pytest-randomly
-Version:        2.1.1
+Version:        3.0.0
 Release:        0
 Summary:        Pytest plugin to randomly order tests and control random.seed
 License:        BSD-3-Clause
@@ -78,7 +78,7 @@
 
 %check
 export PYTHONDONTWRITEBYTECODE=true
-%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} 
py.test-%{$python_bin_suffix} -v
+%pytest
 
 %files %{python_files}
 %doc AUTHORS.rst README.rst

++++++ pytest-randomly-2.1.1.tar.gz -> pytest-randomly-3.0.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-randomly-2.1.1/HISTORY.rst 
new/pytest-randomly-3.0.0/HISTORY.rst
--- old/pytest-randomly-2.1.1/HISTORY.rst       2019-03-26 16:20:50.000000000 
+0100
+++ new/pytest-randomly-3.0.0/HISTORY.rst       2019-04-05 11:31:58.000000000 
+0200
@@ -8,6 +8,13 @@
 
 .. Insert new release notes below this line
 
+3.0.0 (2019-04-05)
+------------------
+
+* Update Python support to 3.5-3.7, as 3.4 has reached its end of life.
+* Handle ``CollectError``\s and ``ImportError``\s during collection when
+  accessing ``item.module``.
+
 2.1.1 (2019-03-26)
 ------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-randomly-2.1.1/PKG-INFO 
new/pytest-randomly-3.0.0/PKG-INFO
--- old/pytest-randomly-2.1.1/PKG-INFO  2019-03-26 16:21:11.000000000 +0100
+++ new/pytest-randomly-3.0.0/PKG-INFO  2019-04-05 11:32:22.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: pytest-randomly
-Version: 2.1.1
+Version: 3.0.0
 Summary: Pytest plugin to randomly order tests and control random.seed.
 Home-page: https://github.com/pytest-dev/pytest-randomly
 Author: Adam Johnson
@@ -74,7 +74,7 @@
         
             pip install pytest-randomly
         
-        Python 3.4+ supported.
+        Python 3.5-3.7 supported.
         
         Pytest will automatically find the plugin and use it when you run 
``pytest``.
         The output will start with an extra line that tells you the random 
seed that is
@@ -83,8 +83,9 @@
         .. code-block:: bash
         
             $ pytest
-            platform darwin -- Python 2.7.11, pytest-2.9.1, py-1.4.31, 
pluggy-0.3.1
-            Using --randomly-seed=1460130750
+            ...
+            platform darwin -- Python 3.7.2, pytest-4.3.1, py-1.8.0, 
pluggy-0.9.0
+            Using --randomly-seed=1553614239
             ...
         
         If the tests fail due to ordering or randomly created data, you can 
restart
@@ -132,6 +133,13 @@
         
         .. Insert new release notes below this line
         
+        3.0.0 (2019-04-05)
+        ------------------
+        
+        * Update Python support to 3.5-3.7, as 3.4 has reached its end of life.
+        * Handle ``CollectError``\s and ``ImportError``\s during collection 
when
+          accessing ``item.module``.
+        
         2.1.1 (2019-03-26)
         ------------------
         
@@ -203,7 +211,7 @@
 Classifier: License :: OSI Approved :: BSD License
 Classifier: Natural Language :: English
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.4
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
-Requires-Python: >=3.4
+Classifier: Programming Language :: Python :: 3.7
+Requires-Python: >=3.5
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-randomly-2.1.1/README.rst 
new/pytest-randomly-3.0.0/README.rst
--- old/pytest-randomly-2.1.1/README.rst        2019-03-08 17:51:57.000000000 
+0100
+++ new/pytest-randomly-3.0.0/README.rst        2019-03-26 21:10:58.000000000 
+0100
@@ -66,7 +66,7 @@
 
     pip install pytest-randomly
 
-Python 3.4+ supported.
+Python 3.5-3.7 supported.
 
 Pytest will automatically find the plugin and use it when you run ``pytest``.
 The output will start with an extra line that tells you the random seed that is
@@ -75,8 +75,9 @@
 .. code-block:: bash
 
     $ pytest
-    platform darwin -- Python 2.7.11, pytest-2.9.1, py-1.4.31, pluggy-0.3.1
-    Using --randomly-seed=1460130750
+    ...
+    platform darwin -- Python 3.7.2, pytest-4.3.1, py-1.8.0, pluggy-0.9.0
+    Using --randomly-seed=1553614239
     ...
 
 If the tests fail due to ordering or randomly created data, you can restart
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pytest-randomly-2.1.1/pytest_randomly.egg-info/PKG-INFO 
new/pytest-randomly-3.0.0/pytest_randomly.egg-info/PKG-INFO
--- old/pytest-randomly-2.1.1/pytest_randomly.egg-info/PKG-INFO 2019-03-26 
16:21:11.000000000 +0100
+++ new/pytest-randomly-3.0.0/pytest_randomly.egg-info/PKG-INFO 2019-04-05 
11:32:21.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: pytest-randomly
-Version: 2.1.1
+Version: 3.0.0
 Summary: Pytest plugin to randomly order tests and control random.seed.
 Home-page: https://github.com/pytest-dev/pytest-randomly
 Author: Adam Johnson
@@ -74,7 +74,7 @@
         
             pip install pytest-randomly
         
-        Python 3.4+ supported.
+        Python 3.5-3.7 supported.
         
         Pytest will automatically find the plugin and use it when you run 
``pytest``.
         The output will start with an extra line that tells you the random 
seed that is
@@ -83,8 +83,9 @@
         .. code-block:: bash
         
             $ pytest
-            platform darwin -- Python 2.7.11, pytest-2.9.1, py-1.4.31, 
pluggy-0.3.1
-            Using --randomly-seed=1460130750
+            ...
+            platform darwin -- Python 3.7.2, pytest-4.3.1, py-1.8.0, 
pluggy-0.9.0
+            Using --randomly-seed=1553614239
             ...
         
         If the tests fail due to ordering or randomly created data, you can 
restart
@@ -132,6 +133,13 @@
         
         .. Insert new release notes below this line
         
+        3.0.0 (2019-04-05)
+        ------------------
+        
+        * Update Python support to 3.5-3.7, as 3.4 has reached its end of life.
+        * Handle ``CollectError``\s and ``ImportError``\s during collection 
when
+          accessing ``item.module``.
+        
         2.1.1 (2019-03-26)
         ------------------
         
@@ -203,7 +211,7 @@
 Classifier: License :: OSI Approved :: BSD License
 Classifier: Natural Language :: English
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.4
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
-Requires-Python: >=3.4
+Classifier: Programming Language :: Python :: 3.7
+Requires-Python: >=3.5
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-randomly-2.1.1/pytest_randomly.py 
new/pytest-randomly-3.0.0/pytest_randomly.py
--- old/pytest-randomly-2.1.1/pytest_randomly.py        2019-03-26 
16:20:50.000000000 +0100
+++ new/pytest-randomly-3.0.0/pytest_randomly.py        2019-04-05 
11:31:55.000000000 +0200
@@ -2,6 +2,8 @@
 import random
 import time
 
+from pytest import Collector
+
 # factory-boy
 try:
     from factory.random import set_random_state as factory_set_random_state
@@ -29,7 +31,7 @@
     have_numpy = False
 
 
-__version__ = '2.1.1'
+__version__ = '3.0.0'
 
 
 default_seed = int(time.time())
@@ -135,10 +137,14 @@
     current_items = []
     for item in items:
 
+        try:
+            item_module = getattr(item, 'module', None)
+        except (ImportError, Collector.CollectError):
+            item_module = None
+
         if current_module is None:
-            current_module = getattr(item, 'module', None)
+            current_module = item_module
 
-        item_module = getattr(item, 'module', None)
         if item_module != current_module:
             module_items.append(shuffle_by_class(current_items))
             current_items = [item]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-randomly-2.1.1/setup.py 
new/pytest-randomly-3.0.0/setup.py
--- old/pytest-randomly-2.1.1/setup.py  2019-03-01 18:58:24.000000000 +0100
+++ new/pytest-randomly-3.0.0/setup.py  2019-03-26 21:10:58.000000000 +0100
@@ -32,7 +32,7 @@
     install_requires=[
         'pytest',
     ],
-    python_requires='>=3.4',
+    python_requires='>=3.5',
     license="BSD",
     zip_safe=False,
     keywords='pytest, random, randomize, randomise, randomly',
@@ -46,8 +46,8 @@
         'License :: OSI Approved :: BSD License',
         'Natural Language :: English',
         'Programming Language :: Python :: 3',
-        'Programming Language :: Python :: 3.4',
         'Programming Language :: Python :: 3.5',
         'Programming Language :: Python :: 3.6',
+        'Programming Language :: Python :: 3.7',
     ],
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-randomly-2.1.1/test_pytest_randomly.py 
new/pytest-randomly-3.0.0/test_pytest_randomly.py
--- old/pytest-randomly-2.1.1/test_pytest_randomly.py   2019-03-01 
22:57:57.000000000 +0100
+++ new/pytest-randomly-3.0.0/test_pytest_randomly.py   2019-04-05 
11:28:59.000000000 +0200
@@ -602,3 +602,17 @@
 
     out = ourtestdir.runpytest('--randomly-seed=1')
     out.assert_outcomes(passed=2)
+
+
+def test_failing_import(testdir):
+    """Test with pytest raising CollectError or ImportError.
+
+    This happens when trying to access item.module during
+    pytest_collection_modifyitems.
+    """
+    modcol = testdir.getmodulecol("import alksdjalskdjalkjals")
+    assert modcol.instance is None
+
+    modcol = testdir.getmodulecol("pytest_plugins='xasdlkj',")
+    with pytest.raises(ImportError):
+        modcol.obj


Reply via email to