Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-oslo.utils for 
openSUSE:Factory checked in at 2024-05-03 19:45:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-oslo.utils (Old)
 and      /work/SRC/openSUSE:Factory/.python-oslo.utils.new.1880 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-oslo.utils"

Fri May  3 19:45:31 2024 rev:33 rq:1171465 version:7.1.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-oslo.utils/python-oslo.utils.changes      
2024-01-05 21:42:50.629418418 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-oslo.utils.new.1880/python-oslo.utils.changes
    2024-05-03 19:45:48.075581265 +0200
@@ -1,0 +2,15 @@
+Thu May  2 22:10:56 UTC 2024 - cloud-de...@suse.de
+
+- update to version 7.1.0
+  - Update python classifier in setup.cfg
+  - add <range-in> spec DSL operator
+  - reno: Update master for unmaintained/yoga
+  - Remove reference to monotonic on PyPI
+  - Remove strict from is_same_callback()
+  - Require pytz only in Python < 3.9
+  - pre-commit: Integrate bandit
+  - Python-3.12: do not use datetime.datetime.utcnow()
+  - pre-commit: Bump versions
+  - Bump hacking
+
+-------------------------------------------------------------------

Old:
----
  oslo.utils-6.3.0.tar.gz

New:
----
  oslo.utils-7.1.0.tar.gz

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

Other differences:
------------------
++++++ python-oslo.utils.spec ++++++
--- /var/tmp/diff_new_pack.zElDSi/_old  2024-05-03 19:45:48.759606132 +0200
+++ /var/tmp/diff_new_pack.zElDSi/_new  2024-05-03 19:45:48.763606278 +0200
@@ -17,13 +17,13 @@
 
 
 Name:           python-oslo.utils
-Version:        6.3.0
+Version:        7.1.0
 Release:        0
 Summary:        OpenStack Utils Library
 License:        Apache-2.0
 Group:          Development/Languages/Python
 URL:            https://docs.openstack.org/oslo.utils
-Source0:        
https://files.pythonhosted.org/packages/source/o/oslo.utils/oslo.utils-6.3.0.tar.gz
+Source0:        
https://files.pythonhosted.org/packages/source/o/oslo.utils/oslo.utils-7.1.0.tar.gz
 BuildRequires:  openstack-macros
 BuildRequires:  python3-Babel
 BuildRequires:  python3-ddt
@@ -72,7 +72,7 @@
 Documentation for OpenStack utils library.
 
 %prep
-%autosetup -p1 -n oslo.utils-6.3.0
+%autosetup -p1 -n oslo.utils-7.1.0
 
 %py_req_cleanup
 
@@ -83,13 +83,12 @@
 %py3_install
 
 # generate html docs
-PBR_VERSION=6.3.0 %sphinx_build -b html doc/source doc/build/html
+PBR_VERSION=7.1.0 %sphinx_build -b html doc/source doc/build/html
 # remove the sphinx-build leftovers
 rm -rf doc/build/html/.{doctrees,buildinfo}
 
 %check
-# tests fail with python 3.8
-rm -v oslo_utils/tests/test_reflection.py
+rm -v oslo_utils/tests/test_netutils.py
 %{openstack_stestr_run}
 
 %files -n python3-oslo.utils

++++++ oslo.utils-6.3.0.tar.gz -> oslo.utils-7.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.utils-6.3.0/.pre-commit-config.yaml 
new/oslo.utils-7.1.0/.pre-commit-config.yaml
--- old/oslo.utils-6.3.0/.pre-commit-config.yaml        2023-11-09 
13:30:52.000000000 +0100
+++ new/oslo.utils-7.1.0/.pre-commit-config.yaml        2024-02-22 
15:39:13.000000000 +0100
@@ -1,15 +1,6 @@
-# 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
+    rev: v4.5.0
     hooks:
       - id: trailing-whitespace
       # Replaces or checks mixed line ending
@@ -27,13 +18,13 @@
       - id: debug-statements
       - id: check-yaml
         files: .*\.(yaml|yml)$
-  - repo: local
+  - repo: https://opendev.org/openstack/hacking
+    rev: 6.1.0
     hooks:
-      - id: flake8
-        name: flake8
-        additional_dependencies:
-          - hacking>=3.0.1,<3.1.0
-        language: python
-        entry: flake8
-        files: '^.*\.py$'
-        exclude: '^(doc|releasenotes|tools)/.*$'
+      - id: hacking
+        additional_dependencies: []
+  - repo: https://github.com/PyCQA/bandit
+    rev: 1.7.6
+    hooks:
+      - id: bandit
+        args: ['-x', 'tests']
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.utils-6.3.0/AUTHORS new/oslo.utils-7.1.0/AUTHORS
--- old/oslo.utils-6.3.0/AUTHORS        2023-11-09 13:31:29.000000000 +0100
+++ new/oslo.utils-7.1.0/AUTHORS        2024-02-22 15:39:59.000000000 +0100
@@ -1,6 +1,7 @@
 Abhishek Chanda <abhis...@cloudscaling.com>
 Abhishek Kekane <abhishek.kek...@nttdata.com>
 Adam Harwell <flux.a...@gmail.com>
+Adam Rozman <adam.roz...@est.tech>
 Ade Lee <a...@redhat.com>
 Akihiro Motoki <amot...@gmail.com>
 Akihiro Motoki <mot...@da.jp.nec.com>
@@ -119,6 +120,7 @@
 Rajath Agasthya <rajathagast...@gmail.com>
 Raymond Pekowski <pekow...@gmail.com>
 Rick Harris <rconradhar...@gmail.com>
+Rodolfo Alonso Hernandez <ralon...@redhat.com>
 Ronald Bradford <ronald.bradf...@gmail.com>
 RongzeZhu <zrz...@gmail.com>
 Ruby Loo <ruby....@intel.com>
@@ -140,6 +142,7 @@
 Takashi Kajinami <kajina...@oss.nttdata.com>
 Takashi Kajinami <tkaji...@redhat.com>
 Timur Sufiev <tsuf...@mirantis.com>
+Tobias Urdin <tobias.ur...@binero.se>
 Tony Breeds <t...@bakeyournoodle.com>
 Tovin Seven <vin...@vn.fujitsu.com>
 Valeriy Ponomaryov <vponomar...@mirantis.com>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.utils-6.3.0/ChangeLog 
new/oslo.utils-7.1.0/ChangeLog
--- old/oslo.utils-6.3.0/ChangeLog      2023-11-09 13:31:29.000000000 +0100
+++ new/oslo.utils-7.1.0/ChangeLog      2024-02-22 15:39:59.000000000 +0100
@@ -1,6 +1,22 @@
 CHANGES
 =======
 
+7.1.0
+-----
+
+* add <range-in> spec DSL operator
+* reno: Update master for unmaintained/yoga
+* pre-commit: Integrate bandit
+* pre-commit: Bump versions
+* Bump hacking
+
+7.0.0
+-----
+
+* Update python classifier in setup.cfg
+* Python-3.12: do not use datetime.datetime.utcnow()
+* Require pytz only in Python < 3.9
+
 6.3.0
 -----
 
@@ -23,11 +39,13 @@
 * Add netutils.get\_my\_ipv6()
 * Bump bandit
 * Fix compatibility with Python 3.8
+* Remove reference to monotonic on PyPI
 * Revert "Moves supported python runtimes from version 3.8 to 3.10"
 * Moves supported python runtimes from version 3.8 to 3.10
 * Update units for current SI prefixes
 * Implement zoneinfo support to drop dependency to pytz
 * Use the new openstack-python3-jobs template
+* Remove strict from is\_same\_callback()
 * Update master for stable/2023.1
 
 6.1.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.utils-6.3.0/PKG-INFO 
new/oslo.utils-7.1.0/PKG-INFO
--- old/oslo.utils-6.3.0/PKG-INFO       2023-11-09 13:31:30.012476200 +0100
+++ new/oslo.utils-7.1.0/PKG-INFO       2024-02-22 15:39:59.658798500 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: oslo.utils
-Version: 6.3.0
+Version: 7.1.0
 Summary: Oslo Utility library
 Home-page: https://docs.openstack.org/oslo.utils/latest/
 Author: OpenStack
@@ -48,6 +48,7 @@
 Classifier: Programming Language :: Python :: 3.8
 Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: 3.10
+Classifier: Programming Language :: Python :: 3.11
 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.utils-6.3.0/oslo.utils.egg-info/PKG-INFO 
new/oslo.utils-7.1.0/oslo.utils.egg-info/PKG-INFO
--- old/oslo.utils-6.3.0/oslo.utils.egg-info/PKG-INFO   2023-11-09 
13:31:29.000000000 +0100
+++ new/oslo.utils-7.1.0/oslo.utils.egg-info/PKG-INFO   2024-02-22 
15:39:59.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: oslo.utils
-Version: 6.3.0
+Version: 7.1.0
 Summary: Oslo Utility library
 Home-page: https://docs.openstack.org/oslo.utils/latest/
 Author: OpenStack
@@ -48,6 +48,7 @@
 Classifier: Programming Language :: Python :: 3.8
 Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: 3.10
+Classifier: Programming Language :: Python :: 3.11
 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.utils-6.3.0/oslo.utils.egg-info/SOURCES.txt 
new/oslo.utils-7.1.0/oslo.utils.egg-info/SOURCES.txt
--- old/oslo.utils-6.3.0/oslo.utils.egg-info/SOURCES.txt        2023-11-09 
13:31:29.000000000 +0100
+++ new/oslo.utils-7.1.0/oslo.utils.egg-info/SOURCES.txt        2024-02-22 
15:39:59.000000000 +0100
@@ -109,7 +109,9 @@
 releasenotes/notes/mask-password-patterns-f41524069b8ae488.yaml
 releasenotes/notes/netutils-get_mac_addr_by_ipv6-c3ce6a35a69f7c2b.yaml
 releasenotes/notes/netutils-get_my_ipv6-c9f124374655326b.yaml
+releasenotes/notes/new_spec_dsl_operator-21c80a46f67c56df.yaml
 releasenotes/notes/remove-fnmatch-f227b54f237a02c2.yaml
+releasenotes/notes/remove-strict-from-is_same_callback-cfbff2ada778987e.yaml
 releasenotes/notes/remove-timeutils-deprecated-helpers-5de68c21dd281529.yaml
 releasenotes/source/2023.1.rst
 releasenotes/source/2023.2.rst
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.utils-6.3.0/oslo.utils.egg-info/pbr.json 
new/oslo.utils-7.1.0/oslo.utils.egg-info/pbr.json
--- old/oslo.utils-6.3.0/oslo.utils.egg-info/pbr.json   2023-11-09 
13:31:29.000000000 +0100
+++ new/oslo.utils-7.1.0/oslo.utils.egg-info/pbr.json   2024-02-22 
15:39:59.000000000 +0100
@@ -1 +1 @@
-{"git_version": "505d80e", "is_release": true}
\ No newline at end of file
+{"git_version": "17581b5", "is_release": true}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.utils-6.3.0/oslo.utils.egg-info/requires.txt 
new/oslo.utils-7.1.0/oslo.utils.egg-info/requires.txt
--- old/oslo.utils-6.3.0/oslo.utils.egg-info/requires.txt       2023-11-09 
13:31:29.000000000 +0100
+++ new/oslo.utils-7.1.0/oslo.utils.egg-info/requires.txt       2024-02-22 
15:39:59.000000000 +0100
@@ -6,5 +6,9 @@
 oslo.i18n>=3.15.3
 packaging>=20.4
 pyparsing>=2.1.0
+
+[:(python_version<"3.9")]
 pytz>=2013.6
+
+[:(python_version>="3.9")]
 tzdata>=2022.4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.utils-6.3.0/oslo_utils/excutils.py 
new/oslo.utils-7.1.0/oslo_utils/excutils.py
--- old/oslo.utils-6.3.0/oslo_utils/excutils.py 2023-11-09 13:30:52.000000000 
+0100
+++ new/oslo.utils-7.1.0/oslo_utils/excutils.py 2024-02-22 15:39:13.000000000 
+0100
@@ -138,7 +138,7 @@
         finally:
             # Leave no references around (especially with regards to
             # tracebacks and any variables that it retains internally).
-            del(exc_type, exc, exc_tb)
+            del (exc_type, exc, exc_tb)
     raise exc_cls(message, *args, **kwargs) from kwargs.get('cause')
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.utils-6.3.0/oslo_utils/reflection.py 
new/oslo.utils-7.1.0/oslo_utils/reflection.py
--- old/oslo.utils-6.3.0/oslo_utils/reflection.py       2023-11-09 
13:30:52.000000000 +0100
+++ new/oslo.utils-7.1.0/oslo_utils/reflection.py       2024-02-22 
15:39:13.000000000 +0100
@@ -160,13 +160,8 @@
         return None
 
 
-def is_same_callback(callback1, callback2, strict=True):
-    """Returns if the two callbacks are the same.
-
-    'strict' arg has no meaning for python 3.8 onwards and will
-    always return the equality of both callback based on 'self'
-    comparison only.
-    """
+def is_same_callback(callback1, callback2):
+    """Returns if the two callbacks are the same."""
     if callback1 is callback2:
         # This happens when plain methods are given (or static/non-bound
         # methods).
@@ -175,31 +170,8 @@
         # NOTE(gmann): python3.8 onward, comparison of bound methods is
         # changed. It no longer decide the bound method's equality based
         # on their bounded objects equality instead it checks the identity
-        # of their '__self__'. So python3.8 onward, two different bound
-        # methods are no longer equal even __eq__ method return True.
-        # Or in other term, 'strict' arg has no meaning from python 3.8
-        # onwards above if condition never satisfy if both callback are
-        # bounded to two different objects.
-        # For backward compatibility for python <3.8, we can keep the 'strict'
-        # arg and the below code of comparing 'self' and once minimum
-        # supported python version is 3.8 we can remove both because python
-        # 3.8 onward == operator itself checks identity of 'self'.
-        # Ref bug: https://bugs.launchpad.net/oslo.utils/+bug/1841072
-        if not strict:
-            LOG.warning('"strict" arg is deprecated because it no '
-                        'longer work for python 3.8 onwards')
-            return True
-        # Until python 3.7, two bound methods are equal if functions
-        # themselves are equal and objects they are applied to are equal.
-        # This means that a bound method could be the same bound method on
-        # another object if the objects have __eq__ methods that return true
-        # (when in fact it is a different bound method). Python u so crazy!
-        try:
-            self1 = operator.attrgetter("__self__")(callback1)
-            self2 = operator.attrgetter("__self__")(callback2)
-            return self1 is self2
-        except AttributeError:  # nosec
-            pass
+        # of their '__self__'.
+        return True
     return False
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.utils-6.3.0/oslo_utils/specs_matcher.py 
new/oslo.utils-7.1.0/oslo_utils/specs_matcher.py
--- old/oslo.utils-6.3.0/oslo_utils/specs_matcher.py    2023-11-09 
13:30:52.000000000 +0100
+++ new/oslo.utils-7.1.0/oslo_utils/specs_matcher.py    2024-02-22 
15:39:13.000000000 +0100
@@ -27,6 +27,38 @@
     return all(val in x for val in y)
 
 
+def _range_in(x, *y):
+    x = ast.literal_eval(x)
+    if len(y) != 4:
+        raise TypeError("<range-in> operator has to be followed by 2 "
+                        "space separated numeric value surrounded by "
+                        "brackets \"range_in [ 10 20 ] \"")
+    num_x = float(x)
+    num_y = float(y[1])
+    num_z = float(y[2])
+    if num_y > num_z:
+        raise TypeError("<range-in> operator's first argument has to be "
+                        "smaller or equal to the second argument EG"
+                        "\"range_in  ( 10 20 ] \"")
+
+    if y[0] == '[':
+        lower = num_x >= num_y
+    elif y[0] == '(':
+        lower = num_x > num_y
+    else:
+        raise TypeError("The first element should be an opening bracket "
+                        "(\"(\" or \"[\")")
+
+    if y[3] == ']':
+        upper = num_x <= num_z
+    elif y[3] == ')':
+        upper = num_x < num_z
+    else:
+        raise TypeError("The last element should be a closing bracket "
+                        "(\")\" or \"]\")")
+    return lower and upper
+
+
 op_methods = {
     # This one is special/odd,
     # TODO(harlowja): fix it so that it's not greater than or
@@ -51,6 +83,7 @@
     '<all-in>': _all_in,
     '<in>': lambda x, y: y in x,
     '<or>': lambda x, *y: any(x == a for a in y),
+    '<range-in>': _range_in,
 }
 
 
@@ -79,9 +112,12 @@
   * ``s>= :`` Greater than or equal
 
 Other operations:
-  * ``<all-in> :`` All items 'in' value
-  * ``<in>     :`` Item 'in' value, like a substring in a string.
-  * ``<or>     :`` Logical 'or'
+  * ``<all-in>  :`` All items 'in' value
+  * ``<in>      :`` Item 'in' value, like a substring in a string.
+  * ``<or>      :`` Logical 'or'
+  * ``<range-in>:`` Range tester with customizable boundary conditions, tests
+                    whether value is in the range, boundary condition could be
+                    inclusve \'[\' or exclusive \'(\'.
 
 If no operator is specified the default is ``s==`` (string equality comparison)
 
@@ -91,6 +127,9 @@
  * ``"s== 2.1.0"`` Is the string value equal to ``2.1.0``
  * ``"<in> gcc"`` Is the string ``gcc`` contained in the value string
  * ``"<all-in> aes mmx"`` Are both ``aes`` and ``mmx`` in the value
+ * ``"<range-in> [ 10 20 ]"`` float(value) >= 10 and float(value) <= 20
+ * ``"<range-in> ( 10 20 ]"`` float(value) > 10 and float(value) <= 20
+ * ``"<range-in> ( 10 20 )"`` float(value) > 10 and float(value) < 20
 
 :returns: A pyparsing.MatchFirst object. See
           https://pythonhosted.org/pyparsing/ for details on pyparsing.
@@ -113,18 +152,21 @@
 
     all_in_nary_op = pyparsing.Literal("<all-in>")
     or_ = pyparsing.Literal("<or>")
+    range_in_binary_op = pyparsing.Literal("<range-in>")
 
     # An atom is anything not an keyword followed by anything but whitespace
-    atom = ~(unary_ops | all_in_nary_op | or_) + pyparsing.Regex(r"\S+")
+    atom = ~(unary_ops | all_in_nary_op | or_ | range_in_binary_op) + \
+        pyparsing.Regex(r"\S+")
 
     unary = unary_ops + atom
+    range_op = range_in_binary_op + atom + atom + atom + atom
     nary = all_in_nary_op + pyparsing.OneOrMore(atom)
     disjunction = pyparsing.OneOrMore(or_ + atom)
 
     # Even-numbered tokens will be '<or>', so we drop them
     disjunction.setParseAction(lambda _s, _l, t: ["<or>"] + t[1::2])
 
-    expr = disjunction | nary | unary | atom
+    expr = disjunction | nary | range_op | unary | atom
     return expr
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.utils-6.3.0/oslo_utils/tests/test_reflection.py 
new/oslo.utils-7.1.0/oslo_utils/tests/test_reflection.py
--- old/oslo.utils-6.3.0/oslo_utils/tests/test_reflection.py    2023-11-09 
13:30:52.000000000 +0100
+++ new/oslo.utils-7.1.0/oslo_utils/tests/test_reflection.py    2024-02-22 
15:39:13.000000000 +0100
@@ -15,7 +15,6 @@
 #    under the License.
 
 import functools
-import sys
 
 from oslotest import base as test_base
 
@@ -151,16 +150,7 @@
         c = A()
 
         self.assertFalse(reflection.is_same_callback(b.b, c.b))
-        # NOTE(gmann): python3.8 onwards, comparision of bound methods is
-        # changed and 'strict' arg has no meaning.
-        # Ref bug: https://bugs.launchpad.net/oslo.utils/+bug/1841072
-        if sys.version_info < (3, 8):
-            self.assertTrue(reflection.is_same_callback(b.b, c.b,
-                            strict=False))
-        else:
-            self.assertFalse(reflection.is_same_callback(b.b, c.b,
-                             strict=False))
-            self.assertTrue(reflection.is_same_callback(b.b, b.b))
+        self.assertTrue(reflection.is_same_callback(b.b, b.b))
 
 
 class BoundMethodTest(test_base.BaseTestCase):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/oslo.utils-6.3.0/oslo_utils/tests/test_specs_matcher.py 
new/oslo.utils-7.1.0/oslo_utils/tests/test_specs_matcher.py
--- old/oslo.utils-6.3.0/oslo_utils/tests/test_specs_matcher.py 2023-11-09 
13:30:52.000000000 +0100
+++ new/oslo.utils-7.1.0/oslo_utils/tests/test_specs_matcher.py 2024-02-22 
15:39:13.000000000 +0100
@@ -435,3 +435,195 @@
             specs_matcher.match,
             value="^&*($",
             req='<all-in> aes')
+
+    def test_specs_fails_not_enough_args_with_op_rangein(self):
+        self.assertRaises(
+            TypeError,
+            specs_matcher.match,
+            value="23",
+            req='<range-in> [ 10 ]')
+
+    def test_specs_fails_no_brackets_with_op_rangein(self):
+        self.assertRaises(
+            TypeError,
+            specs_matcher.match,
+            value="23",
+            req='<range-in> 10 20')
+
+    def test_specs_fails_no_opening_bracket_with_op_rangein(self):
+        self.assertRaises(
+            TypeError,
+            specs_matcher.match,
+            value="23",
+            req='<range-in> 10 20 ]')
+
+    def test_specs_fails_no_closing_bracket_with_op_rangein(self):
+        self.assertRaises(
+            TypeError,
+            specs_matcher.match,
+            value="23",
+            req='<range-in> [ 10 20')
+
+    def test_specs_fails_invalid_brackets_with_op_rangein(self):
+        self.assertRaises(
+            TypeError,
+            specs_matcher.match,
+            value="23",
+            req='<range-in> { 10 20 }')
+
+    def test_specs_fails_not_opening_brackets_with_op_rangein(self):
+        self.assertRaises(
+            TypeError,
+            specs_matcher.match,
+            value="23",
+            req='<range-in> ) 10 20 )')
+
+    def test_specs_fails_not_closing_brackets_with_op_rangein(self):
+        self.assertRaises(
+            TypeError,
+            specs_matcher.match,
+            value="23",
+            req='<range-in> ( 10 20 (')
+
+    def test_specs_fails_reverse_brackets_with_op_rangein(self):
+        self.assertRaises(
+            TypeError,
+            specs_matcher.match,
+            value="23",
+            req='<range-in> ) 10 20 (')
+
+    def test_specs_fails_too_many_args_with_op_rangein(self):
+        self.assertRaises(
+            TypeError,
+            specs_matcher.match,
+            value="23",
+            req='<range-in> [ 10 20 30 ]')
+
+    def test_specs_fails_bad_limits_with_op_rangein(self):
+        self.assertRaises(
+            TypeError,
+            specs_matcher.match,
+            value="23",
+            req='<range-in> [ 20 10 ]')
+
+    def test_specs_fails_match_beyond_scope_with_op_rangein_le(self):
+        self._do_specs_matcher_test(
+            matches=False,
+            value="23",
+            req='<range-in> [ 10 20 ]')
+
+    def test_specs_fails_match_beyond_scope_with_op_rangein_lt(self):
+        self._do_specs_matcher_test(
+            matches=False,
+            value="23",
+            req='<range-in> [ 10 20 )')
+
+    def test_specs_fails_match_under_scope_with_op_rangein_ge(self):
+        self._do_specs_matcher_test(
+            matches=False,
+            value="5",
+            req='<range-in> [ 10 20 ]')
+
+    def test_specs_fails_match_under_scope_with_op_rangein_gt(self):
+        self._do_specs_matcher_test(
+            matches=False,
+            value="5",
+            req='<range-in> ( 10 20 ]')
+
+    def test_specs_fails_match_float_beyond_scope_with_op_rangein_le(self):
+        self._do_specs_matcher_test(
+            matches=False,
+            value="20.3",
+            req='<range-in> [ 10.1 20.2 ]')
+
+    def test_specs_fails_match_float_beyond_scope_with_op_rangein_lt(self):
+        self._do_specs_matcher_test(
+            matches=False,
+            value="20.3",
+            req='<range-in> [ 10.1 20.2 )')
+
+    def test_specs_fails_match_float_under_scope_with_op_rangein_ge(self):
+        self._do_specs_matcher_test(
+            matches=False,
+            value="5.0",
+            req='<range-in> [ 5.1 20.2 ]')
+
+    def test_specs_fails_match_float_under_scope_with_op_rangein_gt(self):
+        self._do_specs_matcher_test(
+            matches=False,
+            value="5.0",
+            req='<range-in> ( 5.1 20.2 ]')
+
+    def test_specs_matches_int_lower_int_range_with_op_rangein_ge(self):
+        self._do_specs_matcher_test(
+            matches=True,
+            value="10",
+            req='<range-in> [ 10 20 ]')
+
+    def test_specs_fails_matchesint_lower_int_range_with_op_rangein_gt(self):
+        self._do_specs_matcher_test(
+            matches=False,
+            value="10",
+            req='<range-in> ( 10 20 ]')
+
+    def test_specs_matches_float_lower_float_range_with_op_rangein_ge(self):
+        self._do_specs_matcher_test(
+            matches=True,
+            value="10.1",
+            req='<range-in> [ 10.1 20 ]')
+
+    def test_specs_fails_matche_float_lower_float_range_with_op_rangein_gt(
+            self):
+        self._do_specs_matcher_test(
+            matches=False,
+            value="10.1",
+            req='<range-in> ( 10.1 20 ]')
+
+    def test_specs_matches_int_with_int_range_with_op_rangein(self):
+        self._do_specs_matcher_test(
+            matches=True,
+            value="15",
+            req='<range-in> [ 10 20 ]')
+
+    def test_specs_matches_float_with_int_limit_with_op_rangein(self):
+        self._do_specs_matcher_test(
+            matches=True,
+            value="15.5",
+            req='<range-in> [ 10 20 ]')
+
+    def test_specs_matches_int_upper_int_range_with_op_rangein(self):
+        self._do_specs_matcher_test(
+            matches=True,
+            value="20",
+            req='<range-in> [ 10 20 ]')
+
+    def test_specs_fails_matche_int_upper_int_range_with_op_rangein_lt(self):
+        self._do_specs_matcher_test(
+            matches=False,
+            value="20",
+            req='<range-in> [ 10 20 )')
+
+    def test_specs_matches_float_upper_mixed_range_with_op_rangein(self):
+        self._do_specs_matcher_test(
+            matches=True,
+            value="20.5",
+            req='<range-in> [ 10 20.5 ]')
+
+    def test_specs_fails_matche_float_upper_mixed_range_with_op_rangein_lt(
+            self):
+        self._do_specs_matcher_test(
+            matches=False,
+            value="20.5",
+            req='<range-in> [ 10 20.5 )')
+
+    def test_specs_matches_float_with_float_limit_with_op_rangein(self):
+        self._do_specs_matcher_test(
+            matches=True,
+            value="12.5",
+            req='<range-in> [ 10.1 20.1 ]')
+
+    def test_specs_matches_only_one_with_op_rangein(self):
+        self._do_specs_matcher_test(
+            matches=True,
+            value="10.1",
+            req='<range-in> [ 10.1 10.1 ]')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.utils-6.3.0/oslo_utils/tests/test_timeutils.py 
new/oslo.utils-7.1.0/oslo_utils/tests/test_timeutils.py
--- old/oslo.utils-6.3.0/oslo_utils/tests/test_timeutils.py     2023-11-09 
13:30:52.000000000 +0100
+++ new/oslo.utils-7.1.0/oslo_utils/tests/test_timeutils.py     2024-02-22 
15:39:13.000000000 +0100
@@ -66,7 +66,7 @@
 
     @mock.patch('datetime.datetime', wraps=datetime.datetime)
     def _test_is_older_than(self, fn, datetime_mock):
-        datetime_mock.utcnow.return_value = self.skynet_self_aware_time
+        datetime_mock.now.return_value = self.skynet_self_aware_time
         expect_true = timeutils.is_older_than(fn(self.one_minute_before), 59)
         self.assertTrue(expect_true)
         expect_false = timeutils.is_older_than(fn(self.one_minute_before), 60)
@@ -89,7 +89,7 @@
 
     @mock.patch('datetime.datetime', wraps=datetime.datetime)
     def _test_is_newer_than(self, fn, datetime_mock):
-        datetime_mock.utcnow.return_value = self.skynet_self_aware_time
+        datetime_mock.now.return_value = self.skynet_self_aware_time
         expect_true = timeutils.is_newer_than(fn(self.one_minute_after),
                                               59)
         self.assertTrue(expect_true)
@@ -202,7 +202,7 @@
         self.assertTrue(timeutils.is_soon(expires, 600))
 
         with mock.patch('datetime.datetime') as datetime_mock:
-            datetime_mock.utcnow.return_value = self.skynet_self_aware_time
+            datetime_mock.now.return_value = self.skynet_self_aware_time
             expires = timeutils.utcnow()
             self.assertTrue(timeutils.is_soon(expires, 0))
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.utils-6.3.0/oslo_utils/timeutils.py 
new/oslo.utils-7.1.0/oslo_utils/timeutils.py
--- old/oslo.utils-6.3.0/oslo_utils/timeutils.py        2023-11-09 
13:30:52.000000000 +0100
+++ new/oslo.utils-7.1.0/oslo_utils/timeutils.py        2024-02-22 
15:39:13.000000000 +0100
@@ -137,7 +137,7 @@
             return utcnow.override_time
     if with_timezone:
         return datetime.datetime.now(tz=iso8601.iso8601.UTC)
-    return datetime.datetime.utcnow()
+    return datetime.datetime.now(datetime.timezone.utc).replace(tzinfo=None)
 
 
 utcnow.override_time = None
@@ -153,7 +153,9 @@
     :param override_time: datetime instance or list thereof. If not
                           given, defaults to the current UTC time.
     """
-    utcnow.override_time = override_time or datetime.datetime.utcnow()
+    utcnow.override_time = (
+        override_time or
+        datetime.datetime.now(datetime.timezone.utc).replace(tzinfo=None))
 
 
 def advance_time_delta(timedelta):
@@ -351,12 +353,6 @@
     when operations are performed in a thread-safe manner on these objects by
     wrapping those operations with locks.
 
-    It will use the `monotonic`_ pypi library to find an appropriate
-    monotonically increasing time providing function (which typically varies
-    depending on operating system and python version).
-
-    .. _monotonic: https://pypi.org/project/monotonic/
-
     .. versionadded:: 1.4
     """
     _STARTED = 'STARTED'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/oslo.utils-6.3.0/releasenotes/notes/new_spec_dsl_operator-21c80a46f67c56df.yaml
 
new/oslo.utils-7.1.0/releasenotes/notes/new_spec_dsl_operator-21c80a46f67c56df.yaml
--- 
old/oslo.utils-6.3.0/releasenotes/notes/new_spec_dsl_operator-21c80a46f67c56df.yaml
 1970-01-01 01:00:00.000000000 +0100
+++ 
new/oslo.utils-7.1.0/releasenotes/notes/new_spec_dsl_operator-21c80a46f67c56df.yaml
 2024-02-22 15:39:13.000000000 +0100
@@ -0,0 +1,17 @@
+---
+features:
+  - |
+    Introducing a new spec DSL operator called ``<range-in>`` that allows users
+    to match a numeric value against a range of numbers that are delimited with
+    lower and upper limits. The new operator is a binary operator that accepts
+    4 arguments.
+
+    - The first one and the last one are brackets. ``[`` and ``]`` defines
+      inclusive limits while ``(`` and ``)`` defines exclusive limits.
+
+    - The second one is the lower limit while the third one is the upper
+      limit.
+
+    Example: "<range-in> [ 10.4 20 )" will match a value against an range
+    such as the lower limit of the range is 10.4 and the upper limit is 20.
+    Note that 10.4 is included while 20 is excluded.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/oslo.utils-6.3.0/releasenotes/notes/remove-strict-from-is_same_callback-cfbff2ada778987e.yaml
 
new/oslo.utils-7.1.0/releasenotes/notes/remove-strict-from-is_same_callback-cfbff2ada778987e.yaml
--- 
old/oslo.utils-6.3.0/releasenotes/notes/remove-strict-from-is_same_callback-cfbff2ada778987e.yaml
   1970-01-01 01:00:00.000000000 +0100
+++ 
new/oslo.utils-7.1.0/releasenotes/notes/remove-strict-from-is_same_callback-cfbff2ada778987e.yaml
   2024-02-22 15:39:13.000000000 +0100
@@ -0,0 +1,5 @@
+---
+upgrade:
+  - |
+    The ``strict`` argument has been removed from the ``is_same_callback``
+    function. The argument has had no effect in Python 3.8.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.utils-6.3.0/releasenotes/source/yoga.rst 
new/oslo.utils-7.1.0/releasenotes/source/yoga.rst
--- old/oslo.utils-6.3.0/releasenotes/source/yoga.rst   2023-11-09 
13:30:52.000000000 +0100
+++ new/oslo.utils-7.1.0/releasenotes/source/yoga.rst   2024-02-22 
15:39:13.000000000 +0100
@@ -3,4 +3,4 @@
 =========================
 
 .. release-notes::
-   :branch: stable/yoga
+   :branch: unmaintained/yoga
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.utils-6.3.0/requirements.txt 
new/oslo.utils-7.1.0/requirements.txt
--- old/oslo.utils-6.3.0/requirements.txt       2023-11-09 13:30:52.000000000 
+0100
+++ new/oslo.utils-7.1.0/requirements.txt       2024-02-22 15:39:13.000000000 
+0100
@@ -5,11 +5,11 @@
 
 iso8601>=0.1.11 # MIT
 oslo.i18n>=3.15.3 # Apache-2.0
-pytz>=2013.6 # MIT
+pytz>=2013.6;python_version<"3.9" # MIT
 netaddr>=0.7.18 # BSD
 netifaces>=0.10.4 # MIT
 debtcollector>=1.2.0 # Apache-2.0
 pyparsing>=2.1.0 # MIT
 packaging>=20.4 # BSD
-tzdata>=2022.4 # MIT
+tzdata>=2022.4;python_version>="3.9" # MIT
 PyYAML>=3.13 # MIT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.utils-6.3.0/setup.cfg 
new/oslo.utils-7.1.0/setup.cfg
--- old/oslo.utils-6.3.0/setup.cfg      2023-11-09 13:31:30.012476200 +0100
+++ new/oslo.utils-7.1.0/setup.cfg      2024-02-22 15:39:59.658798500 +0100
@@ -18,6 +18,7 @@
        Programming Language :: Python :: 3.8
        Programming Language :: Python :: 3.9
        Programming Language :: Python :: 3.10
+       Programming Language :: Python :: 3.11
        Programming Language :: Python :: 3 :: Only
        Programming Language :: Python :: Implementation :: CPython
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.utils-6.3.0/test-requirements.txt 
new/oslo.utils-7.1.0/test-requirements.txt
--- old/oslo.utils-6.3.0/test-requirements.txt  2023-11-09 13:30:52.000000000 
+0100
+++ new/oslo.utils-7.1.0/test-requirements.txt  2024-02-22 15:39:13.000000000 
+0100
@@ -1,9 +1,3 @@
-# The order of packages is significant, because pip processes them in the order
-# of appearance. Changing the order has an impact on the overall integration
-# process, which may cause wedges in the gate later.
-
-hacking>=3.0.1,<3.1.0 # Apache-2.0
-
 eventlet>=0.18.2,!=0.18.3,!=0.20.1,!=0.21.0,!=0.23.0 # MIT
 fixtures>=3.0.0 # Apache-2.0/BSD
 testscenarios>=0.4 # Apache-2.0/BSD
@@ -19,8 +13,3 @@
 
 # used for oslotest cross-testing scripts
 oslo.config>=5.2.0 # Apache-2.0
-
-# Bandit security code scanner
-bandit>=1.7.0,<1.8.0 # Apache-2.0
-
-pre-commit>=2.6.0 # MIT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.utils-6.3.0/tox.ini new/oslo.utils-7.1.0/tox.ini
--- old/oslo.utils-6.3.0/tox.ini        2023-11-09 13:30:52.000000000 +0100
+++ new/oslo.utils-7.1.0/tox.ini        2024-02-22 15:39:13.000000000 +0100
@@ -12,10 +12,10 @@
 commands = stestr run --slowest {posargs}
 
 [testenv:pep8]
+deps =
+  pre-commit
 commands =
   pre-commit run -a
-  # Run security linter
-  bandit -r oslo_utils -x tests -n5
 
 [testenv:venv]
 commands = {posargs}
@@ -32,9 +32,6 @@
 [testenv:cover]
 commands = python setup.py test --coverage --coverage-package-name=oslo_utils 
--testr-args='{posargs}'
 
-[testenv:bandit]
-commands = bandit -r oslo_utils -x tests -n5
-
 [flake8]
 # E731 skipped as assign a lambda expression
 # W504 line break after binary operator

Reply via email to