diff --git a/fix_pycodestyle_240.patch b/fix_pycodestyle_240.patch deleted file mode 100644 index 22cd715..0000000 --- a/fix_pycodestyle_240.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- flake8-3.5.0/setup.py 2017-08-08 02:31:43.000000000 +0200 -+++ flake8-3.5.0/setup.py 2018-04-15 15:08:31.063294441 +0200 -@@ -22,7 +22,7 @@ - # And in which releases we will update those ranges here: - # http://flake8.pycqa.org/en/latest/internal/releases.html#releasing-flake8 - "pyflakes >= 1.5.0, < 1.7.0", -- "pycodestyle >= 2.0.0, < 2.4.0", -+ "pycodestyle >= 2.0.0, < 2.5.0", - "mccabe >= 0.6.0, < 0.7.0", - "setuptools >= 30", - ] -@@ -108,7 +108,8 @@ - PEP8_PLUGIN('module_imports_on_top_of_file'), - PEP8_PLUGIN('compound_statements'), - PEP8_PLUGIN('explicit_line_join'), -- PEP8_PLUGIN('break_around_binary_operator'), -+ PEP8_PLUGIN('break_after_binary_operator'), -+ PEP8_PLUGIN('break_before_binary_operator'), - PEP8_PLUGIN('comparison_to_singleton'), - PEP8_PLUGIN('comparison_negative'), - PEP8_PLUGIN('comparison_type'), ---- flake8-3.5.0/setup2.cfg 2017-10-23 13:16:02.000000000 +0200 -+++ flake8-3.5.0/setup.cfg 2018-04-15 15:04:03.198239064 +0200 -@@ -9,7 +9,7 @@ - enum34; python_version<"3.4" - configparser; python_version<"3.2" - pyflakes >= 1.5.0, < 1.7.0 -- pycodestyle >= 2.0.0, < 2.4.0 -+ pycodestyle >= 2.0.0, < 2.5.0 - mccabe >= 0.6.0, < 0.7.0 - - [egg_info] diff --git a/flake8-3.5.0.tar.gz b/flake8-3.5.0.tar.gz deleted file mode 100644 index 34eff62..0000000 --- a/flake8-3.5.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7253265f7abd8b313e3892944044a365e3f4ac3fcdcfb4298f55ee9ddf188ba0 -size 140608 diff --git a/flake8-3.6.0.tar.gz b/flake8-3.6.0.tar.gz new file mode 100644 index 0000000..90a2e1b --- /dev/null +++ b/flake8-3.6.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6a35f5b8761f45c5513e3405f110a86bea57982c3b75b766ce7b65217abe1670 +size 144684 diff --git a/python-flake8-3.5.0-pyflakes-2.0.0.patch b/python-flake8-3.5.0-pyflakes-2.0.0.patch deleted file mode 100644 index 53860ab..0000000 --- a/python-flake8-3.5.0-pyflakes-2.0.0.patch +++ /dev/null @@ -1,85 +0,0 @@ -From 527af5c214ef0eccfde3dd58d7ea15e09c483bd3 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= -Date: Sun, 3 Jun 2018 22:18:48 +0200 -Subject: [PATCH] Update to pyflakes 2.0.0 - -- Add new pyflakes codes -- Bump the required versions -- Fixes https://gitlab.com/pycqa/flake8/issues/422 ---- - docs/source/user/error-codes.rst | 6 ++++++ - setup.cfg | 2 +- - setup.py | 2 +- - src/flake8/plugins/pyflakes.py | 2 ++ - 4 files changed, 10 insertions(+), 2 deletions(-) - -Index: flake8-3.5.0/docs/source/user/error-codes.rst -=================================================================== ---- flake8-3.5.0.orig/docs/source/user/error-codes.rst -+++ flake8-3.5.0/docs/source/user/error-codes.rst -@@ -54,6 +54,9 @@ generates its own :term:`error code`\ s - +------+---------------------------------------------------------------------+ - | F707 | an ``except:`` block as not the last exception handler | - +------+---------------------------------------------------------------------+ -+| F721 | doctest syntax error | -+| F722 | syntax error in forward type annotation | -++------+---------------------------------------------------------------------+ - +------+---------------------------------------------------------------------+ - | F811 | redefinition of unused ``name`` from line ``N`` | - +------+---------------------------------------------------------------------+ -@@ -69,6 +72,9 @@ generates its own :term:`error code`\ s - +------+---------------------------------------------------------------------+ - | F841 | local variable ``name`` is assigned to but never used | - +------+---------------------------------------------------------------------+ -++------+---------------------------------------------------------------------+ -+| F901 | ``raise NotImplemented`` should be ``raise NotImplementedError`` | -++------+---------------------------------------------------------------------+ - - Note that some of these entries behave differently on Python 2 and Python 3, - for example F812 is specific to Python 2 only. -Index: flake8-3.5.0/setup.cfg -=================================================================== ---- flake8-3.5.0.orig/setup.cfg -+++ flake8-3.5.0/setup.cfg -@@ -8,7 +8,7 @@ universal = 1 - requires-dist = - enum34; python_version<"3.4" - configparser; python_version<"3.2" -- pyflakes >= 1.5.0, < 1.7.0 -+ pyflakes >= 2.0.0, < 2.1.0 - pycodestyle >= 2.0.0, < 2.5.0 - mccabe >= 0.6.0, < 0.7.0 - -Index: flake8-3.5.0/setup.py -=================================================================== ---- flake8-3.5.0.orig/setup.py -+++ flake8-3.5.0/setup.py -@@ -21,7 +21,7 @@ requires = [ - # http://flake8.pycqa.org/en/latest/faq.html#why-does-flake8-use-ranges-for-its-dependencies - # And in which releases we will update those ranges here: - # http://flake8.pycqa.org/en/latest/internal/releases.html#releasing-flake8 -- "pyflakes >= 1.5.0, < 1.7.0", -+ "pyflakes >= 2.0.0, < 2.1.0", - "pycodestyle >= 2.0.0, < 2.5.0", - "mccabe >= 0.6.0, < 0.7.0", - "setuptools >= 30", -Index: flake8-3.5.0/src/flake8/plugins/pyflakes.py -=================================================================== ---- flake8-3.5.0.orig/src/flake8/plugins/pyflakes.py -+++ flake8-3.5.0/src/flake8/plugins/pyflakes.py -@@ -38,6 +38,7 @@ FLAKE8_PYFLAKES_CODES = { - 'ReturnOutsideFunction': 'F706', - 'DefaultExceptNotLast': 'F707', - 'DoctestSyntaxError': 'F721', -+ 'ForwardAnnotationSyntaxError': 'F722', - 'RedefinedWhileUnused': 'F811', - 'RedefinedInListComp': 'F812', - 'UndefinedName': 'F821', -@@ -45,6 +46,7 @@ FLAKE8_PYFLAKES_CODES = { - 'UndefinedLocal': 'F823', - 'DuplicateArgument': 'F831', - 'UnusedVariable': 'F841', -+ 'RaiseNotImplemented': 'F901', - } - - diff --git a/python-flake8.changes b/python-flake8.changes index a2feb1b..b81a031 100644 --- a/python-flake8.changes +++ b/python-flake8.changes @@ -1,3 +1,47 @@ +------------------------------------------------------------------- +Thu Nov 1 22:46:04 UTC 2018 - Arun Persaud + +- specfile: + * be more specific in %files section + * remove two patches that got included upstream: + + fix_pycodestyle_240.patch + + python-flake8-3.5.0-pyflakes-2.0.0.patch + +- update to version 3.6.0: + * New Dependency Information + + pycodestyle has been updated to >= 2.4.0, < 2.5.0 (See also + GitLab#381, GitLab#415, GitLab!212, GitLab!230, GitLab!231) + + Pyflakes has been updated to >= 2.0.0, < 2.1.0 (See also + GitLab#422, GitLab!239) + + flake8 requires python 2.x >= 2.7 or python 3.x >= 3.4 (See also + GitLab!225) + * Features + + Add paths to allow local plugins to exist outside of sys.path + (See also GitLab#379, GitLab!211) + + Copy setup.cfg files to the temporary git hook execution + directory (See also GitLab!215) + + Only skip a file if # flake8: noqa is on a line by itself (See + also GitLab#453, GitLab!219) + + Provide a better user experience for broken plugins (See also + GitLab!221) + + Report E902 when a file passed on the command line does not + exist (See also GitLab#405, GitLab!227) + + Add --extend-ignore for extending the default ignore instead of + overriding it (See also GitLab#365, GitLab!233) + * Bugs Fixed + + Respect a formatter's newline setting when printing (See also + GitLab!222) + + Fix leaking of processes in the legacy api (See also GitLab#410, + GitLab!228) + + Fix a SyntaxWarning for an invalid escape sequence (See also + GitLab!244) + + Fix DeprecationWarning due to import of abc classes from the + collections module (See also GitLab!249) + + Defer setuptools import to improve flake8 startup time (See also + GitLab!250) + + Fix inconsistent line endings in FileProcessor.lines when + running under python 3.x (See also GitLab#457, GitLab!255) + ------------------------------------------------------------------- Wed Sep 5 14:55:07 UTC 2018 - Matěj Cepl diff --git a/python-flake8.spec b/python-flake8.spec index 1784865..941dcb0 100644 --- a/python-flake8.spec +++ b/python-flake8.spec @@ -12,24 +12,21 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} %bcond_without python2 Name: python-flake8 -Version: 3.5.0 +Version: 3.6.0 Release: 0 Summary: Modular source code checker: pep8, pyflakes and co License: MIT Group: Development/Languages/Python URL: https://gitlab.com/pycqa/flake8 Source: https://files.pythonhosted.org/packages/source/f/flake8/flake8-%{version}.tar.gz -#PATCH-FIX-UPSTREAM fix_pycodestyle_240.patch -Patch0: fix_pycodestyle_240.patch -Patch1: python-flake8-3.5.0-pyflakes-2.0.0.patch -Patch2: remove_mock_dependency.patch +Patch0: remove_mock_dependency.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -91,6 +88,8 @@ Flake8 runs all the tools by launching the single ``flake8`` script. %doc README.rst %license LICENSE %python_alternative %{_bindir}/flake8 -%{python_sitelib}/* +%dir %{python_sitelib}/flake8 +%{python_sitelib}/flake8/* +%{python_sitelib}/flake8-%{version}-py*.egg-info %changelog diff --git a/remove_mock_dependency.patch b/remove_mock_dependency.patch index 05cfcac..d794fd2 100644 --- a/remove_mock_dependency.patch +++ b/remove_mock_dependency.patch @@ -210,7 +210,7 @@ +++ b/tests/unit/test_plugin_type_manager.py @@ -1,7 +1,10 @@ """Tests for flake8.plugins.manager.PluginTypeManager.""" - import collections + import sys -import mock +try: