Hello community,
here is the log from the commit of package python-flake8 for openSUSE:Factory checked in at 2019-02-26 22:15:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-flake8 (Old)
and /work/SRC/openSUSE:Factory/.python-flake8.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-flake8"
Tue Feb 26 22:15:26 2019 rev:23 rq:678215 version:3.7.6
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-flake8/python-flake8.changes 2019-02-14 14:12:17.776253104 +0100
+++ /work/SRC/openSUSE:Factory/.python-flake8.new.28833/python-flake8.changes 2019-02-26 22:15:29.558209433 +0100
@@ -1,0 +2,7 @@
+Thu Feb 21 18:42:26 UTC 2019 - John Vandenberg
+
+- Update to v3.7.6
+ * Fix ``--per-file-ignores`` for multi-letter error codes
+ * Improve flake8 speed when only 1 filename is passed
+
+-------------------------------------------------------------------
Old:
----
flake8-3.7.5.tar.gz
New:
----
flake8-3.7.6.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-flake8.spec ++++++
--- /var/tmp/diff_new_pack.0zufXw/_old 2019-02-26 22:15:30.698209045 +0100
+++ /var/tmp/diff_new_pack.0zufXw/_new 2019-02-26 22:15:30.738209032 +0100
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without python2
Name: python-flake8
-Version: 3.7.5
+Version: 3.7.6
Release: 0
Summary: Modular source code checker: pep8, pyflakes and co
License: MIT
++++++ flake8-3.7.5.tar.gz -> flake8-3.7.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flake8-3.7.5/PKG-INFO new/flake8-3.7.6/PKG-INFO
--- old/flake8-3.7.5/PKG-INFO 2019-02-04 17:37:44.000000000 +0100
+++ new/flake8-3.7.6/PKG-INFO 2019-02-18 21:00:44.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: flake8
-Version: 3.7.5
+Version: 3.7.6
Summary: the modular source code checker: pep8, pyflakes and co
Home-page: https://gitlab.com/pycqa/flake8
Author: Tarek Ziade
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flake8-3.7.5/docs/source/release-notes/3.7.6.rst new/flake8-3.7.6/docs/source/release-notes/3.7.6.rst
--- old/flake8-3.7.5/docs/source/release-notes/3.7.6.rst 1970-01-01 01:00:00.000000000 +0100
+++ new/flake8-3.7.6/docs/source/release-notes/3.7.6.rst 2019-02-18 20:56:17.000000000 +0100
@@ -0,0 +1,27 @@
+3.7.6 -- 2019-02-18
+-------------------
+
+You can view the `3.7.6 milestone`_ on GitLab for more details.
+
+Bugs Fixed
+~~~~~~~~~~
+
+- Fix ``--per-file-ignores`` for multi-letter error codes (See also
+ `GitLab!303`_, `GitLab#507`_)
+
+- Improve flake8 speed when only 1 filename is passed (See also `GitLab!305`_)
+
+
+.. all links
+.. _3.7.6 milestone:
+ https://gitlab.com/pycqa/flake8/milestones/29
+
+.. issue links
+.. _GitLab#507:
+ https://gitlab.com/pycqa/flake8/issues/507
+
+.. merge request links
+.. _GitLab!303:
+ https://gitlab.com/pycqa/flake8/merge_requests/303
+.. _GitLab!305:
+ https://gitlab.com/pycqa/flake8/merge_requests/305
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flake8-3.7.5/docs/source/release-notes/index.rst new/flake8-3.7.6/docs/source/release-notes/index.rst
--- old/flake8-3.7.5/docs/source/release-notes/index.rst 2019-02-04 17:33:44.000000000 +0100
+++ new/flake8-3.7.6/docs/source/release-notes/index.rst 2019-02-18 20:53:01.000000000 +0100
@@ -9,6 +9,7 @@
==================
.. toctree::
+ 3.7.6
3.7.5
3.7.4
3.7.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flake8-3.7.5/docs/source/user/options.rst new/flake8-3.7.6/docs/source/user/options.rst
--- old/flake8-3.7.5/docs/source/user/options.rst 2019-01-29 00:49:38.000000000 +0100
+++ new/flake8-3.7.6/docs/source/user/options.rst 2019-02-17 17:31:46.000000000 +0100
@@ -399,7 +399,7 @@
need only specify ``W23`` to ignore them. This also works for ``W2`` and
``W`` (for example).
- This defaults to: ``E121,E123,E126,E226,E24,E704``
+ This defaults to: ``E121,E123,E126,E226,E24,E704,W503,W504``
Command-line example:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flake8-3.7.5/src/flake8/__init__.py new/flake8-3.7.6/src/flake8/__init__.py
--- old/flake8-3.7.5/src/flake8/__init__.py 2019-02-04 17:33:36.000000000 +0100
+++ new/flake8-3.7.6/src/flake8/__init__.py 2019-02-18 20:52:52.000000000 +0100
@@ -15,7 +15,7 @@
LOG = logging.getLogger(__name__)
LOG.addHandler(logging.NullHandler())
-__version__ = "3.7.5"
+__version__ = "3.7.6"
__version_info__ = tuple(
int(i) for i in __version__.split(".") if i.isdigit()
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flake8-3.7.5/src/flake8/checker.py new/flake8-3.7.6/src/flake8/checker.py
--- old/flake8-3.7.5/src/flake8/checker.py 2019-02-04 17:33:16.000000000 +0100
+++ new/flake8-3.7.6/src/flake8/checker.py 2019-02-17 17:31:46.000000000 +0100
@@ -5,7 +5,7 @@
import signal
import sys
import tokenize
-from typing import List, Optional
+from typing import List, Optional, Tuple
try:
import multiprocessing
@@ -73,7 +73,6 @@
self.options = style_guide.options
self.checks = checker_plugins
self.jobs = self._job_count()
- self.using_multiprocessing = self.jobs > 1
self.processes = []
self.checkers = []
self.statistics = {
@@ -247,7 +246,7 @@
LOG.info("Checking %d files", len(self.checkers))
def report(self):
- # type: () -> (int, int)
+ # type: () -> Tuple[int, int]
"""Report all of the errors found in the managed file checkers.
This iterates over each of the checkers and reports the errors sorted
@@ -279,7 +278,6 @@
except OSError as oserr:
if oserr.errno not in SERIAL_RETRY_ERRNOS:
raise
- self.using_multiprocessing = False
self.run_serial()
return
@@ -326,16 +324,10 @@
fallback to serial processing.
"""
try:
- if self.using_multiprocessing:
+ if self.jobs > 1 and len(self.checkers) > 1:
self.run_parallel()
else:
self.run_serial()
- except OSError as oserr:
- if oserr.errno not in SERIAL_RETRY_ERRNOS:
- LOG.exception(oserr)
- raise
- LOG.warning("Running in serial after OS exception, %r", oserr)
- self.run_serial()
except KeyboardInterrupt:
LOG.warning("Flake8 was interrupted by the user")
raise exceptions.EarlyQuit("Early quit while running checks")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flake8-3.7.5/src/flake8/main/application.py new/flake8-3.7.6/src/flake8/main/application.py
--- old/flake8-3.7.5/src/flake8/main/application.py 2019-02-04 17:33:16.000000000 +0100
+++ new/flake8-3.7.6/src/flake8/main/application.py 2019-02-17 17:31:46.000000000 +0100
@@ -4,7 +4,7 @@
import logging
import sys
import time
-from typing import List, Optional, Sequence
+from typing import List, Optional
import flake8
from flake8 import checker
@@ -99,6 +99,7 @@
self.parsed_diff = {}
def parse_preliminary_options_and_args(self, argv=None):
+ # type: (Optional[List[str]]) -> None
"""Get preliminary options and args from CLI, pre-plugin-loading.
We need to know the values of a few standard options and args now, so
@@ -347,7 +348,7 @@
self.formatter.show_statistics(self.guide.stats)
def initialize(self, argv):
- # type: (Sequence[str]) -> None
+ # type: (Optional[List[str]]) -> None
"""Initialize the application to be run.
This finds the plugins, registers their options, and parses the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flake8-3.7.5/src/flake8/plugins/pyflakes.py new/flake8-3.7.6/src/flake8/plugins/pyflakes.py
--- old/flake8-3.7.5/src/flake8/plugins/pyflakes.py 2019-02-04 17:33:16.000000000 +0100
+++ new/flake8-3.7.6/src/flake8/plugins/pyflakes.py 2019-02-17 17:31:46.000000000 +0100
@@ -53,16 +53,6 @@
}
-def patch_pyflakes():
- """Add error codes to Pyflakes messages."""
- for name, obj in vars(pyflakes.messages).items():
- if name[0].isupper() and obj.message:
- obj.flake8_code = FLAKE8_PYFLAKES_CODES.get(name, "F999")
-
-
-patch_pyflakes()
-
-
class FlakesChecker(pyflakes.checker.Checker):
"""Subclass the Pyflakes checker to conform with the flake8 API."""
@@ -186,7 +176,7 @@
message.lineno,
col,
"{} {}".format(
- message.flake8_code,
+ FLAKE8_PYFLAKES_CODES.get(type(message).__name__, "F999"),
message.message % message.message_args,
),
message.__class__,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flake8-3.7.5/src/flake8/utils.py new/flake8-3.7.6/src/flake8/utils.py
--- old/flake8-3.7.5/src/flake8/utils.py 2019-02-04 17:33:16.000000000 +0100
+++ new/flake8-3.7.6/src/flake8/utils.py 2019-02-17 17:31:46.000000000 +0100
@@ -8,8 +8,8 @@
import re
import sys
import tokenize
-from typing import Callable, Dict, Generator, List, Pattern, Sequence, Tuple
-from typing import Union
+from typing import Callable, Dict, Generator, List, Pattern, Sequence, Set
+from typing import Tuple, Union
from flake8 import exceptions
@@ -51,7 +51,7 @@
_CODE, _FILE, _COLON, _COMMA, _WS = "code", "file", "colon", "comma", "ws"
_EOF = "eof"
_FILE_LIST_TOKEN_TYPES = [
- (re.compile(r"[A-Z][0-9]*(?=$|\s|,)"), _CODE),
+ (re.compile(r"[A-Z]+[0-9]*(?=$|\s|,)"), _CODE),
(re.compile(r"[^\s:,]+"), _FILE),
(re.compile(r"\s*:\s*"), _COLON),
(re.compile(r"\s*,\s*"), _COMMA),
@@ -217,7 +217,7 @@
def parse_unified_diff(diff=None):
- # type: (str) -> List[str]
+ # type: (str) -> Dict[str, Set[int]]
"""Parse the unified diff passed on stdin.
:returns:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flake8-3.7.5/src/flake8.egg-info/PKG-INFO new/flake8-3.7.6/src/flake8.egg-info/PKG-INFO
--- old/flake8-3.7.5/src/flake8.egg-info/PKG-INFO 2019-02-04 17:37:44.000000000 +0100
+++ new/flake8-3.7.6/src/flake8.egg-info/PKG-INFO 2019-02-18 21:00:43.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: flake8
-Version: 3.7.5
+Version: 3.7.6
Summary: the modular source code checker: pep8, pyflakes and co
Home-page: https://gitlab.com/pycqa/flake8
Author: Tarek Ziade
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flake8-3.7.5/src/flake8.egg-info/SOURCES.txt new/flake8-3.7.6/src/flake8.egg-info/SOURCES.txt
--- old/flake8-3.7.5/src/flake8.egg-info/SOURCES.txt 2019-02-04 17:37:44.000000000 +0100
+++ new/flake8-3.7.6/src/flake8.egg-info/SOURCES.txt 2019-02-18 21:00:43.000000000 +0100
@@ -85,6 +85,7 @@
docs/source/release-notes/3.7.3.rst
docs/source/release-notes/3.7.4.rst
docs/source/release-notes/3.7.5.rst
+docs/source/release-notes/3.7.6.rst
docs/source/release-notes/index.rst
docs/source/user/configuration.rst
docs/source/user/error-codes.rst
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flake8-3.7.5/tests/unit/test_checker_manager.py new/flake8-3.7.6/tests/unit/test_checker_manager.py
--- old/flake8-3.7.5/tests/unit/test_checker_manager.py 2019-01-30 23:52:39.000000000 +0100
+++ new/flake8-3.7.6/tests/unit/test_checker_manager.py 2019-02-17 17:31:46.000000000 +0100
@@ -16,27 +16,33 @@
return style_guide
+def _parallel_checker_manager():
+ """Call Manager.run() and return the number of calls to `run_serial`."""
+ style_guide = style_guide_mock()
+ manager = checker.Manager(style_guide, [], [])
+ # multiple checkers is needed for parallel mode
+ manager.checkers = [mock.Mock(), mock.Mock()]
+ return manager
+
+
def test_oserrors_cause_serial_fall_back():
"""Verify that OSErrors will cause the Manager to fallback to serial."""
err = OSError(errno.ENOSPC, 'Ominous message about spaceeeeee')
- style_guide = style_guide_mock()
with mock.patch('_multiprocessing.SemLock', side_effect=err):
- manager = checker.Manager(style_guide, [], [])
+ manager = _parallel_checker_manager()
with mock.patch.object(manager, 'run_serial') as serial:
manager.run()
assert serial.call_count == 1
- assert manager.using_multiprocessing is False
@mock.patch('flake8.utils.is_windows', return_value=False)
def test_oserrors_are_reraised(is_windows):
"""Verify that unexpected OSErrors will cause the Manager to reraise."""
err = OSError(errno.EAGAIN, 'Ominous message')
- style_guide = style_guide_mock()
with mock.patch('_multiprocessing.SemLock', side_effect=err):
- with pytest.raises(OSError):
- manager = checker.Manager(style_guide, [], [])
- with mock.patch.object(manager, 'run_serial') as serial:
+ manager = _parallel_checker_manager()
+ with mock.patch.object(manager, 'run_serial') as serial:
+ with pytest.raises(OSError):
manager.run()
assert serial.call_count == 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flake8-3.7.5/tests/unit/test_utils.py new/flake8-3.7.6/tests/unit/test_utils.py
--- old/flake8-3.7.5/tests/unit/test_utils.py 2019-02-04 17:33:16.000000000 +0100
+++ new/flake8-3.7.6/tests/unit/test_utils.py 2019-02-17 17:31:46.000000000 +0100
@@ -90,6 +90,11 @@
['f.py:E,F', 'g.py:G,H'],
[('f.py', ['E', 'F']), ('g.py', ['G', 'H'])],
),
+ # six-digits codes are allowed
+ (
+ 'f.py: ABC123',
+ [('f.py', ['ABC123'])],
+ )
),
)
def test_parse_files_to_codes_mapping(value, expected):