Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Doc/library/codecs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1395,6 +1395,15 @@ encodings.
| | | :mod:`encodings.idna`. |
| | | Only ``errors='strict'`` |
| | | is supported. |
| | | |
| | | .. warning:: |
| | | |
| | | This codec builds on |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to either link to or include the justification here that these algorithms were designed to process 63 or fewer octets? Maybe we can hint at a limit of 1,000 that we've set ourselves somehow, for users looking to adopt a limit?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to either link to or include the justification here that these algorithms were designed to process 63 or fewer octets?

Hmm, any suggestions as to where exactly we could link? I fear issues/PR might be too "busy" for this.

| | | ``punycode``, whose |
| | | algorithms scale |
| | | poorly, so limit the |
| | | length of untrusted |
| | | input. |
+--------------------+---------+---------------------------+
| mbcs | ansi, | Windows only: Encode the |
| | dbcs | operand according to the |
Expand Down Expand Up @@ -1646,6 +1655,11 @@ Applications) and :rfc:`3492` (Nameprep: A Stringprep Profile for
Internationalized Domain Names (IDN)). It builds upon the ``punycode`` encoding
and :mod:`stringprep`.

.. warning::

This module builds on ``punycode``, whose algorithms scale poorly, so limit
the length of untrusted input.

If you need the IDNA 2008 standard from :rfc:`5891` and :rfc:`5895`, use the
third-party :pypi:`idna` module.

Expand Down
Loading