[arch-commits] Commit in python-oslo-utils/trunk (PKGBUILD oslo-utils-py38.patch)

Felix Yan felixonmars at archlinux.org
Fri Sep 11 23:48:05 UTC 2020


    Date: Friday, September 11, 2020 @ 23:48:05
  Author: felixonmars
Revision: 702933

upgpkg: python-oslo-utils 4.6.0-1

Modified:
  python-oslo-utils/trunk/PKGBUILD
Deleted:
  python-oslo-utils/trunk/oslo-utils-py38.patch

-----------------------+
 PKGBUILD              |   12 ++-------
 oslo-utils-py38.patch |   58 ------------------------------------------------
 2 files changed, 3 insertions(+), 67 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-09-11 23:48:02 UTC (rev 702932)
+++ PKGBUILD	2020-09-11 23:48:05 UTC (rev 702933)
@@ -2,7 +2,7 @@
 # Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
 
 pkgname=python-oslo-utils
-pkgver=4.5.0
+pkgver=4.6.0
 pkgrel=1
 pkgdesc="Oslo Utility library"
 arch=('any')
@@ -12,17 +12,11 @@
          'python-netaddr' 'python-netifaces' 'python-debtcollector')
 makedepends=('python-setuptools')
 checkdepends=('python-oslotest' 'python-ddt' 'python-eventlet')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/openstack/oslo.utils/archive/$pkgver.tar.gz"
-        oslo-utils-py38.patch)
-sha512sums=('dfed8940658c539516a255dfef25ff5f4197ee04325cbfe786bca1236326f71852e8c8c8902fb2327723d62f7196cead3bd1d03c1f0b0d102cd5f12f2f509d2f'
-            'edc9861dfc02b82d0312774f2484bb5853a9e5b2e7de9ee19efbd7e1220be56e52d99abb15f71dba4d764832835371200e8d7cac2d40c0546d5cfc8daf68554a')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/openstack/oslo.utils/archive/$pkgver.tar.gz")
+sha512sums=('e1243f62e8f2fa36f6899d87f908ce57ed3a31e58bf176b0980eec861fc00cc095440d7dbd1e4d1cbe6d19544913aa4e1d008b0c21b37b0017f5de1181d9b348')
 
 export PBR_VERSION=$pkgver
 
-prepare() {
-  patch -d oslo.utils-$pkgver -p1 -i ../oslo-utils-py38.patch
-}
-
 build() {
   cd oslo.utils-$pkgver
   python setup.py build

Deleted: oslo-utils-py38.patch
===================================================================
--- oslo-utils-py38.patch	2020-09-11 23:48:02 UTC (rev 702932)
+++ oslo-utils-py38.patch	2020-09-11 23:48:05 UTC (rev 702933)
@@ -1,58 +0,0 @@
-Description: non-strict callback comparison is not possible in py3.8
-Author: Dimitri John Ledkov <xnox at ubuntu.com>
-Bug-Python: https://bugs.python.org/issue1617161
-Bug-LP: https://bugs.launchpad.net/ubuntu/+source/python-oslo.utils/+bug/1841072
-
-Index: python-oslo.utils-3.41.1/oslo_utils/reflection.py
-===================================================================
---- python-oslo.utils-3.41.1.orig/oslo_utils/reflection.py
-+++ python-oslo.utils-3.41.1/oslo_utils/reflection.py
-@@ -22,6 +22,8 @@ Reflection module.
- 
- import inspect
- import types
-+import platform
-+import warnings
- 
- import six
- 
-@@ -169,7 +171,10 @@ def is_same_callback(callback1, callback
-         # This happens when plain methods are given (or static/non-bound
-         # methods).
-         return True
-+    if not strict and platform.python_version() > '3.8':
-+        warnings.warn("non strict comparison impossible in py3.8+", DeprecationWarning)
-     if callback1 == callback2:
-+        ## raise deprecated warning
-         if not strict:
-             return True
-         # Two bound methods are equal if functions themselves are equal and
-Index: python-oslo.utils-3.41.1/oslo_utils/tests/test_reflection.py
-===================================================================
---- python-oslo.utils-3.41.1.orig/oslo_utils/tests/test_reflection.py
-+++ python-oslo.utils-3.41.1/oslo_utils/tests/test_reflection.py
-@@ -17,6 +17,7 @@
- from oslotest import base as test_base
- import six
- import testtools
-+import warnings
- 
- from oslo_utils import reflection
- 
-@@ -153,7 +154,15 @@ class CallbackEqualityTest(test_base.Bas
-         c = A()
- 
-         self.assertFalse(reflection.is_same_callback(b.b, c.b))
--        self.assertTrue(reflection.is_same_callback(b.b, c.b, strict=False))
-+
-+        # Non-strict reflection comparison is not possible in py3.8+
-+        with warnings.catch_warnings(record=True) as capture:
-+            warnings.simplefilter("always")
-+            res = reflection.is_same_callback(b.b, c.b, strict=False)
-+        if len(capture):
-+            self.assertFalse(res)
-+        else:
-+            self.assertTrue(res)
- 
- 
- class BoundMethodTest(test_base.BaseTestCase):



More information about the arch-commits mailing list