diff options
| author | Julen Ruiz Aizpuru <julenx@gmail.com> | 2014-04-30 09:50:38 +0200 |
|---|---|---|
| committer | Julen Ruiz Aizpuru <julenx@gmail.com> | 2014-04-30 09:53:43 +0200 |
| commit | a8981f24eb3d58f8b4c01231b2aecb3427ce960f (patch) | |
| tree | 13ba392fb9c19dfb7f5fb7751f6e6784eb3cf236 /docs/python3.rst | |
| parent | 51ebc82f828d392cb5b56ed202f60855ffb12733 (diff) | |
| download | click-a8981f24eb3d58f8b4c01231b2aecb3427ce960f.tar.gz | |
Docs: several fixes
Diffstat (limited to 'docs/python3.rst')
| -rw-r--r-- | docs/python3.rst | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/docs/python3.rst b/docs/python3.rst index 9238634..0d744ac 100644 --- a/docs/python3.rst +++ b/docs/python3.rst @@ -25,7 +25,7 @@ At the moment click suffers from a few problems on Python 3: Misconfigured environments can currently cause a wide range of unicode problems on Python 3 due to the lack of support for roundtripping - surrogate escapes. This will not be fixed in Click itself! + surrogate escapes. This will not be fixed in click itself! For more information see :ref:`python3-surrogates`. @@ -96,21 +96,21 @@ Python 3 Surrogate Handling --------------------------- Click on Python 3 does all the unicode handling in the standard library -and is subject to it's behavior. On Python 2 click does all the unicode +and is subject to its behavior. On Python 2 click does all the unicode handling itself which means there are differences in error behavior. -The most glaring difference is that on Python 2 Unicode will "just work" +The most glaring difference is that on Python 2 unicode will "just work" but requires extra care on Python 3. The reason for this is that on Python 3 the encoding detection is done in the interpreter and on Linux -and certain other operating systems it's encoding handling is problematic. +and certain other operating systems its encoding handling is problematic. The biggest source of frustration there is that click scripts invoked by init systems (sysvinit, upstart, systemd, etc.), deployment tools (salt, -puppet) or cronjobs (cron) will refuse to work unless a unicode locale is +puppet) or cron jobs (cron) will refuse to work unless a unicode locale is exported. If click encounters such an environment it will prevent further execution -to force you to force a locale. This is done because click cannot know +to force you to set a locale. This is done because click cannot know about the state of the system once it's invoked and restore the values before Python's unicode handling kicked in. @@ -133,9 +133,8 @@ by exporting the locale to ``de_DE.utf-8``:: export LC_ALL=de_DE.utf-8 export LANG=de_DE.utf-8 -If you are on an american machine ``en_EN.utf-8`` is the encoding of -choice. On some newer linux systems you can also try ``C.UTF-8`` as -locale:: +If you are on a US machine, ``en_EN.utf-8`` is the encoding of choice. On +some newer linux systems you can also try ``C.UTF-8`` as locale:: export LC_ALL=C.UTF-8 export LANG=C.UTF-8 |
