Skip to content

Commit

Permalink
Merge pull request #20 – Add tests for sphinx documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Petr Viktorin authored and GitHub committed Nov 28, 2017
2 parents 5f8c419 + 7405d12 commit e5cd30c
Show file tree
Hide file tree
Showing 24 changed files with 229 additions and 41 deletions.
36 changes: 26 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
language: python

python:
- '2.7'
- '3.3'
- '3.4'
- '3.5'
- '3.6'
# Note: when updating Python versions, also change setup.py and tox.ini

sudo: false

cache: pip
Expand All @@ -17,9 +9,33 @@ addons:
packages:
- ldap-utils
- slapd
- enchant

env:
- WITH_GCOV=1
# Note: when updating Python versions, also change setup.py and tox.ini
matrix:
include:
- python: 2.7
env:
- TOXENV=py27
- WITH_GCOV=1
- python: 3.3
env:
- TOXENV=py33
- WITH_GCOV=1
- python: 3.4
env:
- TOXENV=py34
- WITH_GCOV=1
- python: 3.5
env:
- TOXENV=py35
- WITH_GCOV=1
- python: 3.6
env:
- TOXENV=py36
- WITH_GCOV=1
- python: 3.6
env: TOXENV=doc

install:
- pip install "pip>=7.1.0"
Expand Down
7 changes: 7 additions & 0 deletions Doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc']

try:
import sphinxcontrib.spelling
except ImportError:
pass
else:
extensions.append('sphinxcontrib.spelling')

# Add any paths that contain templates here, relative to this directory.
templates_path = ['.templates']

Expand Down
2 changes: 1 addition & 1 deletion Doc/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Usage
**A0**: Yes, from 3.0 on.

**A1**. For earlier versions, there's `pyldap`_, an independent fork
now merged into pyhon-ldap.
now merged into python-ldap.

.. _pyldap: https://pypi.python.org/pypi/pyldap

Expand Down
2 changes: 1 addition & 1 deletion Doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Contents
Bytes/text management
---------------------

The LDAP protocol states that some fields (distinguised names, relative distinguished names,
The LDAP protocol states that some fields (distinguished names, relative distinguished names,
attribute names, queries) be encoded in UTF-8; some other (mostly attribute *values*) **MAY**
contain any type of data, and thus be treated as bytes.

Expand Down
4 changes: 2 additions & 2 deletions Doc/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ to get up to date information which versions are available.
Windows
-------

Unoficial packages for Windows are available on
Unofficial packages for Windows are available on
`Christoph Gohlke's page <https://www.lfd.uci.edu/~gohlke/pythonlibs/>`_.


Expand Down Expand Up @@ -113,7 +113,7 @@ on the local system when building python-ldap:
It is not possible and not supported to build with prior versions.
- `OpenSSL`_ (optional)
- `cyrus-sasl`_ (optional)
- Kerberos libraries, MIT or heimdal (optional)
- Kerberos libraries, MIT or Heimdal (optional)

.. _Python: https://www.python.org/
.. _OpenLDAP: https://www.openldap.org/
Expand Down
10 changes: 5 additions & 5 deletions Doc/reference/ldap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ This module defines the following functions:
when using multiple URIs you cannot determine to which URI your client
gets connected.

Note that internally the OpenLDAP funtion
Note that internally the OpenLDAP function
`ldap_initialize(3) <https://www.openldap.org/software/man.cgi?query=ldap_init&sektion=3>`_
is called which just initializes the LDAP connection struct in the C API
- nothing else. Therefore the first call to an operation method (bind,
Expand Down Expand Up @@ -141,7 +141,7 @@ following option identifiers are defined as constants:
.. py:data:: OPT_DEREF
Specifies how alias derefencing is done within the underlying LDAP C lib.
Specifies how alias dereferencing is done within the underlying LDAP C lib.

.. py:data:: OPT_ERROR_STRING
Expand Down Expand Up @@ -296,7 +296,7 @@ The module defines the following exceptions:

.. py:exception:: LDAPError
This is the base class of all execeptions raised by the module :py:mod:`ldap`.
This is the base class of all exceptions raised by the module :py:mod:`ldap`.
Unlike the C interface, errors are not returned as result codes, but
are instead turned into exceptions, raised as soon an the error condition
is detected.
Expand Down Expand Up @@ -413,7 +413,7 @@ The module defines the following exceptions:

.. py:exception:: IS_LEAF
The object specified is a leaf of the diretcory tree.
The object specified is a leaf of the directory tree.
Sets the :py:const:`matched` field of the exception dictionary value.

.. py:exception:: LOCAL_ERROR
Expand Down Expand Up @@ -836,7 +836,7 @@ and wait for and return with the server's result, or with
This method is used to wait for and return the result of an operation
previously initiated by one of the LDAP *asynchronous* operations
(eg :py:meth:`search()`, :py:meth:`modify()`, etc.)
(e.g. :py:meth:`search()`, :py:meth:`modify()`, etc.)

The *msgid* parameter is the integer identifier returned by that method.
The identifier is guaranteed to be unique across an LDAP session,
Expand Down
4 changes: 2 additions & 2 deletions Doc/reference/ldapurl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

This module parses and generates LDAP URLs. It is implemented in pure Python
and does not rely on any non-standard modules. Therefore it can be used stand-
alone without the rest of the python-ldap package. Compability note: This
alone without the rest of the python-ldap package. Compatibility note: This
module has been solely tested on Python 2.x and above.

.. seealso::
Expand Down Expand Up @@ -91,7 +91,7 @@ Example
^^^^^^^

Important security advice:
For security reasons you shouldn't specify passwords in LDAP URLs
For security reasons you should not specify passwords in LDAP URLs
unless you really know what you are doing.

The following example demonstrates how to parse a LDAP URL
Expand Down
150 changes: 150 additions & 0 deletions Doc/spelling_wordlist.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
args
async
attr
attrlist
attrList
attrs
attrsonly
attrsOnly
attrtype
authzId
automagically
backend
behaviour
BER
bindname
boolean
booleanValue
Bytestrings
cancelled
canonicalization
cb
cfg
changeNumber
changesOnly
changeType
changeTypes
cidict
clientctrls
conf
controlType
controlValue
criticality
cryptographic
cyrus
defresult
dereferenced
dereferencing
desc
directoryOperation
distinguished
distributedOperation
dit
dn
DN
dSAOperation
encodedControlValue
encodedResponseValue
extype
exvalue
favour
filterstr
filterStr
formatOID
func
Heimdal
hostport
hrefTarget
hrefText
ignoreResultsNumber
integerValue
Interoperability
isn
Keepalive
Kerberos
keyerror
knownLDAPControls
kwarg
ldap
ldapadd
ldapControls
ldapControlTuples
ldapdelete
ldapi
LDAPObject
ldaps
ldapurl
ldapwhoami
ldif
LDIFWriter
libldap
libs
Libs
modlist
modrdn
msgid
multi
nameoroid
nots
Novell
objectClass
oc
oid
oids
openldap
postalAddress
pre
previousDN
processResultsCount
Proxied
py
rdn
reentrant
refmodule
refreshAndPersist
refreshDeletes
refreshOnly
requestName
requestValue
resiter
respvalue
ResultProcessor
returnECs
ruleid
rundir
sasl
searchRoot
searchScope
sed
serverctrls
sessionSourceIp
sessionSourceName
sessionTrackingIdentifier
sizelimit
slapd
stderr
stdout
str
Subclasses
subentry
subschema
substr
subtree
syncrepl
syntaxes
timelimit
tracebacks
tuple
tuples
UDP
Umich
unparsing
unsigend
uri
urlPrefix
urlscheme
userApplications
userPassword
usr
uuids
whitespace
2 changes: 1 addition & 1 deletion Lib/ldap/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,5 @@ def release(self):

# More constants

# For compability of 2.3 and 2.4 OpenLDAP API
# For compatibility of 2.3 and 2.4 OpenLDAP API
OPT_DIAGNOSTIC_MESSAGE = OPT_ERROR_STRING
2 changes: 1 addition & 1 deletion Lib/ldap/async.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def __str__(self):

class AsyncSearchHandler:
"""
Class for stream-processsing LDAP search results
Class for stream-processing LDAP search results
Arguments:
Expand Down
2 changes: 1 addition & 1 deletion Lib/ldap/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ class Str(Constant):
TLSInt('OPT_X_TLS_PEERCERT', optional=True),

# only available if OpenSSL supports it => might cause
# backward compability problems
# backward compatibility problems
TLSInt('OPT_X_TLS_CRLCHECK', optional=True),

TLSInt('OPT_X_TLS_CRLFILE', optional=True),
Expand Down
2 changes: 1 addition & 1 deletion Lib/ldap/controls/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class attributes
class LDAPControl(RequestControl,ResponseControl):
"""
Base class for combined request/response controls mainly
for backward-compability to python-ldap 2.3.x
for backward-compatibility to python-ldap 2.3.x
"""

def __init__(self,controlType=None,criticality=False,controlValue=None,encodedControlValue=None):
Expand Down
2 changes: 1 addition & 1 deletion Lib/ldap/controls/deref.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# Request types
#---------------------------------------------------------------------------

# For compability with ASN.1 declaration in I-D
# For compatibility with ASN.1 declaration in I-D
AttributeList = AttributeDescriptionList

class DerefSpec(univ.Sequence):
Expand Down
4 changes: 2 additions & 2 deletions Lib/ldap/controls/psearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ class PersistentSearchControl(RequestControl):
Implements the request control for persistent search.
changeTypes
List of strings specifiying the types of changes returned by the server.
List of strings specifying the types of changes returned by the server.
Setting to None requests all changes.
changesOnly
Boolean which indicates whether only changes are returned by the server.
returnECs
Boolean which indicates whether the server should return an
Entry Change Notication response control
Entry Change Notification response control
"""

class PersistentSearchControlValue(univ.Sequence):
Expand Down
2 changes: 1 addition & 1 deletion Lib/ldap/controls/sss.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def decodeControlValue(self, encoded):
self.attributeType = attribute_type
else:
self.attributeType = None
# backward compability class attributes
# backward compatibility class attributes
self.result = self.sortResult
self.attribute_type_error = self.attributeType

Expand Down
2 changes: 1 addition & 1 deletion Lib/ldap/controls/vlv.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def decodeControlValue(self,encoded):
self.contextID = str(context_id)
else:
self.contextID = None
# backward compability class attributes
# backward compatibility class attributes
self.target_position = self.targetPosition
self.content_count = self.contentCount
self.result = self.virtualListViewResult
Expand Down
2 changes: 1 addition & 1 deletion Lib/ldap/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
See https://www.python-ldap.org/ for details.
Compability:
Compatibility:
- Tested with Python 2.0+
"""

Expand Down
Loading

0 comments on commit e5cd30c

Please sign in to comment.