diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2019-12-31 16:43:47 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2019-12-31 16:43:47 -0500 |
commit | 60a770964656bd45493417ee72bcdb280a7c0e07 (patch) | |
tree | 276217ef359cc24f94d6ab07726ff8db4dba2a81 /coverage/env.py | |
parent | 957e6a6f17a9eb8eea51be972052fcd98ff7a2fd (diff) | |
download | python-coveragepy-git-60a770964656bd45493417ee72bcdb280a7c0e07.tar.gz |
bpo-39114 will be fixed soon.
Diffstat (limited to 'coverage/env.py')
-rw-r--r-- | coverage/env.py | 9 |
1 files changed, 5 insertions, 4 deletions
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. |