diff options
| author | Armin Ronacher <armin.ronacher@active-4.com> | 2015-08-04 16:26:36 +0200 |
|---|---|---|
| committer | Armin Ronacher <armin.ronacher@active-4.com> | 2015-08-04 16:26:36 +0200 |
| commit | 5f337705f68bdfa66d7c7a9fe7fc5d6bfd48db94 (patch) | |
| tree | a0d1a6a9aa2916ba9ca92f56af86a7f21aad92bc /docs/python3.rst | |
| parent | 36f83d91e27b5b88ee806cb40f284658e2f9cdb5 (diff) | |
| download | click-5f337705f68bdfa66d7c7a9fe7fc5d6bfd48db94.tar.gz | |
Warn about the use of unicode_literals
Diffstat (limited to 'docs/python3.rst')
| -rw-r--r-- | docs/python3.rst | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/docs/python3.rst b/docs/python3.rst index 29c7771..0bc97f0 100644 --- a/docs/python3.rst +++ b/docs/python3.rst @@ -152,3 +152,24 @@ Python 3 bug tracker: * `LC_CTYPE=C: pydoc leaves terminal in an unusable state <http://bugs.python.org/issue21398>`_ (this is relevant to Click because the pager support is provided by the stdlib pydoc module) + +Unicode Literals +---------------- + +Starting with Click 5.0 there will be a warning for the use of the +``unicode_literals`` future import in Python 2. This has been done due to +the negative consequences of this import with regards to unintentionally +causing bugs due to introducing Unicode data to APIs that are incapable of +handling them. + +If you use ``unicode_literals`` in any file that defines a Click command +or that invokes a click command you will be given a warning. You are +strongly encouraged to not use ``unicode_literals`` and instead use +explicit ``u`` prefixes for your Unicode strings. + +If you do want to ignore the warning and continue using +``unicode_literals`` on your own peril, you can disable the warning as +follows:: + + import click + click.disable_unicode_literals_warning = True |
