Require python-ldap 3.0.0b2

Use new LDAPBytesWarning to ignore python-ldap's bytes warnings. New
build is available in @freeipa/freeipa-master.

Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Felipe Volpone <fbarreto@redhat.com>
This commit is contained in:
Christian Heimes 2017-12-12 16:40:44 +01:00
parent 23d729e0de
commit 3c59cf5728
2 changed files with 3 additions and 9 deletions

View File

@ -59,7 +59,7 @@
%global samba_version 2:4.7.0 %global samba_version 2:4.7.0
%global selinux_policy_version 3.13.1-158.4 %global selinux_policy_version 3.13.1-158.4
%global slapi_nis_version 0.56.1 %global slapi_nis_version 0.56.1
%global python_ldap_version 3.0.0 %global python_ldap_version 3.0.0-0.2.b2
%endif %endif

View File

@ -77,17 +77,11 @@ TRUNCATED_ADMIN_LIMIT = object()
DIRMAN_DN = DN(('cn', 'directory manager')) DIRMAN_DN = DN(('cn', 'directory manager'))
if six.PY2: if six.PY2 and hasattr(ldap, 'LDAPBytesWarning'):
# XXX silence python-ldap's BytesWarnings # XXX silence python-ldap's BytesWarnings
warnings.filterwarnings( warnings.filterwarnings(
action="ignore", action="ignore",
message="Under Python 2, python-ldap uses bytes", category=ldap.LDAPBytesWarning, # pylint: disable=no-member
category=BytesWarning
)
warnings.filterwarnings(
action="ignore",
message="Received non-bytes value",
category=BytesWarning
) )