diff options
author | Eli Collins <elic@assurancetechnologies.com> | 2019-11-10 14:56:25 -0500 |
---|---|---|
committer | Eli Collins <elic@assurancetechnologies.com> | 2019-11-10 14:56:25 -0500 |
commit | 8c3470170628cbf6b18b48d95a69800b79b327ec (patch) | |
tree | 0ad961aec90b15c9e1e849c1f21c1849ca4c2191 /docs | |
parent | c8b36453db3bcfb70017fe79d50c4c461d18e161 (diff) | |
parent | a945d60e814337e668c647a043bfd6adcbd9d47e (diff) | |
download | passlib-8c3470170628cbf6b18b48d95a69800b79b327ec.tar.gz |
Merge from stable
Diffstat (limited to 'docs')
-rw-r--r-- | docs/conf.py | 37 | ||||
-rw-r--r-- | docs/history/1.7.rst | 44 | ||||
-rw-r--r-- | docs/index.rst | 8 | ||||
-rw-r--r-- | docs/install.rst | 6 | ||||
-rw-r--r-- | docs/lib/passlib.hash.bcrypt.rst | 4 | ||||
-rw-r--r-- | docs/lib/passlib.hash.bcrypt_sha256.rst | 8 | ||||
-rw-r--r-- | docs/lib/passlib.pwd.rst | 20 | ||||
-rw-r--r-- | docs/modular_crypt_format.rst | 5 |
8 files changed, 89 insertions, 43 deletions
diff --git a/docs/conf.py b/docs/conf.py index 6883743..ab34062 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -6,6 +6,11 @@ This file is execfile()d with the current directory set to its containing dir. Note that not all possible configuration values are present in this autogenerated file. All configuration values have a default; values that are commented out serve to show the default. + +This honors the following sphinx tags (passed via -t or $SPHINX_BUILD_TAGS): + + * for-pypi -- generate special version to upload to pypi + """ #============================================================================= # environment setup @@ -31,9 +36,10 @@ warnings.filterwarnings("ignore", category=DeprecationWarning, import datetime -# build option flags: -# "for-pypi" -- enable analytics tracker for pypi documentation -options = os.environ.get("PASSLIB_DOCS", "").split(",") +# read env var for tags, needed since "python setup.py build_sphinx" +# doesn't support sphinx-build's "-t" option. +for _tag in os.environ.get("SPHINX_BUILD_TAGS", "").split(): + tags.add(_tag) # building the docs requires the Cloud Sphinx theme & extensions (>= v1.4), # which contains some sphinx extensions used by Passlib. @@ -45,7 +51,7 @@ import cloud_sptheme as csp #============================================================================= # If your documentation needs a minimal Sphinx version, state it here. -needs_sphinx = '1.3' +needs_sphinx = '1.4' # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. @@ -109,8 +115,6 @@ from passlib import __version__ as release version = csp.get_version(release) if ".dev" in release: tags.add("devcopy") -if 'for-pypi' in options: - tags.add("pypi") # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -199,11 +203,6 @@ if csp.is_cloud_theme(html_theme): toc_local_bg_color='#FFE8C4', toc_local_trim_color='#FFC68A', ) - if 'for-pypi' in options: - html_theme_options.update( - googleanalytics_id = 'UA-22302196-2', - googleanalytics_path = '/passlib/', - ) # Add any paths that contain custom themes here, relative to this directory. html_theme_path = [csp.get_theme_dir()] @@ -274,6 +273,22 @@ html_sidebars = {'**': ['searchbox.html', 'globaltoc.html']} htmlhelp_basename = project + 'Doc' #============================================================================= +# site-specific html output +#============================================================================= +if tags.has("for-pypi"): + + extensions.append('cloud_sptheme.ext.auto_redirect') + auto_redirect_domain_url = "https://passlib.readthedocs.io" + auto_redirect_domain_root = "/en/stable" + + if csp.is_cloud_theme(html_theme): + + html_theme_options.update( + googleanalytics_id = 'UA-22302196-2', + googleanalytics_path = '/passlib/', + ) + +#============================================================================= # Options for LaTeX output #============================================================================= diff --git a/docs/history/1.7.rst b/docs/history/1.7.rst index 14e115f..632e4e4 100644 --- a/docs/history/1.7.rst +++ b/docs/history/1.7.rst @@ -2,6 +2,50 @@ Passlib 1.7 =========== +**1.7.2** (NOT YET RELEASED) +============================ + +This release rolls up assorted bug & compatibility fixes since 1.7.1. + +New Features +------------ + +* .. py:currentmodule:: passlib.hash + + :class:`argon2`: Now supports Argon2 "ID" and "D" hashes (assuming new enough backend library). + Now defaults to "ID" hashes instead of "I" hashes, but this can be overridden via ``type`` keyword. + (:issue:`101`) + +Bugfixes +-------- + +* Python 3.8 compatibility fixes + +* .. py:currentmodule:: passlib.totp + + :mod:`passlib.totp`: The :meth:`TOTP.to_uri` method now prepends the issuer to URI label, + (per the KeyURI spec). This should fix some compatibility issues with older TOTP clients + (:issue:`92`) + +* .. py:currentmodule:: passlib.hash + + Fixed error in :meth:`argon2.parsehash` (:issue:`97`) + +* **unittests**: ``crypt()`` unittests now account for linux systems running libxcrypt + (such as recent Fedora releases) + +Other Changes +------------- + +* **setup.py**: now honors ``$SOURCE_DATE_EPOCH`` to help with reproducible builds + +* .. py:currentmodule:: passlib.hash + + :class:`argon2`: Now throws helpful error if "argon2" package is actually an incompatible + or supported version of argon2_cffi (:issue:`99`). + +* **documentation**: Various updates & corrections. + **1.7.1** (2017-1-30) ===================== diff --git a/docs/index.rst b/docs/index.rst index a055828..c3cad52 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -19,14 +19,6 @@ Passlib |release| documentation For documentation of the latest stable version, see `<https://passlib.readthedocs.io>`_. -.. only:: pypi - - .. warning:: - - The official Passlib documentation have moved to `<https://passlib.readthedocs.io>`_. - Documentation at this location is still being maintained, - but will be updated much less frequently. - Welcome ======= Passlib is a password hashing library for Python 2 & 3, which provides diff --git a/docs/install.rst b/docs/install.rst index dfe40d6..00cab65 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -44,8 +44,8 @@ Optional Libraries Use ``pip install passlib[bcrypt]`` to get the recommended bcrypt setup. -* `argon2_cffi <https://pypi.python.org/pypi/argon2_cffi>`_, or - `argon2pure <https://pypi.python.org/pypi/argon2pure>`_ (>= 1.2.2) +* `argon2_cffi <https://pypi.python.org/pypi/argon2_cffi>`_ (>= 18.2.0), or + `argon2pure <https://pypi.python.org/pypi/argon2pure>`_ (>= 1.3) If any of these packages are installed, they will be used to provide support for the :class:`~passlib.hash.argon2` hash algorithm. @@ -139,7 +139,7 @@ If you wish to generate your own copy of the documentation, you will need to: 1. Install `Sphinx <http://sphinx.pocoo.org/>`_ (1.4 or newer) -2. Install the `Cloud Sphinx Theme <http://packages.python.org/cloud_sptheme>`_ (1.8.2 or newer). +2. Install the `Cloud Sphinx Theme <http://packages.python.org/cloud_sptheme>`_ (1.9.2 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.hash.bcrypt.rst b/docs/lib/passlib.hash.bcrypt.rst index c7c5951..e116983 100644 --- a/docs/lib/passlib.hash.bcrypt.rst +++ b/docs/lib/passlib.hash.bcrypt.rst @@ -19,8 +19,8 @@ for new applications. This class can be used directly as follows:: '$2a$12$NT0I31Sa7ihGEWpka9ASYrEFkhuTNeBQ2xfZskIiiJeyFXhRgS.Sy' >>> # the same, but with an explicit number of rounds - >>> bcrypt.using(rounds=8).hash("password") - '$2a$08$8wmNsdCH.M21f.LSBSnYjQrZ9l1EmtBc9uNPGL.9l75YE8D8FlnZC' + >>> bcrypt.using(rounds=13).hash("password") + '$2b$13$HMQTprwhaUwmir.g.ZYoXuRJhtsbra4uj.qJPHrKsX5nGlhpts0jm' >>> # verify password >>> bcrypt.verify("password", h) diff --git a/docs/lib/passlib.hash.bcrypt_sha256.rst b/docs/lib/passlib.hash.bcrypt_sha256.rst index c9d2870..20ef5ab 100644 --- a/docs/lib/passlib.hash.bcrypt_sha256.rst +++ b/docs/lib/passlib.hash.bcrypt_sha256.rst @@ -21,13 +21,13 @@ This class can be used directly as follows:: '$bcrypt-sha256$2a,12$LrmaIX5x4TRtAwEfwJZa1.$2ehnw6LvuIUTM0iz4iz9hTxv21B6KFO' >>> # the same, but with an explicit number of rounds - >>> bcrypt.using(rounds=8).hash("password") - '$bcrypt-sha256$2a,8$UE3dIZ.0I6XZtA/LdMrrle$Ag04/5zYu./12.OSqInXZnJ.WZoh1ua' + >>> bcrypt_sha256.using(rounds=13).hash("password") + '$bcrypt-sha256$2b,13$Mant9jKTadXYyFh7xp1W5.$J8xpPZR/HxH7f1vRCNUjBI7Ev1al0hu' >>> # verify password - >>> bcrypt.verify("password", h) + >>> bcrypt_sha256.verify("password", h) True - >>> bcrypt.verify("wrong", h) + >>> bcrypt_sha256.verify("wrong", h) False .. note:: diff --git a/docs/lib/passlib.pwd.rst b/docs/lib/passlib.pwd.rst index de4ee50..bb36844 100644 --- a/docs/lib/passlib.pwd.rst +++ b/docs/lib/passlib.pwd.rst @@ -43,20 +43,10 @@ but are exported by this module for general use: Password Strength Estimation ============================ -Passlib does not current offer any password strength estimation routines. +Passlib does not currently offer any password strength estimation routines. However, the (javascript-based) `zxcvbn <https://github.com/dropbox/zxcvbn>`_ -project is a very good choice. There are a few python ports of ZCVBN library, though as of 2016-11, -none of them seem active and up to date. +project is a *very* good choice. -The following is a list of known ZCVBN python ports, though it's not clear which of these -is active and/or official: - -* https://github.com/dropbox/python-zxcvbn -- seemingly official python version, - but not updated since 2013, and not published on pypi. - -* https://github.com/rpearl/python-zxcvbn -- fork of official version, - also not updated since 2013, but released to pypi as `"zxcvbn" <https://pypi.python.org/pypi/zxcvbn>`_. - -* https://github.com/gordon86/python-zxcvbn -- fork that has some updates as of july 2015, - released to pypi as `"zxcvbn-py3" <https://pypi.python.org/pypi/zxcvbn-py3>`_ (and compatible - with 2 & 3, despite the name). +Though there are a few different python ports of ZXCVBN library, as of 2019-3-4, +`zxcvbn <https://pypi.python.org/pypi/zxcvbn>` is the most up-to-date, +and is endorsed by the upstream zxcvbn developers. diff --git a/docs/modular_crypt_format.rst b/docs/modular_crypt_format.rst index c70933b..a734bef 100644 --- a/docs/modular_crypt_format.rst +++ b/docs/modular_crypt_format.rst @@ -174,6 +174,11 @@ and indicates which operating systems offer native support: :class:`~passlib.hash.sha1_crypt` ``$sha1$`` y ==================================== ==================== =========== =========== =========== =========== ======= +.. note:: + + Linux systems using `libxcrypt <https://github.com/besser82/libxcrypt>`_ instead of ``libcrypt`` + will have native support for additional formats, including nearly all those listed above. + Additional Platforms -------------------- The modular crypt format is also supported to some degree |