summaryrefslogtreecommitdiff
path: root/src/click
diff options
context:
space:
mode:
Diffstat (limited to 'src/click')
-rw-r--r--src/click/_unicodefun.py10
-rw-r--r--src/click/core.py4
-rw-r--r--src/click/utils.py10
3 files changed, 10 insertions, 14 deletions
diff --git a/src/click/_unicodefun.py b/src/click/_unicodefun.py
index 7f3f234..53ec9d2 100644
--- a/src/click/_unicodefun.py
+++ b/src/click/_unicodefun.py
@@ -2,8 +2,8 @@ import codecs
import os
-def _verify_python3_env():
- """Ensures that the environment is good for unicode on Python 3."""
+def _verify_python_env():
+ """Ensures that the environment is good for Unicode."""
try:
import locale
@@ -75,8 +75,8 @@ def _verify_python3_env():
)
raise RuntimeError(
- "Click will abort further execution because Python 3 was"
+ "Click will abort further execution because Python was"
" configured to use ASCII as encoding for the environment."
- " Consult https://click.palletsprojects.com/python3/ for"
- f" mitigation steps.{extra}"
+ " Consult https://click.palletsprojects.com/unicode-support/"
+ f" for mitigation steps.{extra}"
)
diff --git a/src/click/core.py b/src/click/core.py
index e4061aa..b7124df 100644
--- a/src/click/core.py
+++ b/src/click/core.py
@@ -6,7 +6,7 @@ from contextlib import contextmanager
from functools import update_wrapper
from itertools import repeat
-from ._unicodefun import _verify_python3_env
+from ._unicodefun import _verify_python_env
from .exceptions import Abort
from .exceptions import BadParameter
from .exceptions import ClickException
@@ -787,7 +787,7 @@ class BaseCommand:
"""
# Verify that the environment is configured correctly, or reject
# further execution to avoid a broken script.
- _verify_python3_env()
+ _verify_python_env()
if args is None:
args = sys.argv[1:]
diff --git a/src/click/utils.py b/src/click/utils.py
index ffd26b3..bd9dd8e 100644
--- a/src/click/utils.py
+++ b/src/click/utils.py
@@ -265,11 +265,7 @@ def echo(message=None, file=None, nl=True, err=False, color=None):
def get_binary_stream(name):
- """Returns a system stream for byte processing. This essentially
- returns the stream from the sys module with the given name but it
- solves some compatibility issues between different Python versions.
- Primarily this function is necessary for getting binary streams on
- Python 3.
+ """Returns a system stream for byte processing.
:param name: the name of the stream to open. Valid names are ``'stdin'``,
``'stdout'`` and ``'stderr'``
@@ -283,8 +279,8 @@ def get_binary_stream(name):
def get_text_stream(name, encoding=None, errors="strict"):
"""Returns a system stream for text processing. This usually returns
a wrapped stream around a binary stream returned from
- :func:`get_binary_stream` but it also can take shortcuts on Python 3
- for already correctly configured streams.
+ :func:`get_binary_stream` but it also can take shortcuts for already
+ correctly configured streams.
:param name: the name of the stream to open. Valid names are ``'stdin'``,
``'stdout'`` and ``'stderr'``