Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-oslo.log for openSUSE:Factory 
checked in at 2023-12-28 23:03:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-oslo.log (Old)
 and      /work/SRC/openSUSE:Factory/.python-oslo.log.new.28375 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-oslo.log"

Thu Dec 28 23:03:17 2023 rev:25 rq:1135455 version:5.4.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-oslo.log/python-oslo.log.changes  
2023-08-10 15:35:12.052650390 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-oslo.log.new.28375/python-oslo.log.changes   
    2023-12-28 23:04:57.586109474 +0100
@@ -1,0 +2,14 @@
+Thu Dec 28 09:39:45 UTC 2023 - [email protected]
+
+- update to version 5.4.0
+  - Cleanup py27 support
+  - Deprecate Windows support
+  - Update master for stable/2023.2
+  - Imported Translations from Zanata
+  - Moves supported python runtimes from version 3.8 to 3.10
+  - Revert "Moves supported python runtimes from version 3.8 to 3.10"
+  - Catch RuntimeError when loading log config file
+  - Bump bandit
+  - Update master for stable/2023.1
+
+-------------------------------------------------------------------

Old:
----
  oslo.log-5.2.0.tar.gz

New:
----
  oslo.log-5.4.0.tar.gz

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

Other differences:
------------------
++++++ python-oslo.log.spec ++++++
--- /var/tmp/diff_new_pack.s1oBVo/_old  2023-12-28 23:04:58.042126140 +0100
+++ /var/tmp/diff_new_pack.s1oBVo/_new  2023-12-28 23:04:58.046126286 +0100
@@ -17,15 +17,16 @@
 
 
 Name:           python-oslo.log
-Version:        5.2.0
+Version:        5.4.0
 Release:        0
 Summary:        OpenStack log library
 License:        Apache-2.0
 Group:          Development/Languages/Python
 URL:            https://docs.openstack.org/oslo.log
-Source0:        
https://files.pythonhosted.org/packages/source/o/oslo.log/oslo.log-5.2.0.tar.gz
+Source0:        
https://files.pythonhosted.org/packages/source/o/oslo.log/oslo.log-5.4.0.tar.gz
 BuildRequires:  fdupes
 BuildRequires:  openstack-macros
+BuildRequires:  python3-eventlet
 BuildRequires:  python3-monotonic
 BuildRequires:  python3-oslo.config >= 5.2.0
 BuildRequires:  python3-oslo.context >= 2.21.0
@@ -77,14 +78,14 @@
 Documentation for the oslo.log library.
 
 %prep
-%autosetup -p1 -n oslo.log-5.2.0
+%autosetup -p1 -n oslo.log-5.4.0
 %py_req_cleanup
 
 %build
 %{py3_build}
 
 # generate html docs
-PYTHONPATH=. PBR_VERSION=5.2.0 %sphinx_build -b html doc/source doc/build/html
+PYTHONPATH=. PBR_VERSION=5.4.0 %sphinx_build -b html doc/source doc/build/html
 rm -rf doc/build/html/.{doctrees,buildinfo}
 
 %install

++++++ oslo.log-5.2.0.tar.gz -> oslo.log-5.4.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.log-5.2.0/AUTHORS new/oslo.log-5.4.0/AUTHORS
--- old/oslo.log-5.2.0/AUTHORS  2023-03-21 17:19:26.000000000 +0100
+++ new/oslo.log-5.4.0/AUTHORS  2023-11-14 10:58:27.000000000 +0100
@@ -5,6 +5,7 @@
 Alexander Gorodnev <[email protected]>
 Alexis Lee <[email protected]>
 Alexis Lee <[email protected]>
+Alfredo Moralejo <[email protected]>
 Alvaro Lopez Garcia <[email protected]>
 Andrea Frittoli <[email protected]>
 Andreas Jaeger <[email protected]>
@@ -50,7 +51,6 @@
 Edan David <[email protected]>
 Edwin Zhai <[email protected]>
 Elena Ezhova <[email protected]>
-Elod Illes <[email protected]>
 Eric Brown <[email protected]>
 Eric Harney <[email protected]>
 Eric Windisch <[email protected]>
@@ -60,6 +60,7 @@
 Francois Deppierraz <[email protected]>
 Gage Hugo <[email protected]>
 Gary Kotton <[email protected]>
+Ghanshyam <[email protected]>
 Ghanshyam Mann <[email protected]>
 Gorka Eguileor <[email protected]>
 Goutham Pacha Ravi <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.log-5.2.0/ChangeLog new/oslo.log-5.4.0/ChangeLog
--- old/oslo.log-5.2.0/ChangeLog        2023-03-21 17:19:26.000000000 +0100
+++ new/oslo.log-5.4.0/ChangeLog        2023-11-14 10:58:27.000000000 +0100
@@ -1,19 +1,28 @@
 CHANGES
 =======
 
-5.2.0
+5.4.0
 -----
 
-* Add 'revert bugfix #1983863' release note
-* Revert "Fix logging in eventlet native threads"
-* Revert "Make the eventlet logging fix execution conditional"
-* Update TOX\_CONSTRAINTS\_FILE for stable/2023.1
-* Update .gitreview for stable/2023.1
+* Deprecate Windows support
+* Update master for stable/2023.2
+
+5.3.0
+-----
+
+* Catch RuntimeError when loading log config file
+* Bump bandit
+* Imported Translations from Zanata
+* Revert "Moves supported python runtimes from version 3.8 to 3.10"
+* Moves supported python runtimes from version 3.8 to 3.10
+* Update master for stable/2023.1
+* Imported Translations from Zanata
 
 5.1.0
 -----
 
 * tox - fix allowlist\_external issues
+* Cleanup py27 support
 
 5.0.2
 -----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.log-5.2.0/PKG-INFO new/oslo.log-5.4.0/PKG-INFO
--- old/oslo.log-5.2.0/PKG-INFO 2023-03-21 17:19:26.847390700 +0100
+++ new/oslo.log-5.4.0/PKG-INFO 2023-11-14 10:58:27.883485300 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: oslo.log
-Version: 5.2.0
+Version: 5.4.0
 Summary: oslo.log library
 Home-page: https://docs.openstack.org/oslo.log/latest
 Author: OpenStack
@@ -49,6 +49,7 @@
 Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3.8
 Classifier: Programming Language :: Python :: 3.9
+Classifier: Programming Language :: Python :: 3.10
 Classifier: Programming Language :: Python :: 3 :: Only
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Requires-Python: >=3.8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.log-5.2.0/oslo.log.egg-info/PKG-INFO 
new/oslo.log-5.4.0/oslo.log.egg-info/PKG-INFO
--- old/oslo.log-5.2.0/oslo.log.egg-info/PKG-INFO       2023-03-21 
17:19:26.000000000 +0100
+++ new/oslo.log-5.4.0/oslo.log.egg-info/PKG-INFO       2023-11-14 
10:58:27.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: oslo.log
-Version: 5.2.0
+Version: 5.4.0
 Summary: oslo.log library
 Home-page: https://docs.openstack.org/oslo.log/latest
 Author: OpenStack
@@ -49,6 +49,7 @@
 Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3.8
 Classifier: Programming Language :: Python :: 3.9
+Classifier: Programming Language :: Python :: 3.10
 Classifier: Programming Language :: Python :: 3 :: Only
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Requires-Python: >=3.8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.log-5.2.0/oslo.log.egg-info/SOURCES.txt 
new/oslo.log-5.4.0/oslo.log.egg-info/SOURCES.txt
--- old/oslo.log-5.2.0/oslo.log.egg-info/SOURCES.txt    2023-03-21 
17:19:26.000000000 +0100
+++ new/oslo.log-5.4.0/oslo.log.egg-info/SOURCES.txt    2023-11-14 
10:58:27.000000000 +0100
@@ -60,6 +60,7 @@
 oslo_log/handlers.py
 oslo_log/helpers.py
 oslo_log/log.py
+oslo_log/pipe_mutex.py
 oslo_log/rate_limit.py
 oslo_log/version.py
 oslo_log/versionutils.py
@@ -80,6 +81,7 @@
 oslo_log/tests/unit/test_formatters.py
 oslo_log/tests/unit/test_helpers.py
 oslo_log/tests/unit/test_log.py
+oslo_log/tests/unit/test_pipe_mutex.py
 oslo_log/tests/unit/test_rate_limit.py
 oslo_log/tests/unit/test_versionutils.py
 oslo_log/tests/unit/fixture/__init__.py
@@ -91,6 +93,7 @@
 releasenotes/notes/add-reno-e4fedb11ece56f1e.yaml
 
releasenotes/notes/add-system_scope-to-logging_user_identity_format-0581ce5070740375.yaml
 releasenotes/notes/always-add-error-text-715022964364ffa0.yaml
+releasenotes/notes/deprecate-windows-support-75e6ac72310d5e72.yaml
 releasenotes/notes/drop-python27-support-0fe4909a5468feb3.yaml
 releasenotes/notes/info-logging-7b7be9fc7a95aebc.yaml
 releasenotes/notes/init-global-request-id-eb2031bc221e5fb7.yaml
@@ -98,16 +101,18 @@
 releasenotes/notes/jsonformatter-repr-fd616eb6fa6caeb3.yaml
 releasenotes/notes/log-global_request_id-f97e6d663e8a80b3.yaml
 releasenotes/notes/log-rotation-595f8232cd987a6d.yaml
+releasenotes/notes/native-threads-logging-cc84f7288c4835a0.yaml
 releasenotes/notes/reload_log_config-743817192b1172b6.yaml
 releasenotes/notes/remove-log-format-b4b949701cee3315.yaml
 releasenotes/notes/remove-syslog-rfc-format-7a06772c0bb48e9b.yaml
 releasenotes/notes/remove-verbose-option-d0d1381e182d1be1.yaml
-releasenotes/notes/revert-native-threads-logging-e5e103eb81b4acad.yaml
 releasenotes/notes/systemd-journal-support-fcbc34b3c5ce93ec.yaml
 releasenotes/notes/use-json-option-96f71da54a3b9a18.yaml
 releasenotes/notes/use-project-in-user-identity-93fd6e0a2e434a6f.yaml
 releasenotes/notes/use_stderr_default_false-50d846b88cf2be90.yaml
 releasenotes/notes/windows-eventlog-2beb0a6010e342eb.yaml
+releasenotes/source/2023.1.rst
+releasenotes/source/2023.2.rst
 releasenotes/source/conf.py
 releasenotes/source/index.rst
 releasenotes/source/liberty.rst
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.log-5.2.0/oslo.log.egg-info/pbr.json 
new/oslo.log-5.4.0/oslo.log.egg-info/pbr.json
--- old/oslo.log-5.2.0/oslo.log.egg-info/pbr.json       2023-03-21 
17:19:26.000000000 +0100
+++ new/oslo.log-5.4.0/oslo.log.egg-info/pbr.json       2023-11-14 
10:58:27.000000000 +0100
@@ -1 +1 @@
-{"git_version": "16a8a42", "is_release": true}
\ No newline at end of file
+{"git_version": "b5b8c30", "is_release": true}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.log-5.2.0/oslo.log.egg-info/requires.txt 
new/oslo.log-5.4.0/oslo.log.egg-info/requires.txt
--- old/oslo.log-5.2.0/oslo.log.egg-info/requires.txt   2023-03-21 
17:19:26.000000000 +0100
+++ new/oslo.log-5.4.0/oslo.log.egg-info/requires.txt   2023-11-14 
10:58:27.000000000 +0100
@@ -17,8 +17,9 @@
 systemd-python>=234
 
 [test]
-bandit<1.7.0,>=1.6.0
+bandit<1.8.0,>=1.7.0
 coverage>=4.5.1
+eventlet!=0.32.0,>=0.30.1
 fixtures>=3.0.0
 hacking<2.1.0,>=2.0.0
 oslotest>=3.3.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.log-5.2.0/oslo_log/_options.py 
new/oslo.log-5.4.0/oslo_log/_options.py
--- old/oslo.log-5.2.0/oslo_log/_options.py     2023-03-21 17:18:57.000000000 
+0100
+++ new/oslo.log-5.4.0/oslo_log/_options.py     2023-11-14 10:58:01.000000000 
+0100
@@ -111,6 +111,8 @@
                      + _IGNORE_MESSAGE),
     cfg.BoolOpt('use_eventlog',
                 default=False,
+                deprecated_for_removal=True,
+                deprecated_reason='Windows support is no longer maintained.',
                 help='Log output to Windows Event Log.'),
     cfg.IntOpt('log_rotate_interval',
                default=1,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.log-5.2.0/oslo_log/log.py 
new/oslo.log-5.4.0/oslo_log/log.py
--- old/oslo.log-5.2.0/oslo_log/log.py  2023-03-21 17:18:57.000000000 +0100
+++ new/oslo.log-5.4.0/oslo_log/log.py  2023-11-14 10:58:01.000000000 +0100
@@ -231,7 +231,7 @@
             logging.config.fileConfig(log_config_append,
                                       disable_existing_loggers=False)
             _load_log_config.old_time = new_time
-    except (configparser.Error, KeyError, os.error) as exc:
+    except (configparser.Error, KeyError, os.error, RuntimeError) as exc:
         raise LogConfigError(log_config_append, str(exc))
 
 
@@ -265,8 +265,26 @@
     conf.register_mutate_hook(_mutate_hook)
 
 
-def setup(conf, product_name, version='unknown'):
+def _fix_eventlet_logging():
+    """Properly setup logging with eventlet on native threads.
+
+    Workaround for: https://github.com/eventlet/eventlet/issues/432
+    """
+
+    # If eventlet was not loaded before call to setup assume it's not used.
+    eventlet = sys.modules.get('eventlet')
+    if eventlet:
+        import eventlet.green.threading
+        from oslo_log import pipe_mutex
+        logging.threading = eventlet.green.threading
+        logging._lock = logging.threading.RLock()
+        logging.Handler.createLock = pipe_mutex.pipe_createLock
+
+
+def setup(conf, product_name, version='unknown', *, fix_eventlet=True):
     """Setup logging for the current application."""
+    if fix_eventlet:
+        _fix_eventlet_logging()
     if conf.log_config_append:
         _load_log_config(conf.log_config_append)
     else:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.log-5.2.0/oslo_log/pipe_mutex.py 
new/oslo.log-5.4.0/oslo_log/pipe_mutex.py
--- old/oslo.log-5.2.0/oslo_log/pipe_mutex.py   1970-01-01 01:00:00.000000000 
+0100
+++ new/oslo.log-5.4.0/oslo_log/pipe_mutex.py   2023-11-14 10:58:01.000000000 
+0100
@@ -0,0 +1,142 @@
+# Copyright (c) 2010-2012 OpenStack Foundation
+#
+# 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
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import errno
+import fcntl
+import os
+
+import eventlet
+import eventlet.debug
+import eventlet.greenthread
+import eventlet.hubs
+
+
+class PipeMutex(object):
+    """Mutex using a pipe.
+
+    Works across both greenlets and real threads, even at the same time.
+
+    Class code copied from Swift's swift/common/utils.py
+    Related eventlet bug: https://github.com/eventlet/eventlet/issues/432
+    """
+    def __init__(self):
+        self.rfd, self.wfd = os.pipe()
+
+        # You can't create a pipe in non-blocking mode; you must set it
+        # later.
+        rflags = fcntl.fcntl(self.rfd, fcntl.F_GETFL)
+        fcntl.fcntl(self.rfd, fcntl.F_SETFL, rflags | os.O_NONBLOCK)
+        os.write(self.wfd, b'-')  # start unlocked
+
+        self.owner = None
+
+        self.recursion_depth = 0
+        # Usually, it's an error to have multiple greenthreads all waiting
+        # to read the same file descriptor. It's often a sign of inadequate
+        # concurrency control; for example, if you have two greenthreads
+        # trying to use the same memcache connection, they'll end up writing
+        # interleaved garbage to the socket or stealing part of each others'
+        # responses.
+        #
+        # In this case, we have multiple greenthreads waiting on the same
+        # file descriptor by design. This lets greenthreads in real thread A
+        # wait with greenthreads in real thread B for the same mutex.
+        # Therefore, we must turn off eventlet's multiple-reader detection.
+        #
+        # It would be better to turn off multiple-reader detection for only
+        # our calls to trampoline(), but eventlet does not support that.
+        eventlet.debug.hub_prevent_multiple_readers(False)
+
+    def acquire(self, blocking=True):
+        """Acquire the mutex.
+
+        If called with blocking=False, returns True if the mutex was
+        acquired and False if it wasn't. Otherwise, blocks until the mutex
+        is acquired and returns True.
+        This lock is recursive; the same greenthread may acquire it as many
+        times as it wants to, though it must then release it that many times
+        too.
+        """
+        current_greenthread_id = id(eventlet.greenthread.getcurrent())
+        if self.owner == current_greenthread_id:
+            self.recursion_depth += 1
+            return True
+
+        while True:
+            try:
+                # If there is a byte available, this will read it and remove
+                # it from the pipe. If not, this will raise OSError with
+                # errno=EAGAIN.
+                os.read(self.rfd, 1)
+                self.owner = current_greenthread_id
+                return True
+            except OSError as err:
+                if err.errno != errno.EAGAIN:
+                    raise
+
+                if not blocking:
+                    return False
+
+                # Tell eventlet to suspend the current greenthread until
+                # self.rfd becomes readable. This will happen when someone
+                # else writes to self.wfd.
+                eventlet.hubs.trampoline(self.rfd, read=True)
+
+    def release(self):
+        """Release the mutex."""
+        current_greenthread_id = id(eventlet.greenthread.getcurrent())
+        if self.owner != current_greenthread_id:
+            raise RuntimeError("cannot release un-acquired lock")
+
+        if self.recursion_depth > 0:
+            self.recursion_depth -= 1
+            return
+
+        self.owner = None
+        os.write(self.wfd, b'X')
+
+    def close(self):
+        """Close the mutex.
+
+        This releases its file descriptors.
+        You can't use a mutex after it's been closed.
+        """
+        if self.wfd is not None:
+            os.close(self.wfd)
+            self.wfd = None
+        if self.rfd is not None:
+            os.close(self.rfd)
+            self.rfd = None
+        self.owner = None
+        self.recursion_depth = 0
+
+    def __del__(self):
+        # We need this so we don't leak file descriptors. Otherwise, if you
+        # call get_logger() and don't explicitly dispose of it by calling
+        # logger.logger.handlers[0].lock.close() [1], the pipe file
+        # descriptors are leaked.
+        #
+        # This only really comes up in tests. Service processes tend to call
+        # get_logger() once and then hang on to it until they exit, but the
+        # test suite calls get_logger() a lot.
+        #
+        # [1] and that's a completely ridiculous thing to expect callers to
+        # do, so nobody does it and that's okay.
+        self.close()
+
+
+def pipe_createLock(self):
+    """Replacement for logging.Handler.createLock method."""
+    self.lock = PipeMutex()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/oslo.log-5.2.0/oslo_log/tests/unit/test_pipe_mutex.py 
new/oslo.log-5.4.0/oslo_log/tests/unit/test_pipe_mutex.py
--- old/oslo.log-5.2.0/oslo_log/tests/unit/test_pipe_mutex.py   1970-01-01 
01:00:00.000000000 +0100
+++ new/oslo.log-5.4.0/oslo_log/tests/unit/test_pipe_mutex.py   2023-11-14 
10:58:01.000000000 +0100
@@ -0,0 +1,209 @@
+# Copyright (c) 2010-2012 OpenStack Foundation
+#
+# 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
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import contextlib
+import unittest
+from unittest import mock
+
+import eventlet
+from eventlet import debug as eventlet_debug
+from eventlet import greenpool
+
+from oslo_log import pipe_mutex
+
+
[email protected]
+def quiet_eventlet_exceptions():
+    orig_state = greenpool.DEBUG
+    eventlet_debug.hub_exceptions(False)
+    try:
+        yield
+    finally:
+        eventlet_debug.hub_exceptions(orig_state)
+
+
+class TestPipeMutex(unittest.TestCase):
+    """From  Swift's test/unit/common/test_utils.py"""
+    def setUp(self):
+        self.mutex = pipe_mutex.PipeMutex()
+
+    def tearDown(self):
+        self.mutex.close()
+
+    def test_nonblocking(self):
+        evt_lock1 = eventlet.event.Event()
+        evt_lock2 = eventlet.event.Event()
+        evt_unlock = eventlet.event.Event()
+
+        def get_the_lock():
+            self.mutex.acquire()
+            evt_lock1.send('got the lock')
+            evt_lock2.wait()
+            self.mutex.release()
+            evt_unlock.send('released the lock')
+
+        eventlet.spawn(get_the_lock)
+        evt_lock1.wait()  # Now, the other greenthread has the lock.
+
+        self.assertFalse(self.mutex.acquire(blocking=False))
+        evt_lock2.send('please release the lock')
+        evt_unlock.wait()  # The other greenthread has released the lock.
+        self.assertTrue(self.mutex.acquire(blocking=False))
+
+    def test_recursive(self):
+        self.assertTrue(self.mutex.acquire(blocking=False))
+        self.assertTrue(self.mutex.acquire(blocking=False))
+
+        def try_acquire_lock():
+            return self.mutex.acquire(blocking=False)
+
+        self.assertFalse(eventlet.spawn(try_acquire_lock).wait())
+        self.mutex.release()
+        self.assertFalse(eventlet.spawn(try_acquire_lock).wait())
+        self.mutex.release()
+        self.assertTrue(eventlet.spawn(try_acquire_lock).wait())
+
+    def test_release_without_acquire(self):
+        self.assertRaises(RuntimeError, self.mutex.release)
+
+    def test_too_many_releases(self):
+        self.mutex.acquire()
+        self.mutex.release()
+        self.assertRaises(RuntimeError, self.mutex.release)
+
+    def test_wrong_releaser(self):
+        self.mutex.acquire()
+        with quiet_eventlet_exceptions():
+            self.assertRaises(RuntimeError,
+                              eventlet.spawn(self.mutex.release).wait)
+
+    def test_blocking(self):
+        evt = eventlet.event.Event()
+
+        sequence = []
+
+        def coro1():
+            eventlet.sleep(0)  # let coro2 go
+
+            self.mutex.acquire()
+            sequence.append('coro1 acquire')
+            evt.send('go')
+            self.mutex.release()
+            sequence.append('coro1 release')
+
+        def coro2():
+            evt.wait()  # wait for coro1 to start us
+            self.mutex.acquire()
+            sequence.append('coro2 acquire')
+            self.mutex.release()
+            sequence.append('coro2 release')
+
+        c1 = eventlet.spawn(coro1)
+        c2 = eventlet.spawn(coro2)
+
+        c1.wait()
+        c2.wait()
+
+        self.assertEqual(sequence, [
+            'coro1 acquire',
+            'coro1 release',
+            'coro2 acquire',
+            'coro2 release'])
+
+    def test_blocking_tpool(self):
+        # Note: this test's success isn't a guarantee that the mutex is
+        # working. However, this test's failure means that the mutex is
+        # definitely broken.
+        sequence = []
+
+        def do_stuff():
+            n = 10
+            while n > 0:
+                self.mutex.acquire()
+                sequence.append("<")
+                eventlet.sleep(0.0001)
+                sequence.append(">")
+                self.mutex.release()
+                n -= 1
+
+        greenthread1 = eventlet.spawn(do_stuff)
+        greenthread2 = eventlet.spawn(do_stuff)
+
+        real_thread1 = eventlet.patcher.original('threading').Thread(
+            target=do_stuff)
+        real_thread1.start()
+
+        real_thread2 = eventlet.patcher.original('threading').Thread(
+            target=do_stuff)
+        real_thread2.start()
+
+        greenthread1.wait()
+        greenthread2.wait()
+        real_thread1.join()
+        real_thread2.join()
+
+        self.assertEqual(''.join(sequence), "<>" * 40)
+
+    def test_blocking_preserves_ownership(self):
+        pthread1_event = eventlet.patcher.original('threading').Event()
+        pthread2_event1 = eventlet.patcher.original('threading').Event()
+        pthread2_event2 = eventlet.patcher.original('threading').Event()
+        thread_id = []
+        owner = []
+
+        def pthread1():
+            thread_id.append(id(eventlet.greenthread.getcurrent()))
+            self.mutex.acquire()
+            owner.append(self.mutex.owner)
+            pthread2_event1.set()
+
+            orig_os_write = pipe_mutex.os.write
+
+            def patched_os_write(*a, **kw):
+                try:
+                    return orig_os_write(*a, **kw)
+                finally:
+                    pthread1_event.wait()
+
+            with mock.patch.object(pipe_mutex.os, 'write', patched_os_write):
+                self.mutex.release()
+            pthread2_event2.set()
+
+        def pthread2():
+            pthread2_event1.wait()  # ensure pthread1 acquires lock first
+            thread_id.append(id(eventlet.greenthread.getcurrent()))
+            self.mutex.acquire()
+            pthread1_event.set()
+            pthread2_event2.wait()
+            owner.append(self.mutex.owner)
+            self.mutex.release()
+
+        real_thread1 = eventlet.patcher.original('threading').Thread(
+            target=pthread1)
+        real_thread1.start()
+
+        real_thread2 = eventlet.patcher.original('threading').Thread(
+            target=pthread2)
+        real_thread2.start()
+
+        real_thread1.join()
+        real_thread2.join()
+        self.assertEqual(thread_id, owner)
+        self.assertIsNone(self.mutex.owner)
+
+    @classmethod
+    def tearDownClass(cls):
+        # PipeMutex turns this off when you instantiate one
+        eventlet.debug.hub_prevent_multiple_readers(True)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/oslo.log-5.2.0/releasenotes/notes/deprecate-windows-support-75e6ac72310d5e72.yaml
 
new/oslo.log-5.4.0/releasenotes/notes/deprecate-windows-support-75e6ac72310d5e72.yaml
--- 
old/oslo.log-5.2.0/releasenotes/notes/deprecate-windows-support-75e6ac72310d5e72.yaml
       1970-01-01 01:00:00.000000000 +0100
+++ 
new/oslo.log-5.4.0/releasenotes/notes/deprecate-windows-support-75e6ac72310d5e72.yaml
       2023-11-14 10:58:01.000000000 +0100
@@ -0,0 +1,5 @@
+---
+deprecations:
+  - |
+    Windows support has been deprecated, because of the retiremenet of
+    the Winstackers project.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/oslo.log-5.2.0/releasenotes/notes/native-threads-logging-cc84f7288c4835a0.yaml
 
new/oslo.log-5.4.0/releasenotes/notes/native-threads-logging-cc84f7288c4835a0.yaml
--- 
old/oslo.log-5.2.0/releasenotes/notes/native-threads-logging-cc84f7288c4835a0.yaml
  1970-01-01 01:00:00.000000000 +0100
+++ 
new/oslo.log-5.4.0/releasenotes/notes/native-threads-logging-cc84f7288c4835a0.yaml
  2023-11-14 10:58:01.000000000 +0100
@@ -0,0 +1,6 @@
+---
+fixes:
+  - |
+    `Bug #1983863
+    <https://bugs.launchpad.net/oslo.log/+bug/1983863>`_: Fixed logging in
+    eventlet native threads.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/oslo.log-5.2.0/releasenotes/notes/revert-native-threads-logging-e5e103eb81b4acad.yaml
 
new/oslo.log-5.4.0/releasenotes/notes/revert-native-threads-logging-e5e103eb81b4acad.yaml
--- 
old/oslo.log-5.2.0/releasenotes/notes/revert-native-threads-logging-e5e103eb81b4acad.yaml
   2023-03-21 17:18:57.000000000 +0100
+++ 
new/oslo.log-5.4.0/releasenotes/notes/revert-native-threads-logging-e5e103eb81b4acad.yaml
   1970-01-01 01:00:00.000000000 +0100
@@ -1,8 +0,0 @@
----
-other:
-  - |
-    This release reverts fix for `Bug #1983863
-    <https://bugs.launchpad.net/oslo.log/+bug/1983863>`_: Fixed logging in
-    eventlet native threads.
-    This fix caused gate problems during cross-project testing and needed
-    to be removed from 2023.1 Antelope release.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.log-5.2.0/releasenotes/source/2023.1.rst 
new/oslo.log-5.4.0/releasenotes/source/2023.1.rst
--- old/oslo.log-5.2.0/releasenotes/source/2023.1.rst   1970-01-01 
01:00:00.000000000 +0100
+++ new/oslo.log-5.4.0/releasenotes/source/2023.1.rst   2023-11-14 
10:58:01.000000000 +0100
@@ -0,0 +1,6 @@
+===========================
+2023.1 Series Release Notes
+===========================
+
+.. release-notes::
+   :branch: stable/2023.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.log-5.2.0/releasenotes/source/2023.2.rst 
new/oslo.log-5.4.0/releasenotes/source/2023.2.rst
--- old/oslo.log-5.2.0/releasenotes/source/2023.2.rst   1970-01-01 
01:00:00.000000000 +0100
+++ new/oslo.log-5.4.0/releasenotes/source/2023.2.rst   2023-11-14 
10:58:01.000000000 +0100
@@ -0,0 +1,6 @@
+===========================
+2023.2 Series Release Notes
+===========================
+
+.. release-notes::
+   :branch: stable/2023.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.log-5.2.0/releasenotes/source/index.rst 
new/oslo.log-5.4.0/releasenotes/source/index.rst
--- old/oslo.log-5.2.0/releasenotes/source/index.rst    2023-03-21 
17:18:57.000000000 +0100
+++ new/oslo.log-5.4.0/releasenotes/source/index.rst    2023-11-14 
10:58:01.000000000 +0100
@@ -6,6 +6,8 @@
    :maxdepth: 1
 
    unreleased
+   2023.2
+   2023.1
    victoria
    ussuri
    train
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/oslo.log-5.2.0/releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po 
new/oslo.log-5.4.0/releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po
--- 
old/oslo.log-5.2.0/releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po 
    2023-03-21 17:18:57.000000000 +0100
+++ 
new/oslo.log-5.4.0/releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po 
    2023-11-14 10:58:01.000000000 +0100
@@ -2,21 +2,26 @@
 # Andi Chandler <[email protected]>, 2017. #zanata
 # Andi Chandler <[email protected]>, 2018. #zanata
 # Andi Chandler <[email protected]>, 2020. #zanata
+# Andi Chandler <[email protected]>, 2022. #zanata
+# Andi Chandler <[email protected]>, 2023. #zanata
 msgid ""
 msgstr ""
 "Project-Id-Version: oslo.log\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-09-22 12:42+0000\n"
+"POT-Creation-Date: 2023-05-05 13:36+0000\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"PO-Revision-Date: 2020-10-10 02:28+0000\n"
+"PO-Revision-Date: 2023-05-09 12:01+0000\n"
 "Last-Translator: Andi Chandler <[email protected]>\n"
 "Language-Team: English (United Kingdom)\n"
 "Language: en_GB\n"
 "X-Generator: Zanata 4.3.3\n"
 "Plural-Forms: nplurals=2; plural=(n != 1)\n"
 
+msgid "2023.1 Series Release Notes"
+msgstr "2023.1 Series Release Notes"
+
 msgid "3.1.0"
 msgstr "3.1.0"
 
@@ -74,6 +79,18 @@
 msgid "4.2.0"
 msgstr "4.2.0"
 
+msgid "4.7.0"
+msgstr "4.7.0"
+
+msgid "4.8.0"
+msgstr "4.8.0"
+
+msgid "5.0.0"
+msgstr "5.0.0"
+
+msgid "5.2.0"
+msgstr "5.2.0"
+
 msgid ""
 "A new ``oslo_log.log.is_debug_enabled`` helper function is added that allows "
 "to determine whether debug mode is enabled for logging."
@@ -99,6 +116,20 @@
 "avoid same logs on service log and specific log file by option --log-file."
 
 msgid ""
+"Default value of the ``[DEFAULT] logging_context_format_string`` option has "
+"been updated and now Global Request IDs are logged by default."
+msgstr ""
+"Default value of the ``[DEFAULT] logging_context_format_string`` option has "
+"been updated and now Global Request IDs are logged by default."
+
+msgid ""
+"Default value of the ``[DEFAULT] logging_user_identity_format`` option has "
+"been updated and now includes system scope information by default."
+msgstr ""
+"Default value of the ``[DEFAULT] logging_user_identity_format`` option has "
+"been updated and now includes system scope information by default."
+
+msgid ""
 "If the log format string includes ``%(error_summary)s``, it will be replaced "
 "with a summary of the current error when there is one and with \"``-``\" "
 "when there is no error.  If the log format string does not include ``"
@@ -111,6 +142,13 @@
 "%(error_summary)s`` the error summary will be appended to the end of the "
 "line automatically, only if there is an error."
 
+msgid ""
+"Initialize the ``global_request_id`` context variable with a default value "
+"if the key is not passed in the context."
+msgstr ""
+"Initialise the ``global_request_id`` context variable with a default value "
+"if the key is not passed in the context."
+
 msgid "Liberty Series Release Notes"
 msgstr "Liberty Series Release Notes"
 
@@ -185,6 +223,13 @@
 "to prevent JSON serialization errors on logging. The fix requires oslo."
 "serialisation 2.21.1 or newer. (Bug #1593641)"
 
+msgid ""
+"The ``logging_user_identity_format`` option's default value is updated to "
+"replace the obsolete ``tenant`` argument with ``project``."
+msgstr ""
+"The ``logging_user_identity_format`` option's default value is updated to "
+"replace the obsolete ``tenant`` argument with ``project``."
+
 msgid "The deprecated 'verbose' option has been removed."
 msgstr "The deprecated 'verbose' option has been removed."
 
@@ -223,6 +268,17 @@
 "the logs when set to True. The option is also available through the command "
 "line via the ``--use-json`` flag."
 
+msgid ""
+"This release reverts fix for `Bug #1983863 <https://bugs.launchpad.net/oslo.";
+"log/+bug/1983863>`_: Fixed logging in eventlet native threads. This fix "
+"caused gate problems during cross-project testing and needed to be removed "
+"from 2023.1 Antelope release."
+msgstr ""
+"This release reverts the fix for `Bug #1983863 <https://bugs.launchpad.net/";
+"oslo.log/+bug/1983863>`_: Fixed logging in eventlet native threads. This fix "
+"caused gate problems during cross-project testing and needed to be removed "
+"from 2023.1 Antelope release."
+
 msgid "Train Series Release Notes"
 msgstr "Train Series Release Notes"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.log-5.2.0/setup.cfg new/oslo.log-5.4.0/setup.cfg
--- old/oslo.log-5.2.0/setup.cfg        2023-03-21 17:19:26.847390700 +0100
+++ new/oslo.log-5.4.0/setup.cfg        2023-11-14 10:58:27.887485500 +0100
@@ -17,6 +17,7 @@
        Programming Language :: Python :: 3
        Programming Language :: Python :: 3.8
        Programming Language :: Python :: 3.9
+       Programming Language :: Python :: 3.10
        Programming Language :: Python :: 3 :: Only
        Programming Language :: Python :: Implementation :: CPython
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.log-5.2.0/setup.py new/oslo.log-5.4.0/setup.py
--- old/oslo.log-5.2.0/setup.py 2023-03-21 17:18:57.000000000 +0100
+++ new/oslo.log-5.4.0/setup.py 2023-11-14 10:58:01.000000000 +0100
@@ -15,14 +15,6 @@
 
 import setuptools
 
-# In python < 2.7.4, a lazy loading of package `pbr` will break
-# setuptools if some other modules registered functions in `atexit`.
-# solution from: http://bugs.python.org/issue15881#msg170215
-try:
-    import multiprocessing  # noqa
-except ImportError:
-    pass
-
 setuptools.setup(
     setup_requires=['pbr>=2.0.0'],
     pbr=True)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.log-5.2.0/test-requirements.txt 
new/oslo.log-5.4.0/test-requirements.txt
--- old/oslo.log-5.2.0/test-requirements.txt    2023-03-21 17:18:57.000000000 
+0100
+++ new/oslo.log-5.4.0/test-requirements.txt    2023-11-14 10:58:01.000000000 
+0100
@@ -11,8 +11,10 @@
 coverage>=4.5.1 # Apache-2.0
 
 # Bandit security code scanner
-bandit>=1.6.0,<1.7.0 # Apache-2.0
+bandit>=1.7.0,<1.8.0 # Apache-2.0
 
 fixtures>=3.0.0 # Apache-2.0/BSD
 
 pre-commit>=2.6.0 # MIT
+
+eventlet>=0.30.1,!=0.32.0 # MIT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.log-5.2.0/tox.ini new/oslo.log-5.4.0/tox.ini
--- old/oslo.log-5.2.0/tox.ini  2023-03-21 17:18:57.000000000 +0100
+++ new/oslo.log-5.4.0/tox.ini  2023-11-14 10:58:01.000000000 +0100
@@ -8,7 +8,7 @@
 allowlist_externals =
   find
 deps =
-  
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/2023.1}
+  
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
   -r{toxinidir}/test-requirements.txt
 commands =
   find . -type f -name "*.pyc" -delete
@@ -27,7 +27,7 @@
 [testenv:docs]
 allowlist_externals = rm
 deps =
-  
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/2023.1}
+  
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
   -r{toxinidir}/doc/requirements.txt
 commands =
   rm -fr doc/build
@@ -36,7 +36,7 @@
 [testenv:releasenotes]
 allowlist_externals = rm
 deps =
-  
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/2023.1}
+  
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
   -r{toxinidir}/doc/requirements.txt
 commands =
   rm -rf releasenotes/build

Reply via email to