Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-ldappool for openSUSE:Factory
checked in at 2022-11-25 13:13:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-ldappool (Old)
and /work/SRC/openSUSE:Factory/.python-ldappool.new.1597 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-ldappool"
Fri Nov 25 13:13:17 2022 rev:7 rq:1038064 version:3.0.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-ldappool/python-ldappool.changes
2021-11-27 23:42:28.568463035 +0100
+++
/work/SRC/openSUSE:Factory/.python-ldappool.new.1597/python-ldappool.changes
2022-11-25 13:23:09.079678609 +0100
@@ -1,0 +2,9 @@
+Fri Nov 25 09:27:25 UTC 2022 - Daniel Garcia <[email protected]>
+
+- Add remove-six-dep.patch upstream patch
+ https://review.opendev.org/c/openstack/ldappool/+/805495
+- Remove python_module macro definition
+- More specific python_sitelib in %files
+- Remove tests from package
+
+-------------------------------------------------------------------
New:
----
remove-six-dep.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-ldappool.spec ++++++
--- /var/tmp/diff_new_pack.iTXO6t/_old 2022-11-25 13:23:09.583681329 +0100
+++ /var/tmp/diff_new_pack.iTXO6t/_new 2022-11-25 13:23:09.591681372 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-ldappool
#
-# Copyright (c) 2021 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
@@ -16,7 +16,6 @@
#
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-ldappool
Version: 3.0.0
Release: 0
@@ -25,6 +24,8 @@
Group: Development/Languages/Python
URL: https://git.openstack.org/cgit/openstack/ldappool
Source:
https://files.pythonhosted.org/packages/source/l/ldappool/ldappool-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM remove-six-dep.patch
https://review.opendev.org/c/openstack/ldappool/+/805495
+Patch: remove-six-dep.patch
BuildRequires: %{python_module ldap >= 3.0.0}
BuildRequires: %{python_module pbr}
# SECTION stestr is only available for primary python3 flavor (openstack
package)
@@ -53,7 +54,7 @@
- a context manager to simplify acquiring and releasing a connector
%prep
-%setup -q -n ldappool-%{version}
+%autosetup -p1 -n ldappool-%{version}
sed -i 's/PrettyTable<0.8,>=0.7.2/prettytable>=0.7.2/' requirements.txt
%build
@@ -62,12 +63,14 @@
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
+%python_expand rm -rf %{buildroot}%{$python_sitelib}/ldappool/tests
%check
python3 -m stestr.cli run
%files %{python_files}
%doc CHANGES.rst README.rst
-%{python_sitelib}/*
+%{python_sitelib}/ldappool
+%{python_sitelib}/ldappool-%{version}*-info
%changelog
++++++ remove-six-dep.patch ++++++
Index: ldappool-3.0.0/ldappool/__init__.py
===================================================================
--- ldappool-3.0.0.orig/ldappool/__init__.py
+++ ldappool-3.0.0/ldappool/__init__.py
@@ -35,7 +35,6 @@
# ***** END LICENSE BLOCK *****
""" LDAP Connection Pool.
"""
-import codecs
from contextlib import contextmanager
import logging
from threading import RLock
@@ -45,29 +44,26 @@ import ldap
from ldap.ldapobject import ReconnectLDAPObject
from prettytable import PrettyTable
import re
-import six
-from six import PY2
log = logging.getLogger(__name__)
-_utf8_encoder = codecs.getencoder('utf-8')
def utf8_encode(value):
"""Encode a basestring to UTF-8.
- If the string is unicode encode it to UTF-8, if the string is
- str then assume it's already encoded. Otherwise raise a TypeError.
+ If the value is string, encode it to UTF-8, if the value is
+ bytes then assume it's already encoded. Otherwise raise a TypeError.
:param value: A basestring
:returns: UTF-8 encoded version of value
:raises TypeError: If value is not basestring
"""
- if isinstance(value, six.text_type):
- return _utf8_encoder(value)[0]
- elif isinstance(value, six.binary_type):
+ if isinstance(value, str):
+ return value.encode('utf-8')
+ elif isinstance(value, bytes):
return value
else:
- raise TypeError("bytes or Unicode expected, got %s"
+ raise TypeError("bytes or str expected, got %s"
% type(value).__name__)
@@ -169,9 +165,6 @@ class ConnectionManager(object):
return len(self._pool)
def _match(self, bind, passwd):
- if passwd is not None:
- if PY2:
- passwd = utf8_encode(passwd)
with self._pool_lock:
inactives = []
@@ -242,9 +235,6 @@ class ConnectionManager(object):
:raises BackendError: If unable to connect to LDAP
"""
connected = False
- if passwd is not None:
- if PY2:
- passwd = utf8_encode(passwd)
# If multiple server URIs have been provided, loop through
# each one in turn in case of connection failures (server down,