Skip to content

Commit

Permalink
Doc: Convert Makefile and index.rst to Unix line endings
Browse files Browse the repository at this point in the history
  • Loading branch information
Petr Viktorin committed Nov 28, 2017
1 parent 4b97671 commit f7012e7
Show file tree
Hide file tree
Showing 2 changed files with 148 additions and 148 deletions.
136 changes: 68 additions & 68 deletions Doc/Makefile
Original file line number Diff line number Diff line change
@@ -1,68 +1,68 @@
# Makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =

# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d .build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .

.PHONY: help clean html web htmlhelp latex changes linkcheck

help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " web to make files usable by Sphinx.web"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " changes to make an overview over all changed/added/deprecated items"
@echo " linkcheck to check all external links for integrity"

clean:
-rm -rf .build/*

html:
mkdir -p .build/html .build/doctrees
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) .build/html
@echo
@echo "Build finished. The HTML pages are in .build/html."

web:
mkdir -p .build/web .build/doctrees
$(SPHINXBUILD) -b web $(ALLSPHINXOPTS) .build/web
@echo
@echo "Build finished; now you can run"
@echo " python -m sphinx.web .build/web"
@echo "to start the server."

htmlhelp:
mkdir -p .build/htmlhelp .build/doctrees
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) .build/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in .build/htmlhelp."

latex:
mkdir -p .build/latex .build/doctrees
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) .build/latex
@echo
@echo "Build finished; the LaTeX files are in .build/latex."
@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
"run these through (pdf)latex."

changes:
mkdir -p .build/changes .build/doctrees
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) .build/changes
@echo
@echo "The overview file is in .build/changes."

linkcheck:
mkdir -p .build/linkcheck .build/doctrees
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) .build/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in .build/linkcheck/output.txt."
# Makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =

# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d .build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .

.PHONY: help clean html web htmlhelp latex changes linkcheck

help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " web to make files usable by Sphinx.web"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " changes to make an overview over all changed/added/deprecated items"
@echo " linkcheck to check all external links for integrity"

clean:
-rm -rf .build/*

html:
mkdir -p .build/html .build/doctrees
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) .build/html
@echo
@echo "Build finished. The HTML pages are in .build/html."

web:
mkdir -p .build/web .build/doctrees
$(SPHINXBUILD) -b web $(ALLSPHINXOPTS) .build/web
@echo
@echo "Build finished; now you can run"
@echo " python -m sphinx.web .build/web"
@echo "to start the server."

htmlhelp:
mkdir -p .build/htmlhelp .build/doctrees
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) .build/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in .build/htmlhelp."

latex:
mkdir -p .build/latex .build/doctrees
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) .build/latex
@echo
@echo "Build finished; the LaTeX files are in .build/latex."
@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
"run these through (pdf)latex."

changes:
mkdir -p .build/changes .build/doctrees
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) .build/changes
@echo
@echo "The overview file is in .build/changes."

linkcheck:
mkdir -p .build/linkcheck .build/doctrees
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) .build/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in .build/linkcheck/output.txt."
160 changes: 80 additions & 80 deletions Doc/index.rst
Original file line number Diff line number Diff line change
@@ -1,80 +1,80 @@
##########################
python-ldap Documentation
##########################

.. topic:: Abstract

This document describes the package python-ldap with its various modules.

Depending on what you want to do this manual assumes basic to expert
knowledge about the Python language and the LDAP standard (LDAPv3).


********
Contents
********

.. toctree::
:maxdepth: 3

installing.rst
ldap.rst
ldap-async.rst
ldap-controls.rst
ldap-dn.rst
ldap-extop.rst
ldap-filter.rst
ldap-modlist.rst
ldap-resiter.rst
ldap-schema.rst
ldap-syncrepl.rst
ldap-sasl.rst
ldif.rst
ldapurl.rst
slapdtest.rst



*********************
Bytes/text management
*********************

The LDAP protocol states that some fields (distinguised 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.

In Python 2, ``python-ldap`` used bytes for all fields, including those guaranteed to be text.
In order to support Python 3, this distinction is made explicit. This is done
through the ``bytes_mode`` flag to ``ldap.initialize()``.

When porting from ``python-ldap`` 2.x, users are advised to update their code to set ``bytes_mode=False``
on calls to these methods.
Under Python 2, ``python-pyldap`` aggressively checks the type of provided arguments, and will raise a ``TypeError``
for any invalid parameter.
However, if the ``bytes_mode`` kwarg isn't provided, ``pyldap`` will only
raise warnings.

The typical usage is as follows; note that only the result's *values* are of the bytes type:

.. code-block:: pycon
>>> import ldap
>>> con = ldap.initialize('ldap://localhost:389', bytes_mode=False)
>>> con.simple_bind_s('login', 'secret_password')
>>> results = con.search_s('ou=people,dc=example,dc=org', ldap.SCOPE_SUBTREE, "(cn=Raphaël)")
>>> results
[
("cn=Raphaël,ou=people,dc=example,dc=org", {
'cn': [b'Rapha\xc3\xabl'],
'sn': [b'Barrois'],
}),
]
******************
Indices and tables
******************

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
##########################
python-ldap Documentation
##########################

.. topic:: Abstract

This document describes the package python-ldap with its various modules.

Depending on what you want to do this manual assumes basic to expert
knowledge about the Python language and the LDAP standard (LDAPv3).


********
Contents
********

.. toctree::
:maxdepth: 3

installing.rst
ldap.rst
ldap-async.rst
ldap-controls.rst
ldap-dn.rst
ldap-extop.rst
ldap-filter.rst
ldap-modlist.rst
ldap-resiter.rst
ldap-schema.rst
ldap-syncrepl.rst
ldap-sasl.rst
ldif.rst
ldapurl.rst
slapdtest.rst



*********************
Bytes/text management
*********************

The LDAP protocol states that some fields (distinguised 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.

In Python 2, ``python-ldap`` used bytes for all fields, including those guaranteed to be text.
In order to support Python 3, this distinction is made explicit. This is done
through the ``bytes_mode`` flag to ``ldap.initialize()``.

When porting from ``python-ldap`` 2.x, users are advised to update their code to set ``bytes_mode=False``
on calls to these methods.
Under Python 2, ``python-pyldap`` aggressively checks the type of provided arguments, and will raise a ``TypeError``
for any invalid parameter.
However, if the ``bytes_mode`` kwarg isn't provided, ``pyldap`` will only
raise warnings.

The typical usage is as follows; note that only the result's *values* are of the bytes type:

.. code-block:: pycon
>>> import ldap
>>> con = ldap.initialize('ldap://localhost:389', bytes_mode=False)
>>> con.simple_bind_s('login', 'secret_password')
>>> results = con.search_s('ou=people,dc=example,dc=org', ldap.SCOPE_SUBTREE, "(cn=Raphaël)")
>>> results
[
("cn=Raphaël,ou=people,dc=example,dc=org", {
'cn': [b'Rapha\xc3\xabl'],
'sn': [b'Barrois'],
}),
]
******************
Indices and tables
******************

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

0 comments on commit f7012e7

Please sign in to comment.