Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-oslo.concurrency for 
openSUSE:Factory checked in at 2022-05-25 20:34:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-oslo.concurrency (Old)
 and      /work/SRC/openSUSE:Factory/.python-oslo.concurrency.new.2254 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-oslo.concurrency"

Wed May 25 20:34:36 2022 rev:18 rq:979077 version:4.5.1

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-oslo.concurrency/python-oslo.concurrency.changes
  2020-10-26 16:17:02.686970426 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-oslo.concurrency.new.2254/python-oslo.concurrency.changes
        2022-05-25 20:34:55.548258083 +0200
@@ -1,0 +2,23 @@
+Tue May 24 21:18:02 UTC 2022 - [email protected]
+
+- update to version 4.5.1
+  - Add support for non-blocking locks
+  - Use TOX_CONSTRAINTS_FILE
+  - Dropping lower constraints testing
+  - Remove references to 'sys.version_info'
+  - Update CI to use unversioned jobs template
+  - Add Python3 wallaby unit tests
+  - Adding pre-commit
+  - Fix RequiredOptError when missing lock_path
+  - Remove unnecessary unicode prefixes
+  - Monkey patch original current_thread _active in processutils
+  - Use py3 as the default runtime for tox
+  - Update master for stable/victoria
+  - Allow python_exec kwarg to be None
+  - Move flake8 as a pre-commit local target.
+  - Add Python3 yoga unit tests
+  - setup.cfg: Replace dashes with underscores
+  - Remove lower-constraints remnants
+  - Update python testing classifier
+
+-------------------------------------------------------------------

Old:
----
  oslo.concurrency-4.3.0.tar.gz

New:
----
  oslo.concurrency-4.5.1.tar.gz

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

Other differences:
------------------
++++++ python-oslo.concurrency.spec ++++++
--- /var/tmp/diff_new_pack.hQeW2V/_old  2022-05-25 20:34:57.056260187 +0200
+++ /var/tmp/diff_new_pack.hQeW2V/_new  2022-05-25 20:34:57.060260193 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-oslo.concurrency
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,18 +17,17 @@
 
 
 Name:           python-oslo.concurrency
-Version:        4.3.0
+Version:        4.5.1
 Release:        0
 Summary:        OpenStack oslo.concurrency library
 License:        Apache-2.0
 Group:          Development/Languages/Python
-URL:            https://launchpad.net/oslo.concurrency
-Source0:        
https://files.pythonhosted.org/packages/source/o/oslo.concurrency/oslo.concurrency-4.3.0.tar.gz
+URL:            https://docs.openstack.org/oslo.concurrency
+Source0:        
https://files.pythonhosted.org/packages/source/o/oslo.concurrency/oslo.concurrency-4.5.1.tar.gz
 BuildRequires:  openstack-macros
 BuildRequires:  python3-eventlet
 BuildRequires:  python3-fasteners >= 0.7.0
 BuildRequires:  python3-fixtures
-BuildRequires:  python3-mock
 BuildRequires:  python3-oslo.config >= 5.2.0
 BuildRequires:  python3-oslo.i18n >= 3.15.3
 BuildRequires:  python3-oslo.utils >= 3.33.0
@@ -46,12 +45,10 @@
 
 %package -n python3-oslo.concurrency
 Summary:        OpenStack oslo.concurrency library
-Group:          Development/Languages/Python
 Requires:       python3-fasteners >= 0.7.0
 Requires:       python3-oslo.config >= 5.2.0
 Requires:       python3-oslo.i18n >= 3.15.3
 Requires:       python3-oslo.utils >= 3.33.0
-Requires:       python3-six
 %if 0%{?suse_version}
 Obsoletes:      python2-oslo.concurrency < 4.0.0
 %endif
@@ -65,7 +62,6 @@
 
 %package -n python-oslo.concurrency-doc
 Summary:        Documentation for OpenStack concurrency library
-Group:          Development/Languages/Python
 BuildRequires:  python3-Sphinx
 BuildRequires:  python3-openstackdocstheme
 BuildRequires:  python3-sphinxcontrib-apidoc
@@ -77,7 +73,7 @@
 This package contains the documentation.
 
 %prep
-%autosetup -p1 -n oslo.concurrency-4.3.0
+%autosetup -p1 -n oslo.concurrency-4.5.1
 %py_req_cleanup
 
 %build

++++++ _service ++++++
--- /var/tmp/diff_new_pack.hQeW2V/_old  2022-05-25 20:34:57.112260266 +0200
+++ /var/tmp/diff_new_pack.hQeW2V/_new  2022-05-25 20:34:57.128260288 +0200
@@ -1,8 +1,8 @@
 <services>
   <service mode="disabled" name="renderspec">
-    <param 
name="input-template">https://opendev.org/openstack/rpm-packaging/raw/branch/stable/victoria/openstack/oslo.concurrency/oslo.concurrency.spec.j2</param>
+    <param 
name="input-template">https://opendev.org/openstack/rpm-packaging/raw/branch/master/openstack/oslo.concurrency/oslo.concurrency.spec.j2</param>
     <param name="output-name">python-oslo.concurrency.spec</param>
-    <param 
name="requirements">https://opendev.org/openstack/oslo.concurrency/raw/branch/stable/victoria/requirements.txt</param>
+    <param 
name="requirements">https://opendev.org/openstack/oslo.concurrency/raw/branch/master/requirements.txt</param>
     <param name="changelog-email">[email protected]</param>
     <param name="changelog-provider">gh,openstack,oslo.concurrency</param>
   </service>

++++++ oslo.concurrency-4.3.0.tar.gz -> oslo.concurrency-4.5.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.concurrency-4.3.0/.pre-commit-config.yaml 
new/oslo.concurrency-4.5.1/.pre-commit-config.yaml
--- old/oslo.concurrency-4.3.0/.pre-commit-config.yaml  1970-01-01 
01:00:00.000000000 +0100
+++ new/oslo.concurrency-4.5.1/.pre-commit-config.yaml  2022-05-05 
11:52:12.000000000 +0200
@@ -0,0 +1,39 @@
+# We from the Oslo project decided to pin repos based on the
+# commit hash instead of the version tag to prevend arbitrary
+# code from running in developer's machines.  To update to a
+# newer version, run `pre-commit autoupdate` and then replace
+# the newer versions with their commit hash.
+
+default_language_version:
+  python: python3
+
+repos:
+  - repo: https://github.com/pre-commit/pre-commit-hooks
+    rev: 9136088a246768144165fcc3ecc3d31bb686920a # v3.3.0
+    hooks:
+      - id: trailing-whitespace
+      # Replaces or checks mixed line ending
+      - id: mixed-line-ending
+        args: ['--fix', 'lf']
+        exclude: '.*\.(svg)$'
+      # Forbid files which have a UTF-8 byte-order marker
+      - id: check-byte-order-marker
+      # Checks that non-binary executables have a proper shebang
+      - id: check-executables-have-shebangs
+      # Check for files that contain merge conflict strings.
+      - id: check-merge-conflict
+      # Check for debugger imports and py37+ breakpoint()
+      # calls in python source
+      - id: debug-statements
+      - id: check-yaml
+        files: .*\.(yaml|yml)$
+  - repo: local
+    hooks:
+      - id: flake8
+        name: flake8
+        additional_dependencies:
+          - hacking>=3.0.1,<3.1.0
+        language: python
+        entry: flake8
+        files: '^.*\.py$'
+        exclude: '^(doc|releasenotes|tools)/.*$'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.concurrency-4.3.0/.zuul.yaml 
new/oslo.concurrency-4.5.1/.zuul.yaml
--- old/oslo.concurrency-4.3.0/.zuul.yaml       2020-09-11 21:23:14.000000000 
+0200
+++ new/oslo.concurrency-4.5.1/.zuul.yaml       2022-05-05 11:52:12.000000000 
+0200
@@ -3,8 +3,7 @@
       - check-requirements
       - lib-forward-testing-python3
       - openstack-cover-jobs
-      - openstack-lower-constraints-jobs
-      - openstack-python3-victoria-jobs
+      - openstack-python3-jobs
       - periodic-stable-jobs
       - publish-openstack-docs-pti
       - release-notes-jobs-python3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.concurrency-4.3.0/AUTHORS 
new/oslo.concurrency-4.5.1/AUTHORS
--- old/oslo.concurrency-4.3.0/AUTHORS  2020-09-11 21:24:27.000000000 +0200
+++ new/oslo.concurrency-4.5.1/AUTHORS  2022-05-05 11:52:43.000000000 +0200
@@ -22,6 +22,7 @@
 Corey Bryant <[email protected]>
 Csaba Henk <[email protected]>
 Dan Prince <[email protected]>
+Daniel Bengtsson <[email protected]>
 Daniel P. Berrange <[email protected]>
 Davanum Srinivas <[email protected]>
 Davanum Srinivas <[email protected]>
@@ -71,6 +72,8 @@
 Noorul Islam K M <[email protected]>
 OpenStack Release Bot <[email protected]>
 Pedro Navarro Perez <[email protected]>
+Rodolfo Alonso Hernandez <[email protected]>
+Romain Poupin <[email protected]>
 Roman Prykhodchenko <[email protected]>
 Ronald Bradford <[email protected]>
 Russell Bryant <[email protected]>
@@ -84,6 +87,7 @@
 Stephen Finucane <[email protected]>
 Steve Kowalik <[email protected]>
 Steve Martinelli <[email protected]>
+Thiago Brito <[email protected]>
 Thomas Bechtold <[email protected]>
 Thomas Herve <[email protected]>
 Tony Breeds <[email protected]>
@@ -93,12 +97,14 @@
 Vieri <[email protected]>
 Vu Cong Tuan <[email protected]>
 Wu Wenxiang <[email protected]>
+YuehuiLei <[email protected]>
 Yuriy Taraday <[email protected]>
 ZhiQiang Fan <[email protected]>
 ZhijunWei <[email protected]>
 ZhongShengping <[email protected]>
 Zhongyue Luo <[email protected]>
 caoyuan <[email protected]>
+dengzhaosen <[email protected]>
 gecong1973 <[email protected]>
 gengchc2 <[email protected]>
 howardlee <[email protected]>
@@ -111,8 +117,11 @@
 ricolin <[email protected]>
 shangxiaobj <[email protected]>
 shupeng <[email protected]>
+songwenping <[email protected]>
+tushargite96 <[email protected]>
 vponomaryov <[email protected]>
 wangqi <[email protected]>
+wu.shiming <[email protected]>
 yanheven <[email protected]>
 zhangboye <[email protected]>
 zhangsong <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.concurrency-4.3.0/ChangeLog 
new/oslo.concurrency-4.5.1/ChangeLog
--- old/oslo.concurrency-4.3.0/ChangeLog        2020-09-11 21:24:27.000000000 
+0200
+++ new/oslo.concurrency-4.5.1/ChangeLog        2022-05-05 11:52:43.000000000 
+0200
@@ -1,6 +1,40 @@
 CHANGES
 =======
 
+4.5.1
+-----
+
+* Remove unnecessary unicode prefixes
+* Fix RequiredOptError when missing lock\_path
+* Update CI to use unversioned jobs template
+* Add Python3 yoga unit tests
+* Allow python\_exec kwarg to be None
+* Update python testing classifier
+
+4.5.0
+-----
+
+* Add support for non-blocking locks
+
+4.4.1
+-----
+
+* setup.cfg: Replace dashes with underscores
+* Remove references to 'sys.version\_info'
+* Move flake8 as a pre-commit local target
+* Remove lower-constraints remnants
+
+4.4.0
+-----
+
+* Dropping lower constraints testing
+* Use TOX\_CONSTRAINTS\_FILE
+* Use py3 as the default runtime for tox
+* Monkey patch original current\_thread \_active in processutils
+* Add Python3 wallaby unit tests
+* Update master for stable/victoria
+* Adding pre-commit
+
 4.3.0
 -----
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.concurrency-4.3.0/PKG-INFO 
new/oslo.concurrency-4.5.1/PKG-INFO
--- old/oslo.concurrency-4.3.0/PKG-INFO 2020-09-11 21:24:27.000000000 +0200
+++ new/oslo.concurrency-4.5.1/PKG-INFO 2022-05-05 11:52:43.497313700 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: oslo.concurrency
-Version: 4.3.0
+Version: 4.5.1
 Summary: Oslo Concurrency library
 Home-page: https://docs.openstack.org/oslo.concurrency/latest/
 Author: OpenStack
@@ -45,6 +45,7 @@
 Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
 Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: 3 :: Only
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Requires-Python: >=3.6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.concurrency-4.3.0/doc/source/conf.py 
new/oslo.concurrency-4.5.1/doc/source/conf.py
--- old/oslo.concurrency-4.3.0/doc/source/conf.py       2020-09-11 
21:23:14.000000000 +0200
+++ new/oslo.concurrency-4.5.1/doc/source/conf.py       2022-05-05 
11:52:12.000000000 +0200
@@ -1,4 +1,6 @@
 # -*- coding: utf-8 -*-
+# Copyright (C) 2020 Red Hat, Inc.
+#
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
@@ -32,7 +34,7 @@
 master_doc = 'index'
 
 # General information about the project.
-copyright = u'2014, OpenStack Foundation'
+copyright = '2014, OpenStack Foundation'
 
 # If true, '()' will be appended to :func: etc. cross-reference text.
 add_function_parentheses = True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.concurrency-4.3.0/lower-constraints.txt 
new/oslo.concurrency-4.5.1/lower-constraints.txt
--- old/oslo.concurrency-4.3.0/lower-constraints.txt    2020-09-11 
21:23:14.000000000 +0200
+++ new/oslo.concurrency-4.5.1/lower-constraints.txt    1970-01-01 
01:00:00.000000000 +0100
@@ -1,51 +0,0 @@
-appdirs==1.3.0
-Babel==2.3.4
-cliff==3.1.0
-cmd2==0.8.9
-coverage==4.0
-debtcollector==1.2.0
-dnspython==1.16.0
-entrypoints==0.3
-eventlet==0.19.0
-extras==1.0.0
-fasteners==0.7.0
-fixtures==3.0.0
-future==0.18.2
-gitdb==0.6.4
-GitPython==1.0.1
-greenlet==0.4.13
-iso8601==0.1.11
-keystoneauth1==3.4.0
-linecache2==1.0.0
-mock==4.0.2
-monotonic==1.5
-mox3==0.20.0
-netaddr==0.7.18
-netifaces==0.10.4
-os-client-config==1.28.0
-oslo.config==5.2.0
-oslo.i18n==3.15.3
-oslo.utils==3.33.0
-oslotest==3.2.0
-pbr==2.0.0
-prettytable==0.7.2
-pyparsing==2.1.0
-pyperclip==1.8.0
-python-mimeparse==1.6.0
-python-subunit==1.0.0
-pytz==2013.6
-PyYAML==3.12
-requests==2.14.2
-requestsexceptions==1.2.0
-rfc3986==0.3.1
-six==1.10.0
-smmap==0.9.0
-stestr==2.0.0
-stevedore==1.20.0
-testrepository==0.0.20
-testtools==2.2.0
-traceback2==1.4.0
-unittest2==1.1.0
-voluptuous==0.11.7
-wcwidth==0.2.4
-wrapt==1.7.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/oslo.concurrency-4.3.0/oslo.concurrency.egg-info/PKG-INFO 
new/oslo.concurrency-4.5.1/oslo.concurrency.egg-info/PKG-INFO
--- old/oslo.concurrency-4.3.0/oslo.concurrency.egg-info/PKG-INFO       
2020-09-11 21:24:27.000000000 +0200
+++ new/oslo.concurrency-4.5.1/oslo.concurrency.egg-info/PKG-INFO       
2022-05-05 11:52:43.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: oslo.concurrency
-Version: 4.3.0
+Version: 4.5.1
 Summary: Oslo Concurrency library
 Home-page: https://docs.openstack.org/oslo.concurrency/latest/
 Author: OpenStack
@@ -45,6 +45,7 @@
 Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
 Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: 3 :: Only
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Requires-Python: >=3.6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/oslo.concurrency-4.3.0/oslo.concurrency.egg-info/SOURCES.txt 
new/oslo.concurrency-4.5.1/oslo.concurrency.egg-info/SOURCES.txt
--- old/oslo.concurrency-4.3.0/oslo.concurrency.egg-info/SOURCES.txt    
2020-09-11 21:24:27.000000000 +0200
+++ new/oslo.concurrency-4.5.1/oslo.concurrency.egg-info/SOURCES.txt    
2022-05-05 11:52:43.000000000 +0200
@@ -1,5 +1,6 @@
 .coveragerc
 .mailmap
+.pre-commit-config.yaml
 .stestr.conf
 .zuul.yaml
 AUTHORS
@@ -8,7 +9,6 @@
 HACKING.rst
 LICENSE
 README.rst
-lower-constraints.txt
 requirements.txt
 setup.cfg
 setup.py
@@ -73,6 +73,7 @@
 releasenotes/source/train.rst
 releasenotes/source/unreleased.rst
 releasenotes/source/ussuri.rst
+releasenotes/source/victoria.rst
 releasenotes/source/_static/.placeholder
 releasenotes/source/_templates/.placeholder
 releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/oslo.concurrency-4.3.0/oslo.concurrency.egg-info/pbr.json 
new/oslo.concurrency-4.5.1/oslo.concurrency.egg-info/pbr.json
--- old/oslo.concurrency-4.3.0/oslo.concurrency.egg-info/pbr.json       
2020-09-11 21:24:27.000000000 +0200
+++ new/oslo.concurrency-4.5.1/oslo.concurrency.egg-info/pbr.json       
2022-05-05 11:52:43.000000000 +0200
@@ -1 +1 @@
-{"git_version": "2f78803", "is_release": true}
\ No newline at end of file
+{"git_version": "145f060", "is_release": true}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.concurrency-4.3.0/oslo_concurrency/lockutils.py 
new/oslo.concurrency-4.5.1/oslo_concurrency/lockutils.py
--- old/oslo.concurrency-4.3.0/oslo_concurrency/lockutils.py    2020-09-11 
21:23:14.000000000 +0200
+++ new/oslo.concurrency-4.5.1/oslo_concurrency/lockutils.py    2022-05-05 
11:52:12.000000000 +0200
@@ -180,7 +180,7 @@
     local_lock_path = lock_path or CONF.oslo_concurrency.lock_path
 
     if not local_lock_path:
-        raise cfg.RequiredOptError('lock_path')
+        raise cfg.RequiredOptError('lock_path', 'oslo_concurrency')
 
     return os.path.join(local_lock_path, name)
 
@@ -206,15 +206,35 @@
                             {'file': lock_file_path})
 
 
-def internal_lock(name, semaphores=None):
+class AcquireLockFailedException(Exception):
+    def __init__(self, lock_name):
+        self.message = "Failed to acquire the lock %s" % lock_name
+
+    def __str__(self):
+        return self.message
+
+
+def internal_lock(name, semaphores=None, blocking=True):
+    @contextlib.contextmanager
+    def nonblocking(lock):
+        """Try to acquire the internal lock without blocking."""
+        if not lock.acquire(blocking=False):
+            raise AcquireLockFailedException(name)
+        try:
+            yield lock
+        finally:
+            lock.release()
+
     if semaphores is None:
         semaphores = _semaphores
-    return semaphores.get(name)
+    lock = semaphores.get(name)
+
+    return nonblocking(lock) if not blocking else lock
 
 
 @contextlib.contextmanager
 def lock(name, lock_file_prefix=None, external=False, lock_path=None,
-         do_log=True, semaphores=None, delay=0.01, fair=False):
+         do_log=True, semaphores=None, delay=0.01, fair=False, blocking=True):
     """Context based lock
 
     This function yields a `threading.Semaphore` instance (if we don't use
@@ -247,6 +267,10 @@
     :param fair: Whether or not we want a "fair" lock where contending lockers
         will get the lock in the order in which they tried to acquire it.
 
+    :param blocking: Whether to wait forever to try to acquire the lock.
+        Incompatible with fair locks because those provided by the fasteners
+        module doesn't implements a non-blocking behavior.
+
     .. versionchanged:: 0.2
        Added *do_log* optional parameter.
 
@@ -257,17 +281,23 @@
         if semaphores is not None:
             raise NotImplementedError(_('Specifying semaphores is not '
                                         'supported when using fair locks.'))
-        # The fastners module specifies that write_lock() provides fairness.
+        if blocking is not True:
+            raise NotImplementedError(_('Disabling blocking is not supported '
+                                        'when using fair locks.'))
+        # The fasteners module specifies that write_lock() provides fairness.
         int_lock = internal_fair_lock(name).write_lock()
     else:
-        int_lock = internal_lock(name, semaphores=semaphores)
+        int_lock = internal_lock(name, semaphores=semaphores,
+                                 blocking=blocking)
     with int_lock:
         if do_log:
             LOG.debug('Acquired lock "%(lock)s"', {'lock': name})
         try:
             if external and not CONF.oslo_concurrency.disable_process_locking:
                 ext_lock = external_lock(name, lock_file_prefix, lock_path)
-                ext_lock.acquire(delay=delay)
+                gotten = ext_lock.acquire(delay=delay, blocking=blocking)
+                if not gotten:
+                    raise AcquireLockFailedException(name)
                 if do_log:
                     LOG.debug('Acquired external semaphore "%(lock)s"',
                               {'lock': name})
@@ -314,7 +344,7 @@
 
 
 def synchronized(name, lock_file_prefix=None, external=False, lock_path=None,
-                 semaphores=None, delay=0.01, fair=False):
+                 semaphores=None, delay=0.01, fair=False, blocking=True):
     """Synchronization decorator.
 
     Decorating a method like so::
@@ -347,10 +377,11 @@
         def inner(*args, **kwargs):
             t1 = timeutils.now()
             t2 = None
+            gotten = True
             try:
                 with lock(name, lock_file_prefix, external, lock_path,
                           do_log=False, semaphores=semaphores, delay=delay,
-                          fair=fair):
+                          fair=fair, blocking=blocking):
                     t2 = timeutils.now()
                     LOG.debug('Lock "%(name)s" acquired by "%(function)s" :: '
                               'waited %(wait_secs)0.3fs',
@@ -358,15 +389,18 @@
                                'function': reflection.get_callable_name(f),
                                'wait_secs': (t2 - t1)})
                     return f(*args, **kwargs)
+            except AcquireLockFailedException:
+                gotten = False
             finally:
                 t3 = timeutils.now()
                 if t2 is None:
                     held_secs = "N/A"
                 else:
                     held_secs = "%0.3fs" % (t3 - t2)
-                LOG.debug('Lock "%(name)s" released by "%(function)s" :: held '
-                          '%(held_secs)s',
+                LOG.debug('Lock "%(name)s" "%(gotten)s" by "%(function)s" ::'
+                          ' held %(held_secs)s',
                           {'name': name,
+                           'gotten': 'released' if gotten else 'unacquired',
                            'function': reflection.get_callable_name(f),
                            'held_secs': held_secs})
         return inner
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.concurrency-4.3.0/oslo_concurrency/prlimit.py 
new/oslo.concurrency-4.5.1/oslo_concurrency/prlimit.py
--- old/oslo.concurrency-4.3.0/oslo_concurrency/prlimit.py      2020-09-11 
21:23:14.000000000 +0200
+++ new/oslo.concurrency-4.5.1/oslo_concurrency/prlimit.py      2022-05-05 
11:52:12.000000000 +0200
@@ -16,6 +16,7 @@
 import argparse
 import os
 import resource
+import shutil
 import sys
 
 USAGE_PROGRAM = ('%s -m oslo_concurrency.prlimit'
@@ -74,12 +75,7 @@
     if not os.path.isabs(program):
         # program uses a relative path: try to find the absolute path
         # to the executable
-        if sys.version_info >= (3, 3):
-            import shutil
-            program_abs = shutil.which(program)
-        else:
-            import distutils.spawn
-            program_abs = distutils.spawn.find_executable(program)
+        program_abs = shutil.which(program)
         if program_abs:
             program = program_abs
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/oslo.concurrency-4.3.0/oslo_concurrency/processutils.py 
new/oslo.concurrency-4.5.1/oslo_concurrency/processutils.py
--- old/oslo.concurrency-4.3.0/oslo_concurrency/processutils.py 2020-09-11 
21:23:14.000000000 +0200
+++ new/oslo.concurrency-4.5.1/oslo_concurrency/processutils.py 2022-05-05 
11:52:12.000000000 +0200
@@ -55,6 +55,13 @@
         from eventlet.green import subprocess
 
     from eventlet import tpool
+
+    # Monkey patch the original current_thread to use the up-to-date _active
+    # global variable. See https://bugs.launchpad.net/bugs/1863021 and
+    # https://github.com/eventlet/eventlet/issues/592
+    import __original_module_threading as orig_threading
+    import threading
+    orig_threading.current_thread.__globals__['_active'] = threading._active
 else:
     import subprocess
 
@@ -262,8 +269,8 @@
                             below for a detailed description.
     :type prlimit:          :class:`ProcessLimits`
     :param python_exec:     The python executable to use for enforcing
-                            prlimits. If this is not set it will default to use
-                            sys.executable.
+                            prlimits. If this is not set or is None, it will
+                            default to use sys.executable.
     :type python_exec:      string
     :param timeout:         Timeout (in seconds) to wait for the process
                             termination. If timeout is reached,
@@ -322,7 +329,7 @@
     on_completion = kwargs.pop('on_completion', None)
     preexec_fn = kwargs.pop('preexec_fn', None)
     prlimit = kwargs.pop('prlimit', None)
-    python_exec = kwargs.pop('python_exec', sys.executable)
+    python_exec = kwargs.pop('python_exec', None) or sys.executable
     timeout = kwargs.pop('timeout', None)
 
     if isinstance(check_exit_code, bool):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/oslo.concurrency-4.3.0/oslo_concurrency/tests/unit/test_lockutils.py 
new/oslo.concurrency-4.5.1/oslo_concurrency/tests/unit/test_lockutils.py
--- old/oslo.concurrency-4.3.0/oslo_concurrency/tests/unit/test_lockutils.py    
2020-09-11 21:23:14.000000000 +0200
+++ new/oslo.concurrency-4.5.1/oslo_concurrency/tests/unit/test_lockutils.py    
2022-05-05 11:52:12.000000000 +0200
@@ -186,6 +186,13 @@
                 pass
         self.assertRaises(NotImplementedError, do_test)
 
+    def test_fair_lock_with_nonblocking(self):
+        def do_test():
+            with lockutils.lock('testlock', 'test-', fair=True,
+                                blocking=False):
+                pass
+        self.assertRaises(NotImplementedError, do_test)
+
     def test_nested_synchronized_external_works(self):
         """We can nest external syncs."""
         self.config(lock_path=tempfile.mkdtemp(), group='oslo_concurrency')
@@ -430,6 +437,35 @@
                 time.sleep(.5)
                 os._exit(0)
 
+    def test_interprocess_nonblocking_external_lock(self):
+        """Check that we're not actually blocking between processes."""
+
+        nb_calls = multiprocessing.Value('i', 0)
+
+        @lockutils.synchronized('foo', blocking=False, external=True,
+                                lock_path=self.lock_dir)
+        def foo(param):
+            """Simulate a long-running operation in a process."""
+            param.value += 1
+            time.sleep(.5)
+
+        def other(param):
+            foo(param)
+
+        process = multiprocessing.Process(target=other, args=(nb_calls, ))
+        process.start()
+        # Make sure the other process grabs the lock
+        start = time.time()
+        while not os.path.exists(os.path.join(self.lock_dir, 'foo')):
+            if time.time() - start > 5:
+                self.fail('Timed out waiting for process to grab lock')
+            time.sleep(0)
+        process1 = multiprocessing.Process(target=other, args=(nb_calls, ))
+        process1.start()
+        process1.join()
+        process.join()
+        self.assertEqual(1, nb_calls.value)
+
     def test_interthread_external_lock(self):
         call_list = []
 
@@ -465,6 +501,62 @@
         thread.join()
         self.assertEqual(['other', 'other', 'main', 'main'], call_list)
 
+    def test_interthread_nonblocking_external_lock(self):
+        call_list = []
+
+        @lockutils.synchronized('foo', external=True, blocking=False,
+                                lock_path=self.lock_dir)
+        def foo(param):
+            """Simulate a long-running threaded operation."""
+            call_list.append(param)
+            time.sleep(.5)
+            call_list.append(param)
+
+        def other(param):
+            foo(param)
+
+        thread = threading.Thread(target=other, args=('other',))
+        thread.start()
+        # Make sure the other thread grabs the lock
+        start = time.time()
+        while not os.path.exists(os.path.join(self.lock_dir, 'foo')):
+            if time.time() - start > 5:
+                self.fail('Timed out waiting for thread to grab lock')
+            time.sleep(0)
+        thread1 = threading.Thread(target=other, args=('main',))
+        thread1.start()
+        thread1.join()
+        thread.join()
+        self.assertEqual(['other', 'other'], call_list)
+
+    def test_interthread_nonblocking_internal_lock(self):
+        call_list = []
+
+        @lockutils.synchronized('foo', blocking=False,
+                                lock_path=self.lock_dir)
+        def foo(param):
+            # Simulate a long-running threaded operation.
+            call_list.append(param)
+            time.sleep(.5)
+            call_list.append(param)
+
+        def other(param):
+            foo(param)
+
+        thread = threading.Thread(target=other, args=('other',))
+        thread.start()
+        # Make sure the other thread grabs the lock
+        start = time.time()
+        while not call_list:
+            if time.time() - start > 5:
+                self.fail('Timed out waiting for thread to grab lock')
+            time.sleep(0)
+        thread1 = threading.Thread(target=other, args=('main',))
+        thread1.start()
+        thread1.join()
+        thread.join()
+        self.assertEqual(['other', 'other'], call_list)
+
     def test_non_destructive(self):
         lock_file = os.path.join(self.lock_dir, 'not-destroyed')
         with open(lock_file, 'w') as f:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.concurrency-4.3.0/releasenotes/source/conf.py 
new/oslo.concurrency-4.5.1/releasenotes/source/conf.py
--- old/oslo.concurrency-4.3.0/releasenotes/source/conf.py      2020-09-11 
21:23:14.000000000 +0200
+++ new/oslo.concurrency-4.5.1/releasenotes/source/conf.py      2022-05-05 
11:52:12.000000000 +0200
@@ -57,7 +57,7 @@
 master_doc = 'index'
 
 # General information about the project.
-copyright = u'2016, oslo.concurrency Developers'
+copyright = '2016, oslo.concurrency Developers'
 
 # Release notes do not need a version in the title, they span
 # multiple versions.
@@ -197,8 +197,8 @@
 #  author, documentclass [howto, manual, or own class]).
 latex_documents = [
     ('index', 'oslo.concurrencyReleaseNotes.tex',
-     u'oslo.concurrency Release Notes Documentation',
-     u'oslo.concurrency Developers', 'manual'),
+     'oslo.concurrency Release Notes Documentation',
+     'oslo.concurrency Developers', 'manual'),
 ]
 
 # The name of an image file (relative to this directory) to place at the top of
@@ -228,8 +228,8 @@
 # (source start file, name, description, authors, manual section).
 man_pages = [
     ('index', 'oslo.concurrencyReleaseNotes',
-     u'oslo.concurrency Release Notes Documentation',
-     [u'oslo.concurrency Developers'], 1)
+     'oslo.concurrency Release Notes Documentation',
+     ['oslo.concurrency Developers'], 1)
 ]
 
 # If true, show URL addresses after external links.
@@ -243,8 +243,8 @@
 #  dir menu entry, description, category)
 texinfo_documents = [
     ('index', 'oslo.concurrencyReleaseNotes',
-     u'oslo.concurrency Release Notes Documentation',
-     u'oslo.concurrency Developers', 'oslo.concurrencyReleaseNotes',
+     'oslo.concurrency Release Notes Documentation',
+     'oslo.concurrency Developers', 'oslo.concurrencyReleaseNotes',
      'One line description of project.',
      'Miscellaneous'),
 ]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.concurrency-4.3.0/releasenotes/source/index.rst 
new/oslo.concurrency-4.5.1/releasenotes/source/index.rst
--- old/oslo.concurrency-4.3.0/releasenotes/source/index.rst    2020-09-11 
21:23:14.000000000 +0200
+++ new/oslo.concurrency-4.5.1/releasenotes/source/index.rst    2022-05-05 
11:52:12.000000000 +0200
@@ -6,6 +6,7 @@
     :maxdepth: 1
 
     unreleased
+    victoria
     ussuri
     train
     stein
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/oslo.concurrency-4.3.0/releasenotes/source/victoria.rst 
new/oslo.concurrency-4.5.1/releasenotes/source/victoria.rst
--- old/oslo.concurrency-4.3.0/releasenotes/source/victoria.rst 1970-01-01 
01:00:00.000000000 +0100
+++ new/oslo.concurrency-4.5.1/releasenotes/source/victoria.rst 2022-05-05 
11:52:12.000000000 +0200
@@ -0,0 +1,6 @@
+=============================
+Victoria Series Release Notes
+=============================
+
+.. release-notes::
+   :branch: stable/victoria
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.concurrency-4.3.0/setup.cfg 
new/oslo.concurrency-4.5.1/setup.cfg
--- old/oslo.concurrency-4.3.0/setup.cfg        2020-09-11 21:24:27.000000000 
+0200
+++ new/oslo.concurrency-4.5.1/setup.cfg        2022-05-05 11:52:43.497313700 
+0200
@@ -1,12 +1,12 @@
 [metadata]
 name = oslo.concurrency
 summary = Oslo Concurrency library
-description-file = 
+description_file = 
        README.rst
 author = OpenStack
-author-email = [email protected]
-home-page = https://docs.openstack.org/oslo.concurrency/latest/
-python-requires = >=3.6
+author_email = [email protected]
+home_page = https://docs.openstack.org/oslo.concurrency/latest/
+python_requires = >=3.6
 classifier = 
        Environment :: OpenStack
        Intended Audience :: Information Technology
@@ -18,6 +18,7 @@
        Programming Language :: Python :: 3.6
        Programming Language :: Python :: 3.7
        Programming Language :: Python :: 3.8
+       Programming Language :: Python :: 3.9
        Programming Language :: Python :: 3 :: Only
        Programming Language :: Python :: Implementation :: CPython
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.concurrency-4.3.0/test-requirements.txt 
new/oslo.concurrency-4.5.1/test-requirements.txt
--- old/oslo.concurrency-4.3.0/test-requirements.txt    2020-09-11 
21:23:14.000000000 +0200
+++ new/oslo.concurrency-4.5.1/test-requirements.txt    2022-05-05 
11:52:12.000000000 +0200
@@ -11,3 +11,5 @@
 
 # Bandit security code scanner
 bandit>=1.6.0,<1.7.0 # Apache-2.0
+
+pre-commit>=2.6.0 # MIT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.concurrency-4.3.0/tox.ini 
new/oslo.concurrency-4.5.1/tox.ini
--- old/oslo.concurrency-4.3.0/tox.ini  2020-09-11 21:23:14.000000000 +0200
+++ new/oslo.concurrency-4.5.1/tox.ini  2022-05-05 11:52:12.000000000 +0200
@@ -1,12 +1,12 @@
 [tox]
 minversion = 3.2.0
-envlist = py38,pep8
+envlist = py3,pep8
 ignore_basepython_conflict = True
 
 [testenv]
 basepython = python3
 deps =
-  
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
+  
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
   -r{toxinidir}/test-requirements.txt
 # We want to support both vanilla stdlib and eventlet monkey patched
 whitelist_externals = env
@@ -17,7 +17,7 @@
 [testenv:pep8]
 deps = {[testenv]deps}
 commands =
-  flake8
+  pre-commit run -a
   # Run security linter
   bandit -r oslo_concurrency -x tests -n5 --skip B311,B404,B603,B606
 
@@ -27,7 +27,7 @@
 [testenv:docs]
 whitelist_externals = rm
 deps =
-  
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
+  
-c{env:TOX_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
   -r{toxinidir}/doc/requirements.txt
 commands =
   rm -fr doc/build
@@ -56,8 +56,3 @@
 commands =
   sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html 
releasenotes/source releasenotes/build/html
 
-[testenv:lower-constraints]
-deps =
-  -c{toxinidir}/lower-constraints.txt
-  -r{toxinidir}/test-requirements.txt
-  -r{toxinidir}/requirements.txt

Reply via email to