summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/_static/masthead.pngbin8103 -> 7827 bytes
-rw-r--r--docs/conf.py28
-rw-r--r--docs/index.rst3
-rw-r--r--docs/install.rst2
-rw-r--r--docs/lib/passlib.context.rst4
-rw-r--r--docs/lib/passlib.hash.dlitz_pbkdf2_sha1.rst2
-rw-r--r--docs/lib/passlib.hash.ldap_std.rst2
-rw-r--r--docs/password_hash_api.rst12
-rw-r--r--passlib/handlers/bcrypt.py2
9 files changed, 40 insertions, 15 deletions
diff --git a/docs/_static/masthead.png b/docs/_static/masthead.png
index 677fcb1..5aac437 100644
--- a/docs/_static/masthead.png
+++ b/docs/_static/masthead.png
Binary files differ
diff --git a/docs/conf.py b/docs/conf.py
index edb0028..e63b3d0 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -68,6 +68,9 @@ extensions = [
# allow table column alignment styling
'cloud_sptheme.ext.table_styling',
+
+ # modify logo per page
+ 'cloud_sptheme.ext.perpage',
]
# Add any paths that contain templates here, relative to this directory.
@@ -159,7 +162,16 @@ html_theme = os.environ.get("SPHINX_THEME") or 'redcloud'
# documentation.
html_theme_options = {}
if csp.is_cloud_theme(html_theme):
- html_theme_options.update(roottarget=index_doc, issueicon=None, lighter_decor=True)
+ html_theme_options.update(roottarget=index_doc,
+ issueicon=None,
+ lighter_decor=True,
+# borderless_decor=True,
+ inline_admonitions=False,
+ sidebar_localtoc_title="Page contents",
+ sidebarwidth="280px",
+ max_width="11.5in",
+ compact_width="11.5in",
+ )
if 'for-pypi' in options:
html_theme_options.update(
googleanalytics_id = 'UA-22302196-2',
@@ -179,6 +191,9 @@ html_short_title = "%s %s Documentation" % (project, version)
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
html_logo = os.path.join("_static", "masthead.png")
+perpage_html_logo = {
+ 'index': None,
+}
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
@@ -199,7 +214,14 @@ html_static_path = ['_static']
html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
-##html_sidebars = {}
+common_sidebars = ['quicklinks.html', 'searchbox.html']
+html_sidebars = {
+ '**': ['localtoc.html', 'relations.html'] + common_sidebars,
+ 'py-modindex': common_sidebars,
+ 'genindex': common_sidebars,
+ 'search': common_sidebars,
+}
+#html_sidebars = {'**': ['globaltoc.html', 'searchbox.html']}
# Additional templates that should be rendered to pages, maps page names to
# template names.
@@ -215,7 +237,7 @@ html_use_smartypants = True
##html_split_index = False
# If true, links to the reST sources are added to the pages.
-html_show_sourcelink = False
+##html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
##html_show_sphinx = True
diff --git a/docs/index.rst b/docs/index.rst
index 270fcba..cbcebe3 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -1,3 +1,6 @@
+.. image:: _static/masthead.png
+ :align: center
+
==========================================
Passlib |release| documentation
==========================================
diff --git a/docs/install.rst b/docs/install.rst
index df99878..9407673 100644
--- a/docs/install.rst
+++ b/docs/install.rst
@@ -96,7 +96,7 @@ If you wish to generate your own copy of the documentation,
you will need to:
1. Install `Sphinx <http://sphinx.pocoo.org/>`_ (1.1 or newer)
-2. Install the `Cloud Sphinx Theme <http://packages.python.org/cloud_sptheme>`_ (1.5 or newer).
+2. Install the `Cloud Sphinx Theme <http://packages.python.org/cloud_sptheme>`_ (1.6 or newer).
3. Download the Passlib source
4. From the Passlib source directory, run :samp:`python setup.py build_sphinx`.
5. Once Sphinx completes its run, point a web browser to the file at :samp:`{SOURCE}/build/sphinx/html/index.html`
diff --git a/docs/lib/passlib.context.rst b/docs/lib/passlib.context.rst
index 6df24ba..6d40067 100644
--- a/docs/lib/passlib.context.rst
+++ b/docs/lib/passlib.context.rst
@@ -458,8 +458,8 @@ if any invalid-but-correctable values are encountered
:class:`~passlib.hash.sha256_crypt` 's minimum of 1000).
.. versionchanged:: 1.6
- Previous releases issued a generic :exc:`UserWarning` instead
- of the more specific :exc:`PasslibConfigWarning`.
+ Previous releases used Python's builtin :exc:`UserWarning` instead
+ of the more specific :exc:`!passlib.exc.PasslibConfigWarning`.
Other Helpers
=============
diff --git a/docs/lib/passlib.hash.dlitz_pbkdf2_sha1.rst b/docs/lib/passlib.hash.dlitz_pbkdf2_sha1.rst
index 4b62520..270cd75 100644
--- a/docs/lib/passlib.hash.dlitz_pbkdf2_sha1.rst
+++ b/docs/lib/passlib.hash.dlitz_pbkdf2_sha1.rst
@@ -4,7 +4,7 @@
:class:`passlib.hash.dlitz_pbkdf2_sha1` - Dwayne Litzenberger's PBKDF2 hash
===========================================================================
-.. note::
+.. warning::
Due to a small flaw, this hash is not as strong as other PBKDF1-HMAC-SHA1
based hashes. It should probably not be used for new applications.
diff --git a/docs/lib/passlib.hash.ldap_std.rst b/docs/lib/passlib.hash.ldap_std.rst
index 0b0b13a..6440b49 100644
--- a/docs/lib/passlib.hash.ldap_std.rst
+++ b/docs/lib/passlib.hash.ldap_std.rst
@@ -38,7 +38,7 @@ Plain Hashes
============
.. warning::
- These hashes should be considered secure in any manner,
+ These hashes should not be considered secure in any way,
as they are nothing but raw MD5 & SHA-1 digests,
which are extremely vulnerable to brute-force attacks.
diff --git a/docs/password_hash_api.rst b/docs/password_hash_api.rst
index 69e0d5c..8d20dbf 100644
--- a/docs/password_hash_api.rst
+++ b/docs/password_hash_api.rst
@@ -630,7 +630,7 @@ and the following attributes should be defined:
The maximum number of rounds the scheme allows.
Specifying a value beyond this will result in a :exc:`ValueError`.
- Will be a positive integer, or ``None`` (indicating
+ This will be either a positive integer, or ``None`` (indicating
the algorithm has no effective upper limit).
.. attribute:: PasswordHash.min_rounds
@@ -720,8 +720,8 @@ and the following attributes should be defined:
Choosing the right rounds value
===============================
-For hash algorithms which support a variable time-cost,
-Passlib's default ``rounds`` choices attempt to be secure enough for
+For hash algorithms with a variable time-cost,
+Passlib's :attr:`~PasswordHash.default_rounds` values attempt to be secure enough for
the average [#avgsys]_ system. But the "right" value for a given hash
is dependant on the server, its cpu, its expected load, and its users.
Since larger values mean increased work for an attacker,
@@ -733,12 +733,12 @@ take upwards of 250ms - 400ms before users start getting annoyed.
For superuser accounts, it should take as much time as the admin can stand
(usually ~4x more delay than a regular account).
-Passlib's ``default_rounds`` values are retuned periodically
-by taking a rough estimate of what an "average" system is capable of,
+Passlib's :attr:`!default_rounds` values are retuned periodically,
+starting with a rough estimate of what an "average" system is capable of,
and then setting all :samp:`{hash}.default_rounds` values to take ~300ms on such a system.
However, some older algorithms (e.g. :class:`~passlib.hash.bsdi_crypt`) are weak enough that
a tradeoff must be made, choosing "secure but intolerably slow" over "fast but unacceptably insecure".
For this reason, it is strongly recommended to not use a value much lower than Passlib's default.
-.. [#avgsys] For Passlib 1.6, all hashes were retuned to take ~300ms on a
+.. [#avgsys] For Passlib 1.6.2, all hashes were retuned to take ~300ms on a
system with a 2.5 ghz 64 bit CPU.
diff --git a/passlib/handlers/bcrypt.py b/passlib/handlers/bcrypt.py
index 5158fcd..ee6e300 100644
--- a/passlib/handlers/bcrypt.py
+++ b/passlib/handlers/bcrypt.py
@@ -271,7 +271,7 @@ class bcrypt(uh.HasManyIdents, uh.HasRounds, uh.HasSalt, uh.HasManyBackends, uh.
@classmethod
def _no_backends_msg(cls):
- return "no bcrypt backends available - please install py-bcrypt"
+ return "no bcrypt backends available -- recommend you install one (e.g. 'pip install bcrypt')"
def _calc_checksum(self, secret):
"common backend code"