diff options
| author | Erik Rose <grinch@grinchcentral.com> | 2014-04-28 12:58:49 -0400 |
|---|---|---|
| committer | Erik Rose <grinch@grinchcentral.com> | 2014-04-28 12:58:49 -0400 |
| commit | 7503e66b492f51026ed8489e475a497e75675427 (patch) | |
| tree | 514364a0b7df13a2366b74cd8bb5fa9058cfd55e /docs/python3.rst | |
| parent | c0536c975d7c06a0de3fc4cc83725e471e2afb87 (diff) | |
| download | click-7503e66b492f51026ed8489e475a497e75675427.tar.gz | |
A couple drive-by edits to the Python 2/3 docs
Diffstat (limited to 'docs/python3.rst')
| -rw-r--r-- | docs/python3.rst | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/python3.rst b/docs/python3.rst index 02593a2..4755beb 100644 --- a/docs/python3.rst +++ b/docs/python3.rst @@ -19,20 +19,20 @@ Python 3 Limitations At the moment click suffers from a few problems on Python 3: * The command line in Unix traditionally is in bytes and not unicode. - While there are encoding hits for all of this, there are generally + While there are encoding hints for all of this, there are generally some situations where this can break. The most common one is SSH connections to machines with different locales. 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 be fixed on a case by case basis going + surrogate escapes. This will be fixed on a case-by-case basis going forward. * Standard input and output on Python 3 is opened in unicode mode by default. Click has to reopen the stream in binary mode in certain situations. Because there is no standardized way to do this, this might not always work. Primarily this can become a problem when - testing command line applications. + testing command-line applications. This is not supported:: @@ -74,7 +74,7 @@ On Python 2 the following is true: On Python 3 the following is true: * ``sys.stdin``, ``sys.stdout`` and ``sys.stderr`` are by default - text-based. When click needs a binary stream it attempts to discover + text-based. When click needs a binary stream, it attempts to discover the underlying binary stream. See :ref:`python3-limitations` for how this works. * ``sys.argv`` is always unicode-based. This also means that the native @@ -83,8 +83,8 @@ On Python 3 the following is true: This causes problems when the terminal is incorrectly set and Python does not figure out the encoding. In that case the unicode string will contain error bytes encoded as surrogate escapes. -* When dealing with files click will always use the unicode file system +* When dealing with files, click will always use the unicode file system API calls by using the operating system's reported or guessed - filesystem encoding. Surrogates are supported for filenames so it + filesystem encoding. Surrogates are supported for filenames, so it should be possible to open files through the :class:`File` type even if the environment is misconfigured. |
