Hello community,

here is the log from the commit of package python-coverage for openSUSE:Factory 
checked in at 2018-02-21 14:07:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-coverage (Old)
 and      /work/SRC/openSUSE:Factory/.python-coverage.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-coverage"

Wed Feb 21 14:07:28 2018 rev:34 rq:577962 version:4.5.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-coverage/python-coverage.changes  
2018-02-12 10:11:00.302608093 +0100
+++ /work/SRC/openSUSE:Factory/.python-coverage.new/python-coverage.changes     
2018-02-21 14:07:29.778778427 +0100
@@ -1,0 +2,13 @@
+Sun Feb 18 17:12:53 UTC 2018 - [email protected]
+
+- update to version 4.5.1:
+  * Now that 4.5 properly separated the [run] omit and [report] omit
+    settings, an old bug has become apparent. If you specified a
+    package name for [run] source, then omit patterns weren’t matched
+    inside that package. This bug (issue 638) is now fixed.
+  * On Python 3.7, reporting about a decorated function with no body
+    other than a docstring would crash coverage.py with an IndexError
+    (issue 640). This is now fixed.
+  * Configurer plugins are now reported in the output of --debug=sys.
+
+-------------------------------------------------------------------

Old:
----
  coverage-4.5.tar.gz

New:
----
  coverage-4.5.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-coverage.spec ++++++
--- /var/tmp/diff_new_pack.wVWz5V/_old  2018-02-21 14:07:31.054732479 +0100
+++ /var/tmp/diff_new_pack.wVWz5V/_new  2018-02-21 14:07:31.058732335 +0100
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-coverage
-Version:        4.5
+Version:        4.5.1
 Release:        0
 Url:            http://nedbatchelder.com/code/coverage/%{version}
 Summary:        Code coverage measurement for Python

++++++ coverage-4.5.tar.gz -> coverage-4.5.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/coverage-4.5/CHANGES.rst 
new/coverage-4.5.1/CHANGES.rst
--- old/coverage-4.5/CHANGES.rst        2018-02-03 21:01:49.000000000 +0100
+++ new/coverage-4.5.1/CHANGES.rst      2018-02-10 18:52:38.000000000 +0100
@@ -5,6 +5,39 @@
 Change history for Coverage.py
 ==============================
 
+    .. When updating the "Unreleased" header to a specific version, use this
+    .. format.  Don't forget the jump target:
+    ..
+    ..
+    ..  .. _changes_781:
+    ..
+    ..
+    ..  Version 7.8.1 --- 2021-07-27
+    ..  ----------------------------
+
+
+.. _changes_451:
+
+Version 4.5.1 --- 2018-02-10
+----------------------------
+
+- Now that 4.5 properly separated the ``[run] omit`` and ``[report] omit``
+  settings, an old bug has become apparent.  If you specified a package name
+  for ``[run] source``, then omit patterns weren't matched inside that package.
+  This bug (`issue 638`_) is now fixed.
+
+- On Python 3.7, reporting about a decorated function with no body other than a
+  docstring would crash coverage.py with an IndexError (`issue 640`_).  This is
+  now fixed.
+
+- Configurer plugins are now reported in the output of ``--debug=sys``.
+
+.. _issue 638: 
https://bitbucket.org/ned/coveragepy/issues/638/run-omit-is-ignored-since-45
+.. _issue 640: 
https://bitbucket.org/ned/coveragepy/issues/640/indexerror-reporting-on-an-empty-decorated
+
+
+.. _changes_45:
+
 Version 4.5 --- 2018-02-03
 --------------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/coverage-4.5/PKG-INFO new/coverage-4.5.1/PKG-INFO
--- old/coverage-4.5/PKG-INFO   2018-02-03 21:19:26.000000000 +0100
+++ new/coverage-4.5.1/PKG-INFO 2018-02-10 20:49:30.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: coverage
-Version: 4.5
+Version: 4.5.1
 Summary: Code coverage measurement for Python
 Home-page: https://bitbucket.org/ned/coveragepy
 Author: Ned Batchelder and 100 others
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/coverage-4.5/coverage/control.py 
new/coverage-4.5.1/coverage/control.py
--- old/coverage-4.5/coverage/control.py        2018-01-23 01:24:57.000000000 
+0100
+++ new/coverage-4.5.1/coverage/control.py      2018-02-10 18:35:03.000000000 
+0100
@@ -559,9 +559,7 @@
             if self.source_pkgs_match.match(modulename):
                 if modulename in self.source_pkgs_unmatched:
                     self.source_pkgs_unmatched.remove(modulename)
-                return None  # There's no reason to skip this file.
-
-            if not self.source_match.match(filename):
+            elif not self.source_match.match(filename):
                 return "falls outside the --source trees"
         elif self.include_match:
             if not self.include_match.match(filename):
@@ -902,7 +900,7 @@
 
     def _find_plugin_files(self, src_dir):
         """Get executable files from the plugins."""
-        for plugin in self.plugins:
+        for plugin in self.plugins.file_tracers:
             for x_file in plugin.find_executable_files(src_dir):
                 yield x_file, plugin._coverage_plugin_name
 
@@ -1154,12 +1152,15 @@
 
         self._init()
 
-        ft_plugins = []
-        for ft in self.plugins.file_tracers:
-            ft_name = ft._coverage_plugin_name
-            if not ft._coverage_enabled:
-                ft_name += " (disabled)"
-            ft_plugins.append(ft_name)
+        def plugin_info(plugins):
+            """Make an entry for the sys_info from a list of plug-ins."""
+            entries = []
+            for plugin in plugins:
+                entry = plugin._coverage_plugin_name
+                if not plugin._coverage_enabled:
+                    entry += " (disabled)"
+                entries.append(entry)
+            return entries
 
         info = [
             ('version', covmod.__version__),
@@ -1167,7 +1168,8 @@
             ('cover_paths', self.cover_paths),
             ('pylib_paths', self.pylib_paths),
             ('tracer', self.collector.tracer_name()),
-            ('plugins.file_tracers', ft_plugins),
+            ('plugins.file_tracers', plugin_info(self.plugins.file_tracers)),
+            ('plugins.configurers', plugin_info(self.plugins.configurers)),
             ('config_files', self.config.attempted_config_files),
             ('configs_read', self.config.config_files),
             ('data_path', self.data_files.filename),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/coverage-4.5/coverage/parser.py 
new/coverage-4.5.1/coverage/parser.py
--- old/coverage-4.5/coverage/parser.py 2017-10-24 03:47:35.000000000 +0200
+++ new/coverage-4.5.1/coverage/parser.py       2018-02-09 22:03:22.000000000 
+0100
@@ -831,12 +831,13 @@
             # 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
             # it to the first one.
-            body_start = self.line_for_node(node.body[0])
-            body_start = self.multiline.get(body_start, body_start)
-            for lineno in range(last+1, body_start):
-                if lineno in self.statements:
-                    self.add_arc(last, lineno)
-                    last = lineno
+            if node.body:
+                body_start = self.line_for_node(node.body[0])
+                body_start = self.multiline.get(body_start, body_start)
+                for lineno in range(last+1, body_start):
+                    if lineno in self.statements:
+                        self.add_arc(last, lineno)
+                        last = lineno
         # The body is handled in collect_arcs.
         return set([ArcStart(last)])
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/coverage-4.5/coverage/plugin.py 
new/coverage-4.5.1/coverage/plugin.py
--- old/coverage-4.5/coverage/plugin.py 2018-01-06 21:14:13.000000000 +0100
+++ new/coverage-4.5.1/coverage/plugin.py       2018-02-10 19:05:27.000000000 
+0100
@@ -2,6 +2,8 @@
 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
 
 """
+.. versionadded:: 4.0
+
 Plug-in interfaces for coverage.py.
 
 Coverage.py supports a few different kinds of plug-ins that change its
@@ -42,6 +44,15 @@
 Coverage.py will store its own information on your plug-in object, using
 attributes whose names start with ``_coverage_``.  Don't be startled.
 
+.. warning::
+    Plug-ins are imported by coverage.py before it begins measuring code.
+    If you write a plugin in your own project, it might import your product
+    code before coverage.py can start measuring.  This can result in your
+    own code being reported as missing.
+
+    One solution is to put your plugins in your project tree, but not in
+    your importable Python package.
+
 
 File Tracers
 ============
@@ -58,6 +69,8 @@
 Configurers
 ===========
 
+.. versionadded:: 4.5
+
 Configurers modify the configuration of coverage.py during start-up.
 Configurers implement the :meth:`~coverage.CoveragePlugin.configure` method to
 change the configuration.
@@ -147,7 +160,7 @@
         Plug-in type: configurer.
 
         This method is called during coverage.py start-up, to give your plug-in
-        a change to change the configuration.  The `config` parameter is an
+        a chance to change the configuration.  The `config` parameter is an
         object with :meth:`~coverage.Coverage.get_option` and
         :meth:`~coverage.Coverage.set_option` methods.  Do not call any other
         methods on the `config` object.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/coverage-4.5/coverage/version.py 
new/coverage-4.5.1/coverage/version.py
--- old/coverage-4.5/coverage/version.py        2018-02-03 21:01:16.000000000 
+0100
+++ new/coverage-4.5.1/coverage/version.py      2018-02-10 18:51:38.000000000 
+0100
@@ -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, 0, 'final', 0)
+version_info = (4, 5, 1, 'final', 0)
 
 
 def _make_version(major, minor, micro, releaselevel, serial):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/coverage-4.5/coverage.egg-info/PKG-INFO 
new/coverage-4.5.1/coverage.egg-info/PKG-INFO
--- old/coverage-4.5/coverage.egg-info/PKG-INFO 2018-02-03 21:19:23.000000000 
+0100
+++ new/coverage-4.5.1/coverage.egg-info/PKG-INFO       2018-02-10 
20:49:29.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: coverage
-Version: 4.5
+Version: 4.5.1
 Summary: Code coverage measurement for Python
 Home-page: https://bitbucket.org/ned/coveragepy
 Author: Ned Batchelder and 100 others
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/coverage-4.5/doc/api_plugin.rst 
new/coverage-4.5.1/doc/api_plugin.rst
--- old/coverage-4.5/doc/api_plugin.rst 2018-01-06 17:43:16.000000000 +0100
+++ new/coverage-4.5.1/doc/api_plugin.rst       2018-02-10 18:45:44.000000000 
+0100
@@ -9,8 +9,6 @@
 
 .. :history: 20150815T132400, new doc for 4.0b2
 
-.. versionadded:: 4.0
-
 .. automodule:: coverage.plugin
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/coverage-4.5/doc/conf.py 
new/coverage-4.5.1/doc/conf.py
--- old/coverage-4.5/doc/conf.py        2018-02-03 21:10:22.000000000 +0100
+++ new/coverage-4.5.1/doc/conf.py      2018-02-10 18:53:44.000000000 +0100
@@ -58,7 +58,7 @@
 # The short X.Y version.
 version = '4.5'             # CHANGEME
 # The full version, including alpha/beta/rc tags.
-release = '4.5'             # CHANGEME
+release = '4.5.1'           # CHANGEME
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/coverage-4.5/doc/index.rst 
new/coverage-4.5.1/doc/index.rst
--- old/coverage-4.5/doc/index.rst      2018-02-03 21:03:39.000000000 +0100
+++ new/coverage-4.5.1/doc/index.rst    2018-02-10 18:53:20.000000000 +0100
@@ -51,6 +51,7 @@
 .. :history: 20161226T160400, updated for 4.3
 .. :history: 20170116T180100, updated for 4.3.2
 .. :history: 20180203T130300, updated for 4.5
+.. :history: 20180210T125300, updated for 4.5.1
 
 
 Coverage.py is a tool for measuring code coverage of Python programs. It
@@ -63,7 +64,7 @@
 
 .. ifconfig:: not prerelease
 
-    The latest version is coverage.py 4.5, released February 3rd 2018.  It
+    The latest version is coverage.py 4.5.1, released February 10th 2018.  It
     is supported on:
 
     * Python versions 2.6, 2.7, 3.3, 3.4, 3.5, 3.6, and 3.7.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/coverage-4.5/howto.txt new/coverage-4.5.1/howto.txt
--- old/coverage-4.5/howto.txt  2018-02-03 21:02:45.000000000 +0100
+++ new/coverage-4.5.1/howto.txt        2018-02-03 23:22:20.000000000 +0100
@@ -61,6 +61,14 @@
         - show/hide the proper versions.
 - Tag the tree
     - hg tag -m "Coverage 3.0.1" coverage-3.0.1
+- Bump version:
+    - coverage/version.py
+        - increment version number
+        - IF NOT BETA:
+            - set to alpha-0 if just released
+    - CHANGES.rst
+        - add an "Unreleased" section to the top.
+- push hg changes
 - Update nedbatchelder.com
     - Blog post?
 - Update readthedocs
@@ -76,13 +84,6 @@
 - Announce on [email protected] .
 - Announce on TIP.
 
-- Bump version:
-    - coverage/version.py
-        - increment version number
-        - IF NOT BETA:
-            - set to alpha-0 if just released
-    - CHANGES.rst
-        - add an "Unreleased" section to the top.
 
 * Testing
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/coverage-4.5/tests/test_api.py 
new/coverage-4.5.1/tests/test_api.py
--- old/coverage-4.5/tests/test_api.py  2018-01-21 02:34:25.000000000 +0100
+++ new/coverage-4.5.1/tests/test_api.py        2018-02-10 16:10:30.000000000 
+0100
@@ -615,6 +615,13 @@
         self.filenames_not_in(lines, "p1b")
         self.assertEqual(lines['p1c'], 0)
 
+    def test_source_package_as_package_part_omitted(self):
+        # 
https://bitbucket.org/ned/coveragepy/issues/638/run-omit-is-ignored-since-45
+        lines = self.coverage_usepkgs(source=["pkg1"], omit=["*/p1b.py"])
+        self.filenames_in(lines, "p1a")
+        self.filenames_not_in(lines, "p1b")
+        self.assertEqual(lines['p1c'], 0)
+
 
 class ReportIncludeOmitTest(OmitIncludeTestsMixin, CoverageTest):
     """Tests of the report include/omit functionality."""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/coverage-4.5/tests/test_parser.py 
new/coverage-4.5.1/tests/test_parser.py
--- old/coverage-4.5/tests/test_parser.py       2017-11-05 16:03:36.000000000 
+0100
+++ new/coverage-4.5.1/tests/test_parser.py     2018-02-09 22:01:33.000000000 
+0100
@@ -187,6 +187,23 @@
         self.assertEqual(parser.raw_statements, set([1, 2, 3, 5, 6, 7, 8]))
         self.assertEqual(parser.statements, set([1, 2, 3]))
 
+    def test_empty_decorated_function(self):
+        parser = self.parse_source("""\
+            def decorator(func):
+                return func
+
+            @decorator
+            def foo(self):
+                '''Docstring'''
+
+            @decorator
+            def bar(self):
+                pass
+            """)
+        self.assertEqual(parser.statements, set([1, 2, 4, 8, 10]))
+        self.assertEqual(parser.arcs(), set(self.arcz_to_arcs(".1 14 48 8.  .2 
2.  -8A A-8")))
+        self.assertEqual(parser.exit_counts(), {1: 1, 2: 1, 4: 1, 8: 1, 10: 1})
+
 
 class ParserMissingArcDescriptionTest(CoverageTest):
     """Tests for PythonParser.missing_arc_description."""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/coverage-4.5/tests/test_plugins.py 
new/coverage-4.5.1/tests/test_plugins.py
--- old/coverage-4.5/tests/test_plugins.py      2018-01-23 03:49:02.000000000 
+0100
+++ new/coverage-4.5.1/tests/test_plugins.py    2018-02-10 19:17:26.000000000 
+0100
@@ -183,7 +183,7 @@
                     return [("hello", "world")]
 
             def coverage_init(reg, options):
-                reg.add_noop(Plugin())
+                reg.add_file_tracer(Plugin())
             """)
         debug_out = StringIO()
         cov = coverage.Coverage(debug=["sys"])
@@ -191,10 +191,15 @@
         cov.set_option("run:plugins", ["plugin_sys_info"])
         cov.load()
 
-        out_lines = debug_out.getvalue().splitlines()
+        out_lines = [line.strip() for line in 
debug_out.getvalue().splitlines()]
+        if env.C_TRACER:
+            self.assertIn('plugins.file_tracers: plugin_sys_info.Plugin', 
out_lines)
+        else:
+            self.assertIn('plugins.file_tracers: plugin_sys_info.Plugin 
(disabled)', out_lines)
+        self.assertIn('plugins.configurers: -none-', out_lines)
         expected_end = [
             "-- sys: plugin_sys_info.Plugin -------------------------------",
-            " hello: world",
+            "hello: world",
             "-- end -------------------------------------------------------",
             ]
         self.assertEqual(expected_end, out_lines[-len(expected_end):])
@@ -207,7 +212,7 @@
                 pass
 
             def coverage_init(reg, options):
-                reg.add_noop(Plugin())
+                reg.add_configurer(Plugin())
             """)
         debug_out = StringIO()
         cov = coverage.Coverage(debug=["sys"])
@@ -215,7 +220,9 @@
         cov.set_option("run:plugins", ["plugin_no_sys_info"])
         cov.load()
 
-        out_lines = debug_out.getvalue().splitlines()
+        out_lines = [line.strip() for line in 
debug_out.getvalue().splitlines()]
+        self.assertIn('plugins.file_tracers: -none-', out_lines)
+        self.assertIn('plugins.configurers: plugin_no_sys_info.Plugin', 
out_lines)
         expected_end = [
             "-- sys: plugin_no_sys_info.Plugin ----------------------------",
             "-- end -------------------------------------------------------",


Reply via email to