Hello community, here is the log from the commit of package python-flake8 for openSUSE:Factory checked in at 2019-03-04 09:12:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-flake8 (Old) and /work/SRC/openSUSE:Factory/.python-flake8.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-flake8" Mon Mar 4 09:12:22 2019 rev:24 rq:681065 version:3.7.7 Changes: -------- --- /work/SRC/openSUSE:Factory/python-flake8/python-flake8.changes 2019-02-26 22:15:29.558209433 +0100 +++ /work/SRC/openSUSE:Factory/.python-flake8.new.28833/python-flake8.changes 2019-03-04 09:12:23.548687170 +0100 @@ -1,0 +2,15 @@ +Sun Mar 3 09:06:27 UTC 2019 - John Vandenberg <[email protected]> + +- Create doc sub package with rst files, and README.rst +- Replace main package %doc README.rst with manpage.rst +- Simplify dependency on python-typing, which is provided by + python3-base when it isnt a separate dependency + +------------------------------------------------------------------- +Sat Mar 2 04:49:32 UTC 2019 - Arun Persaud <[email protected]> + +- update to version 3.7.7: + * Fix crahes in plugins causing flake8 to hang while unpickling + errors (See also GitLab!308, GitLab#505) + +------------------------------------------------------------------- Old: ---- flake8-3.7.6.tar.gz New: ---- flake8-3.7.7.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-flake8.spec ++++++ --- /var/tmp/diff_new_pack.zWGs38/_old 2019-03-04 09:12:24.248687044 +0100 +++ /var/tmp/diff_new_pack.zWGs38/_new 2019-03-04 09:12:24.248687044 +0100 @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %bcond_without python2 Name: python-flake8 -Version: 3.7.6 +Version: 3.7.7 Release: 0 Summary: Modular source code checker: pep8, pyflakes and co License: MIT @@ -35,6 +35,7 @@ Requires: python-mccabe >= 0.6.0 Requires: python-pycodestyle >= 2.5.0 Requires: python-pyflakes >= 2.1.0 +Requires: python-typing Requires(post): update-alternatives Requires(postun): update-alternatives BuildArch: noarch @@ -45,32 +46,24 @@ BuildRequires: %{python_module pyflakes >= 2.1.0} BuildRequires: %{python_module pytest-runner} BuildRequires: %{python_module pytest} +BuildRequires: %{python_module typing} %if %{with python2} BuildRequires: python2-configparser >= 3.7.0 BuildRequires: python2-enum34 BuildRequires: python2-functools32 BuildRequires: python2-mock -BuildRequires: python2-typing -%endif -%if 0%{?python3_version_nodots} < 35 -BuildRequires: python3-typing %endif # /SECTION %ifpython2 Requires: python-configparser >= 3.7.0 Requires: python-enum34 Requires: python-functools32 -Requires: python-typing -%endif -%ifpython3 -%if 0%{?python3_version_nodots} < 35 -Requires: python3-typing -%endif %endif %python_subpackages %description -Flake8 is a wrapper around these tools: +Flake8 is a modular extensible source code checker including wrappers +around these tools: - PyFlakes - pep8 @@ -78,6 +71,16 @@ Flake8 runs all the tools by launching the single ``flake8`` script. +%package -n %{name}-doc +Summary: Documentation files for %name +Group: Documentation/Other +Recommends: %{name} = %{version} + +%description -n %{name}-doc +Flake8 is a modular extensible source code checker. + +This package provides documentation for %{name}. + %prep %setup -q -n flake8-%{version} %autopatch -p1 @@ -100,11 +103,17 @@ %python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python -m pytest tests %files %{python_files} -%doc README.rst %license LICENSE +%doc docs/source/manpage.rst %python_alternative %{_bindir}/flake8 %dir %{python_sitelib}/flake8 %{python_sitelib}/flake8/* %{python_sitelib}/flake8-%{version}-py*.egg-info +%files -n %{name}-doc +%doc README.rst +%doc docs/source/index.rst docs/source/faq.rst docs/source/glossary.rst +%doc docs/source/internal/ docs/source/user docs/source/plugin-development +%license LICENSE + %changelog ++++++ flake8-3.7.6.tar.gz -> flake8-3.7.7.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flake8-3.7.6/PKG-INFO new/flake8-3.7.7/PKG-INFO --- old/flake8-3.7.6/PKG-INFO 2019-02-18 21:00:44.000000000 +0100 +++ new/flake8-3.7.7/PKG-INFO 2019-02-25 17:37:20.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.2 Name: flake8 -Version: 3.7.6 +Version: 3.7.7 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.6/docs/source/release-notes/3.7.7.rst new/flake8-3.7.7/docs/source/release-notes/3.7.7.rst --- old/flake8-3.7.6/docs/source/release-notes/3.7.7.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/flake8-3.7.7/docs/source/release-notes/3.7.7.rst 2019-02-25 17:34:36.000000000 +0100 @@ -0,0 +1,23 @@ +3.7.7 -- 2019-02-25 +------------------- + +You can view the `3.7.7 milestone`_ on GitLab for more details. + +Bugs Fixed +~~~~~~~~~~ + +- Fix crahes in plugins causing ``flake8`` to hang while unpickling errors (See + also `GitLab!308`_, `GitLab#505`_) + + +.. all links +.. _3.7.7 milestone: + https://gitlab.com/pycqa/flake8/milestones/30 + +.. issue links +.. _GitLab#505: + https://gitlab.com/pycqa/flake8/issues/505 + +.. merge request links +.. _GitLab!308: + https://gitlab.com/pycqa/flake8/merge_requests/308 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flake8-3.7.6/docs/source/release-notes/index.rst new/flake8-3.7.7/docs/source/release-notes/index.rst --- old/flake8-3.7.6/docs/source/release-notes/index.rst 2019-02-18 20:53:01.000000000 +0100 +++ new/flake8-3.7.7/docs/source/release-notes/index.rst 2019-02-25 17:32:53.000000000 +0100 @@ -9,6 +9,7 @@ ================== .. toctree:: + 3.7.7 3.7.6 3.7.5 3.7.4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flake8-3.7.6/src/flake8/__init__.py new/flake8-3.7.7/src/flake8/__init__.py --- old/flake8-3.7.6/src/flake8/__init__.py 2019-02-18 20:52:52.000000000 +0100 +++ new/flake8-3.7.7/src/flake8/__init__.py 2019-02-25 17:32:46.000000000 +0100 @@ -15,7 +15,7 @@ LOG = logging.getLogger(__name__) LOG.addHandler(logging.NullHandler()) -__version__ = "3.7.6" +__version__ = "3.7.7" __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.6/src/flake8/exceptions.py new/flake8-3.7.7/src/flake8/exceptions.py --- old/flake8-3.7.6/src/flake8/exceptions.py 2019-01-31 04:31:05.000000000 +0100 +++ new/flake8-3.7.7/src/flake8/exceptions.py 2019-02-25 17:23:51.000000000 +0100 @@ -4,14 +4,10 @@ class Flake8Exception(Exception): """Plain Flake8 exception.""" - pass - class EarlyQuit(Flake8Exception): """Except raised when encountering a KeyboardInterrupt.""" - pass - class ExecutionError(Flake8Exception): """Exception raised during execution of Flake8.""" @@ -22,15 +18,15 @@ FORMAT = 'Flake8 failed to load plugin "%(name)s" due to %(exc)s.' - def __init__(self, *args, **kwargs): + def __init__(self, plugin, exception): """Initialize our FailedToLoadPlugin exception.""" - self.plugin = kwargs.pop("plugin") + self.plugin = plugin self.ep_name = self.plugin.name - self.original_exception = kwargs.pop("exception") - super(FailedToLoadPlugin, self).__init__(*args, **kwargs) + self.original_exception = exception + super(FailedToLoadPlugin, self).__init__(plugin, exception) def __str__(self): - """Return a nice string for our exception.""" + """Format our exception message.""" return self.FORMAT % { "name": self.ep_name, "exc": self.original_exception, @@ -40,9 +36,8 @@ class InvalidSyntax(Flake8Exception): """Exception raised when tokenizing a file fails.""" - def __init__(self, *args, **kwargs): + def __init__(self, exception): # type: (Exception) -> None """Initialize our InvalidSyntax exception.""" - exception = kwargs.pop("exception", None) self.original_exception = exception self.error_message = "{0}: {1}".format( exception.__class__.__name__, exception.args[0] @@ -50,9 +45,11 @@ self.error_code = "E902" self.line_number = 1 self.column_number = 0 - super(InvalidSyntax, self).__init__( - self.error_message, *args, **kwargs - ) + super(InvalidSyntax, self).__init__(exception) + + def __str__(self): + """Format our exception message.""" + return self.error_message class PluginRequestedUnknownParameters(Flake8Exception): @@ -60,12 +57,12 @@ FORMAT = '"%(name)s" requested unknown parameters causing %(exc)s' - def __init__(self, *args, **kwargs): + def __init__(self, plugin, exception): """Pop certain keyword arguments for initialization.""" - self.original_exception = kwargs.pop("exception") - self.plugin = kwargs.pop("plugin") + self.plugin = plugin + self.original_exception = exception super(PluginRequestedUnknownParameters, self).__init__( - *args, **kwargs + plugin, exception ) def __str__(self): @@ -81,13 +78,11 @@ FORMAT = '"%(name)s" failed during execution due to "%(exc)s"' - def __init__(self, *args, **kwargs): + def __init__(self, plugin, exception): """Utilize keyword arguments for message generation.""" - self.original_exception = kwargs.pop("exception") - self.plugin = kwargs.pop("plugin") - super(PluginExecutionFailed, self).__init__( - str(self), *args, **kwargs - ) + self.plugin = plugin + self.original_exception = exception + super(PluginExecutionFailed, self).__init__(plugin, exception) def __str__(self): """Format our exception message.""" @@ -100,8 +95,6 @@ class HookInstallationError(Flake8Exception): """Parent exception for all hooks errors.""" - pass - class GitHookAlreadyExists(HookInstallationError): """Exception raised when the git pre-commit hook file already exists.""" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flake8-3.7.6/src/flake8/processor.py new/flake8-3.7.7/src/flake8/processor.py --- old/flake8-3.7.6/src/flake8/processor.py 2019-02-03 23:57:40.000000000 +0100 +++ new/flake8-3.7.7/src/flake8/processor.py 2019-02-25 17:23:51.000000000 +0100 @@ -118,7 +118,7 @@ tokenize.generate_tokens(lambda: next(line_iter)) ) except tokenize.TokenError as exc: - raise exceptions.InvalidSyntax(exc.message, exception=exc) + raise exceptions.InvalidSyntax(exception=exc) return self._file_tokens diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flake8-3.7.6/src/flake8.egg-info/PKG-INFO new/flake8-3.7.7/src/flake8.egg-info/PKG-INFO --- old/flake8-3.7.6/src/flake8.egg-info/PKG-INFO 2019-02-18 21:00:43.000000000 +0100 +++ new/flake8-3.7.7/src/flake8.egg-info/PKG-INFO 2019-02-25 17:37:20.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.2 Name: flake8 -Version: 3.7.6 +Version: 3.7.7 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.6/src/flake8.egg-info/SOURCES.txt new/flake8-3.7.7/src/flake8.egg-info/SOURCES.txt --- old/flake8-3.7.6/src/flake8.egg-info/SOURCES.txt 2019-02-18 21:00:43.000000000 +0100 +++ new/flake8-3.7.7/src/flake8.egg-info/SOURCES.txt 2019-02-25 17:37:20.000000000 +0100 @@ -86,6 +86,7 @@ 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/3.7.7.rst docs/source/release-notes/index.rst docs/source/user/configuration.rst docs/source/user/error-codes.rst @@ -164,6 +165,7 @@ tests/unit/test_config_file_finder.py tests/unit/test_debug.py tests/unit/test_decision_engine.py +tests/unit/test_exceptions.py tests/unit/test_file_checker.py tests/unit/test_file_processor.py tests/unit/test_filenameonly_formatter.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/flake8-3.7.6/tests/unit/test_exceptions.py new/flake8-3.7.7/tests/unit/test_exceptions.py --- old/flake8-3.7.6/tests/unit/test_exceptions.py 1970-01-01 01:00:00.000000000 +0100 +++ new/flake8-3.7.7/tests/unit/test_exceptions.py 2019-02-25 17:23:51.000000000 +0100 @@ -0,0 +1,54 @@ +"""Tests for the flake8.exceptions module.""" +import pickle + +import entrypoints + +from flake8 import exceptions +from flake8.plugins import manager as plugins_manager + + +class _ExceptionTest: + def test_pickleable(self): + """Test that the exception is round-trip pickleable.""" + for proto in range(pickle.HIGHEST_PROTOCOL + 1): + new_err = pickle.loads(pickle.dumps(self.err, protocol=proto)) + assert str(self.err) == str(new_err) + orig_e = self.err.original_exception + new_e = new_err.original_exception + assert (type(orig_e), orig_e.args) == (type(new_e), new_e.args) + + +class TestFailedToLoadPlugin(_ExceptionTest): + """Tests for the FailedToLoadPlugin exception.""" + + err = exceptions.FailedToLoadPlugin( + plugin=plugins_manager.Plugin( + 'plugin_name', + entrypoints.EntryPoint('plugin_name', 'os.path', None), + ), + exception=ValueError('boom!'), + ) + + +class TestInvalidSyntax(_ExceptionTest): + """Tests for the InvalidSyntax exception.""" + + err = exceptions.InvalidSyntax(exception=ValueError('Unexpected token: $')) + + +class TestPluginRequestedUnknownParameters(_ExceptionTest): + """Tests for the PluginRequestedUnknownParameters exception.""" + + err = exceptions.PluginRequestedUnknownParameters( + plugin={'plugin_name': 'plugin_name'}, + exception=ValueError('boom!'), + ) + + +class TestPluginExecutionFailed(_ExceptionTest): + """Tests for the PluginExecutionFailed exception.""" + + err = exceptions.PluginExecutionFailed( + plugin={'plugin_name': 'plugin_name'}, + exception=ValueError('boom!'), + )
