Hello community,

here is the log from the commit of package python-pytest-services for 
openSUSE:Factory checked in at 2020-06-30 21:54:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-services (Old)
 and      /work/SRC/openSUSE:Factory/.python-pytest-services.new.3060 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pytest-services"

Tue Jun 30 21:54:34 2020 rev:5 rq:817715 version:2.1.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-pytest-services/python-pytest-services.changes
    2020-03-27 00:22:38.056175864 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-pytest-services.new.3060/python-pytest-services.changes
  2020-06-30 21:54:36.974415581 +0200
@@ -1,0 +2,7 @@
+Mon Jun 29 12:05:26 UTC 2020 - Marketa Calabkova <mcalabk...@suse.com>
+
+- Update to version 2.1.0
+  * #34: Deprecated slave_id fixture in favor of worker_id,
+    for compatibility with pytest-xdist 2.
+ 
+-------------------------------------------------------------------

Old:
----
  2.0.1.tar.gz

New:
----
  2.1.0.tar.gz

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

Other differences:
------------------
++++++ python-pytest-services.spec ++++++
--- /var/tmp/diff_new_pack.UyJrum/_old  2020-06-30 21:54:37.650417673 +0200
+++ /var/tmp/diff_new_pack.UyJrum/_new  2020-06-30 21:54:37.654417685 +0200
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %bcond_without python2
 Name:           python-pytest-services
-Version:        2.0.1
+Version:        2.1.0
 Release:        0
 Summary:        Services plugin for pytest testing framework
 License:        MIT

++++++ 2.0.1.tar.gz -> 2.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-services-2.0.1/AUTHORS.rst 
new/pytest-services-2.1.0/AUTHORS.rst
--- old/pytest-services-2.0.1/AUTHORS.rst       2019-11-12 22:04:01.000000000 
+0100
+++ new/pytest-services-2.1.0/AUTHORS.rst       2020-06-17 00:45:26.000000000 
+0200
@@ -11,3 +11,4 @@
 * `Jason R. Coombs <jar...@jaraco.com>`_
 * `Joep van Dijken <joepvandij...@github.com>`_
 * `Oleg Pidsadnyi <oleg.pidsad...@gmail.com>`_
+* `Zac Hatfield-Dodds <z...@zhd.dev>`_
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-services-2.0.1/CHANGES.rst 
new/pytest-services-2.1.0/CHANGES.rst
--- old/pytest-services-2.0.1/CHANGES.rst       2019-11-12 22:04:01.000000000 
+0100
+++ new/pytest-services-2.1.0/CHANGES.rst       2020-06-17 00:45:26.000000000 
+0200
@@ -1,6 +1,12 @@
 Changelog
 =========
 
+2.1.0
+-----
+
+- #34: Deprecated ``slave_id`` fixture in favor of ``worker_id``,
+  for compatibility with ``pytest-xdist`` 2.
+
 2.0.1
 -----
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-services-2.0.1/README.rst 
new/pytest-services-2.1.0/README.rst
--- old/pytest-services-2.0.1/README.rst        2019-11-12 22:04:01.000000000 
+0100
+++ new/pytest-services-2.1.0/README.rst        2020-06-17 00:45:26.000000000 
+0200
@@ -48,9 +48,10 @@
 Infrastructure fixtures
 ***********************
 
-* slave_id
-    Id of the slave if tests are run using pytest-xdist_. It is set to `local` 
if tests are not run using
+* worker_id
+    Id of the worker if tests are run using pytest-xdist_. It is set to 
`local` if tests are not run using
     pytest-xdist_ (with `--dist` command line option set to `load`).
+    Has a deprecated alias ``slave_id`` which will be removed in a future 
version.
 * session_id
     Test session id. Globally unique, and of course also guaranteed to be 
different for potentially multiple test
     sessions running on same test node via pytest-xdist_.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-services-2.0.1/pytest_services/__init__.py 
new/pytest-services-2.1.0/pytest_services/__init__.py
--- old/pytest-services-2.0.1/pytest_services/__init__.py       2019-11-12 
22:04:01.000000000 +0100
+++ new/pytest-services-2.1.0/pytest_services/__init__.py       2020-06-17 
00:45:26.000000000 +0200
@@ -1,2 +1,2 @@
 """pytest-services package."""
-__version__ = '2.0.1'
+__version__ = '2.1.0'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-services-2.0.1/pytest_services/log.py 
new/pytest-services-2.1.0/pytest_services/log.py
--- old/pytest-services-2.0.1/pytest_services/log.py    2019-11-12 
22:04:01.000000000 +0100
+++ new/pytest-services-2.1.0/pytest_services/log.py    2020-06-17 
00:45:26.000000000 +0200
@@ -8,8 +8,8 @@
 
 
 @pytest.fixture(scope='session')
-def services_log(slave_id):
-    """A services_logger with the slave id."""
+def services_log(worker_id):
+    """A services_logger with the worker id."""
     handler = None
     for kwargs in (dict(socktype=socket.SOCK_RAW), 
dict(socktype=socket.SOCK_STREAM), dict()):
         try:
@@ -18,7 +18,7 @@
             break
         except (IOError, TypeError):
             pass
-    logger = logging.getLogger('[{slave_id}] {name}'.format(name=__name__, 
slave_id=slave_id))
+    logger = logging.getLogger('[{worker_id}] {name}'.format(name=__name__, 
worker_id=worker_id))
     logger.setLevel(logging.DEBUG)
     if handler and workaround_issue_20(handler):
         logger.propagate = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-services-2.0.1/pytest_services/service.py 
new/pytest-services-2.1.0/pytest_services/service.py
--- old/pytest-services-2.0.1/pytest_services/service.py        2019-11-12 
22:04:01.000000000 +0100
+++ new/pytest-services-2.1.0/pytest_services/service.py        2020-06-17 
00:45:26.000000000 +0200
@@ -15,15 +15,15 @@
 
 
 @pytest.fixture(scope='session')
-def run_services(request, slave_id):
+def run_services(request, worker_id):
     """Indicate whether the services should run or not."""
-    return slave_id != 'local' or request.config.option.run_services
+    return worker_id != 'local' or request.config.option.run_services
 
 
 @pytest.fixture(scope='session')
-def slave_id(request):
+def worker_id(request):
     """
-    The id of the slave if tests are run using xdist.
+    The id of the worker if tests are run using xdist.
 
     It is set to `'local'` if tests are not run using xdist.
 
@@ -31,20 +31,27 @@
     that belong to different test sessions.
 
     """
-    return WRONG_FILE_NAME_CHARS_RE.sub('_', getattr(request.config, 
'slaveinput', {}).get('slaveid', 'local'))
+    return WRONG_FILE_NAME_CHARS_RE.sub('_', getattr(request.config, 
'workerinput', {}).get('workerid', 'local'))
 
 
 @pytest.fixture(scope='session')
-def session_id(request, slave_id, run_services):
+def slave_id(request, worker_id):
+    msg = "The `slave_id` fixture is deprecated; use `worker_id` instead."
+    warnings.warn(msg, DeprecationWarning)
+    return worker_id
+
+
+@pytest.fixture(scope='session')
+def session_id(request, worker_id, run_services):
     """The test session id.
 
     It is supposed to be globally unique.
 
     """
     # UUID should be enough, other fields are added for the debugging purposes.
-    session_id = '{random}-{slave_id}'.format(
+    session_id = '{random}-{worker_id}'.format(
         random=uuid.uuid4().hex,
-        slave_id=slave_id,
+        worker_id=worker_id,
     )
 
     return session_id


Reply via email to