diff options
-rw-r--r-- | CHANGES.txt | 2 | ||||
-rw-r--r-- | coverage/execfile.py | 7 | ||||
-rw-r--r-- | doc/index.rst | 3 |
3 files changed, 10 insertions, 2 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index 3338be11..9df12fe2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,7 +6,7 @@ Change history for Coverage.py Latest ------ -- Officially support PyPy 2.3 and 2.4. +- Officially support PyPy 2.3 and 2.4, and PyPy3 2.3 and 2.4. - The original command line switches (`-x` to run a program, etc) are no longer supported. diff --git a/coverage/execfile.py b/coverage/execfile.py index b7877b6a..82cc2217 100644 --- a/coverage/execfile.py +++ b/coverage/execfile.py @@ -138,6 +138,13 @@ def run_python_file(filename, args, package=None): # so that the coverage.py code doesn't appear in the final printed # traceback. typ, err, tb = sys.exc_info() + + # PyPy3 weirdness. If I don't access __context__, then somehow it + # is non-None when the exception is reported at the upper layer, + # and a nested exception is shown to the user. This getattr fixes + # it somehow? https://bitbucket.org/pypy/pypy/issue/1903 + getattr(err, '__context__', None) + raise ExceptionDuringRun(typ, err, tb.tb_next) finally: # Restore the old __main__ diff --git a/doc/index.rst b/doc/index.rst index d557665c..ba83f2cd 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -50,7 +50,8 @@ not. .. ifconfig:: prerelease The latest version is coverage.py 4.0a1, released 27 September 2014. - It is supported on Python versions 2.6 through 3.4, and PyPy 2.2 through 2.4. + It is supported on Python versions 2.6 through 3.4, PyPy 2.2 through 2.4, + and PyPy3 2.3 and 2.4. **This is a pre-release build. The usual warnings about possible bugs apply.** The latest stable version is coverage.py 3.7.1, `described here`_. |