Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-pytest-xdist for 
openSUSE:Factory checked in at 2023-12-07 19:08:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-xdist (Old)
 and      /work/SRC/openSUSE:Factory/.python-pytest-xdist.new.25432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pytest-xdist"

Thu Dec  7 19:08:48 2023 rev:25 rq:1129240 version:3.5.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pytest-xdist/python-pytest-xdist.changes  
2023-11-19 20:14:19.099179665 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-pytest-xdist.new.25432/python-pytest-xdist.changes
       2023-12-07 19:08:52.411867769 +0100
@@ -1,0 +2,10 @@
+Mon Nov 27 20:03:15 UTC 2023 - Dirk Müller <[email protected]>
+
+- update to 3.5.0:
+  * ``--dist=loadscope`` now sorts scopes by number of tests to
+    assign largest scopes early -- in many cases this should
+    improve overall test session running time, as there is less
+    chance of a large scope being left to be processed near the
+    end of the session, leaving other workers idle.
+
+-------------------------------------------------------------------

Old:
----
  pytest-xdist-3.4.0.tar.gz

New:
----
  pytest-xdist-3.5.0.tar.gz

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

Other differences:
------------------
++++++ python-pytest-xdist.spec ++++++
--- /var/tmp/diff_new_pack.KAQJ3n/_old  2023-12-07 19:08:54.083929460 +0100
+++ /var/tmp/diff_new_pack.KAQJ3n/_new  2023-12-07 19:08:54.087929607 +0100
@@ -16,10 +16,9 @@
 #
 
 
-%define skip_python2 1
 %{?sle15_python_module_pythons}
 Name:           python-pytest-xdist
-Version:        3.4.0
+Version:        3.5.0
 Release:        0
 Summary:        Distributed testing and loop-on-failing for py.test
 License:        MIT

++++++ pytest-xdist-3.4.0.tar.gz -> pytest-xdist-3.5.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-xdist-3.4.0/CHANGELOG.rst 
new/pytest-xdist-3.5.0/CHANGELOG.rst
--- old/pytest-xdist-3.4.0/CHANGELOG.rst        2023-11-11 16:31:50.000000000 
+0100
+++ new/pytest-xdist-3.5.0/CHANGELOG.rst        2023-11-21 15:38:24.000000000 
+0100
@@ -1,3 +1,12 @@
+pytest-xdist 3.5.0 (2023-11-21)
+===============================
+
+Features
+--------
+
+- `#632 <https://github.com/pytest-dev/pytest-xdist/issues/632>`_: 
``--dist=loadscope`` now sorts scopes by number of tests to assign largest 
scopes early -- in many cases this should improve overall test session running 
time, as there is less chance of a large scope being left to be processed near 
the end of the session, leaving other workers idle.
+
+
 pytest-xdist 3.4.0 (2023-11-11)
 ===============================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-xdist-3.4.0/PKG-INFO 
new/pytest-xdist-3.5.0/PKG-INFO
--- old/pytest-xdist-3.4.0/PKG-INFO     2023-11-11 16:32:13.699526300 +0100
+++ new/pytest-xdist-3.5.0/PKG-INFO     2023-11-21 15:38:45.306871700 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: pytest-xdist
-Version: 3.4.0
+Version: 3.5.0
 Summary: pytest xdist plugin for distributed testing, most importantly across 
multiple CPUs
 Home-page: https://github.com/pytest-dev/pytest-xdist
 Author: holger krekel and contributors
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pytest-xdist-3.4.0/src/pytest_xdist.egg-info/PKG-INFO 
new/pytest-xdist-3.5.0/src/pytest_xdist.egg-info/PKG-INFO
--- old/pytest-xdist-3.4.0/src/pytest_xdist.egg-info/PKG-INFO   2023-11-11 
16:32:13.000000000 +0100
+++ new/pytest-xdist-3.5.0/src/pytest_xdist.egg-info/PKG-INFO   2023-11-21 
15:38:45.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: pytest-xdist
-Version: 3.4.0
+Version: 3.5.0
 Summary: pytest xdist plugin for distributed testing, most importantly across 
multiple CPUs
 Home-page: https://github.com/pytest-dev/pytest-xdist
 Author: holger krekel and contributors
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-xdist-3.4.0/src/xdist/_version.py 
new/pytest-xdist-3.5.0/src/xdist/_version.py
--- old/pytest-xdist-3.4.0/src/xdist/_version.py        2023-11-11 
16:32:13.000000000 +0100
+++ new/pytest-xdist-3.5.0/src/xdist/_version.py        2023-11-21 
15:38:45.000000000 +0100
@@ -12,5 +12,5 @@
 __version_tuple__: VERSION_TUPLE
 version_tuple: VERSION_TUPLE
 
-__version__ = version = '3.4.0'
-__version_tuple__ = version_tuple = (3, 4, 0)
+__version__ = version = '3.5.0'
+__version_tuple__ = version_tuple = (3, 5, 0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-xdist-3.4.0/src/xdist/scheduler/loadscope.py 
new/pytest-xdist-3.5.0/src/xdist/scheduler/loadscope.py
--- old/pytest-xdist-3.4.0/src/xdist/scheduler/loadscope.py     2023-11-11 
16:31:50.000000000 +0100
+++ new/pytest-xdist-3.5.0/src/xdist/scheduler/loadscope.py     2023-11-21 
15:38:24.000000000 +0100
@@ -350,11 +350,18 @@
             return
 
         # Determine chunks of work (scopes)
+        unsorted_workqueue = OrderedDict()
         for nodeid in self.collection:
             scope = self._split_scope(nodeid)
-            work_unit = self.workqueue.setdefault(scope, default=OrderedDict())
+            work_unit = unsorted_workqueue.setdefault(scope, 
default=OrderedDict())
             work_unit[nodeid] = False
 
+        # Insert tests scopes into work queue ordered by number of tests.
+        for scope, nodeids in sorted(
+            unsorted_workqueue.items(), key=lambda item: -len(item[1])
+        ):
+            self.workqueue[scope] = nodeids
+
         # Avoid having more workers than work
         extra_nodes = len(self.nodes) - len(self.workqueue)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-xdist-3.4.0/testing/acceptance_test.py 
new/pytest-xdist-3.5.0/testing/acceptance_test.py
--- old/pytest-xdist-3.4.0/testing/acceptance_test.py   2023-11-11 
16:31:50.000000000 +0100
+++ new/pytest-xdist-3.5.0/testing/acceptance_test.py   2023-11-21 
15:38:24.000000000 +0100
@@ -1232,6 +1232,22 @@
             "test_a.py::TestB", result.outlines
         ) in ({"gw0": 10}, {"gw1": 10})
 
+    def test_workqueue_ordered_by_size(self, pytester: pytest.Pytester) -> 
None:
+        test_file = """
+            import pytest
+            @pytest.mark.parametrize('i', range({}))
+            def test(i):
+                pass
+        """
+        pytester.makepyfile(test_a=test_file.format(10), 
test_b=test_file.format(20))
+        result = pytester.runpytest("-n2", "--dist=loadscope", "-v")
+        assert get_workers_and_test_count_by_prefix(
+            "test_a.py::test", result.outlines
+        ) == {"gw1": 10}
+        assert get_workers_and_test_count_by_prefix(
+            "test_b.py::test", result.outlines
+        ) == {"gw0": 20}
+
     def test_module_single_start(self, pytester: pytest.Pytester) -> None:
         """Fix test suite never finishing in case all workers start with a 
single test (#277)."""
         test_file1 = """

Reply via email to