From 8f019ba54eb6838c182c8bfe9310a8d526602071 Mon Sep 17 00:00:00 2001 From: David Lord Date: Thu, 6 Jul 2023 08:07:27 -0700 Subject: [PATCH 1/2] remove msys2 detection --- CHANGES.rst | 1 + src/click/_compat.py | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 2c812d0b6..ccaaafbee 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -28,6 +28,7 @@ Unreleased ``cls`` parameter is used. :issue:`2294` - Don't fail when writing filenames to streams with strict errors. Replace invalid bytes with the replacement character (``�``). :issue:`2395` +- Remove unnecessary attempt to detect MSYS2 environment. :issue:`2355` Version 8.1.3 diff --git a/src/click/_compat.py b/src/click/_compat.py index fa5a47f00..27d445c07 100644 --- a/src/click/_compat.py +++ b/src/click/_compat.py @@ -7,12 +7,11 @@ from weakref import WeakKeyDictionary CYGWIN = sys.platform.startswith("cygwin") -MSYS2 = sys.platform.startswith("win") and ("GCC" in sys.version) # Determine local App Engine environment, per Google's own suggestion APP_ENGINE = "APPENGINE_RUNTIME" in os.environ and "Development/" in os.environ.get( "SERVER_SOFTWARE", "" ) -WIN = sys.platform.startswith("win") and not APP_ENGINE and not MSYS2 +WIN = sys.platform.startswith("win") and not APP_ENGINE auto_wrap_for_ansi: t.Optional[t.Callable[[t.TextIO], t.TextIO]] = None _ansi_re = re.compile(r"\033\[[;?0-9]*[a-zA-Z]") From daca3cfce4dcc98451362da0785e4db5fd2b1d8a Mon Sep 17 00:00:00 2001 From: David Lord Date: Thu, 6 Jul 2023 08:41:01 -0700 Subject: [PATCH 2/2] remove app engine detection --- CHANGES.rst | 1 + src/click/_compat.py | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index ccaaafbee..ce2bf8e80 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -29,6 +29,7 @@ Unreleased - Don't fail when writing filenames to streams with strict errors. Replace invalid bytes with the replacement character (``�``). :issue:`2395` - Remove unnecessary attempt to detect MSYS2 environment. :issue:`2355` +- Remove outdated and unnecessary detection of App Engine environment. :pr:`2554` Version 8.1.3 diff --git a/src/click/_compat.py b/src/click/_compat.py index 27d445c07..17cef0e8b 100644 --- a/src/click/_compat.py +++ b/src/click/_compat.py @@ -7,11 +7,7 @@ from weakref import WeakKeyDictionary CYGWIN = sys.platform.startswith("cygwin") -# Determine local App Engine environment, per Google's own suggestion -APP_ENGINE = "APPENGINE_RUNTIME" in os.environ and "Development/" in os.environ.get( - "SERVER_SOFTWARE", "" -) -WIN = sys.platform.startswith("win") and not APP_ENGINE +WIN = sys.platform.startswith("win") auto_wrap_for_ansi: t.Optional[t.Callable[[t.TextIO], t.TextIO]] = None _ansi_re = re.compile(r"\033\[[;?0-9]*[a-zA-Z]")