diff -Nru python-coverage-4.5.1+dfsg.1/appveyor.yml python-coverage-4.5.2+dfsg.1/appveyor.yml --- python-coverage-4.5.1+dfsg.1/appveyor.yml 2017-11-05 15:03:36.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/appveyor.yml 2018-11-12 00:23:23.000000000 +0000 @@ -5,6 +5,9 @@ shallow_clone: true +cache: + - '%LOCALAPPDATA%\pip\Cache' + environment: CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\ci\\run_with_env.cmd" @@ -13,67 +16,84 @@ # .pth files in the shared virtualenv. Disable parallel tests. PYTEST_ADDOPTS: "-n 0" + # Note: There is logic to install Python version $PYTHON_VERSION if the + # $PYTHON directory doesn't exist. Last I tried (Oct 2018), that installation + # failed, and I don't know why. $PYTHON_VERSION is visible in the job + # descriptions, but can be wrong in the minor version, since we use the + # version pre-installed on AppVeyor. matrix: - JOB: "2.7 32-bit" TOXENV: "py27" - PYTHON: "C:\\Python27.11" - PYTHON_VERSION: "2.7.11" + PYTHON: "C:\\Python27" + PYTHON_VERSION: "2.7.15" PYTHON_ARCH: "32" - JOB: "2.7 64-bit" TOXENV: "py27" - PYTHON: "C:\\Python27.11-x64" - PYTHON_VERSION: "2.7.11" + PYTHON: "C:\\Python27-x64" + PYTHON_VERSION: "2.7.15" PYTHON_ARCH: "64" - JOB: "3.4 32-bit" TOXENV: "py34" PYTHON: "C:\\Python34" - PYTHON_VERSION: "3.4" + PYTHON_VERSION: "3.4.4" PYTHON_ARCH: "32" - JOB: "3.4 64-bit" TOXENV: "py34" PYTHON: "C:\\Python34-x64" - PYTHON_VERSION: "3.4" + PYTHON_VERSION: "3.4.4" PYTHON_ARCH: "64" - JOB: "3.5 32-bit" TOXENV: "py35" PYTHON: "C:\\Python35" - PYTHON_VERSION: "3.5.0" + PYTHON_VERSION: "3.5.4" PYTHON_ARCH: "32" - JOB: "3.5 64-bit" TOXENV: "py35" PYTHON: "C:\\Python35-x64" - PYTHON_VERSION: "3.5.0" + PYTHON_VERSION: "3.5.4" PYTHON_ARCH: "64" - JOB: "3.6 32-bit" TOXENV: "py36" PYTHON: "C:\\Python36" - PYTHON_VERSION: "3.6.0" + PYTHON_VERSION: "3.6.7" PYTHON_ARCH: "32" - JOB: "3.6 64-bit" TOXENV: "py36" PYTHON: "C:\\Python36-x64" - PYTHON_VERSION: "3.6.0" + PYTHON_VERSION: "3.6.7" + PYTHON_ARCH: "64" + + - JOB: "3.7 32-bit" + TOXENV: "py37" + PYTHON: "C:\\Python37" + PYTHON_VERSION: "3.7.1" + PYTHON_ARCH: "32" + + - JOB: "3.7 64-bit" + TOXENV: "py37" + PYTHON: "C:\\Python37-x64" + PYTHON_VERSION: "3.7.1" PYTHON_ARCH: "64" # Meta coverage - JOB: "Meta 2.7" TOXENV: "py27" PYTHON: "C:\\Python27" - PYTHON_VERSION: "2.7" + PYTHON_VERSION: "2.7.15" PYTHON_ARCH: "32" COVERAGE_COVERAGE: "yes" - - JOB: "Meta 3.5" - TOXENV: "py35" - PYTHON: "C:\\Python35" - PYTHON_VERSION: "3.5" + - JOB: "Meta 3.6" + TOXENV: "py36" + PYTHON: "C:\\Python36" + PYTHON_VERSION: "3.6.7" PYTHON_ARCH: "32" COVERAGE_COVERAGE: "yes" @@ -91,21 +111,20 @@ - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" # Check that we have the expected version and architecture for Python - - "python --version" - - "python -c \"import struct; print(struct.calcsize('P') * 8)\"" + - "python -c \"import struct, sys; print('{}\\n{}-bit'.format(sys.version, struct.calcsize('P') * 8))\"" # Upgrade to the latest version of pip to avoid it displaying warnings # about it being out of date. - - "pip install --disable-pip-version-check --user --upgrade pip" + - "python -m pip install --disable-pip-version-check --upgrade pip" # And upgrade virtualenv to get the latest pip inside .tox virtualenvs. - - "pip install --disable-pip-version-check --user --upgrade virtualenv" + - "python -m pip install --disable-pip-version-check --upgrade virtualenv" # Install requirements. - "%CMD_IN_ENV% pip install -r requirements/ci.pip" # Make a python3.4.bat file in the current directory so that tox will find it # and python3.4 will mean what we want it to. - - "python -c \"import os; open('python{0}.{1}.bat'.format(*os.environ['TOXENV'][2:]), 'w').write('@{0}\\\\python \\x25*\\n'.format(os.environ['PYTHON']))\"" + - "python -c \"import os; open('python{}.{}.bat'.format(*os.environ['TOXENV'][2:]), 'w').write('@{}\\\\python \\x25*\\n'.format(os.environ['PYTHON']))\"" build_script: # If not a metacov job, then build wheels and .exe installers. @@ -123,5 +142,10 @@ - if "%COVERAGE_COVERAGE%" == "yes" %CMD_IN_ENV% pip install codecov - if "%COVERAGE_COVERAGE%" == "yes" %CMD_IN_ENV% codecov -X gcov --file coverage.xml +# Uncomment this to enable RDP access to the build when done. +# https://www.appveyor.com/docs/how-to/rdp-to-build-worker/ +# on_finish: +# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) + artifacts: - path: "metacov-*.zip" diff -Nru python-coverage-4.5.1+dfsg.1/CHANGES.rst python-coverage-4.5.2+dfsg.1/CHANGES.rst --- python-coverage-4.5.1+dfsg.1/CHANGES.rst 2018-02-10 17:52:38.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/CHANGES.rst 2018-11-12 13:59:11.000000000 +0000 @@ -16,6 +16,27 @@ .. ---------------------------- +.. _changes_452: + +Version 4.5.2 --- 2018-11-12 +---------------------------- + +- Namespace packages are supported on Python 3.7, where they used to cause + TypeErrors about path being None. Fixes `issue 700`_. + +- Python 3.8 (as of today!) passes all tests. Fixes `issue 707` and + `issue 714`_. + +- Development moved from `Bitbucket`_ to `GitHub`_. + +.. _issue 700: https://github.com/nedbat/coveragepy/issues/700 +.. _issue 707: https://github.com/nedbat/coveragepy/issues/707 +.. _issue 714: https://github.com/nedbat/coveragepy/issues/714 + +.. _Bitbucket: https://bitbucket.org/ned/coveragepy +.. _GitHub: https://github.com/nedbat/coveragepy + + .. _changes_451: Version 4.5.1 --- 2018-02-10 diff -Nru python-coverage-4.5.1+dfsg.1/coverage/cmdline.py python-coverage-4.5.2+dfsg.1/coverage/cmdline.py --- python-coverage-4.5.1+dfsg.1/coverage/cmdline.py 2018-01-21 14:21:20.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/coverage/cmdline.py 2018-11-12 12:37:01.000000000 +0000 @@ -115,7 +115,10 @@ ) rcfile = optparse.make_option( '', '--rcfile', action='store', - help="Specify configuration file. Defaults to '.coveragerc'", + help=( + "Specify configuration file. " + "By default '.coveragerc', 'setup.cfg' and 'tox.ini' are tried." + ), ) source = optparse.make_option( '', '--source', action='store', metavar="SRC1,SRC2,...", diff -Nru python-coverage-4.5.1+dfsg.1/coverage/control.py python-coverage-4.5.2+dfsg.1/coverage/control.py --- python-coverage-4.5.1+dfsg.1/coverage/control.py 2018-02-10 17:35:03.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/coverage/control.py 2018-11-12 12:37:01.000000000 +0000 @@ -855,8 +855,7 @@ # Find files that were never executed at all. for pkg in self.source_pkgs: if (not pkg in sys.modules or - not hasattr(sys.modules[pkg], '__file__') or - not os.path.exists(sys.modules[pkg].__file__)): + not module_has_file(sys.modules[pkg])): continue pkg_file = source_for_file(sys.modules[pkg].__file__) self._find_unexecuted_files(self._canonical_path(pkg_file)) @@ -878,15 +877,12 @@ self._warn("Module %s was never imported." % pkg, slug="module-not-imported") return - is_namespace = hasattr(mod, '__path__') and not hasattr(mod, '__file__') - has_file = hasattr(mod, '__file__') and os.path.exists(mod.__file__) - - if is_namespace: + if module_is_namespace(mod): # A namespace package. It's OK for this not to have been traced, # since there is no code directly in it. return - if not has_file: + if not module_has_file(mod): self._warn("Module %s has no Python source." % pkg, slug="module-not-python") return @@ -1204,6 +1200,19 @@ return info +def module_is_namespace(mod): + """Is the module object `mod` a PEP420 namespace module?""" + return hasattr(mod, '__path__') and getattr(mod, '__file__', None) is None + + +def module_has_file(mod): + """Does the module object `mod` have an existing __file__ ?""" + mod__file__ = getattr(mod, '__file__', None) + if mod__file__ is None: + return False + return os.path.exists(mod__file__) + + # FileDisposition "methods": FileDisposition is a pure value object, so it can # be implemented in either C or Python. Acting on them is done with these # functions. diff -Nru python-coverage-4.5.1+dfsg.1/coverage/env.py python-coverage-4.5.2+dfsg.1/coverage/env.py --- python-coverage-4.5.1+dfsg.1/coverage/env.py 2018-01-03 14:04:11.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/coverage/env.py 2018-11-12 12:37:01.000000000 +0000 @@ -24,6 +24,24 @@ PY2 = PYVERSION < (3, 0) PY3 = PYVERSION >= (3, 0) +# Python behavior +class PYBEHAVIOR(object): + """Flags indicating this Python's behavior.""" + + # When a break/continue/return statement in a try block jumps to a finally + # block, does the finally block do the break/continue/return (pre-3.8), or + # does the finally jump back to the break/continue/return (3.8) to do the + # work? + finally_jumps_back = (PYVERSION >= (3, 8)) + + # When a function is decorated, does the trace function get called for the + # @-line and also the def-line (new behavior in 3.8)? Or just the @-line + # (old behavior)? + trace_decorated_def = (PYVERSION >= (3, 8)) + + # Are while-true loops optimized into absolute jumps with no loop setup? + nix_while_true = (PYVERSION >= (3, 8)) + # Coverage.py specifics. # Are we using the C-implemented trace function? diff -Nru python-coverage-4.5.1+dfsg.1/coverage/execfile.py python-coverage-4.5.2+dfsg.1/coverage/execfile.py --- python-coverage-4.5.1+dfsg.1/coverage/execfile.py 2018-01-14 01:09:29.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/coverage/execfile.py 2018-11-12 12:37:01.000000000 +0000 @@ -111,7 +111,15 @@ pathname = os.path.abspath(pathname) args[0] = pathname - run_python_file(pathname, args, package=packagename, modulename=modulename, path0="") + # Python 3.7.0b3 changed the behavior of the sys.path[0] entry for -m. It + # used to be an empty string (meaning the current directory). It changed + # to be the actual path to the current directory, so that os.chdir wouldn't + # affect the outcome. + if sys.version_info >= (3, 7, 0, 'beta', 3): + path0 = os.getcwd() + else: + path0 = "" + run_python_file(pathname, args, package=packagename, modulename=modulename, path0=path0) def run_python_file(filename, args, package=None, modulename=None, path0=None): diff -Nru python-coverage-4.5.1+dfsg.1/coverage/files.py python-coverage-4.5.2+dfsg.1/coverage/files.py --- python-coverage-4.5.1+dfsg.1/coverage/files.py 2018-01-23 12:21:57.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/coverage/files.py 2018-11-12 12:37:01.000000000 +0000 @@ -260,19 +260,8 @@ class FnmatchMatcher(object): """A matcher for files by file name pattern.""" def __init__(self, pats): - self.pats = pats[:] - # fnmatch is platform-specific. On Windows, it does the Windows thing - # of treating / and \ as equivalent. But on other platforms, we need to - # take care of that ourselves. - fnpats = (fnmatch.translate(p) for p in pats) - # Python3.7 fnmatch translates "/" as "/", before that, it translates as "\/", - # so we have to deal with maybe a backslash. - fnpats = (re.sub(r"\\?/", r"[\\\\/]", p) for p in fnpats) - flags = 0 - if env.WINDOWS: - # Windows is also case-insensitive, so make the regex case-insensitive. - flags |= re.IGNORECASE - self.re = re.compile(join_regex(fnpats), flags=flags) + self.pats = list(pats) + self.re = fnmatches_to_regex(self.pats, case_insensitive=env.WINDOWS) def __repr__(self): return "" % self.pats @@ -296,6 +285,39 @@ return the_sep +def fnmatches_to_regex(patterns, case_insensitive=False, partial=False): + """Convert fnmatch patterns to a compiled regex that matches any of them. + + Slashes are always converted to match either slash or backslash, for + Windows support, even when running elsewhere. + + If `partial` is true, then the pattern will match if the target string + starts with the pattern. Otherwise, it must match the entire string. + + Returns: a compiled regex object. Use the .match method to compare target + strings. + + """ + regexes = (fnmatch.translate(pattern) for pattern in patterns) + # Python3.7 fnmatch translates "/" as "/". Before that, it translates as "\/", + # so we have to deal with maybe a backslash. + regexes = (re.sub(r"\\?/", r"[\\\\/]", regex) for regex in regexes) + + if partial: + # fnmatch always adds a \Z to match the whole string, which we don't + # want, so we remove the \Z. While removing it, we only replace \Z if + # followed by paren (introducing flags), or at end, to keep from + # destroying a literal \Z in the pattern. + regexes = (re.sub(r'\\Z(\(\?|$)', r'\1', regex) for regex in regexes) + + flags = 0 + if case_insensitive: + flags |= re.IGNORECASE + compiled = re.compile(join_regex(regexes), flags=flags) + + return compiled + + class PathAliases(object): """A collection of aliases for paths. @@ -343,18 +365,8 @@ if not pattern.endswith(pattern_sep): pattern += pattern_sep - # Make a regex from the pattern. fnmatch always adds a \Z to - # match the whole string, which we don't want, so we remove the \Z. - # While removing it, we only replace \Z if followed by paren, or at - # end, to keep from destroying a literal \Z in the pattern. - regex_pat = fnmatch.translate(pattern) - regex_pat = re.sub(r'\\Z(\(|$)', r'\1', regex_pat) - - # We want */a/b.py to match on Windows too, so change slash to match - # either separator. - regex_pat = regex_pat.replace(r"\/", r"[\\/]") - # We want case-insensitive matching, so add that flag. - regex = re.compile(r"(?i)" + regex_pat) + # Make a regex from the pattern. + regex = fnmatches_to_regex([pattern], case_insensitive=True, partial=True) # Normalize the result: it must end with a path separator. result_sep = sep(result) diff -Nru python-coverage-4.5.1+dfsg.1/coverage/parser.py python-coverage-4.5.2+dfsg.1/coverage/parser.py --- python-coverage-4.5.1+dfsg.1/coverage/parser.py 2018-02-09 21:03:22.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/coverage/parser.py 2018-11-12 12:37:01.000000000 +0000 @@ -409,6 +409,8 @@ yield (byte_num, line_num) last_line_num = line_num byte_num += byte_incr + if env.PYVERSION >= (3, 6) and line_incr >= 0x80: + line_incr -= 0x100 line_num += line_incr if line_num != last_line_num: yield (byte_num, line_num) @@ -503,6 +505,10 @@ self.lineno = body[0].lineno +# TODO: some add_arcs methods here don't add arcs, they return them. Rename them. +# TODO: the cause messages have too many commas. +# TODO: Shouldn't the cause messages join with "and" instead of "or"? + class AstArcAnalyzer(object): """Analyze source text with an AST to find executable code paths.""" @@ -544,6 +550,7 @@ if code_object_handler is not None: code_object_handler(node) + @contract(start=int, end=int) def add_arc(self, start, end, smsg=None, emsg=None): """Add an arc, including message fragments to use if it is missing.""" if self.debug: # pragma: debugging @@ -572,9 +579,19 @@ else: return node.lineno + def _line_decorated(self, node): + """Compute first line number for things that can be decorated (classes and functions).""" + lineno = node.lineno + if env.PYBEHAVIOR.trace_decorated_def: + if node.decorator_list: + lineno = node.decorator_list[0].lineno + return lineno + def _line__Assign(self, node): return self.line_for_node(node.value) + _line__ClassDef = _line_decorated + def _line__Dict(self, node): # Python 3.5 changed how dict literals are made. if env.PYVERSION >= (3, 5) and node.keys: @@ -587,6 +604,8 @@ else: return node.lineno + _line__FunctionDef = _line_decorated + def _line__List(self, node): if node.elts: return self.line_for_node(node.elts[0]) @@ -690,6 +709,13 @@ node = None return node + # Missing nodes: _missing__* + # + # Entire statements can be optimized away by Python. They will appear in + # the AST, but not the bytecode. These functions are called (by + # find_non_missing_node) to find a node to use instead of the missing + # node. They can return None if the node should truly be gone. + def _missing__If(self, node): # If the if-node is missing, then one of its children might still be # here, but not both. So return the first of the two that isn't missing. @@ -717,10 +743,24 @@ return non_missing_children[0] return NodeList(non_missing_children) + def _missing__While(self, node): + body_nodes = self.find_non_missing_node(NodeList(node.body)) + if not body_nodes: + return None + # Make a synthetic While-true node. + new_while = ast.While() + new_while.lineno = body_nodes.lineno + new_while.test = ast.Name() + new_while.test.lineno = body_nodes.lineno + new_while.test.id = "True" + new_while.body = body_nodes.body + new_while.orelse = None + return new_while + def is_constant_expr(self, node): """Is this a compile-time constant?""" node_name = node.__class__.__name__ - if node_name in ["NameConstant", "Num"]: + if node_name in ["Constant", "NameConstant", "Num"]: return "Num" elif node_name == "Name": if node.id in ["True", "False", "None", "__debug__"]: @@ -805,10 +845,10 @@ # Handlers: _handle__* # # Each handler deals with a specific AST node type, dispatched from - # add_arcs. Each deals with a particular kind of node type, and returns - # the set of exits from that node. These functions mirror the Python - # semantics of each syntactic construct. See the docstring for add_arcs to - # understand the concept of exits from a node. + # add_arcs. Handlers return the set of exits from that node, and can + # also call self.add_arc to record arcs they find. These functions mirror + # the Python semantics of each syntactic construct. See the docstring + # for add_arcs to understand the concept of exits from a node. @contract(returns='ArcStarts') def _handle__Break(self, node): @@ -820,13 +860,18 @@ @contract(returns='ArcStarts') def _handle_decorated(self, node): """Add arcs for things that can be decorated (classes and functions).""" - last = self.line_for_node(node) + main_line = last = node.lineno if node.decorator_list: + if env.PYBEHAVIOR.trace_decorated_def: + last = None for dec_node in node.decorator_list: dec_start = self.line_for_node(dec_node) - if dec_start != last: + if last is not None and dec_start != last: self.add_arc(last, dec_start) - last = dec_start + last = dec_start + if env.PYBEHAVIOR.trace_decorated_def: + self.add_arc(last, main_line) + last = main_line # The definition line may have been missed, but we should have it # in `self.statements`. For some constructs, `line_for_node` is # not what we'd think of as the first line in the statement, so map @@ -968,21 +1013,45 @@ final_exits = self.add_body_arcs(node.finalbody, prev_starts=final_from) if try_block.break_from: - self.process_break_exits( - self._combine_finally_starts(try_block.break_from, final_exits) - ) + if env.PYBEHAVIOR.finally_jumps_back: + for break_line in try_block.break_from: + lineno = break_line.lineno + cause = break_line.cause.format(lineno=lineno) + for final_exit in final_exits: + self.add_arc(final_exit.lineno, lineno, cause) + breaks = try_block.break_from + else: + breaks = self._combine_finally_starts(try_block.break_from, final_exits) + self.process_break_exits(breaks) + if try_block.continue_from: - self.process_continue_exits( - self._combine_finally_starts(try_block.continue_from, final_exits) - ) + if env.PYBEHAVIOR.finally_jumps_back: + for continue_line in try_block.continue_from: + lineno = continue_line.lineno + cause = continue_line.cause.format(lineno=lineno) + for final_exit in final_exits: + self.add_arc(final_exit.lineno, lineno, cause) + continues = try_block.continue_from + else: + continues = self._combine_finally_starts(try_block.continue_from, final_exits) + self.process_continue_exits(continues) + if try_block.raise_from: self.process_raise_exits( self._combine_finally_starts(try_block.raise_from, final_exits) ) + if try_block.return_from: - self.process_return_exits( - self._combine_finally_starts(try_block.return_from, final_exits) - ) + if env.PYBEHAVIOR.finally_jumps_back: + for return_line in try_block.return_from: + lineno = return_line.lineno + cause = return_line.cause.format(lineno=lineno) + for final_exit in final_exits: + self.add_arc(final_exit.lineno, lineno, cause) + returns = try_block.return_from + else: + returns = self._combine_finally_starts(try_block.return_from, final_exits) + self.process_return_exits(returns) if exits: # The finally clause's exits are only exits for the try block diff -Nru python-coverage-4.5.1+dfsg.1/coverage/python.py python-coverage-4.5.2+dfsg.1/coverage/python.py --- python-coverage-4.5.1+dfsg.1/coverage/python.py 2017-10-24 01:47:35.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/coverage/python.py 2018-11-12 12:37:01.000000000 +0000 @@ -135,7 +135,7 @@ def __init__(self, morf, coverage=None): self.coverage = coverage - if hasattr(morf, '__file__'): + if hasattr(morf, '__file__') and morf.__file__: filename = morf.__file__ elif isinstance(morf, types.ModuleType): # A module should have had .__file__, otherwise we can't use it. diff -Nru python-coverage-4.5.1+dfsg.1/coverage/version.py python-coverage-4.5.2+dfsg.1/coverage/version.py --- python-coverage-4.5.1+dfsg.1/coverage/version.py 2018-02-10 17:51:38.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/coverage/version.py 2018-11-12 13:57:44.000000000 +0000 @@ -5,7 +5,7 @@ # This file is exec'ed in setup.py, don't import anything! # Same semantics as sys.version_info. -version_info = (4, 5, 1, 'final', 0) +version_info = (4, 5, 2, 'final', 0) def _make_version(major, minor, micro, releaselevel, serial): diff -Nru python-coverage-4.5.1+dfsg.1/coverage/xmlreport.py python-coverage-4.5.2+dfsg.1/coverage/xmlreport.py --- python-coverage-4.5.1+dfsg.1/coverage/xmlreport.py 2017-10-24 01:47:35.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/coverage/xmlreport.py 2018-11-12 12:37:01.000000000 +0000 @@ -1,3 +1,4 @@ +# coding: utf-8 # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt @@ -5,6 +6,7 @@ import os import os.path +import re import sys import time import xml.dom.minidom @@ -123,11 +125,8 @@ xcoverage.setAttribute("branch-rate", "0") xcoverage.setAttribute("complexity", "0") - # Use the DOM to write the output file. - out = self.xml_out.toprettyxml() - if env.PY2: - out = out.encode("utf8") - outfile.write(out) + # Write the output file. + outfile.write(serialize_xml(self.xml_out)) # Return the total percentage. denom = lnum_tot + bnum_tot @@ -218,3 +217,23 @@ package[2] += class_lines package[3] += class_br_hits package[4] += class_branches + + +def serialize_xml(dom): + """Serialize a minidom node to XML.""" + out = dom.toprettyxml() + if env.PY2: + out = out.encode("utf8") + # In Python 3.8, minidom lost the sorting of attributes: https://bugs.python.org/issue34160 + # For the limited kinds of XML we produce, this re-sorts them. + if env.PYVERSION >= (3, 8): + rx_attr = r' [\w-]+="[^"]*"' + rx_attrs = r'(' + rx_attr + ')+' + fixed_lines = [] + for line in out.splitlines(True): + hollow_line = re.sub(rx_attrs, u"☺", line) + attrs = sorted(re.findall(rx_attr, line)) + new_line = hollow_line.replace(u"☺", "".join(attrs)) + fixed_lines.append(new_line) + out = "".join(fixed_lines) + return out diff -Nru python-coverage-4.5.1+dfsg.1/coverage.egg-info/PKG-INFO python-coverage-4.5.2+dfsg.1/coverage.egg-info/PKG-INFO --- python-coverage-4.5.1+dfsg.1/coverage.egg-info/PKG-INFO 2018-02-10 19:49:29.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/coverage.egg-info/PKG-INFO 2018-11-12 14:23:05.000000000 +0000 @@ -1,12 +1,11 @@ Metadata-Version: 1.2 Name: coverage -Version: 4.5.1 +Version: 4.5.2 Summary: Code coverage measurement for Python Home-page: https://bitbucket.org/ned/coveragepy Author: Ned Batchelder and 100 others Author-email: ned@nedbatchelder.com License: Apache 2.0 -Description-Content-Type: UNKNOWN Description: .. Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 .. For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt @@ -18,7 +17,8 @@ | |license| |versions| |status| |docs| | |ci-status| |win-ci-status| |codecov| - | |kit| |format| |saythanks| + | |kit| |format| |repos| + | |tidelift| |saythanks| .. downloads badge seems to be broken... |downloads| @@ -26,9 +26,25 @@ the code analysis tools and tracing hooks provided in the Python standard library to determine which lines are executable, and which have been executed. + .. |tideliftlogo| image:: doc/media/Tidelift_Logos_RGB_Tidelift_Shorthand_On-White_small.png + :width: 75 + :alt: Tidelift + + .. list-table:: + :widths: 10 100 + + * - |tideliftlogo| + - Professional support for coverage.py is available as part of the `Tidelift + Subscription`_. Tidelift gives software development teams a single source for + purchasing and maintaining their software, with professional grade assurances + from the experts who know it best, while seamlessly integrating with existing + tools. + + .. _Tidelift Subscription: https://tidelift.com/subscription/pkg/pypi-coverage?utm_source=pypi-coverage&utm_medium=referral&utm_campaign=readme + Coverage.py runs on many versions of Python: - * CPython 2.6, 2.7 and 3.3 through 3.7. + * CPython 2.6, 2.7 and 3.3 through pre-alpha 3.8. * PyPy2 5.10 and PyPy3 5.10. * Jython 2.7.1, though not for reporting. * IronPython 2.7.7, though not for reporting. @@ -114,9 +130,15 @@ .. |codecov| image:: http://codecov.io/github/nedbat/coveragepy/coverage.svg?branch=master&precision=2 :target: http://codecov.io/github/nedbat/coveragepy?branch=master :alt: Coverage! + .. |repos| image:: https://repology.org/badge/tiny-repos/python:coverage.svg + :target: https://repology.org/metapackage/python:coverage/versions + :alt: Packaging status .. |saythanks| image:: https://img.shields.io/badge/saythanks.io-%E2%98%BC-1EAEDB.svg :target: https://saythanks.io/to/nedbat :alt: Say thanks :) + .. |tidelift| image:: https://tidelift.com/badges/github/nedbat/coveragepy + :target: https://tidelift.com/subscription/pkg/pypi-coverage?utm_source=pypi-coverage&utm_medium=referral&utm_campaign=readme + :alt: Tidelift Keywords: code coverage testing Platform: UNKNOWN @@ -134,6 +156,7 @@ Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Programming Language :: Python :: Implementation :: Jython diff -Nru python-coverage-4.5.1+dfsg.1/debian/changelog python-coverage-4.5.2+dfsg.1/debian/changelog --- python-coverage-4.5.1+dfsg.1/debian/changelog 2018-11-03 11:52:18.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/debian/changelog 2019-01-25 00:58:58.000000000 +0000 @@ -1,8 +1,23 @@ -python-coverage (4.5.1+dfsg.1-1build1) disco; urgency=medium +python-coverage (4.5.2+dfsg.1-1) unstable; urgency=medium - * No-change rebuild to build without python3.6 support. + * The “وليد أبوالخير‎‎ (Waleed Sami Abulkhair)” release. + * New upstream version. + Highlights since previous release: + * Upstream development hosting moved. + * Namespace packages are supported on Python 3.7, where they used to + cause TypeErrors about path being None. + * Extend supported Python versions to include Python 3.8. + * Update publication years for Debian packaging in copyright notices. + * Update package source documentation for standard packaging tools. + * debian/repack, debian/source_package_build.bash: + * Remove unused custom ‘repack’ program. + * Declare AutoPkgTest dependency on all relevant CPython packages. + Closes: bug#915133. Thanks to Paul Gevers for the report. + * Update Lintian override for new Python-version-specific filenames. + * Declare “Standards-Version: 4.3.0”. No additional changes required. + * Record upstream metadata in DEP-12 document. - -- Matthias Klose Sat, 03 Nov 2018 11:52:18 +0000 + -- Ben Finney Fri, 25 Jan 2019 11:58:58 +1100 python-coverage (4.5.1+dfsg.1-1) unstable; urgency=medium diff -Nru python-coverage-4.5.1+dfsg.1/debian/control python-coverage-4.5.2+dfsg.1/debian/control --- python-coverage-4.5.1+dfsg.1/debian/control 2018-07-15 02:25:30.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/debian/control 2019-01-25 00:58:58.000000000 +0000 @@ -17,7 +17,7 @@ Build-Depends-Indep: pypy-setuptools, pypy -Standards-Version: 4.1.5 +Standards-Version: 4.3.0 Homepage: http://nedbatchelder.com/code/coverage/ VCS-Git: https://salsa.debian.org/debian/pkg-python-coverage.git VCS-Browser: https://salsa.debian.org/debian/pkg-python-coverage/ diff -Nru python-coverage-4.5.1+dfsg.1/debian/copyright python-coverage-4.5.2+dfsg.1/debian/copyright --- python-coverage-4.5.1+dfsg.1/debian/copyright 2018-07-15 02:25:30.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/debian/copyright 2019-01-25 00:58:58.000000000 +0000 @@ -13,7 +13,7 @@ Files: * Copyright: - © 2004–2018 Ned Batchelder + © 2004–2019 Ned Batchelder © 2001 Gareth Rees License: Apache-2 License-Grant: @@ -53,7 +53,7 @@ Files: debian/* Copyright: - © 2008–2018 Ben Finney + © 2008–2019 Ben Finney © 2007–2008 Lars Wirzenius License: GPL-3+ License-Grant: diff -Nru python-coverage-4.5.1+dfsg.1/debian/python3-coverage.lintian-overrides python-coverage-4.5.2+dfsg.1/debian/python3-coverage.lintian-overrides --- python-coverage-4.5.1+dfsg.1/debian/python3-coverage.lintian-overrides 2018-07-15 02:25:30.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/debian/python3-coverage.lintian-overrides 2019-01-25 00:58:58.000000000 +0000 @@ -3,8 +3,8 @@ # Documentation: ‘/usr/share/doc/lintian/lintian’ §2.4. # The Coverage.py library is not an application, despite these commands. -library-package-name-for-application usr/bin/python3-coverage usr/bin/python3.6-coverage -application-in-library-section python usr/bin/python3-coverage usr/bin/python3.6-coverage +library-package-name-for-application usr/bin/python3-coverage usr/bin/python3.7-coverage +application-in-library-section python usr/bin/python3-coverage usr/bin/python3.7-coverage # Local variables: diff -Nru python-coverage-4.5.1+dfsg.1/debian/README.Debian python-coverage-4.5.2+dfsg.1/debian/README.Debian --- python-coverage-4.5.1+dfsg.1/debian/README.Debian 2018-07-15 02:25:30.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/debian/README.Debian 2019-01-25 00:58:58.000000000 +0000 @@ -35,7 +35,7 @@ .. - Copyright © 2013–2018 Ben Finney + Copyright © 2013–2019 Ben Finney This is free software: you may copy, modify, and/or distribute this work under the terms of the GNU General Public License as published by the Free Software Foundation; version 3 of that license or any later version. @@ -45,7 +45,7 @@ .. Local variables: coding: utf-8 - mode: text mode: rst + mode: text End: vim: fileencoding=utf-8 filetype=rst : diff -Nru python-coverage-4.5.1+dfsg.1/debian/README.source python-coverage-4.5.2+dfsg.1/debian/README.source --- python-coverage-4.5.1+dfsg.1/debian/README.source 2018-07-15 02:25:30.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/debian/README.source 2019-01-25 00:58:58.000000000 +0000 @@ -3,7 +3,7 @@ =========================================== :Author: Ben Finney -:Updated: 2018-02-08 +:Updated: 2019-01-22 Pristine upstream source contains non-DFSG-free files @@ -16,7 +16,7 @@ source tarball. The ‘debian/watch’ configuration specifies that ‘uscan --download’ will re-pack -the pristine upstream tarball by running ‘debian/repack’. +the pristine upstream tarball. Package maintenance in VCS @@ -29,10 +29,9 @@ Work on a release in VCS ------------------------ -* Get the correct upstream source, using the ‘get-packaged-orig-source’ - target:: +* Get the correct upstream source, using UScan:: - $ fakeroot debian/rules get-packaged-orig-source + $ uscan --download * In the ‘master’ branch, create a new Debian changelog entry. @@ -128,7 +127,7 @@ .. - Copyright © 2013–2018 Ben Finney + Copyright © 2013–2019 Ben Finney This is free software: you may copy, modify, and/or distribute this work under the terms of the GNU General Public License as published by the Free Software Foundation; version 3 of that license or any later version. @@ -139,5 +138,6 @@ Local variables: coding: utf-8 mode: rst + mode: text End: vim: fileencoding=utf-8 filetype=rst : diff -Nru python-coverage-4.5.1+dfsg.1/debian/repack python-coverage-4.5.2+dfsg.1/debian/repack --- python-coverage-4.5.1+dfsg.1/debian/repack 2018-07-15 02:25:30.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/debian/repack 1970-01-01 00:00:00.000000000 +0000 @@ -1,93 +0,0 @@ -#! /bin/bash -# -# debian/repack -# Part of the Debian package ‘python-coverage’. -# -# This is free software, and you are welcome to redistribute it under -# certain conditions; see the end of this file for copyright -# information, grant of license, and disclaimer of warranty. - -# Convert the pristine upstream source to the Debian upstream source. -# -# This program is designed for use with the ‘uscan(1)’ tool, as the -# “action” parameter for the ‘debian/watch’ configuration file. - -set -o errexit -set -o errtrace -set -o pipefail -set -o nounset - -program_dir="$(dirname "$(realpath --strip "$0")")" -source "${program_dir}"/source_package_build.bash - -function usage() { - local progname=$(basename $0) - printf "Usage: %s --upstream-version VERSION FILENAME\n" "$progname" -} - -if [ $# -ne 3 ] ; then - usage - exit 1 -fi - -upstream_version="$2" -downloaded_file="$3" - -target_filename="${upstream_tarball_basename}.tar.gz" -target_working_file="${working_dir}/${target_filename}" -target_file="$(dirname "${downloaded_file}")/${target_filename}" - -repack_dir="${working_dir}/${upstream_dirname}" - -printf "Unpacking pristine upstream source ‘%s’:\n" "${downloaded_file}" - -extract_tarball_to_working_dir "${downloaded_file}" - -upstream_source_dirname=$(ls -1 "${working_dir}") -upstream_source_dir="${working_dir}/${upstream_source_dirname}" - -printf "Repackaging upstream source from ‘%s’ to ‘%s’:\n" \ - "${upstream_source_dir}" "${repack_dir}" - -mv "${upstream_source_dir}" "${repack_dir}" - -printf "Removing non-source files:\n" - -nonsource_files=( - # Compiled JavaScript files without corresponding source. - coverage/htmlfiles/jquery.min.js - coverage/htmlfiles/jquery.ba-throttle-debounce.min.js - coverage/htmlfiles/jquery.tablesorter.min.js - tests/qunit/jquery.tmpl.min.js - ) - -for f in "${nonsource_files[@]}" ; do - rm -rv "${repack_dir}/$f" -done - -printf "Rebuilding DFSG-free upstream source tarball:\n" - -archive_working_dir_to_tarball "${upstream_dirname}" "${target_working_file}" - -printf "Moving completed upstream tarball to ‘%s’:\n" "${target_file}" - -rm -v "${downloaded_file}" -mv "${target_working_file}" "${target_file}" - -printf "Done.\n" - - -# Copyright © 2010–2018 Ben Finney -# -# This is free software: you may copy, modify, and/or distribute this work -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; version 3 of that license or any later version. -# No warranty expressed or implied. - - -# Local variables: -# coding: utf-8 -# mode: shell-script -# indent-tabs-mode: nil -# End: -# vim: fileencoding=utf-8 filetype=bash expandtab : diff -Nru python-coverage-4.5.1+dfsg.1/debian/rules python-coverage-4.5.2+dfsg.1/debian/rules --- python-coverage-4.5.1+dfsg.1/debian/rules 2018-07-15 02:25:30.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/debian/rules 2019-01-25 00:58:58.000000000 +0000 @@ -134,7 +134,7 @@ $(RM) -r ${GENERATED_FILES} -# Copyright © 2010–2018 Ben Finney +# Copyright © 2010–2019 Ben Finney # # This is free software: you may copy, modify, and/or distribute this work # under the terms of the GNU General Public License as published by the diff -Nru python-coverage-4.5.1+dfsg.1/debian/source_package_build.bash python-coverage-4.5.2+dfsg.1/debian/source_package_build.bash --- python-coverage-4.5.1+dfsg.1/debian/source_package_build.bash 2018-07-15 02:25:30.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/debian/source_package_build.bash 1970-01-01 00:00:00.000000000 +0000 @@ -1,63 +0,0 @@ -# debian/source_package_build.bash -# Part of the Debian package ‘python-coverage’. -# -# This is free software, and you are welcome to redistribute it under -# certain conditions; see the end of this file for copyright -# information, grant of license, and disclaimer of warranty. - -# Common code for building Debian upstream source package. - -working_dir="$(mktemp -d -t)" - -exit_sigspecs="ERR EXIT SIGTERM SIGHUP SIGINT SIGQUIT" - -function cleanup_exit() { - exit_status=$? - trap - $exit_sigspecs - - rm -rf "${working_dir}" - printf "Cleaned up working directory ‘%s’\n" "${working_dir}" - - exit $exit_status -} -trap cleanup_exit $exit_sigspecs - -package_name=$(dpkg-parsechangelog | sed -n -e 's/^Source: //p') -release_version=$(dpkg-parsechangelog | sed -n -e 's/^Version: //p') -upstream_version=$(printf "${release_version}" \ - | sed -e 's/^[[:digit:]]\+://' -e 's/[-][^-]\+$//') -upstream_dirname="${package_name}-${upstream_version}.orig" -upstream_tarball_basename="${package_name}_${upstream_version}.orig" - -function extract_tarball_to_working_dir() { - # Extract the specified tarball to the program's working directory. - local tarball="$1" - tar -xf "${tarball}" --directory "${working_dir}" -} - -function archive_working_dir_to_tarball() { - # Archive the specified directory, relative to the working directory, - # to a new tarball of the specified name. - local source_dirname="$1" - local tarball="$2" - GZIP="--best" tar \ - --directory "${working_dir}" \ - -czf "${tarball}" \ - "${source_dirname}" -} - - -# Copyright © 2010–2018 Ben Finney -# -# This is free software: you may copy, modify, and/or distribute this work -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; version 3 of that license or any later version. -# No warranty expressed or implied. - - -# Local variables: -# coding: utf-8 -# mode: shell-script -# indent-tabs-mode: nil -# End: -# vim: fileencoding=utf-8 filetype=bash expandtab : diff -Nru python-coverage-4.5.1+dfsg.1/debian/tests/control python-coverage-4.5.2+dfsg.1/debian/tests/control --- python-coverage-4.5.1+dfsg.1/debian/tests/control 2018-07-15 02:25:30.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/debian/tests/control 2019-01-25 00:58:58.000000000 +0000 @@ -9,12 +9,14 @@ Tests: smoke-python3 Depends: python3-coverage, - python3-pkg-resources + python3-pkg-resources, + python3-all Tests: smoke-python2 Depends: python-coverage, - python-pkg-resources + python-pkg-resources, + python-all Tests: smoke-pypy Depends: @@ -51,7 +53,7 @@ pypy -# Copyright © 2016–2018 Ben Finney +# Copyright © 2016–2019 Ben Finney # This is free software: you may copy, modify, and/or distribute this work # under the terms of the GNU General Public License as published by the # Free Software Foundation; version 3 of that license or any later version. diff -Nru python-coverage-4.5.1+dfsg.1/debian/tests/entry-point-scripts python-coverage-4.5.2+dfsg.1/debian/tests/entry-point-scripts --- python-coverage-4.5.1+dfsg.1/debian/tests/entry-point-scripts 2018-07-15 02:25:30.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/debian/tests/entry-point-scripts 2019-01-25 00:58:58.000000000 +0000 @@ -33,7 +33,7 @@ done -# Copyright © 2016–2018 Ben Finney +# Copyright © 2016–2019 Ben Finney # This is free software: you may copy, modify, and/or distribute this work # under the terms of the GNU General Public License as published by the # Free Software Foundation; version 3 of that license or any later version. diff -Nru python-coverage-4.5.1+dfsg.1/debian/tests/module-scripts python-coverage-4.5.2+dfsg.1/debian/tests/module-scripts --- python-coverage-4.5.1+dfsg.1/debian/tests/module-scripts 2018-07-15 02:25:30.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/debian/tests/module-scripts 2019-01-25 00:58:58.000000000 +0000 @@ -36,7 +36,7 @@ done -# Copyright © 2016–2018 Ben Finney +# Copyright © 2016–2019 Ben Finney # This is free software: you may copy, modify, and/or distribute this work # under the terms of the GNU General Public License as published by the # Free Software Foundation; version 3 of that license or any later version. diff -Nru python-coverage-4.5.1+dfsg.1/debian/tests/smoke-pypy python-coverage-4.5.2+dfsg.1/debian/tests/smoke-pypy --- python-coverage-4.5.1+dfsg.1/debian/tests/smoke-pypy 2018-07-15 02:25:30.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/debian/tests/smoke-pypy 2019-01-25 00:58:58.000000000 +0000 @@ -31,7 +31,7 @@ done -# Copyright © 2016–2018 Ben Finney +# Copyright © 2016–2019 Ben Finney # This is free software: you may copy, modify, and/or distribute this work # under the terms of the GNU General Public License as published by the # Free Software Foundation; version 3 of that license or any later version. diff -Nru python-coverage-4.5.1+dfsg.1/debian/tests/smoke-python2 python-coverage-4.5.2+dfsg.1/debian/tests/smoke-python2 --- python-coverage-4.5.1+dfsg.1/debian/tests/smoke-python2 2018-07-15 02:25:30.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/debian/tests/smoke-python2 2019-01-25 00:58:58.000000000 +0000 @@ -31,7 +31,7 @@ done -# Copyright © 2016–2018 Ben Finney +# Copyright © 2016–2019 Ben Finney # This is free software: you may copy, modify, and/or distribute this work # under the terms of the GNU General Public License as published by the # Free Software Foundation; version 3 of that license or any later version. diff -Nru python-coverage-4.5.1+dfsg.1/debian/tests/smoke-python3 python-coverage-4.5.2+dfsg.1/debian/tests/smoke-python3 --- python-coverage-4.5.1+dfsg.1/debian/tests/smoke-python3 2018-07-15 02:25:30.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/debian/tests/smoke-python3 2019-01-25 00:58:58.000000000 +0000 @@ -31,7 +31,7 @@ done -# Copyright © 2016–2018 Ben Finney +# Copyright © 2016–2019 Ben Finney # This is free software: you may copy, modify, and/or distribute this work # under the terms of the GNU General Public License as published by the # Free Software Foundation; version 3 of that license or any later version. diff -Nru python-coverage-4.5.1+dfsg.1/debian/tests/smoke_test.py python-coverage-4.5.2+dfsg.1/debian/tests/smoke_test.py --- python-coverage-4.5.1+dfsg.1/debian/tests/smoke_test.py 2018-07-15 02:25:30.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/debian/tests/smoke_test.py 2019-01-25 00:58:58.000000000 +0000 @@ -121,7 +121,7 @@ sys.exit(exit_status) -# Copyright © 2016–2018 Ben Finney +# Copyright © 2016–2019 Ben Finney # This is free software: you may copy, modify, and/or distribute this work # under the terms of the GNU General Public License as published by the # Free Software Foundation; version 3 of that license or any later version. diff -Nru python-coverage-4.5.1+dfsg.1/debian/TODO.Debian python-coverage-4.5.2+dfsg.1/debian/TODO.Debian --- python-coverage-4.5.1+dfsg.1/debian/TODO.Debian 2018-07-15 02:25:30.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/debian/TODO.Debian 2019-01-25 00:58:58.000000000 +0000 @@ -1,7 +1,7 @@ To Do list for Debian packaging ############################### -:Last-Updated: 2015-10-23 +:Last-Updated: 2019-01-22 To Do ===== @@ -11,6 +11,10 @@ * Add `tox` Build-Depends. * Enable Pybuild to run test suite with `tox`. + +Done +==== + * Build binary packages for PyPy. * Add `pypy` Build-Depends. @@ -20,16 +24,12 @@ * Add `sphinx` Build-Depends. * Enable Pybuild to build using Sphinx. - -Done -==== - .. Local variables: coding: utf-8 - mode: text mode: rst + mode: text time-stamp-format: "%:y-%02m-%02d" time-stamp-start: "^:Last-Updated:[ ]+" time-stamp-end: "$" diff -Nru python-coverage-4.5.1+dfsg.1/debian/upstream/metadata python-coverage-4.5.2+dfsg.1/debian/upstream/metadata --- python-coverage-4.5.1+dfsg.1/debian/upstream/metadata 1970-01-01 00:00:00.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/debian/upstream/metadata 2019-01-25 00:58:58.000000000 +0000 @@ -0,0 +1,33 @@ +# debian/upstream/metadata +# Part of Debian ‘python-coverage’ package. +# +# This is free software, and you are welcome to redistribute it under +# certain conditions; see the end of this file for copyright +# information, grant of license, and disclaimer of warranty. + +%YAML 1.1 +--- +# +Name: Coverage.py +Homepage: http://nedbatchelder.com/code/coverage/ +Contact: Ned Batchelder +Archive: PyPI +Bug-Database: https://github.com/nedbat/coveragepy/issues/ +Bug-Submit: https://github.com/nedbat/coveragepy/issues/new +Repository: https://github.com/nedbat/coveragepy.git +Repository-Browse: https://github.com/nedbat/coveragepy/ +Changelog: https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst + + +# Copyright © 2018–2019 Ben Finney +# +# This is free software; you may copy, modify, and/or distribute this work +# under the terms of the GNU General Public License, version 3 or later. +# No warranty expressed or implied. +# See the file '/usr/share/common-licenses/GPL-3' for details. + +# Local variables: +# coding: utf-8 +# mode: yaml +# End: +# vim: fileencoding=utf-8 filetype=yaml : diff -Nru python-coverage-4.5.1+dfsg.1/doc/conf.py python-coverage-4.5.2+dfsg.1/doc/conf.py --- python-coverage-4.5.1+dfsg.1/doc/conf.py 2018-02-10 17:53:44.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/doc/conf.py 2018-11-12 14:01:05.000000000 +0000 @@ -58,7 +58,7 @@ # The short X.Y version. version = '4.5' # CHANGEME # The full version, including alpha/beta/rc tags. -release = '4.5.1' # CHANGEME +release = '4.5.2' # CHANGEME # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff -Nru python-coverage-4.5.1+dfsg.1/doc/contributing.rst python-coverage-4.5.2+dfsg.1/doc/contributing.rst --- python-coverage-4.5.1+dfsg.1/doc/contributing.rst 2017-11-05 15:03:36.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/doc/contributing.rst 2018-11-12 12:37:01.000000000 +0000 @@ -19,7 +19,7 @@ There you can find ideas for requested features, or the remains of rejected ideas. -.. _bug reports: https://bitbucket.org/ned/coveragepy/issues?status=new&status=open +.. _bug reports: https://github.com/nedbat/coveragepy/issues Before you begin @@ -35,8 +35,8 @@ Getting the code ---------------- -The coverage.py code is hosted on a `Mercurial`_ repository at -https://bitbucket.org/ned/coveragepy. To get a working environment, follow +The coverage.py code is hosted on a GitHub repo at +https://github.com/nedbat/coveragepy. To get a working environment, follow these steps: #. (Optional, but recommended) Create a virtualenv to work in, and activate @@ -47,7 +47,7 @@ #. Clone the repo:: - $ hg clone https://bitbucket.org/ned/coveragepy + $ git clone https://github.com/nedbat/coveragepy $ cd coveragepy #. Install the requirements:: @@ -174,10 +174,9 @@ ------------ When you are ready to contribute a change, any way you can get it to me is -probably fine. A pull request on Bitbucket is great, but a simple diff or +probably fine. A pull request on GitHub is great, but a simple diff or patch works too. .. _editorconfig.org: http://editorconfig.org -.. _Mercurial: https://www.mercurial-scm.org/ .. _tox: https://tox.readthedocs.io/ diff -Nru python-coverage-4.5.1+dfsg.1/doc/faq.rst python-coverage-4.5.2+dfsg.1/doc/faq.rst --- python-coverage-4.5.1+dfsg.1/doc/faq.rst 2018-01-06 22:12:33.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/doc/faq.rst 2018-11-12 12:37:01.000000000 +0000 @@ -127,14 +127,9 @@ .. _Testing In Python: http://lists.idyll.org/listinfo/testing-in-python -Bug reports are gladly accepted at the `Bitbucket issue tracker`_. +Bug reports are gladly accepted at the `GitHub issue tracker`_. -.. _Bitbucket issue tracker: https://bitbucket.org/ned/coveragepy/issues - -Announcements of new coverage.py releases are sent to the -`coveragepy-announce`_ mailing list. - -.. _coveragepy-announce: http://groups.google.com/group/coveragepy-announce +.. _GitHub issue tracker: https://github.com/nedbat/coveragepy/issues `I can be reached`__ in a number of ways, I'm happy to answer questions about using coverage.py. @@ -151,4 +146,4 @@ .. _Gareth Rees: http://garethrees.org/ .. _Ned Batchelder: https://nedbatchelder.com -.. _many others: https://bitbucket.org/ned/coveragepy/src/tip/CONTRIBUTORS.txt +.. _many others: https://github.com/nedbat/coveragepy/blob/master/CONTRIBUTORS.txt diff -Nru python-coverage-4.5.1+dfsg.1/doc/index.rst python-coverage-4.5.2+dfsg.1/doc/index.rst --- python-coverage-4.5.1+dfsg.1/doc/index.rst 2018-02-10 17:53:20.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/doc/index.rst 2018-11-12 14:00:32.000000000 +0000 @@ -64,12 +64,12 @@ .. ifconfig:: not prerelease - The latest version is coverage.py 4.5.1, released February 10th 2018. It + The latest version is coverage.py 4.5.2, released November 12th 2018. It is supported on: - * Python versions 2.6, 2.7, 3.3, 3.4, 3.5, 3.6, and 3.7. + * Python versions 2.6, 2.7, 3.3, 3.4, 3.5, 3.6, 3.7, and pre-alpha 3.8. - * PyPy2 5.10 and PyPy3 5.10. + * PyPy2 6.0 and PyPy3 6.0. * Jython 2.7.1, though only for running code, not reporting. @@ -93,6 +93,25 @@ .. _described here: https://nedbatchelder.com/code/coverage +.. image:: media/Tidelift_Logos_RGB_Tidelift_Shorthand_On-White.png + :width: 75 + :alt: Tidelift + :align: left + :class: tideliftlogo + +Professional support for coverage.py is available as part of the `Tidelift +Subscription`_. Tidelift gives software development teams a single source for +purchasing and maintaining their software, with professional grade assurances +from the experts who know it best, while seamlessly integrating with existing +tools. + +.. _Tidelift Subscription: https://tidelift.com/subscription/pkg/pypi-coverage?utm_source=pypi-coverage&utm_medium=referral&utm_campaign=docs + +Professional support for coverage.py is available as part of the `Tidelift +Subscription`_. + +.. _Tidelift Subscription: https://tidelift.com/subscription/pkg/pypi-coverage?utm_source=pypi-coverage&utm_medium=referral&utm_campaign=docs + Quick start ----------- @@ -180,13 +199,14 @@ .. _Testing In Python: http://lists.idyll.org/listinfo/testing-in-python -Bug reports are gladly accepted at the `Bitbucket issue tracker`_. -Bitbucket also hosts the `code repository`_. There is a `mirrored repo`_ on -GitHub. - -.. _Bitbucket issue tracker: https://bitbucket.org/ned/coveragepy/issues -.. _code repository: https://bitbucket.org/ned/coveragepy -.. _mirrored repo: https://github.com/nedbat/coveragepy +Bug reports are gladly accepted at the `GitHub issue tracker`_. +GitHub also hosts the `code repository`_. + +.. _GitHub issue tracker: https://github.com/nedbat/coveragepy/issues +.. _code repository: https://github.com/nedbat/coveragepy + +Professional support for coverage.py is available as part of the `Tidelift +Subscription`_. `I can be reached`_ in a number of ways. I'm happy to answer questions about using coverage.py. diff -Nru python-coverage-4.5.1+dfsg.1/doc/_static/coverage.css python-coverage-4.5.2+dfsg.1/doc/_static/coverage.css --- python-coverage-4.5.1+dfsg.1/doc/_static/coverage.css 2017-08-19 13:39:05.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/doc/_static/coverage.css 2018-11-03 13:30:32.000000000 +0000 @@ -5,3 +5,8 @@ h1, h2, h3, h4, h5, h6 { font-family: Helvetica; } + +img.tideliftlogo { + border: 1px solid #888; + margin-top: .5em !important; +} diff -Nru python-coverage-4.5.1+dfsg.1/doc/trouble.rst python-coverage-4.5.2+dfsg.1/doc/trouble.rst --- python-coverage-4.5.1+dfsg.1/doc/trouble.rst 2017-11-05 15:03:36.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/doc/trouble.rst 2018-11-12 12:37:01.000000000 +0000 @@ -23,7 +23,7 @@ If your problem isn't discussed here, you can of course search the `coverage.py bug tracker`_ directly to see if there is some mention of it. -.. _coverage.py bug tracker: https://bitbucket.org/ned/coveragepy/issues?status=new&status=open +.. _coverage.py bug tracker: https://github.com/nedbat/coveragepy/issues Things that don't work diff -Nru python-coverage-4.5.1+dfsg.1/howto.txt python-coverage-4.5.2+dfsg.1/howto.txt --- python-coverage-4.5.1+dfsg.1/howto.txt 2018-02-03 22:22:20.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/howto.txt 2018-11-12 14:09:43.000000000 +0000 @@ -17,8 +17,7 @@ - Don't forget the man page: doc/python-coverage.1.txt - Check that the docs build correctly: $ tox -e doc - - Done with changes to source files, check them in. - - hg push + - Done with changes to source files, check them in and push them. - Generate new sample_html to get the latest, incl footer version number: make clean pip install -e . @@ -60,7 +59,7 @@ - Visit https://pypi.python.org/pypi?:action=pkg_edit&name=coverage : - show/hide the proper versions. - Tag the tree - - hg tag -m "Coverage 3.0.1" coverage-3.0.1 + - git tag coverage-3.0.1 - Bump version: - coverage/version.py - increment version number @@ -68,7 +67,7 @@ - set to alpha-0 if just released - CHANGES.rst - add an "Unreleased" section to the top. -- push hg changes +- push git changes - Update nedbatchelder.com - Blog post? - Update readthedocs diff -Nru python-coverage-4.5.1+dfsg.1/Makefile python-coverage-4.5.2+dfsg.1/Makefile --- python-coverage-4.5.1+dfsg.1/Makefile 2017-11-05 15:03:36.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/Makefile 2018-11-12 12:37:01.000000000 +0000 @@ -69,6 +69,9 @@ wheel: tox -c tox_wheels.ini $(ARGS) +manylinux_clean: + docker image rm quay.io/pypa/manylinux1_i686 quay.io/pypa/manylinux1_x86_64 + manylinux: docker run -it --init --rm -v `pwd`:/io quay.io/pypa/manylinux1_x86_64 /io/ci/manylinux.sh build docker run -it --init --rm -v `pwd`:/io quay.io/pypa/manylinux1_i686 /io/ci/manylinux.sh build diff -Nru python-coverage-4.5.1+dfsg.1/PKG-INFO python-coverage-4.5.2+dfsg.1/PKG-INFO --- python-coverage-4.5.1+dfsg.1/PKG-INFO 2018-02-10 19:49:30.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/PKG-INFO 2018-11-12 14:23:07.000000000 +0000 @@ -1,12 +1,11 @@ Metadata-Version: 1.2 Name: coverage -Version: 4.5.1 +Version: 4.5.2 Summary: Code coverage measurement for Python Home-page: https://bitbucket.org/ned/coveragepy Author: Ned Batchelder and 100 others Author-email: ned@nedbatchelder.com License: Apache 2.0 -Description-Content-Type: UNKNOWN Description: .. Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 .. For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt @@ -18,7 +17,8 @@ | |license| |versions| |status| |docs| | |ci-status| |win-ci-status| |codecov| - | |kit| |format| |saythanks| + | |kit| |format| |repos| + | |tidelift| |saythanks| .. downloads badge seems to be broken... |downloads| @@ -26,9 +26,25 @@ the code analysis tools and tracing hooks provided in the Python standard library to determine which lines are executable, and which have been executed. + .. |tideliftlogo| image:: doc/media/Tidelift_Logos_RGB_Tidelift_Shorthand_On-White_small.png + :width: 75 + :alt: Tidelift + + .. list-table:: + :widths: 10 100 + + * - |tideliftlogo| + - Professional support for coverage.py is available as part of the `Tidelift + Subscription`_. Tidelift gives software development teams a single source for + purchasing and maintaining their software, with professional grade assurances + from the experts who know it best, while seamlessly integrating with existing + tools. + + .. _Tidelift Subscription: https://tidelift.com/subscription/pkg/pypi-coverage?utm_source=pypi-coverage&utm_medium=referral&utm_campaign=readme + Coverage.py runs on many versions of Python: - * CPython 2.6, 2.7 and 3.3 through 3.7. + * CPython 2.6, 2.7 and 3.3 through pre-alpha 3.8. * PyPy2 5.10 and PyPy3 5.10. * Jython 2.7.1, though not for reporting. * IronPython 2.7.7, though not for reporting. @@ -114,9 +130,15 @@ .. |codecov| image:: http://codecov.io/github/nedbat/coveragepy/coverage.svg?branch=master&precision=2 :target: http://codecov.io/github/nedbat/coveragepy?branch=master :alt: Coverage! + .. |repos| image:: https://repology.org/badge/tiny-repos/python:coverage.svg + :target: https://repology.org/metapackage/python:coverage/versions + :alt: Packaging status .. |saythanks| image:: https://img.shields.io/badge/saythanks.io-%E2%98%BC-1EAEDB.svg :target: https://saythanks.io/to/nedbat :alt: Say thanks :) + .. |tidelift| image:: https://tidelift.com/badges/github/nedbat/coveragepy + :target: https://tidelift.com/subscription/pkg/pypi-coverage?utm_source=pypi-coverage&utm_medium=referral&utm_campaign=readme + :alt: Tidelift Keywords: code coverage testing Platform: UNKNOWN @@ -134,6 +156,7 @@ Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Programming Language :: Python :: Implementation :: Jython diff -Nru python-coverage-4.5.1+dfsg.1/README.rst python-coverage-4.5.2+dfsg.1/README.rst --- python-coverage-4.5.1+dfsg.1/README.rst 2018-02-03 20:02:27.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/README.rst 2018-11-12 12:37:01.000000000 +0000 @@ -9,7 +9,8 @@ | |license| |versions| |status| |docs| | |ci-status| |win-ci-status| |codecov| -| |kit| |format| |saythanks| +| |kit| |format| |repos| +| |tidelift| |saythanks| .. downloads badge seems to be broken... |downloads| @@ -17,9 +18,25 @@ the code analysis tools and tracing hooks provided in the Python standard library to determine which lines are executable, and which have been executed. +.. |tideliftlogo| image:: doc/media/Tidelift_Logos_RGB_Tidelift_Shorthand_On-White_small.png + :width: 75 + :alt: Tidelift + +.. list-table:: + :widths: 10 100 + + * - |tideliftlogo| + - Professional support for coverage.py is available as part of the `Tidelift + Subscription`_. Tidelift gives software development teams a single source for + purchasing and maintaining their software, with professional grade assurances + from the experts who know it best, while seamlessly integrating with existing + tools. + +.. _Tidelift Subscription: https://tidelift.com/subscription/pkg/pypi-coverage?utm_source=pypi-coverage&utm_medium=referral&utm_campaign=readme + Coverage.py runs on many versions of Python: -* CPython 2.6, 2.7 and 3.3 through 3.7. +* CPython 2.6, 2.7 and 3.3 through pre-alpha 3.8. * PyPy2 5.10 and PyPy3 5.10. * Jython 2.7.1, though not for reporting. * IronPython 2.7.7, though not for reporting. @@ -105,6 +122,12 @@ .. |codecov| image:: http://codecov.io/github/nedbat/coveragepy/coverage.svg?branch=master&precision=2 :target: http://codecov.io/github/nedbat/coveragepy?branch=master :alt: Coverage! +.. |repos| image:: https://repology.org/badge/tiny-repos/python:coverage.svg + :target: https://repology.org/metapackage/python:coverage/versions + :alt: Packaging status .. |saythanks| image:: https://img.shields.io/badge/saythanks.io-%E2%98%BC-1EAEDB.svg :target: https://saythanks.io/to/nedbat :alt: Say thanks :) +.. |tidelift| image:: https://tidelift.com/badges/github/nedbat/coveragepy + :target: https://tidelift.com/subscription/pkg/pypi-coverage?utm_source=pypi-coverage&utm_medium=referral&utm_campaign=readme + :alt: Tidelift diff -Nru python-coverage-4.5.1+dfsg.1/requirements/dev.pip python-coverage-4.5.2+dfsg.1/requirements/dev.pip --- python-coverage-4.5.1+dfsg.1/requirements/dev.pip 2018-02-01 13:09:56.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/requirements/dev.pip 2018-11-12 12:37:01.000000000 +0000 @@ -4,6 +4,10 @@ # Requirements for doing local development work on coverage.py. # https://requires.io/github/nedbat/coveragepy/requirements/ +# Pin these so that 2.6 keeps working +pip==9.0.1 +virtualenv==15.2.0 + # PyPI requirements for running tests. -r tox.pip -r pytest.pip diff -Nru python-coverage-4.5.1+dfsg.1/requirements/tox.pip python-coverage-4.5.2+dfsg.1/requirements/tox.pip --- python-coverage-4.5.1+dfsg.1/requirements/tox.pip 2017-12-24 02:05:42.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/requirements/tox.pip 2018-11-12 12:37:01.000000000 +0000 @@ -1,4 +1,5 @@ # The version of tox used by coverage.py +# 2.9.1 is last version supporting 2.6 tox==2.9.1 # Adds env recreation on requirements file changes. -tox-battery==0.5 +tox-battery==0.5.1 diff -Nru python-coverage-4.5.1+dfsg.1/requirements/wheel.pip python-coverage-4.5.2+dfsg.1/requirements/wheel.pip --- python-coverage-4.5.1+dfsg.1/requirements/wheel.pip 2017-11-05 15:03:36.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/requirements/wheel.pip 2018-11-12 12:37:02.000000000 +0000 @@ -1,4 +1,6 @@ # Things needed to make wheels for coverage.py +# 36.8.0 is last version supporting 2.6 +# but we use 35.0.2 in tox.ini, so stick with that here too. setuptools==35.0.2 # We need to stick with 0.29.0 until we drop 2.6 and 3.3 wheel==0.29.0 diff -Nru python-coverage-4.5.1+dfsg.1/setup.cfg python-coverage-4.5.2+dfsg.1/setup.cfg --- python-coverage-4.5.1+dfsg.1/setup.cfg 2018-02-10 19:49:30.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/setup.cfg 2018-11-12 14:23:07.000000000 +0000 @@ -1,5 +1,5 @@ [tool:pytest] -addopts = -q -n3 --strict --no-flaky-report +addopts = -q -n3 --strict --no-flaky-report -rfe markers = expensive: too slow to run during "make smoke" diff -Nru python-coverage-4.5.1+dfsg.1/setup.py python-coverage-4.5.2+dfsg.1/setup.py --- python-coverage-4.5.1+dfsg.1/setup.py 2018-01-14 22:43:41.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/setup.py 2018-11-12 13:58:25.000000000 +0000 @@ -32,6 +32,7 @@ Programming Language :: Python :: 3.5 Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 +Programming Language :: Python :: 3.8 Programming Language :: Python :: Implementation :: CPython Programming Language :: Python :: Implementation :: PyPy Programming Language :: Python :: Implementation :: Jython diff -Nru python-coverage-4.5.1+dfsg.1/tests/conftest.py python-coverage-4.5.2+dfsg.1/tests/conftest.py --- python-coverage-4.5.1+dfsg.1/tests/conftest.py 2017-11-05 15:03:36.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/tests/conftest.py 2018-11-12 12:37:02.000000000 +0000 @@ -10,9 +10,23 @@ import pytest import warnings +from coverage import env + @pytest.fixture(autouse=True) def set_warnings(): """Enable DeprecationWarnings during all tests.""" warnings.simplefilter("default") warnings.simplefilter("once", DeprecationWarning) + + # A warning to suppress: + # setuptools/py33compat.py:54: DeprecationWarning: The value of convert_charrefs will become + # True in 3.5. You are encouraged to set the value explicitly. + # unescape = getattr(html, 'unescape', html_parser.HTMLParser().unescape) + warnings.filterwarnings( + "ignore", + category=DeprecationWarning, + message="The value of convert_charrefs will become True in 3.5.", + ) + if env.PYPY and env.PY3: + warnings.filterwarnings("ignore", r".*unclosed file", category=ResourceWarning) diff -Nru python-coverage-4.5.1+dfsg.1/tests/farm/html/gold_partial/index.html python-coverage-4.5.2+dfsg.1/tests/farm/html/gold_partial/index.html --- python-coverage-4.5.1+dfsg.1/tests/farm/html/gold_partial/index.html 2017-08-19 13:39:05.000000000 +0000 +++ python-coverage-4.5.2+dfsg.1/tests/farm/html/gold_partial/index.html 2018-11-12 12:37:02.000000000 +0000 @@ -9,7 +9,7 @@ - + @@ -22,7 +22,7 @@