Skip to content

ldap.initialize() unknown keyword parameter bytes_strictness #249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jdennis opened this issue Oct 17, 2018 · 0 comments
Closed

ldap.initialize() unknown keyword parameter bytes_strictness #249

jdennis opened this issue Oct 17, 2018 · 0 comments

Comments

@jdennis
Copy link

jdennis commented Oct 17, 2018

ldap.initialize() is documented as having a bytes_strictness parameter as seen here: http://www.python-ldap.org/en/latest/reference/ldap.html#ldap.initialize.

It needs to be added to the parameter list here:

def initialize(uri,trace_level=0,trace_file=sys.stdout,trace_stack_limit=None, bytes_mode=None):

also the docstring, and finally in the call to LDAPObject().

The LDAPObject (SimpleLDAPObject in ldapobject.py) already supports the bytes_strictness parameter.

As an initial work-around one can do this:

conn = ldap.initialize(url, bytes_mode=False)
conn.bytes_strictness = 'silent'

bytes_strictness defaults to 'error' thus defeating the automatic type conversion described here: http://www.python-ldap.org/en/latest/bytes_mode.html#bytes-mode

encukou added a commit to encukou/python-ldap that referenced this issue Oct 25, 2018
encukou added a commit to encukou/python-ldap that referenced this issue Oct 25, 2018
encukou added a commit to encukou/python-ldap that referenced this issue Oct 25, 2018
encukou added a commit that referenced this issue Jan 7, 2019
Make initialize() pass extra keyword arguments to LDAPObject

Fixes: #249

For docs, use signatures and doc from the code (and docstrings) using Sphinx
autodoc.

#250
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant