Skip to content

Commit

Permalink
Update changelog.
Browse files Browse the repository at this point in the history
  • Loading branch information
ubernostrum committed May 8, 2019
1 parent 0aef0b0 commit 6b57ffb
Showing 1 changed file with 32 additions and 22 deletions.
54 changes: 32 additions & 22 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ Changelog
This document lists changes between released versions of
pwned-passwords-django.

1.3.2 -- released 2019-05-07
----------------------------

No new features. No bug fixes. Released to add explicit markers of
Django 2.2 compatibility.


1.3.1 -- released 2018-09-18
----------------------------
Expand Down Expand Up @@ -44,15 +50,15 @@ New features:

* When a request to the Pwned Passwords API times out, or encounters
an error, it logs the problem with a message of level
``logging.WARNING``. The
:data:`logging.WARNING`. The
:class:`~pwned_passwords_django.validators.PwnedPasswordsValidator`
will fall back to `Django's CommonPasswordValidator
<https://docs.djangoproject.com/en/2.0/topics/auth/passwords/#django.contrib.auth.password_validation.CommonPasswordValidator>`_,
will fall back to
:class:`~django.contrib.auth.password_validation.CommonPasswordValidator`,
which has a smaller list of common passwords. The
:class:`~pwned_passwords_django.middleware.PwnedPasswordsMiddleware`
does not have a fallback behavior;
:func:`~pwned_passwords_django.api.pwned_password` will return
``None`` to indicate the error case.
:data:`None` to indicate the error case.

Bugs fixed:
~~~~~~~~~~~
Expand All @@ -63,28 +69,32 @@ Other changes:
~~~~~~~~~~~~~~

* :func:`~pwned_passwords_django.api.pwned_password` will now raise
``TypeError`` if its argument is not a Unicode string (the type
``unicode`` on Python 2, ``str`` on Python 3). This is debatably
backwards-incompatible; ``pwned_password()`` encodes its argument to
UTF-8 bytes, which will raise ``AttributeError`` if attempted on a
``bytes`` object in Python 3. As a result, all supported
environments other than Python 2.7/Django 1.11 would already raise
``AttributeError`` (due to ``bytes`` objects lacking the
``encode()`` method) in both 1.0 and 1.1. Enforcing the
``TypeError`` on all supported environments ensures users of
pwned-passwords-django do not write code that accidentally works in
one and only one environment, and supplies a more accurate and
comprehensible exception than the ``AttributeError`` which would
have been raised in previous versions.
:exc:`TypeError` if its argument is not a Unicode string (the type
:class:`unicode` on Python 2, :class:`str` on Python 3). This is
debatably backwards-incompatible;
:func:`~pwned_passwords_django.api.pwned_password` encodes its
argument to UTF-8 bytes, which will raise :exc:`AttributeError` if
attempted on a :class:`bytes` object in Python 3. As a result, all
supported environments other than Python 2.7/Django 1.11 would
already raise :exc:`AttributeError` (due to :class:`bytes` objects
lacking the :meth:`~str.encode` method) in both 1.0 and
1.1. Enforcing the :exc:`TypeError` on all supported environments
ensures users of pwned-passwords-django do not write code that
accidentally works in one and only one environment, and supplies a
more accurate and comprehensible exception than the
:exc:`AttributeError` which would have been raised in previous
versions.

* The default error and help messages of
:class:`~pwned_passwords_django.validators.PwnedPasswordsValidator`
now match the messages of Django's
``CommonPasswordValidator``. Since ``PwnedPasswordsValidator`` falls
back to ``CommonPasswordValidator`` when the Pwned Passwords API is
unresponsive, this provides consistency of messages, and also
ensures the messages are translated (Django provides translations
for its built-in messages).
:class:`~django.contrib.auth.password_validation.CommonPasswordValidator`. Since
:class:`~pwned_passwords_django.validators.PwnedPasswordsValidator`
falls back to
:class:`~django.contrib.auth.password_validation.CommonPasswordValidator`
when the Pwned Passwords API is unresponsive, this provides
consistency of messages, and also ensures the messages are
translated (Django provides translations for its built-in messages).


1.1 -- released 2018-03-06
Expand Down

0 comments on commit 6b57ffb

Please sign in to comment.