-
Notifications
You must be signed in to change notification settings - Fork 126
feat(ldap.dn): Add support for different formats in ldap.dn2str()
via flags
#466
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
base: main
Are you sure you want to change the base?
Conversation
6948a13
to
f25fa60
Compare
@spaceone hi! |
Overall, I think it'll be nice to have the feature. |
I agree, getting better DN handling would be nice. |
ldap.dn2str()
ldap.dn2str()
via flags
ebdee71
to
7c80d5c
Compare
Performance comparison: C:
Python:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, maybe be consistent about using raw strings (r'cn=\C3...'
vs. 'cn=\\C3...'
)
…` via flags In C `dn2str()` supports `flags` which works by providing one of `LDAP_DN_FORMAT_UFN`, `LDAP_DN_FORMAT_AD_CANONICAL`, `LDAP_DN_FORMAT_DCE`, `LDAP_DN_FORMAT_LDAPV3`. These symbols do exist in Python, but could not be used ultimately because the Python counterpart was pure Python and did not pass to `dn2str(3)`. Fix python-ldap#257
Thanks for approval. I added a commit which unifies the whole file, to use raw-strings. |
In C
dn2str()
supportsflags
which works by providingLDAP_DN_FORMAT_UFN
,LDAP_DN_FORMAT_AD_CANONICAL
, ….These symbols do exist in Python, but could not be used ultimately because the Python counterpart was pure Python and did not pass to
dn2str(3)
.Fix #257