Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion 1 .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Auto-generated
.*.swp
*.pyc
Expand Down
2 changes: 1 addition & 1 deletion 2 Build/build-openbsd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ HOMEPAGE= https://www.python-ldap.org/
FAKE= Yes
CONFIGURE_STYLE= gnu
SEPARATE_BUILD= Yes
EXTRACT_ONLY=
EXTRACT_ONLY=

CONFIGURE_ARGS+= --with-ldap=${LOCALBASE}

Expand Down
2 changes: 1 addition & 1 deletion 2 Build/build-openbsd/pkg/DESCR
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This Python library provides access to the LDAP (Lightweight Directory Access
This Python library provides access to the LDAP (Lightweight Directory Access
Protocol) RFC1823 C interface.
4 changes: 2 additions & 2 deletions 4 Build/setup.cfg.mingw
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ defines = WIN32
library_dirs = C:/msys/1.0/home/mcicogni/openldap-mingw-build-4/openldap-2.2.18/libraries/libldap_r/.libs C:/msys/1.0/home/mcicogni/openldap-mingw-build-4/openldap-2.2.18/libraries/liblber/.libs C:\msys\1.0\home\mcicogni\openldap-mingw-build-4\openssl-0.9.7e
include_dirs = C:/msys/1.0/home/mcicogni/openldap-mingw-build-4/openldap-2.2.18/include

extra_compile_args =
extra_objects =
extra_compile_args =
extra_objects =

libs = ldap_r lber ssl crypto ws2_32 gdi32

Expand Down
2 changes: 1 addition & 1 deletion 2 Build/setup.cfg.suse-linux
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
library_dirs = /usr/lib/sasl2
include_dirs = /usr/include/sasl

extra_compile_args =
extra_compile_args =
extra_objects =

# Example for full-featured SuSE build:
Expand Down
2 changes: 1 addition & 1 deletion 2 Demo/Lib/ldap/async/deltree.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class DeleteLeafs(ldap.async.AsyncSearchHandler):
"""
Class for deleting entries which are results of a search.

DNs of Non-leaf entries are collected in DeleteLeafs.nonLeafEntries.
"""
_entryResultTypes = ldap.async._entryResultTypes
Expand Down
1 change: 0 additions & 1 deletion 1 Demo/Lib/ldif/ldifcopy.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@
process_url_schemes=['file','ftp','http']
)
ldif_collector.parse()

1 change: 0 additions & 1 deletion 1 Demo/matchedvalues.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,3 @@ def print_result(search_result):
res = ld.search_ext_s(base, scope, filter, attrlist = ['mail'], serverctrls = [mv])
print("Matched values control: %s" % control_filter)
print_result(res)

4 changes: 0 additions & 4 deletions 4 Demo/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,3 @@
#print("time limit:",l.get_option(ldap.OPT_TIMELIMIT))
print("Binding...")
l.simple_bind_s("","")




1 change: 0 additions & 1 deletion 1 Demo/pyasn1/sessiontrack.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,3 @@
ldap_url.attrs or ['*'],
serverctrls=[st_ctrl]
)

4 changes: 2 additions & 2 deletions 4 Demo/pyasn1/syncrepl.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ def syncrepl_present(self,uuids,refreshDeletes=False):
# If we have not been given any UUID values,
# then we have recieved all the present controls...
if uuids is None:
# We only do things if refreshDeletes is false as the syncrepl
# extension will call syncrepl_delete instead when it detects a
# We only do things if refreshDeletes is false as the syncrepl
# extension will call syncrepl_delete instead when it detects a
# delete notice
if refreshDeletes is False:
deletedEntries = [
Expand Down
2 changes: 1 addition & 1 deletion 2 Demo/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
attr_type_filter = [
('no_user_mod',[0]),
('usage',range(2)),
]
]
)
except KeyError as e:
print('***KeyError',str(e))
Expand Down
1 change: 0 additions & 1 deletion 1 Demo/schema_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,3 @@ def HTMLSchemaTree(schema,se_class,se_tree,se_oid,level):

print('\n*** Attribute types tree ***\n')
PrintSchemaTree(schema,ldap.schema.AttributeType,at_tree,'_',0)

5 changes: 2 additions & 3 deletions 5 Demo/simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,10 @@
#

res = l.search_s(
"ou=CSEE, o=UQ, c=AU",
_ldap.SCOPE_SUBTREE,
"ou=CSEE, o=UQ, c=AU",
_ldap.SCOPE_SUBTREE,
"objectclass=*",
)
print(res)

l.unbind()

5 changes: 2 additions & 3 deletions 5 Demo/simplebrowse.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
# We're not interested in attributes at this stage, so
# we specify [] as the list of attribute names to retreive.
#
for name,attrs in l.search_s(dn, ldap.SCOPE_ONELEVEL,
for name,attrs in l.search_s(dn, ldap.SCOPE_ONELEVEL,
"objectclass=*", []):
#-- shorten resulting dns for output brevity
if name.startswith(dn+", "):
Expand Down Expand Up @@ -100,7 +100,7 @@
print(" %-24s" % name)
for k,vals in attrs.items():
for v in vals:
if len(v) > 200:
if len(v) > 200:
v = `v[:200]` + \
("... (%d bytes)" % len(v))
else:
Expand All @@ -125,4 +125,3 @@

except:
print_exc()

1 change: 0 additions & 1 deletion 1 Doc/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -246,4 +246,3 @@ Debugging symbols are preserved with compile option ``-g``.
extra_objects =

libs = ldap_r lber sasl2 ssl crypto

1 change: 0 additions & 1 deletion 1 Doc/reference/ldap-async.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,3 @@ for writing search results as LDIF to stdout. ::
s.endResultBreak-s.beginResultsDropped
)
)

1 change: 0 additions & 1 deletion 1 Doc/reference/ldap-dn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,3 @@ Splitting a LDAPv3 DN with a multi-valued RDN into its AVA parts:

>>> ldap.dn.str2dn('cn=John Doe+mail=john.doe@example.com,dc=example,dc=com')
[[('cn', 'John Doe', 1), ('mail', 'john.doe@example.com', 1)], [('dc', 'example', 1)], [('dc', 'com', 1)]]

1 change: 0 additions & 1 deletion 1 Doc/reference/ldap-extop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,3 @@ This requires :py:mod:`pyasn1` and :py:mod:`pyasn1_modules` to be installed.

.. autoclass:: ldap.extop.dds.RefreshResponse
:members:

1 change: 0 additions & 1 deletion 1 Doc/reference/ldap-filter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,3 @@ The :mod:`ldap.filter` module defines the following functions:
whole filter string.

.. % -> string

3 changes: 1 addition & 2 deletions 3 Doc/reference/ldap-sasl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Classes

.. autoclass:: ldap.sasl.sasl
:members:

This class is used with :py:meth:`ldap.LDAPObject.sasl_interactive_bind_s()`.


Expand Down Expand Up @@ -82,4 +82,3 @@ and sends a SASL external bind request.
ldap_conn.sasl_non_interactive_bind_s('EXTERNAL')
# Find out the SASL Authorization Identity
print ldap_conn.whoami_s()

1 change: 0 additions & 1 deletion 1 Doc/reference/ldap-syncrepl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ This module defines the following classes:

.. autoclass:: ldap.syncrepl.SyncreplConsumer
:members:

5 changes: 2 additions & 3 deletions 5 Doc/reference/ldap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,7 @@ and wait for and return with the server's result, or with
.. py:method:: LDAPObject.sasl_interactive_bind_s(who, auth[, serverctrls=None [, clientctrls=None [, sasl_flags=ldap.SASL_QUIET]]]) -> None

This call is used to bind to the directory with a SASL bind request.

*auth* is an :py:class:`ldap.sasl.sasl()` instance.

*serverctrls* and *clientctrls* like described in section :ref:`ldap-controls`.
Expand Down Expand Up @@ -1079,7 +1079,7 @@ and wait for and return with the server's result, or with
.. versionchanged:: 3.0

``filterstr=None`` is equivalent to ``filterstr='(objectClass=*)'``.


.. py:method:: LDAPObject.start_tls_s() -> None

Expand Down Expand Up @@ -1220,4 +1220,3 @@ subtree search.
>>> for dn,entry in r:
>>> print('Processing',repr(dn))
>>> handle_ldap_entry(entry)

1 change: 0 additions & 1 deletion 1 Doc/reference/ldapurl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,3 @@ with \module{ldapurl} module.
>>> ldap_url = ldapurl.LDAPUrl(hostport='localhost:1389',dn='dc=stroeder,dc=com',attrs=['cn','mail'],who='cn=Michael,dc=stroeder,dc=com',cred='secret')
>>> ldap_url.unparse()
'ldap://localhost:1389/dc=stroeder,dc=com?cn,mail?base?(objectclass=*)?bindname=cn=Michael%2Cdc=stroeder%2Cdc=com,X-BINDPW=secret'

1 change: 0 additions & 1 deletion 1 Doc/reference/ldif.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,3 @@ with :mod:`ldif` module, skip some entries and write the result to stdout. ::

parser = MyLDIF(open("input.ldif", 'rb'), sys.stdout)
parser.parse()

1 change: 0 additions & 1 deletion 1 Doc/sample_workflow.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

.. _sample workflow:

Sample workflow for python-ldap development
Expand Down
2 changes: 1 addition & 1 deletion 2 Lib/ldap/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from __future__ import print_function

class Constant(object):
"""Base class for a definition of an OpenLDAP constant
"""Base class for a definition of an OpenLDAP constant
"""

def __init__(self, name, optional=False, requirements=(), doc=None):
Expand Down
2 changes: 1 addition & 1 deletion 2 Lib/ldap/controls/deref.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
"""
ldap.controls.deref - classes for
ldap.controls.deref - classes for
(see https://tools.ietf.org/html/draft-masarati-ldap-deref)

See https://www.python-ldap.org/ for project details.
Expand Down
1 change: 0 additions & 1 deletion 1 Lib/ldapurl.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,4 +429,3 @@ def __delattr__(self,name):
pass
else:
del self.__dict__[name]

20 changes: 10 additions & 10 deletions 20 Modules/LDAPObject.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ dealloc(LDAPObject *self)
* utility functions
*/

/*
* check to see if the LDAPObject is valid,
/*
* check to see if the LDAPObject is valid,
* ie has been opened, and not closed. An exception is set if not valid.
*/

Expand Down Expand Up @@ -89,8 +89,8 @@ LDAPMod_DEL(LDAPMod *lm)
PyMem_DEL(lm);
}

/*
* convert a tuple of the form (int,str,[str,...])
/*
* convert a tuple of the form (int,str,[str,...])
* or (str, [str,...]) if no_op is true, into an LDAPMod structure.
* See ldap_modify(3) for details.
*
Expand Down Expand Up @@ -208,8 +208,8 @@ LDAPMods_DEL(LDAPMod **lms)
PyMem_DEL(lms);
}

/*
* convert a list of tuples into a LDAPMod*[] array structure
/*
* convert a list of tuples into a LDAPMod*[] array structure
* NOTE: list of tuples must live longer than the LDAPMods
*/

Expand Down Expand Up @@ -589,7 +589,7 @@ l_ldap_simple_bind(LDAPObject *self, PyObject *args)
auth modules ("mechanisms"), or try

ldapsearch -b "" -s base -LLL -x supportedSASLMechanisms

(perhaps with an additional -h and -p argument for ldap host and
port). The latter will show you which SASL mechanisms are known
to the LDAP server. If you do not want to set up Kerberos, you
Expand Down Expand Up @@ -645,7 +645,7 @@ interaction(unsigned flags, sasl_interact_t *interact, PyObject *SASLObject)
return LDAP_SUCCESS;
}

/*
/*
This function will be called by ldap_sasl_interactive_bind(). The
"*in" is an array of sasl_interact_t's (see sasl.h for a
reference). The last interact in the array has an interact->id of
Expand Down Expand Up @@ -748,12 +748,12 @@ l_ldap_sasl_interactive_bind_s(LDAPObject *self, PyObject *args)

static unsigned sasl_flags = LDAP_SASL_QUIET;

/*
/*
* In Python 2.3+, a "I" format argument indicates that we're either converting
* the Python object into a long or an unsigned int. In versions prior to that,
* it will always convert to a long. Since the sasl_flags variable is an
* unsigned int, we need to use the "I" flag if we're running Python 2.3+ and a
* "i" otherwise.
* "i" otherwise.
*/
#if (PY_MAJOR_VERSION == 2) && (PY_MINOR_VERSION < 3)
if (!PyArg_ParseTuple
Expand Down
1 change: 0 additions & 1 deletion 1 Tests/t_ldap_asyncsearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@ def test_deprecated(self):

if __name__ == '__main__':
unittest.main()

1 change: 0 additions & 1 deletion 1 Tests/t_ldap_sasl.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,3 @@ def test_external_tlscert(self):

if __name__ == '__main__':
unittest.main()

4 changes: 2 additions & 2 deletions 4 Tests/t_ldif.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ def test_weird_empty_lines(self):
"""

# comment before version

version: 1


Expand Down Expand Up @@ -586,7 +586,7 @@ def test_weird_empty_lines(self):
"""

# comment before version

version: 1


Expand Down
4 changes: 2 additions & 2 deletions 4 setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
# ./configure --with-cyrus-sasl --with-tls
defines = HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R

extra_compile_args =
extra_objects =
extra_compile_args =
extra_objects =

# Example for full-featured build:
# Support for StartTLS/LDAPS, SASL bind and reentrant libldap_r.
Expand Down
2 changes: 1 addition & 1 deletion 2 setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class OpenLDAP2:
from Python programs. Mainly it wraps the OpenLDAP 2.x libs for that purpose.
Additionally the package contains modules for other LDAP-related stuff
(e.g. processing LDIF, LDAPURLs, LDAPv3 schema, LDAPv3 extended operations
and controls, etc.).
and controls, etc.).
""",
author = 'python-ldap project',
author_email = 'python-ldap@python.org',
Expand Down
2 changes: 1 addition & 1 deletion 2 tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ minver = 1.8
[testenv]
deps = coverage
passenv = WITH_GCOV
# - Enable BytesWarning
# - Enable BytesWarning
# - Turn all warnings into exceptions.
# - 'ignore:the imp module is deprecated' is required to ignore import of 'imp'
# in distutils. Python < 3.6 use PendingDeprecationWarning; Python >= 3.6 use
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.