From 60a770964656bd45493417ee72bcdb280a7c0e07 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Tue, 31 Dec 2019 16:43:47 -0500 Subject: bpo-39114 will be fixed soon. --- coverage/env.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'coverage/env.py') diff --git a/coverage/env.py b/coverage/env.py index 175b3092..ab9dbe92 100644 --- a/coverage/env.py +++ b/coverage/env.py @@ -11,8 +11,9 @@ import sys WINDOWS = sys.platform == "win32" LINUX = sys.platform.startswith("linux") -# Python versions. -PYVERSION = sys.version_info +# Python versions. We amend version_info with one more value, a zero if an +# official version, or 1 if built from source beyond an official version. +PYVERSION = sys.version_info + (int(platform.python_version()[-1] == "+"),) PY2 = PYVERSION < (3, 0) PY3 = PYVERSION >= (3, 0) @@ -84,9 +85,9 @@ class PYBEHAVIOR(object): # Python 3.9a1 made sys.argv[0] and other reported files absolute paths. report_absolute_files = (PYVERSION >= (3, 9)) - # Python 3.9a2 changed how return/finally was traced, but it could be + # Python 3.9a2 changed how return/finally was traced, but it was # temporary. - bug39114 = (PYVERSION >= (3, 9, 0, 'alpha', 2)) + bug39114 = (PYVERSION == (3, 9, 0, 'alpha', 2, 0)) # Coverage.py specifics. -- cgit v1.2.1