Skip to content

Commit dc7a3fe

Browse files
tiranencukou
authored andcommitted
Rename ldap.async to ldap.asyncsearch
Python 3.7 introduces `async` as a keyword. The old import path is still available for backwards compatibility. python-ldap#107 Signed-off-by: Christian Heimes <cheimes@redhat.com>
1 parent baa091f commit dc7a3fe

File tree

6 files changed

+353
-300
lines changed

6 files changed

+353
-300
lines changed

Doc/reference/ldap-async.rst

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,60 @@
1-
**************************************************************
2-
:py:mod:`ldap.async` Stream-processing of large search results
3-
**************************************************************
1+
********************************************************************
2+
:py:mod:`ldap.asyncsearch` Stream-processing of large search results
3+
********************************************************************
44

5-
.. py:module:: ldap.async
5+
.. py:module:: ldap.asyncsearch
66
:synopsis: Framework for stream-processing of large search results.
77

88
With newer Python versions one might want to consider using
99
:py:mod:`ldap.resiter` instead.
1010

1111

12+
.. versionchanged:: 3.0
13+
In Python 3.7 ``async`` is a reserved keyword. The module
14+
:py:mod:`ldap.async` has been renamed to :py:mod:`ldap.asyncsearch`. The
15+
old name :py:mod:`ldap.async` is still available for backwards
16+
compatibility.
17+
18+
.. deprecated:: 3.0
19+
The old name :py:mod:`ldap.async` is deprecated, but will not be removed
20+
until Python 3.6 reaches end-of-life.
21+
22+
1223
Classes
1324
=======
1425

15-
.. autoclass:: ldap.async.AsyncSearchHandler
26+
.. autoclass:: ldap.asyncsearch.AsyncSearchHandler
1627
:members:
1728

18-
.. autoclass:: ldap.async.List
29+
.. autoclass:: ldap.asyncsearch.List
1930
:members:
2031

21-
.. autoclass:: ldap.async.Dict
32+
.. autoclass:: ldap.asyncsearch.Dict
2233
:members:
2334

24-
.. autoclass:: ldap.async.IndexedDict
35+
.. autoclass:: ldap.asyncsearch.IndexedDict
2536
:members:
2637

27-
.. autoclass:: ldap.async.LDIFWriter
38+
.. autoclass:: ldap.asyncsearch.LDIFWriter
2839
:members:
2940

30-
.. _ldap.async-example:
41+
.. _ldap.asyncsearch-example:
3142

3243
Examples
3344
========
3445

35-
.. _ldap.async-example.List:
46+
.. _ldap.asyncsearch-example.List:
3647

37-
Using ldap.async.List
38-
^^^^^^^^^^^^^^^^^^^^^
48+
Using ldap.asyncsearch.List
49+
^^^^^^^^^^^^^^^^^^^^^^^^^^^
3950

40-
This example demonstrates how to use class ldap.async.List for
51+
This example demonstrates how to use class ldap.asyncsearch.List for
4152
retrieving partial search results even though the exception
4253
:exc:`ldap.SIZELIMIT_EXCEEDED` was raised because a server side limit was hit. ::
4354

44-
import sys,ldap,ldap.async
55+
import sys,ldap,ldap.asyncsearch
4556

46-
s = ldap.async.List(
57+
s = ldap.asyncsearch.List(
4758
ldap.initialize('ldap://localhost'),
4859
)
4960

@@ -67,17 +78,17 @@ retrieving partial search results even though the exception
6778
)
6879
)
6980

70-
.. _ldap.async-example.LDIFWriter:
81+
.. _ldap.asyncsearch-example.LDIFWriter:
7182

72-
Using ldap.async.LDIFWriter
73-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
83+
Using ldap.asyncsearch.LDIFWriter
84+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7485

75-
This example demonstrates how to use class ldap.async.LDIFWriter
86+
This example demonstrates how to use class ldap.asyncsearch.LDIFWriter
7687
for writing search results as LDIF to stdout. ::
7788

78-
import sys,ldap,ldap.async
89+
import sys,ldap,ldap.asyncsearch
7990

80-
s = ldap.async.LDIFWriter(
91+
s = ldap.asyncsearch.LDIFWriter(
8192
ldap.initialize('ldap://localhost:1390'),
8293
sys.stdout
8394
)

Doc/spelling_wordlist.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
args
22
async
3+
asyncsearch
34
attr
45
attrlist
56
attrList

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy