#7303 BytesWarning from python-ldap 3.0
Closed: fixed by cheimes. Opened by cheimes.

freeipa master COPR provides python-ldap 3.0.0b1. The 3.x series contains Python 3 compatibility code from the pyldap fork including the bytes_mode setting, see https://python-ldap.readthedocs.io/en/latest/bytes_mode.html . tl;dr it warns when bytes_mode is not enabled or when mixing bytes with text. PR https://github.com/freeipa/freeipa/pull/1356 silences the warnings, but we should find a better way to fix it.

26:/usr/lib64/python2.7/site-packages/ldap/functions.py:82: BytesWarning: Under Python 2, python-ldap uses bytes by default. This will be removed in Python 3 (no bytes for DN/RDN/field names). Please call initialize(..., bytes_mode=False) explicitly.
...
5090:/usr/lib64/python2.7/site-packages/ldap/ldapobject.py:396: BytesWarning: Received non-bytes value u'givenname' with default (disabled) bytes mode; please choose an explicit option for bytes_mode on your LDAP connection

I don't understand what is this ticket about. What is the problem it tries to solve?

Aren't there the warnings for a reason?

Metadata Update from @rcritten:
- Issue priority set to: normal
- Issue set to the milestone: FreeIPA 4.7

Metadata Update from @rcritten:
- Issue set to the milestone: FreeIPA 4.7.1 (was: FreeIPA 4.7)

FreeIPA 4.7 has been released, moving to FreeIPA 4.7.1 milestone

Master branch no longer supports Python 2. I consider this bug as fixed.

Metadata Update from @cheimes:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

Metadata