diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2016-08-03 13:03:01 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2016-08-03 13:03:01 -0400 |
commit | 90ecf09e3fc3f9c8950deba71fca699c7623edbf (patch) | |
tree | fe0be805116ffb62ad359fe272fe03cc503ba572 | |
parent | de35946f2db5ad862fe2bd7f89573a038b156a82 (diff) | |
download | python-coveragepy-git-90ecf09e3fc3f9c8950deba71fca699c7623edbf.tar.gz |
Add support for PyPy3 5.2 alpha 1
-rw-r--r-- | CHANGES.rst | 2 | ||||
-rw-r--r-- | README.rst | 2 | ||||
-rw-r--r-- | coverage/control.py | 22 | ||||
-rw-r--r-- | doc/index.rst | 4 | ||||
-rw-r--r-- | tox.ini | 15 |
5 files changed, 27 insertions, 18 deletions
diff --git a/CHANGES.rst b/CHANGES.rst index 32defc19..2457973d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -16,6 +16,8 @@ Unreleased - Corrected the name of the jquery.ba-throttle-debounce.js library. Thanks, Ben Finney. Closes `issue 505`_. +- Support PyPy3 5.2 alpha 1. + .. _issue 505: https://bitbucket.org/ned/coveragepy/issues/505/use-canonical-filename-for-debounce .. _issue 510: https://bitbucket.org/ned/coveragepy/issues/510/erase-still-needed-in-42 @@ -16,7 +16,7 @@ the code analysis tools and tracing hooks provided in the Python standard library to determine which lines are executable, and which have been executed. Coverage.py runs on CPython 2.6, 2.7, and 3.3 through 3.6; PyPy 4.0 and 5.1; -and PyPy3 2.4. +and PyPy3 2.4 and 5.2. Documentation is on `Read the Docs <http://coverage.readthedocs.io>`_. Code repository and issue tracker are on `Bitbucket <http://bitbucket.org/ned/coveragepy>`_, diff --git a/coverage/control.py b/coverage/control.py index 56a6afd6..16e9748a 100644 --- a/coverage/control.py +++ b/coverage/control.py @@ -35,11 +35,20 @@ from coverage.xmlreport import XmlReporter os = isolate_module(os) # Pypy has some unusual stuff in the "stdlib". Consider those locations -# when deciding where the stdlib is. -try: - import _structseq -except ImportError: - _structseq = None +# when deciding where the stdlib is. This modules are not used for anything, +# they are modules importable from the pypy lib directories, so that we can +# find those directories. +_structseq = _pypy_irc_topic = None +if env.PYPY: + try: + import _structseq + except ImportError: + pass + + try: + import _pypy_irc_topic + except ImportError: + pass class Coverage(object): @@ -308,9 +317,10 @@ class Coverage(object): # environments (virtualenv, for example), these modules may be # spread across a few locations. Look at all the candidate modules # we've imported, and take all the different ones. - for m in (atexit, inspect, os, platform, re, _structseq, traceback): + for m in (atexit, inspect, os, platform, _pypy_irc_topic, re, _structseq, traceback): if m is not None and hasattr(m, "__file__"): self.pylib_dirs.add(self._canonical_dir(m)) + if _structseq and not hasattr(_structseq, '__file__'): # PyPy 2.4 has no __file__ in the builtin modules, but the code # objects still have the file names. So dig into one to find diff --git a/doc/index.rst b/doc/index.rst index 44996dde..efbb556d 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -67,7 +67,7 @@ not. * PyPy 4.0 and 5.1. - * PyPy3 2.4. + * PyPy3 2.4 and 5.2 .. ifconfig:: prerelease @@ -78,7 +78,7 @@ not. * PyPy 4.0 and 5.1. - * PyPy3 2.4. + * PyPy3 2.4 and 5.2. **This is a pre-release build. The usual warnings about possible bugs apply.** The latest stable version is coverage.py 4.1, `described here`_. @@ -2,7 +2,7 @@ # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt [tox] -envlist = py{26,27,33,34,35,36}, pypy{40,51,3_24}, doc +envlist = py{26,27,33,34,35,36}, pypy{40,51,3_24,3_52}, doc skip_missing_interpreters = True [testenv] @@ -21,7 +21,7 @@ deps = py{26,27,33,34,35,36}: eventlet==0.19.0 py{26,27,33,34,35,36}: greenlet==0.4.10 # setuptools no longer supports Python 3.2 - pypy3_24: setuptools==21.1.0 + pypy3_{24,52}: setuptools==21.1.0 # Windows can't update the pip version with pip running, so use Python # to install things. @@ -29,7 +29,7 @@ install_command = python -m pip install -U {opts} {packages} passenv = * setenv = - pypy,pypy{24,26,40,51,3_24}: COVERAGE_NO_EXTENSION=no C extension under PyPy + pypy,pypy{40,51,3_24,3_52}: COVERAGE_NO_EXTENSION=no C extension under PyPy # Something (pip? setuptools?) chatters about 3.2 support going away. pypy3_24: PYTHONWARNINGS=ignore:::pkg_resources @@ -56,12 +56,6 @@ install_command = python -m pip.__main__ install -U {opts} {packages} # the other environments... basepython = pypy -[testenv:pypy24] -basepython = pypy2.4 - -[testenv:pypy26] -basepython = pypy2.6 - [testenv:pypy3_24] basepython = pypy3-2.4 @@ -71,6 +65,9 @@ basepython = pypy4.0 [testenv:pypy51] basepython = pypy5.1 +[testenv:pypy3_52] +basepython = pypy3-5.2 + [testenv:doc] # Build the docs so we know if they are successful. We build twice: once with # -q to get all warnings, and once with -QW to get a success/fail status |