summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDavid Smith <smithdc@gmail.com>2020-06-17 07:35:09 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-06-18 21:43:20 +0200
commit27c09043da52ca1f02605bf28600bfd5ace95ae4 (patch)
treeb9fb0d8d11a736943e4bab5ea2982bb8d96d6477 /docs
parent26a413507abb38f7eee4cf62f2ee9727fdc7bf8d (diff)
Refs #31670 -- Renamed whitelist argument and attribute of EmailValidator.
Diffstat (limited to 'docs')
-rw-r--r--docs/internals/deprecation.txt3
-rw-r--r--docs/ref/validators.txt26
-rw-r--r--docs/releases/3.2.txt6
-rw-r--r--docs/spelling_wordlist2
4 files changed, 27 insertions, 10 deletions
diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt
index dd80acf833..d6becd31c1 100644
--- a/docs/internals/deprecation.txt
+++ b/docs/internals/deprecation.txt
@@ -21,6 +21,9 @@ details on these changes.
* ``BaseCommand.requires_system_checks`` won't support boolean values.
+* The ``whitelist`` argument and ``domain_whitelist`` attribute of
+ ``django.core.validators.EmailValidator`` will be removed.
+
.. _deprecation-removed-in-4.0:
4.0
diff --git a/docs/ref/validators.txt b/docs/ref/validators.txt
index 6374f4e8cd..4669ba28d7 100644
--- a/docs/ref/validators.txt
+++ b/docs/ref/validators.txt
@@ -119,11 +119,11 @@ to, or in lieu of custom ``field.clean()`` methods.
``EmailValidator``
------------------
-.. class:: EmailValidator(message=None, code=None, whitelist=None)
+.. class:: EmailValidator(message=None, code=None, allowlist=None)
:param message: If not ``None``, overrides :attr:`.message`.
:param code: If not ``None``, overrides :attr:`code`.
- :param whitelist: If not ``None``, overrides :attr:`whitelist`.
+ :param allowlist: If not ``None``, overrides :attr:`allowlist`.
.. attribute:: message
@@ -136,14 +136,22 @@ to, or in lieu of custom ``field.clean()`` methods.
The error code used by :exc:`~django.core.exceptions.ValidationError`
if validation fails. Defaults to ``"invalid"``.
- .. attribute:: whitelist
+ .. attribute:: allowlist
- Whitelist of email domains to allow. By default, a regular expression
- (the ``domain_regex`` attribute) is used to validate whatever appears
- after the @ sign. However, if that string appears in the whitelist, this
- validation is bypassed. If not provided, the default whitelist is
- ``['localhost']``. Other domains that don't contain a dot won't pass
- validation, so you'd need to whitelist them as necessary.
+ Allowlist of email domains. By default, a regular expression (the
+ ``domain_regex`` attribute) is used to validate whatever appears after
+ the ``@`` sign. However, if that string appears in the ``allowlist``,
+ this validation is bypassed. If not provided, the default ``allowlist``
+ is ``['localhost']``. Other domains that don't contain a dot won't pass
+ validation, so you'd need to add them to the ``allowlist`` as
+ necessary.
+
+ .. deprecated:: 3.2
+
+ The ``whitelist`` parameter is deprecated. Use :attr:`allowlist`
+ instead.
+ The undocumented ``domain_whitelist`` attribute is deprecated. Use
+ ``domain_allowlist`` instead.
``URLValidator``
----------------
diff --git a/docs/releases/3.2.txt b/docs/releases/3.2.txt
index 9b87484335..a9e9ff662d 100644
--- a/docs/releases/3.2.txt
+++ b/docs/releases/3.2.txt
@@ -351,3 +351,9 @@ Miscellaneous
* Using a boolean value in :attr:`.BaseCommand.requires_system_checks` is
deprecated. Use ``'__all__'`` instead of ``True``, and ``[]`` (an empty list)
instead of ``False``.
+
+* The ``whitelist`` argument and ``domain_whitelist`` attribute of
+ :class:`~django.core.validators.EmailValidator` are deprecated. Use
+ ``allowlist`` instead of ``whitelist``, and ``domain_allowlist`` instead of
+ ``domain_whitelist``. You may need to rename ``whitelist`` in existing
+ migrations.
diff --git a/docs/spelling_wordlist b/docs/spelling_wordlist
index 06c2f7399d..ead96de4cf 100644
--- a/docs/spelling_wordlist
+++ b/docs/spelling_wordlist
@@ -10,6 +10,7 @@ affordances
aggregator
Ai
Alchin
+allowlist
alphanumerics
amet
analytics
@@ -780,7 +781,6 @@ vertices
viewable
virtualized
Weblog
-whitelist
whitespace
whitespaces
whizbang