Accepting request 805568 from home:bnavigator:branches:devel:languages:python

- Update to 3.8.1
  * Fix --output-file (regression in 3.8.0) (See also GitLab!427,
    GitLab#637)
- Update notes for 3.8.0
   * Fix logical checks which report positions out of bounds (See also
     GitLab!422, GitLab#635)
   * Fix --exclude=.* accidentally matching . and .. (See also GitLab!424,
     GitLab#632)
   * Add deprecation message for vcs hooks (See also GitLab!420, GitLab#568)
- Update notes for 3.8.0a2
   * Fix type="str" optparse options (See also GitLab!419)
- Update notes for 3.8.0a1
  New Dependency Information
  * Remove dependency on entrypoints and add dependency on importlib-metadata
    (only for python<3.8) (See also GitLab!388, GitLab#569)
  * Pyflakes has been updated to >= 2.2.0, < 2.3.0 (See also GitLab!417)
  * pycodestyle has been updated to >= 2.6.0a1, < 2.7.0 (See also GitLab!418)
  Features
  * Add --extend-exclude option to add to --exclude without overwriting (See
    also GitLab!315, GitLab#535)
  * Move argument parsing from optparse to argparse (See also GitLab!341
  * Group plugin options in --help (See also GitLab!342, GitLab#565)
  * Remove parsing of verbose from configuration files as it was not
    consistently applied (See also GitLab!360, GitLab#439)
  * Remove parsing of output_file from configuration files as it was not
    consistently applied (See also GitLab!361)
  * Resolve configuration files relative to cwd instead of common prefix of
    passed filenames. You may need to change flake8 subproject to cd subproject
    && flake8 . (See also GitLab!363)
  * Officially support python3.8 (See also GitLab!377)
  * --disable-noqa now also disables # flake8: noqa (See also GitLab!380,
    GitLab#590)
  * Ensure that a missing file produces a E902 error (See also GitLab!404,
    GitLab#600)
  * # noqa comments now apply to all of the lines in an explicit \ continuation
    or in a line continued by a multi-line string (See also GitLab!413, GitLab#375)
  Bugs Fixed
  * Fix --exclude=./t.py to only match t.py at the top level (See also
    GitLab!311, GitLab#382)
  * Fix --show-source when a file is indented with tabs (See also GitLab!339,
    GitLab#563)
  * Fix crash when --max-line-length is given a non-integer (See also
    GitLab!341, GitLab#541)
  * Prevent flip-flopping of indent_char causing extra E101 errors (See also
    GitLab!357, pycodestyle#886)
  * Only enable multiprocessing when the method is fork fixing issues on macos
    with python3.8+ (See also GitLab!366, GitLab#587) (note: this fix also
    landed in 3.7.9)
  * noqa is now only handled by flake8 fixing specific-noqa. Plugins requesting
    this parameter will always receive False (See also GitLab!331, GitLab#552)
  * Fix duplicate loading of plugins when invoked via python -m flake8 (See also
    GitLab!388)
  * Fix early exit when --exit-zero and --diff are provided and the diff is
    empty (See also GitLab!391)
  * Consistently split lines when \f is present when reading from stdin
    (See also GitLab!406, GitLab#270)
  Deprecations
  * python setup.py flake8 (setuptools integration) is now deprecated and will
    be removed in a future version (See also GitLab!330, GitLab#544)
  * type='string' (optparse) types are deprecated, use type=callable (argparse)
    instead. Support for type='string' will be removed in a future version (See
    also GitLab!341)
  * %default in plugin option help text is deprecated, use %(default)s instead.
    Support for %default will be removed in a future version (See also
    GitLab!341)
  * optparse-style action='callback' setting for options is deprecated,
    use argparse action classes instead. This will be removed in a future
    version (See also GitLab!341)
- remove remove_mock_dependency.patch 
- remove pyflakes-version.patch

OBS-URL: https://build.opensuse.org/request/show/805568
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flake8?expand=0&rev=60
This commit is contained in:
Tomáš Chvátal 2020-05-15 08:12:26 +00:00 committed by Git OBS Bridge
parent 30bdf95726
commit 49f4ac8ead
6 changed files with 90 additions and 383 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:45681a117ecc81e870cbf1262835ae4af5e7a8b08e40b944a8a6e6b895914cfb
size 150123

3
flake8-3.8.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ea6623797bf9a52f4c9577d780da0bb17d65f870213f7b5bcc9fca82540c31d5
size 157166

View File

@ -1,31 +0,0 @@
--- a/setup.cfg
+++ b/setup.cfg
@@ -9,7 +9,7 @@ requires-dist =
configparser; python_version<"3.2"
functools32; python_version<"3.2"
entrypoints >= 0.3.0, < 0.4.0
- pyflakes >= 2.1.0, < 2.2.0
+ pyflakes >= 2.1.0, <= 2.2.0
pycodestyle >= 2.5.0, < 2.6.0
mccabe >= 0.6.0, < 0.7.0
--- a/setup.py
+++ b/setup.py
@@ -26,7 +26,7 @@ requires = [
# And in which releases we will update those ranges here:
# http://flake8.pycqa.org/en/latest/internal/releases.html#releasing-flake8
"entrypoints >= 0.3.0, < 0.4.0",
- "pyflakes >= 2.1.0, < 2.2.0",
+ "pyflakes >= 2.1.0, <= 2.2.0",
"pycodestyle >= 2.5.0, < 2.6.0",
"mccabe >= 0.6.0, < 0.7.0",
]
--- a/src/flake8.egg-info/requires.txt
+++ b/src/flake8.egg-info/requires.txt
@@ -1,5 +1,5 @@
entrypoints<0.4.0,>=0.3.0
-pyflakes<2.2.0,>=2.1.0
+pyflakes<=2.2.0,>=2.1.0
pycodestyle<2.6.0,>=2.5.0
mccabe<0.7.0,>=0.6.0

View File

@ -1,3 +1,77 @@
-------------------------------------------------------------------
Thu May 14 08:48:44 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
- Update to 3.8.1
* Fix --output-file (regression in 3.8.0) (See also GitLab!427,
GitLab#637)
- Update notes for 3.8.0
* Fix logical checks which report positions out of bounds (See also
GitLab!422, GitLab#635)
* Fix --exclude=.* accidentally matching . and .. (See also GitLab!424,
GitLab#632)
* Add deprecation message for vcs hooks (See also GitLab!420, GitLab#568)
- Update notes for 3.8.0a2
* Fix type="str" optparse options (See also GitLab!419)
- Update notes for 3.8.0a1
New Dependency Information
* Remove dependency on entrypoints and add dependency on importlib-metadata
(only for python<3.8) (See also GitLab!388, GitLab#569)
* Pyflakes has been updated to >= 2.2.0, < 2.3.0 (See also GitLab!417)
* pycodestyle has been updated to >= 2.6.0a1, < 2.7.0 (See also GitLab!418)
Features
* Add --extend-exclude option to add to --exclude without overwriting (See
also GitLab!315, GitLab#535)
* Move argument parsing from optparse to argparse (See also GitLab!341
* Group plugin options in --help (See also GitLab!342, GitLab#565)
* Remove parsing of verbose from configuration files as it was not
consistently applied (See also GitLab!360, GitLab#439)
* Remove parsing of output_file from configuration files as it was not
consistently applied (See also GitLab!361)
* Resolve configuration files relative to cwd instead of common prefix of
passed filenames. You may need to change flake8 subproject to cd subproject
&& flake8 . (See also GitLab!363)
* Officially support python3.8 (See also GitLab!377)
* --disable-noqa now also disables # flake8: noqa (See also GitLab!380,
GitLab#590)
* Ensure that a missing file produces a E902 error (See also GitLab!404,
GitLab#600)
* # noqa comments now apply to all of the lines in an explicit \ continuation
or in a line continued by a multi-line string (See also GitLab!413, GitLab#375)
Bugs Fixed
* Fix --exclude=./t.py to only match t.py at the top level (See also
GitLab!311, GitLab#382)
* Fix --show-source when a file is indented with tabs (See also GitLab!339,
GitLab#563)
* Fix crash when --max-line-length is given a non-integer (See also
GitLab!341, GitLab#541)
* Prevent flip-flopping of indent_char causing extra E101 errors (See also
GitLab!357, pycodestyle#886)
* Only enable multiprocessing when the method is fork fixing issues on macos
with python3.8+ (See also GitLab!366, GitLab#587) (note: this fix also
landed in 3.7.9)
* noqa is now only handled by flake8 fixing specific-noqa. Plugins requesting
this parameter will always receive False (See also GitLab!331, GitLab#552)
* Fix duplicate loading of plugins when invoked via python -m flake8 (See also
GitLab!388)
* Fix early exit when --exit-zero and --diff are provided and the diff is
empty (See also GitLab!391)
* Consistently split lines when \f is present when reading from stdin
(See also GitLab!406, GitLab#270)
Deprecations
* python setup.py flake8 (setuptools integration) is now deprecated and will
be removed in a future version (See also GitLab!330, GitLab#544)
* type='string' (optparse) types are deprecated, use type=callable (argparse)
instead. Support for type='string' will be removed in a future version (See
also GitLab!341)
* %default in plugin option help text is deprecated, use %(default)s instead.
Support for %default will be removed in a future version (See also
GitLab!341)
* optparse-style action='callback' setting for options is deprecated,
use argparse action classes instead. This will be removed in a future
version (See also GitLab!341)
- remove remove_mock_dependency.patch
- remove pyflakes-version.patch
-------------------------------------------------------------------
Mon May 4 20:02:18 UTC 2020 - Matej Cepl <mcepl@suse.com>

View File

@ -19,32 +19,35 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without python2
Name: python-flake8
Version: 3.7.9
Version: 3.8.1
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
Patch0: remove_mock_dependency.patch
Patch1: fix-mock-patch-with-python3.4.patch
Patch2: pyflakes-version.patch
Patch0: fix-mock-patch-with-python3.4.patch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-entrypoints >= 0.3
Requires: python-mccabe >= 0.6.0
Requires: python-pycodestyle >= 2.5.0
Requires: python-pycodestyle >= 2.6.0~a1
Requires: python-pyflakes >= 2.1.0
Requires: python-typing
%if %{python3_version_nodots} < 38
Requires: python-importlib-metadata
%endif
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module entrypoints >= 0.3}
%if %{python3_version_nodots} < 38
BuildRequires: %{python_module importlib-metadata}
%endif
BuildRequires: %{python_module mccabe >= 0.6.0}
BuildRequires: %{python_module pycodestyle >= 2.5.0}
BuildRequires: %{python_module pyflakes >= 2.1.0}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module pycodestyle >= 2.6.0~a1}
BuildRequires: %{python_module pyflakes >= 2.2.0}
BuildRequires: %{python_module pytest-runner}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module typing}
@ -101,8 +104,7 @@ This package provides documentation for %{name}.
%python_uninstall_alternative flake8
%check
# gl#pycqa/flake8#633
%pytest -k 'not test_all_pyflakes_messages_have_flake8_codes_assigned' tests
%pytest tests
%files %{python_files}
%license LICENSE

View File

@ -1,338 +0,0 @@
Index: flake8-3.7.8/tests/integration/test_checker.py
===================================================================
--- flake8-3.7.8.orig/tests/integration/test_checker.py
+++ flake8-3.7.8/tests/integration/test_checker.py
@@ -1,5 +1,8 @@
"""Integration tests for the checker submodule."""
-import mock
+try:
+ import unittest.mock as mock
+except ImportError:
+ import mock
import pytest
from flake8 import checker
Index: flake8-3.7.8/tests/unit/test_application.py
===================================================================
--- flake8-3.7.8.orig/tests/unit/test_application.py
+++ flake8-3.7.8/tests/unit/test_application.py
@@ -2,7 +2,10 @@
import optparse
import sys
-import mock
+try:
+ import unittest.mock as mock
+except ImportError:
+ import mock
import pytest
from flake8.main import application as app
Index: flake8-3.7.8/tests/unit/test_base_formatter.py
===================================================================
--- flake8-3.7.8.orig/tests/unit/test_base_formatter.py
+++ flake8-3.7.8/tests/unit/test_base_formatter.py
@@ -1,7 +1,10 @@
"""Tests for the BaseFormatter object."""
import optparse
-import mock
+try:
+ import unittest.mock as mock
+except ImportError:
+ import mock
import pytest
from flake8 import style_guide
Index: flake8-3.7.8/tests/unit/test_checker_manager.py
===================================================================
--- flake8-3.7.8.orig/tests/unit/test_checker_manager.py
+++ flake8-3.7.8/tests/unit/test_checker_manager.py
@@ -1,7 +1,10 @@
"""Tests for the Manager object for FileCheckers."""
import errno
-import mock
+try:
+ import unittest.mock as mock
+except ImportError:
+ import mock
import pytest
from flake8 import checker
Index: flake8-3.7.8/tests/unit/test_config_file_finder.py
===================================================================
--- flake8-3.7.8.orig/tests/unit/test_config_file_finder.py
+++ flake8-3.7.8/tests/unit/test_config_file_finder.py
@@ -4,7 +4,10 @@ import configparser
import os
import sys
-import mock
+try:
+ import unittest.mock as mock
+except ImportError:
+ import mock
import pytest
from flake8.options import config
Index: flake8-3.7.8/tests/unit/test_debug.py
===================================================================
--- flake8-3.7.8.orig/tests/unit/test_debug.py
+++ flake8-3.7.8/tests/unit/test_debug.py
@@ -1,6 +1,9 @@
"""Tests for our debugging module."""
import entrypoints
-import mock
+try:
+ import unittest.mock as mock
+except ImportError:
+ import mock
import pytest
from flake8.main import debug
Index: flake8-3.7.8/tests/unit/test_file_checker.py
===================================================================
--- flake8-3.7.8.orig/tests/unit/test_file_checker.py
+++ flake8-3.7.8/tests/unit/test_file_checker.py
@@ -1,5 +1,8 @@
"""Unit tests for the FileChecker class."""
-import mock
+try:
+ import unittest.mock as mock
+except ImportError:
+ import mock
import pytest
import flake8
Index: flake8-3.7.8/tests/unit/test_file_processor.py
===================================================================
--- flake8-3.7.8.orig/tests/unit/test_file_processor.py
+++ flake8-3.7.8/tests/unit/test_file_processor.py
@@ -2,7 +2,10 @@
import ast
import tokenize
-import mock
+try:
+ import unittest.mock as mock
+except ImportError:
+ import mock
import pytest
from flake8 import processor
Index: flake8-3.7.8/tests/unit/test_get_local_plugins.py
===================================================================
--- flake8-3.7.8.orig/tests/unit/test_get_local_plugins.py
+++ flake8-3.7.8/tests/unit/test_get_local_plugins.py
@@ -1,5 +1,8 @@
"""Tests for get_local_plugins."""
-import mock
+try:
+ import unittest.mock as mock
+except ImportError:
+ import mock
from flake8.options import config
Index: flake8-3.7.8/tests/unit/test_git.py
===================================================================
--- flake8-3.7.8.orig/tests/unit/test_git.py
+++ flake8-3.7.8/tests/unit/test_git.py
@@ -1,5 +1,8 @@
"""Tests around functionality in the git integration."""
-import mock
+try:
+ import unittest.mock as mock
+except ImportError:
+ import mock
import pytest
from flake8.main import git
Index: flake8-3.7.8/tests/unit/test_legacy_api.py
===================================================================
--- flake8-3.7.8.orig/tests/unit/test_legacy_api.py
+++ flake8-3.7.8/tests/unit/test_legacy_api.py
@@ -1,5 +1,8 @@
"""Tests for Flake8's legacy API."""
-import mock
+try:
+ import unittest.mock as mock
+except ImportError:
+ import mock
import pytest
from flake8.api import legacy as api
Index: flake8-3.7.8/tests/unit/test_merged_config_parser.py
===================================================================
--- flake8-3.7.8.orig/tests/unit/test_merged_config_parser.py
+++ flake8-3.7.8/tests/unit/test_merged_config_parser.py
@@ -1,7 +1,10 @@
"""Unit tests for flake8.options.config.MergedConfigParser."""
import os
-import mock
+try:
+ import unittest.mock as mock
+except ImportError:
+ import mock
import pytest
from flake8.options import config
Index: flake8-3.7.8/tests/unit/test_option.py
===================================================================
--- flake8-3.7.8.orig/tests/unit/test_option.py
+++ flake8-3.7.8/tests/unit/test_option.py
@@ -1,5 +1,8 @@
"""Unit tests for flake8.options.manager.Option."""
-import mock
+try:
+ import unittest.mock as mock
+except ImportError:
+ import mock
import pytest
from flake8.options import manager
Index: flake8-3.7.8/tests/unit/test_option_manager.py
===================================================================
--- flake8-3.7.8.orig/tests/unit/test_option_manager.py
+++ flake8-3.7.8/tests/unit/test_option_manager.py
@@ -2,7 +2,10 @@
import optparse
import os
-import mock
+try:
+ import unittest.mock as mock
+except ImportError:
+ import mock
import pytest
from flake8 import utils
Index: flake8-3.7.8/tests/unit/test_plugin.py
===================================================================
--- flake8-3.7.8.orig/tests/unit/test_plugin.py
+++ flake8-3.7.8/tests/unit/test_plugin.py
@@ -1,7 +1,10 @@
"""Tests for flake8.plugins.manager.Plugin."""
import optparse
-import mock
+try:
+ import unittest.mock as mock
+except ImportError:
+ import mock
import pytest
from flake8 import exceptions
Index: flake8-3.7.8/tests/unit/test_plugin_manager.py
===================================================================
--- flake8-3.7.8.orig/tests/unit/test_plugin_manager.py
+++ flake8-3.7.8/tests/unit/test_plugin_manager.py
@@ -1,5 +1,8 @@
"""Tests for flake8.plugins.manager.PluginManager."""
-import mock
+try:
+ import unittest.mock as mock
+except ImportError:
+ import mock
from flake8.plugins import manager
Index: flake8-3.7.8/tests/unit/test_plugin_type_manager.py
===================================================================
--- flake8-3.7.8.orig/tests/unit/test_plugin_type_manager.py
+++ flake8-3.7.8/tests/unit/test_plugin_type_manager.py
@@ -1,5 +1,8 @@
"""Tests for flake8.plugins.manager.PluginTypeManager."""
-import mock
+try:
+ import unittest.mock as mock
+except ImportError:
+ import mock
import pytest
from flake8 import exceptions
Index: flake8-3.7.8/tests/unit/test_style_guide.py
===================================================================
--- flake8-3.7.8.orig/tests/unit/test_style_guide.py
+++ flake8-3.7.8/tests/unit/test_style_guide.py
@@ -1,7 +1,10 @@
"""Tests for the flake8.style_guide.StyleGuide class."""
import optparse
-import mock
+try:
+ import unittest.mock as mock
+except ImportError:
+ import mock
import pytest
from flake8 import statistics
Index: flake8-3.7.8/tests/unit/test_utils.py
===================================================================
--- flake8-3.7.8.orig/tests/unit/test_utils.py
+++ flake8-3.7.8/tests/unit/test_utils.py
@@ -1,7 +1,10 @@
"""Tests for flake8's utils module."""
import os
-import mock
+try:
+ import unittest.mock as mock
+except ImportError:
+ import mock
import pytest
from flake8 import exceptions
Index: flake8-3.7.8/tests/unit/test_violation.py
===================================================================
--- flake8-3.7.8.orig/tests/unit/test_violation.py
+++ flake8-3.7.8/tests/unit/test_violation.py
@@ -1,5 +1,8 @@
"""Tests for the flake8.style_guide.Violation class."""
-import mock
+try:
+ import unittest.mock as mock
+except ImportError:
+ import mock
import pytest
from flake8 import style_guide
Index: flake8-3.7.8/setup.py
===================================================================
--- flake8-3.7.8.orig/setup.py
+++ flake8-3.7.8/setup.py
@@ -11,6 +11,12 @@ sys.path.insert(0, os.path.join(os.path.
import flake8
+PY2 = sys.version_info[0] == 2
+tests_require = ['pytest']
+
+if PY2:
+ tests_require.append('mock >= 2.0.0')
+
# NOTE(sigmavirus24): When updating these requirements, update them in
# setup.cfg as well.
@@ -147,4 +153,5 @@ setuptools.setup(
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Quality Assurance",
],
+ tests_require=tests_require,
)
Index: flake8-3.7.8/tests/integration/test_main.py
===================================================================
--- flake8-3.7.8.orig/tests/integration/test_main.py
+++ flake8-3.7.8/tests/integration/test_main.py
@@ -1,5 +1,8 @@
"""Integration tests for the main entrypoint of flake8."""
-import mock
+try:
+ import unittest.mock as mock
+except ImportError:
+ import mock
from flake8 import utils
from flake8.main import application