From 58ec58a42bece5b2804b178c7a6a7e67328465db Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Tue, 17 Mar 2020 00:29:11 -0700 Subject: [PATCH] bpo-39656: Ensure `bin/python3.#` is always present in virtual environments on POSIX (GH-19030) --- Lib/venv/__init__.py | 2 +- .../next/Library/2020-03-16-11-38-45.bpo-39656.MaNOgm.rst | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/Library/2020-03-16-11-38-45.bpo-39656.MaNOgm.rst diff --git a/Lib/venv/__init__.py b/Lib/venv/__init__.py index a220ef784c1..8009deb3ea7 100644 --- a/Lib/venv/__init__.py +++ b/Lib/venv/__init__.py @@ -243,7 +243,7 @@ class EnvBuilder: copier(context.executable, path) if not os.path.islink(path): os.chmod(path, 0o755) - for suffix in ('python', 'python3'): + for suffix in ('python', 'python3', f'python3.{sys.version_info[1]}'): path = os.path.join(binpath, suffix) if not os.path.exists(path): # Issue 18807: make copies if diff --git a/Misc/NEWS.d/next/Library/2020-03-16-11-38-45.bpo-39656.MaNOgm.rst b/Misc/NEWS.d/next/Library/2020-03-16-11-38-45.bpo-39656.MaNOgm.rst new file mode 100644 index 00000000000..937d162e4f0 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-03-16-11-38-45.bpo-39656.MaNOgm.rst @@ -0,0 +1,2 @@ +Ensure ``bin/python3.#`` is always present in virtual environments on POSIX +platforms - by Anthony Sottile.