Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-pytest-flake8 for
openSUSE:Factory checked in at 2022-09-08 14:23:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-flake8 (Old)
and /work/SRC/openSUSE:Factory/.python-pytest-flake8.new.2083 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-flake8"
Thu Sep 8 14:23:30 2022 rev:9 rq:1001818 version:1.1.1
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-pytest-flake8/python-pytest-flake8.changes
2021-08-18 08:57:05.154892081 +0200
+++
/work/SRC/openSUSE:Factory/.python-pytest-flake8.new.2083/python-pytest-flake8.changes
2022-09-08 14:24:01.162719510 +0200
@@ -1,0 +2,13 @@
+Thu Sep 8 04:38:54 UTC 2022 - Steve Kowalik <[email protected]>
+
+- Update to 1.1.1:
+ * Update classifiers to indicate older versions are no longer supported
+ * No longer use deprecated pytest constructs
+ * Bump requirements to more accurately indicate what is currently needed
+ * Drop Python 2 support and dependency on py; from @erikkemperman
+ * Drop support for Python 3.5, 3.6
+ * Add a `flake8-max-doc-length` option; from @rodrigomologni
+- Add patch support-flake8-5.patch:
+ * Support flake8 >= 5.0, adjust {Build,}Requires.
+
+-------------------------------------------------------------------
Old:
----
pytest-flake8-1.0.7.tar.gz
New:
----
pytest-flake8-1.1.1.tar.gz
support-flake8-5.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pytest-flake8.spec ++++++
--- /var/tmp/diff_new_pack.XyM3vu/_old 2022-09-08 14:24:01.642720618 +0200
+++ /var/tmp/diff_new_pack.XyM3vu/_new 2022-09-08 14:24:01.646720627 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-pytest-flake8
#
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,19 +18,20 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pytest-flake8
-Version: 1.0.7
+Version: 1.1.1
Release: 0
Summary: Plugin for pytest to check FLAKE8 requirements
License: BSD-2-Clause
-Group: Development/Languages/Python
URL: https://github.com/tholo/pytest-flake8
Source:
https://files.pythonhosted.org/packages/source/p/pytest-flake8/pytest-flake8-%{version}.tar.gz
-BuildRequires: %{python_module flake8 >= 3.5}
+# PATCH-FIX-UPSTREAM Support flake8 >= 5.0 gh#tholo/pytest-flake8#88
+Patch0: support-flake8-5.patch
+BuildRequires: %{python_module flake8 >= 5.0}
BuildRequires: %{python_module pytest >= 3.5}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
-Requires: python-flake8 >= 3.5
+Requires: python-flake8 >= 5.0
Requires: python-pytest >= 3.5
BuildArch: noarch
%python_subpackages
@@ -39,7 +40,7 @@
Plugin for py.test for efficiently checking PEP8 compliance.
%prep
-%setup -q -n pytest-flake8-%{version}
+%autosetup -p1 -n pytest-flake8-%{version}
%build
%python_build
++++++ pytest-flake8-1.0.7.tar.gz -> pytest-flake8-1.1.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-flake8-1.0.7/.gitignore
new/pytest-flake8-1.1.1/.gitignore
--- old/pytest-flake8-1.0.7/.gitignore 2018-03-19 20:01:38.000000000 +0100
+++ new/pytest-flake8-1.1.1/.gitignore 1970-01-01 01:00:00.000000000 +0100
@@ -1,9 +0,0 @@
-*.egg-info/
-.pytest_cache/
-*.pyc
-*.sublime-workspace
-.cache/
-.tox/
-/build/
-/dist/
-__pycache__/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-flake8-1.0.7/.travis.yml
new/pytest-flake8-1.1.1/.travis.yml
--- old/pytest-flake8-1.0.7/.travis.yml 2020-04-23 20:51:54.000000000 +0200
+++ new/pytest-flake8-1.1.1/.travis.yml 1970-01-01 01:00:00.000000000 +0100
@@ -1,29 +0,0 @@
-dist: xenial
-language: python
-cache: pip
-matrix:
- include:
- - python: 2.7
- env: TOXENV=py27
- - python: 3.4
- env: TOXENV=py34
- - python: 3.5
- env: TOXENV=py35
- - python: 3.6
- env: TOXENV=py36
- - python: 3.6
- env: TOXENV=py36-pytesttrunk
- - python: 3.6
- env: TOXENV=py36-xdist
- - python: 3.7
- env: TOXENV=py37
- - python: 3.8
- env: TOXENV=py38
- - python: pypy2.7-6.0
- env: TOXENV=pypy
- - python: pypy3.5-6.0
- env: TOXENV=pypy3
-install:
- - pip install tox
-script:
- - tox -e $TOXENV
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-flake8-1.0.7/CHANGELOG
new/pytest-flake8-1.1.1/CHANGELOG
--- old/pytest-flake8-1.0.7/CHANGELOG 2020-12-16 23:32:44.000000000 +0100
+++ new/pytest-flake8-1.1.1/CHANGELOG 2022-03-18 22:33:31.000000000 +0100
@@ -1,3 +1,19 @@
+1.1.1
+-----
+
+- Update classifiers to indicate older versions are no longer supported
+- No longer use deprecated pytest constructs
+- Bump requirements to more accurately indicate what is currently needed
+
+1.1.0
+-----
+
+- Drop Python 2 support and dependency on py; from @erikkemperman
+- Drop support for Python 3.5, 3.6
+- Stop testing on Python versions prior to 3.7
+- Add a `flake8-max-doc-length` option; from @rodrigomologni
+- Fix some minor typos; from @kianmeng
+
1.0.7
-----
@@ -33,7 +49,7 @@
-----
- Test on Python 3.7
-- Escape a regex tring with r""
+- Escape a regex string with r""
1.0.1
-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-flake8-1.0.7/PKG-INFO
new/pytest-flake8-1.1.1/PKG-INFO
--- old/pytest-flake8-1.0.7/PKG-INFO 2020-12-16 23:38:52.321679600 +0100
+++ new/pytest-flake8-1.1.1/PKG-INFO 2022-03-18 23:13:06.720005800 +0100
@@ -1,165 +1,169 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
Name: pytest-flake8
-Version: 1.0.7
+Version: 1.1.1
Summary: pytest plugin to check FLAKE8 requirements
Home-page: https://github.com/tholo/pytest-flake8
Author: Thorsten Lockert
Author-email: [email protected]
License: BSD License
-Description: pytest plugin for efficiently checking PEP8 compliance
- ======================================================
-
- .. image:: https://img.shields.io/pypi/v/pytest-flake8.svg
- :target: https://pypi.python.org/pypi/pytest-flake8
-
- .. image:: https://img.shields.io/pypi/pyversions/pytest-flake8.svg
- :target: https://pypi.python.org/pypi/pytest-flake8
-
- .. image:: https://img.shields.io/pypi/implementation/pytest-flake8.svg
- :target: https://pypi.python.org/pypi/pytest-flake8
-
- .. image:: https://img.shields.io/pypi/status/pytest-flake8.svg
- :target: https://pypi.python.org/pypi/pytest-flake8
-
- .. image:: https://travis-ci.org/tholo/pytest-flake8.svg?branch=master
- :target: https://travis-ci.org/tholo/pytest-flake8
-
- .. image:: https://img.shields.io/github/issues/tholo/pytest-flake8.svg
- :target: https://github.com/tholo/pytest-flake8/issues
-
- .. image::
https://img.shields.io/github/issues-pr/tholo/pytest-flake8.svg
- :target: https://github.com/tholo/pytest-flake8/pulls
-
- Usage
- -----
-
- Install by running the command::
-
- pip install pytest-flake8
-
- After installing it, when you run tests with the option::
-
- pytest --flake8
-
- every file ending in ``.py`` will be discovered and checked with
- flake8.
-
- .. note::
-
- If optional flake8 plugins are installed, those will
- be used automatically. No provisions have been made for
- configuring these via `pytest`_.
-
- .. warning::
-
- Running flake8 tests on your project is likely to cause a number
- of issues. The plugin allows one to configure on a per-project and
- per-file basis which errors or warnings to ignore, see
- flake8-ignore_.
-
- .. _flake8-ignore:
-
- Configuring FLAKE8 options per project and file
- -----------------------------------------------
-
- Maximum line length can be configured for the whole project
- by adding a ``flake8-max-line-length`` option to your ``setup.cfg``
- or ``tox.ini`` file like this::
-
- # content of setup.cfg
- [tool:pytest]
- flake8-max-line-length = 99
-
- Note that the default will be what naturally comes with `flake8`_
- (which it turn gets its default from `pycodestyle`_).
-
- You may configure flake8-checking options for your project
- by adding an ``flake8-ignore`` entry to your ``setup.cfg``
- or ``tox.ini`` file like this::
-
- # content of setup.cfg
- [tool:pytest]
- flake8-ignore = E201 E231
-
- This would globally prevent complaints about two whitespace issues.
- Rerunning with the above example will now look better::
-
- $ pytest -q --flake8
- collecting ... collected 1 items
- .
- 1 passed in 0.01 seconds
-
- If you have some files where you want to specifically ignore
- some errors or warnings you can start a flake8-ignore line with
- a glob-pattern and a space-separated list of codes::
-
- # content of setup.cfg
- [tool:pytest]
- flake8-ignore =
- *.py E201
- doc/conf.py ALL
-
- So if you have a conf.py like this::
-
- # content of doc/conf.py
-
- func ( [1,2,3]) #this line lots PEP8 errors :)
-
- then running again with the previous example will show a single
- failure and it will ignore doc/conf.py alltogether::
-
- $ pytest --flake8 -v # verbose shows what is ignored
- ======================================= test session starts
========================================
- platform darwin -- Python 2.7.6 -- py-1.4.26 -- pytest-2.7.0 --
/Users/tholo/Source/pytest/bin/python
- cachedir: /Users/tholo/Source/pytest/src/verify/.cache
- rootdir: /Users/tholo/Source/angular/src/verify, inifile: setup.cfg
- plugins: flake8, cache
- collected 1 items
-
- myfile.py PASSED
-
- ========================================= 1 passed in 0.00 seconds
=========================================
-
- Note that doc/conf.py was not considered or imported.
-
- FAQs
- -----
-
- All the flake8 tests are skipping!
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
- This is by design. Clean flake8 results are cached and, unless the
file is modified, not tested again.
-
- You can run with ``pytest --cache-clear --flake8`` to override this.
-
- Notes
- -----
-
- The repository of this plugin is at
https://github.com/tholo/pytest-flake8
-
- For more info on `pytest`_ see http://pytest.org
-
- The code is partially based on Ronny Pfannschmidt's
`pytest-codecheckers`_ plugin.
-
- .. _`pytest`: http://pytest.org
- .. _`flake8`: https://pypi.python.org/pypi/flake8
- .. _`pycodestyle`: https://pypi.python.org/pypi/pycodestyle
- .. _`pytest-codecheckers`:
https://pypi.python.org/pypi/pytest-codecheckers
-
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.4
-Classifier: Programming Language :: Python :: 3.5
-Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
+Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Testing
+License-File: LICENSE
+
+pytest plugin for efficiently checking PEP8 compliance
+======================================================
+
+.. image:: https://img.shields.io/pypi/v/pytest-flake8.svg
+ :target: https://pypi.python.org/pypi/pytest-flake8
+
+.. image:: https://img.shields.io/pypi/pyversions/pytest-flake8.svg
+ :target: https://pypi.python.org/pypi/pytest-flake8
+
+.. image:: https://img.shields.io/pypi/implementation/pytest-flake8.svg
+ :target: https://pypi.python.org/pypi/pytest-flake8
+
+.. image:: https://img.shields.io/pypi/status/pytest-flake8.svg
+ :target: https://pypi.python.org/pypi/pytest-flake8
+
+.. image:: https://travis-ci.org/tholo/pytest-flake8.svg?branch=master
+ :target: https://travis-ci.org/tholo/pytest-flake8
+
+.. image:: https://img.shields.io/github/issues/tholo/pytest-flake8.svg
+ :target: https://github.com/tholo/pytest-flake8/issues
+
+.. image:: https://img.shields.io/github/issues-pr/tholo/pytest-flake8.svg
+ :target: https://github.com/tholo/pytest-flake8/pulls
+
+Usage
+-----
+
+Install by running the command::
+
+ pip install pytest-flake8
+
+After installing it, when you run tests with the option::
+
+ pytest --flake8
+
+every file ending in ``.py`` will be discovered and checked with
+flake8.
+
+.. note::
+
+ If optional flake8 plugins are installed, those will
+ be used automatically. No provisions have been made for
+ configuring these via `pytest`_.
+
+.. warning::
+
+ Running flake8 tests on your project is likely to cause a number
+ of issues. The plugin allows one to configure on a per-project and
+ per-file basis which errors or warnings to ignore, see
+ flake8-ignore_.
+
+.. _flake8-ignore:
+
+Configuring FLAKE8 options per project and file
+-----------------------------------------------
+
+Maximum line length and maximum doc line length can be configured for the
+whole project by adding a ``flake8-max-line-length`` option and
+``flake8-max-doc-length`` to your ``setup.cfg`` or ``tox.ini`` file like
+this::
+
+ # content of setup.cfg
+ [tool:pytest]
+ flake8-max-line-length = 99
+ flake8-max-doc-length = 74
+
+Note that the default will be what naturally comes with `flake8`_
+(which it turn gets its default from `pycodestyle`_).
+
+You may configure flake8-checking options for your project
+by adding an ``flake8-ignore`` entry to your ``setup.cfg``
+or ``tox.ini`` file like this::
+
+ # content of setup.cfg
+ [tool:pytest]
+ flake8-ignore = E201 E231
+
+This would globally prevent complaints about two whitespace issues.
+Rerunning with the above example will now look better::
+
+ $ pytest -q --flake8
+ collecting ... collected 1 items
+ .
+ 1 passed in 0.01 seconds
+
+If you have some files where you want to specifically ignore
+some errors or warnings you can start a flake8-ignore line with
+a glob-pattern and a space-separated list of codes::
+
+ # content of setup.cfg
+ [tool:pytest]
+ flake8-ignore =
+ *.py E201
+ doc/conf.py ALL
+
+So if you have a conf.py like this::
+
+ # content of doc/conf.py
+
+ func ( [1,2,3]) #this line lots PEP8 errors :)
+
+then running again with the previous example will show a single
+failure and it will ignore doc/conf.py altogether::
+
+ $ pytest --flake8 -v # verbose shows what is ignored
+ ======================================= test session starts
========================================
+ platform darwin -- Python 2.7.6 -- py-1.4.26 -- pytest-2.7.0 --
/Users/tholo/Source/pytest/bin/python
+ cachedir: /Users/tholo/Source/pytest/src/verify/.cache
+ rootdir: /Users/tholo/Source/angular/src/verify, inifile: setup.cfg
+ plugins: flake8, cache
+ collected 1 items
+
+ myfile.py PASSED
+
+ ========================================= 1 passed in 0.00 seconds
=========================================
+
+Note that doc/conf.py was not considered or imported.
+
+FAQs
+-----
+
+All the flake8 tests are skipping!
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+This is by design. Clean flake8 results are cached and, unless the file is
modified, not tested again.
+
+You can run with ``pytest --cache-clear --flake8`` to override this.
+
+Notes
+-----
+
+The repository of this plugin is at https://github.com/tholo/pytest-flake8
+
+For more info on `pytest`_ see http://pytest.org
+
+The code is partially based on Ronny Pfannschmidt's `pytest-codecheckers`_
plugin.
+
+.. _`pytest`: http://pytest.org
+.. _`flake8`: https://pypi.python.org/pypi/flake8
+.. _`pycodestyle`: https://pypi.python.org/pypi/pycodestyle
+.. _`pytest-codecheckers`: https://pypi.python.org/pypi/pytest-codecheckers
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-flake8-1.0.7/README.rst
new/pytest-flake8-1.1.1/README.rst
--- old/pytest-flake8-1.0.7/README.rst 2020-12-16 23:31:14.000000000 +0100
+++ new/pytest-flake8-1.1.1/README.rst 2022-03-05 07:01:31.000000000 +0100
@@ -54,13 +54,15 @@
Configuring FLAKE8 options per project and file
-----------------------------------------------
-Maximum line length can be configured for the whole project
-by adding a ``flake8-max-line-length`` option to your ``setup.cfg``
-or ``tox.ini`` file like this::
+Maximum line length and maximum doc line length can be configured for the
+whole project by adding a ``flake8-max-line-length`` option and
+``flake8-max-doc-length`` to your ``setup.cfg`` or ``tox.ini`` file like
+this::
# content of setup.cfg
[tool:pytest]
flake8-max-line-length = 99
+ flake8-max-doc-length = 74
Note that the default will be what naturally comes with `flake8`_
(which it turn gets its default from `pycodestyle`_).
@@ -98,7 +100,7 @@
func ( [1,2,3]) #this line lots PEP8 errors :)
then running again with the previous example will show a single
-failure and it will ignore doc/conf.py alltogether::
+failure and it will ignore doc/conf.py altogether::
$ pytest --flake8 -v # verbose shows what is ignored
======================================= test session starts
========================================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-flake8-1.0.7/pytest-flake8.sublime-project
new/pytest-flake8-1.1.1/pytest-flake8.sublime-project
--- old/pytest-flake8-1.0.7/pytest-flake8.sublime-project 2015-04-01
01:31:39.000000000 +0200
+++ new/pytest-flake8-1.1.1/pytest-flake8.sublime-project 1970-01-01
01:00:00.000000000 +0100
@@ -1,17 +0,0 @@
-{
- "folders":
- [
- {
- "folder_exclude_patterns":
- [
- "__pycache__",
- "*.egg-info",
- ".cache",
- ".tox",
- "build",
- "dist"
- ],
- "path": "."
- }
- ]
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-flake8-1.0.7/pytest_flake8.egg-info/PKG-INFO
new/pytest-flake8-1.1.1/pytest_flake8.egg-info/PKG-INFO
--- old/pytest-flake8-1.0.7/pytest_flake8.egg-info/PKG-INFO 2020-12-16
23:38:52.000000000 +0100
+++ new/pytest-flake8-1.1.1/pytest_flake8.egg-info/PKG-INFO 2022-03-18
23:13:06.000000000 +0100
@@ -1,165 +1,169 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
Name: pytest-flake8
-Version: 1.0.7
+Version: 1.1.1
Summary: pytest plugin to check FLAKE8 requirements
Home-page: https://github.com/tholo/pytest-flake8
Author: Thorsten Lockert
Author-email: [email protected]
License: BSD License
-Description: pytest plugin for efficiently checking PEP8 compliance
- ======================================================
-
- .. image:: https://img.shields.io/pypi/v/pytest-flake8.svg
- :target: https://pypi.python.org/pypi/pytest-flake8
-
- .. image:: https://img.shields.io/pypi/pyversions/pytest-flake8.svg
- :target: https://pypi.python.org/pypi/pytest-flake8
-
- .. image:: https://img.shields.io/pypi/implementation/pytest-flake8.svg
- :target: https://pypi.python.org/pypi/pytest-flake8
-
- .. image:: https://img.shields.io/pypi/status/pytest-flake8.svg
- :target: https://pypi.python.org/pypi/pytest-flake8
-
- .. image:: https://travis-ci.org/tholo/pytest-flake8.svg?branch=master
- :target: https://travis-ci.org/tholo/pytest-flake8
-
- .. image:: https://img.shields.io/github/issues/tholo/pytest-flake8.svg
- :target: https://github.com/tholo/pytest-flake8/issues
-
- .. image::
https://img.shields.io/github/issues-pr/tholo/pytest-flake8.svg
- :target: https://github.com/tholo/pytest-flake8/pulls
-
- Usage
- -----
-
- Install by running the command::
-
- pip install pytest-flake8
-
- After installing it, when you run tests with the option::
-
- pytest --flake8
-
- every file ending in ``.py`` will be discovered and checked with
- flake8.
-
- .. note::
-
- If optional flake8 plugins are installed, those will
- be used automatically. No provisions have been made for
- configuring these via `pytest`_.
-
- .. warning::
-
- Running flake8 tests on your project is likely to cause a number
- of issues. The plugin allows one to configure on a per-project and
- per-file basis which errors or warnings to ignore, see
- flake8-ignore_.
-
- .. _flake8-ignore:
-
- Configuring FLAKE8 options per project and file
- -----------------------------------------------
-
- Maximum line length can be configured for the whole project
- by adding a ``flake8-max-line-length`` option to your ``setup.cfg``
- or ``tox.ini`` file like this::
-
- # content of setup.cfg
- [tool:pytest]
- flake8-max-line-length = 99
-
- Note that the default will be what naturally comes with `flake8`_
- (which it turn gets its default from `pycodestyle`_).
-
- You may configure flake8-checking options for your project
- by adding an ``flake8-ignore`` entry to your ``setup.cfg``
- or ``tox.ini`` file like this::
-
- # content of setup.cfg
- [tool:pytest]
- flake8-ignore = E201 E231
-
- This would globally prevent complaints about two whitespace issues.
- Rerunning with the above example will now look better::
-
- $ pytest -q --flake8
- collecting ... collected 1 items
- .
- 1 passed in 0.01 seconds
-
- If you have some files where you want to specifically ignore
- some errors or warnings you can start a flake8-ignore line with
- a glob-pattern and a space-separated list of codes::
-
- # content of setup.cfg
- [tool:pytest]
- flake8-ignore =
- *.py E201
- doc/conf.py ALL
-
- So if you have a conf.py like this::
-
- # content of doc/conf.py
-
- func ( [1,2,3]) #this line lots PEP8 errors :)
-
- then running again with the previous example will show a single
- failure and it will ignore doc/conf.py alltogether::
-
- $ pytest --flake8 -v # verbose shows what is ignored
- ======================================= test session starts
========================================
- platform darwin -- Python 2.7.6 -- py-1.4.26 -- pytest-2.7.0 --
/Users/tholo/Source/pytest/bin/python
- cachedir: /Users/tholo/Source/pytest/src/verify/.cache
- rootdir: /Users/tholo/Source/angular/src/verify, inifile: setup.cfg
- plugins: flake8, cache
- collected 1 items
-
- myfile.py PASSED
-
- ========================================= 1 passed in 0.00 seconds
=========================================
-
- Note that doc/conf.py was not considered or imported.
-
- FAQs
- -----
-
- All the flake8 tests are skipping!
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
- This is by design. Clean flake8 results are cached and, unless the
file is modified, not tested again.
-
- You can run with ``pytest --cache-clear --flake8`` to override this.
-
- Notes
- -----
-
- The repository of this plugin is at
https://github.com/tholo/pytest-flake8
-
- For more info on `pytest`_ see http://pytest.org
-
- The code is partially based on Ronny Pfannschmidt's
`pytest-codecheckers`_ plugin.
-
- .. _`pytest`: http://pytest.org
- .. _`flake8`: https://pypi.python.org/pypi/flake8
- .. _`pycodestyle`: https://pypi.python.org/pypi/pycodestyle
- .. _`pytest-codecheckers`:
https://pypi.python.org/pypi/pytest-codecheckers
-
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.4
-Classifier: Programming Language :: Python :: 3.5
-Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
+Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Testing
+License-File: LICENSE
+
+pytest plugin for efficiently checking PEP8 compliance
+======================================================
+
+.. image:: https://img.shields.io/pypi/v/pytest-flake8.svg
+ :target: https://pypi.python.org/pypi/pytest-flake8
+
+.. image:: https://img.shields.io/pypi/pyversions/pytest-flake8.svg
+ :target: https://pypi.python.org/pypi/pytest-flake8
+
+.. image:: https://img.shields.io/pypi/implementation/pytest-flake8.svg
+ :target: https://pypi.python.org/pypi/pytest-flake8
+
+.. image:: https://img.shields.io/pypi/status/pytest-flake8.svg
+ :target: https://pypi.python.org/pypi/pytest-flake8
+
+.. image:: https://travis-ci.org/tholo/pytest-flake8.svg?branch=master
+ :target: https://travis-ci.org/tholo/pytest-flake8
+
+.. image:: https://img.shields.io/github/issues/tholo/pytest-flake8.svg
+ :target: https://github.com/tholo/pytest-flake8/issues
+
+.. image:: https://img.shields.io/github/issues-pr/tholo/pytest-flake8.svg
+ :target: https://github.com/tholo/pytest-flake8/pulls
+
+Usage
+-----
+
+Install by running the command::
+
+ pip install pytest-flake8
+
+After installing it, when you run tests with the option::
+
+ pytest --flake8
+
+every file ending in ``.py`` will be discovered and checked with
+flake8.
+
+.. note::
+
+ If optional flake8 plugins are installed, those will
+ be used automatically. No provisions have been made for
+ configuring these via `pytest`_.
+
+.. warning::
+
+ Running flake8 tests on your project is likely to cause a number
+ of issues. The plugin allows one to configure on a per-project and
+ per-file basis which errors or warnings to ignore, see
+ flake8-ignore_.
+
+.. _flake8-ignore:
+
+Configuring FLAKE8 options per project and file
+-----------------------------------------------
+
+Maximum line length and maximum doc line length can be configured for the
+whole project by adding a ``flake8-max-line-length`` option and
+``flake8-max-doc-length`` to your ``setup.cfg`` or ``tox.ini`` file like
+this::
+
+ # content of setup.cfg
+ [tool:pytest]
+ flake8-max-line-length = 99
+ flake8-max-doc-length = 74
+
+Note that the default will be what naturally comes with `flake8`_
+(which it turn gets its default from `pycodestyle`_).
+
+You may configure flake8-checking options for your project
+by adding an ``flake8-ignore`` entry to your ``setup.cfg``
+or ``tox.ini`` file like this::
+
+ # content of setup.cfg
+ [tool:pytest]
+ flake8-ignore = E201 E231
+
+This would globally prevent complaints about two whitespace issues.
+Rerunning with the above example will now look better::
+
+ $ pytest -q --flake8
+ collecting ... collected 1 items
+ .
+ 1 passed in 0.01 seconds
+
+If you have some files where you want to specifically ignore
+some errors or warnings you can start a flake8-ignore line with
+a glob-pattern and a space-separated list of codes::
+
+ # content of setup.cfg
+ [tool:pytest]
+ flake8-ignore =
+ *.py E201
+ doc/conf.py ALL
+
+So if you have a conf.py like this::
+
+ # content of doc/conf.py
+
+ func ( [1,2,3]) #this line lots PEP8 errors :)
+
+then running again with the previous example will show a single
+failure and it will ignore doc/conf.py altogether::
+
+ $ pytest --flake8 -v # verbose shows what is ignored
+ ======================================= test session starts
========================================
+ platform darwin -- Python 2.7.6 -- py-1.4.26 -- pytest-2.7.0 --
/Users/tholo/Source/pytest/bin/python
+ cachedir: /Users/tholo/Source/pytest/src/verify/.cache
+ rootdir: /Users/tholo/Source/angular/src/verify, inifile: setup.cfg
+ plugins: flake8, cache
+ collected 1 items
+
+ myfile.py PASSED
+
+ ========================================= 1 passed in 0.00 seconds
=========================================
+
+Note that doc/conf.py was not considered or imported.
+
+FAQs
+-----
+
+All the flake8 tests are skipping!
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+This is by design. Clean flake8 results are cached and, unless the file is
modified, not tested again.
+
+You can run with ``pytest --cache-clear --flake8`` to override this.
+
+Notes
+-----
+
+The repository of this plugin is at https://github.com/tholo/pytest-flake8
+
+For more info on `pytest`_ see http://pytest.org
+
+The code is partially based on Ronny Pfannschmidt's `pytest-codecheckers`_
plugin.
+
+.. _`pytest`: http://pytest.org
+.. _`flake8`: https://pypi.python.org/pypi/flake8
+.. _`pycodestyle`: https://pypi.python.org/pypi/pycodestyle
+.. _`pytest-codecheckers`: https://pypi.python.org/pypi/pytest-codecheckers
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-flake8-1.0.7/pytest_flake8.egg-info/SOURCES.txt
new/pytest-flake8-1.1.1/pytest_flake8.egg-info/SOURCES.txt
--- old/pytest-flake8-1.0.7/pytest_flake8.egg-info/SOURCES.txt 2020-12-16
23:38:52.000000000 +0100
+++ new/pytest-flake8-1.1.1/pytest_flake8.egg-info/SOURCES.txt 2022-03-18
23:13:06.000000000 +0100
@@ -1,10 +1,7 @@
-.gitignore
-.travis.yml
CHANGELOG
LICENSE
MANIFEST.in
README.rst
-pytest-flake8.sublime-project
pytest_flake8.py
setup.cfg
setup.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-flake8-1.0.7/pytest_flake8.egg-info/entry_points.txt
new/pytest-flake8-1.1.1/pytest_flake8.egg-info/entry_points.txt
--- old/pytest-flake8-1.0.7/pytest_flake8.egg-info/entry_points.txt
2020-12-16 23:38:52.000000000 +0100
+++ new/pytest-flake8-1.1.1/pytest_flake8.egg-info/entry_points.txt
2022-03-18 23:13:06.000000000 +0100
@@ -1,3 +1,2 @@
[pytest11]
flake8 = pytest_flake8
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-flake8-1.0.7/pytest_flake8.egg-info/requires.txt
new/pytest-flake8-1.1.1/pytest_flake8.egg-info/requires.txt
--- old/pytest-flake8-1.0.7/pytest_flake8.egg-info/requires.txt 2020-12-16
23:38:52.000000000 +0100
+++ new/pytest-flake8-1.1.1/pytest_flake8.egg-info/requires.txt 2022-03-18
23:13:06.000000000 +0100
@@ -1,2 +1,2 @@
-flake8>=3.5
-pytest>=3.5
+flake8>=4.0
+pytest>=7.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-flake8-1.0.7/pytest_flake8.py
new/pytest-flake8-1.1.1/pytest_flake8.py
--- old/pytest-flake8-1.0.7/pytest_flake8.py 2020-12-16 23:27:03.000000000
+0100
+++ new/pytest-flake8-1.1.1/pytest_flake8.py 2022-03-18 23:10:40.000000000
+0100
@@ -2,15 +2,15 @@
import os
import re
+from contextlib import redirect_stdout, redirect_stderr
+from io import BytesIO, TextIOWrapper
from flake8.main import application
from flake8.options import config
-import py
-
import pytest
-__version__ = '0.6'
+__version__ = '1.1.1'
HISTKEY = "flake8/mtimes"
@@ -30,6 +30,9 @@
"flake8-max-line-length",
help="maximum line length")
parser.addini(
+ "flake8-max-doc-length",
+ help="maximum doc line length")
+ parser.addini(
"flake8-max-complexity",
help="McCabe complexity threshold")
parser.addini(
@@ -48,8 +51,9 @@
if config.option.flake8:
config._flake8ignore = Ignorer(config.getini("flake8-ignore"))
config._flake8maxlen = config.getini("flake8-max-line-length")
+ config._flake8maxdoclen = config.getini("flake8-max-doc-length")
config._flake8maxcomplexity = config.getini("flake8-max-complexity")
- config._flake8showshource = config.getini("flake8-show-source")
+ config._flake8showsource = config.getini("flake8-show-source")
config._flake8statistics = config.getini("flake8-statistics")
config._flake8exts = config.getini("flake8-extensions")
config.addinivalue_line('markers', "flake8: Tests which run flake8.")
@@ -57,29 +61,21 @@
config._flake8mtimes = config.cache.get(HISTKEY, {})
-def pytest_collect_file(path, parent):
+def pytest_collect_file(file_path, path, parent):
"""Filter files down to which ones should be checked."""
config = parent.config
- if config.option.flake8 and path.ext in config._flake8exts:
+ if config.option.flake8 and file_path.suffix in config._flake8exts:
flake8ignore = config._flake8ignore(path)
if flake8ignore is not None:
- if hasattr(Flake8Item, "from_parent"):
- item = Flake8Item.from_parent(parent, fspath=path)
- item.flake8ignore = flake8ignore
- item.maxlength = config._flake8maxlen
- item.maxcomplexity = config._flake8maxcomplexity
- item.showshource = config._flake8showshource
- item.statistics = config._flake8statistics
- return item
- else:
- return Flake8Item(
- path,
- parent,
- flake8ignore=flake8ignore,
- maxlength=config._flake8maxlen,
- maxcomplexity=config._flake8maxcomplexity,
- showshource=config._flake8showshource,
- statistics=config._flake8statistics)
+ item = Flake8File.from_parent(
+ parent, path=file_path,
+ flake8ignore=flake8ignore,
+ maxlength=config._flake8maxlen,
+ maxdoclength=config._flake8maxdoclen,
+ maxcomplexity=config._flake8maxcomplexity,
+ showsource=config._flake8showsource,
+ statistics=config._flake8statistics)
+ return item
def pytest_unconfigure(config):
@@ -92,19 +88,37 @@
""" indicates an error during flake8 checks. """
-class Flake8Item(pytest.Item, pytest.File):
+class Flake8File(pytest.File):
- def __init__(self, fspath, parent, flake8ignore=None, maxlength=None,
- maxcomplexity=None, showshource=None, statistics=None):
- super(Flake8Item, self).__init__(fspath, parent)
- self._nodeid += "::FLAKE8"
- self.add_marker("flake8")
+ def __init__(self, *k,
+ flake8ignore=None, maxlength=None, maxdoclength=None,
+ maxcomplexity=None, showsource=None, statistics=None,
+ **kw):
+ super().__init__(*k, **kw)
self.flake8ignore = flake8ignore
self.maxlength = maxlength
+ self.maxdoclength = maxdoclength
self.maxcomplexity = maxcomplexity
- self.showshource = showshource
+ self.showsource = showsource
self.statistics = statistics
+ def collect(self):
+ return [Flake8Item.from_parent(self, name="flake-8")]
+
+
+class Flake8Item(pytest.Item):
+
+ def __init__(self, *k, **kwargs):
+ super().__init__(*k, **kwargs)
+ self._nodeid += "::FLAKE8"
+ self.add_marker("flake8")
+ self.flake8ignore = self.parent.flake8ignore
+ self.maxlength = self.parent.maxlength
+ self.maxdoclength = self.parent.maxdoclength
+ self.maxcomplexity = self.parent.maxcomplexity
+ self.showsource = self.parent.showsource
+ self.statistics = self.parent.statistics
+
def setup(self):
if hasattr(self.config, "_flake8mtimes"):
flake8mtimes = self.config._flake8mtimes
@@ -116,15 +130,23 @@
pytest.skip("file(s) previously passed FLAKE8 checks")
def runtest(self):
- call = py.io.StdCapture.call
- found_errors, out, err = call(
- check_file,
- self.fspath,
- self.flake8ignore,
- self.maxlength,
- self.maxcomplexity,
- self.showshource,
- self.statistics)
+ with BytesIO() as bo, TextIOWrapper(bo, encoding='utf-8') as to, \
+ BytesIO() as be, TextIOWrapper(be, encoding='utf-8') as te, \
+ redirect_stdout(to), redirect_stderr(te):
+ found_errors = check_file(
+ self.fspath,
+ self.flake8ignore,
+ self.maxlength,
+ self.maxdoclength,
+ self.maxcomplexity,
+ self.showsource,
+ self.statistics
+ )
+ to.flush()
+ te.flush()
+ out = bo.getvalue().decode('utf-8')
+ err = be.getvalue().decode('utf-8')
+
if found_errors:
raise Flake8Error(out, err)
# update mtime only if test passed
@@ -145,9 +167,6 @@
ignores = ""
return (self.fspath, -1, "FLAKE8-check%s" % ignores)
- def collect(self):
- return iter((self,))
-
class Ignorer:
def __init__(self, ignorelines, coderex=re.compile(r"[EW]\d\d\d")):
@@ -179,42 +198,34 @@
return l
-def check_file(path, flake8ignore, maxlength, maxcomplexity,
- showshource, statistics):
+def check_file(path, flake8ignore, maxlength, maxdoclenght, maxcomplexity,
+ showsource, statistics):
"""Run flake8 over a single file, and return the number of failures."""
args = []
if maxlength:
args += ['--max-line-length', maxlength]
+ if maxdoclenght:
+ args += ['--max-doc-length', maxdoclenght]
if maxcomplexity:
args += ['--max-complexity', maxcomplexity]
- if showshource:
+ if showsource:
args += ['--show-source']
if statistics:
args += ['--statistics']
app = application.Application()
- if not hasattr(app, 'parse_preliminary_options_and_args'): # flake8 >= 3.8
- prelim_opts, remaining_args = app.parse_preliminary_options(args)
- config_finder = config.ConfigFileFinder(
- app.program,
- prelim_opts.append_config,
- config_file=prelim_opts.config,
- ignore_config_files=prelim_opts.isolated,
- )
- app.find_plugins(config_finder)
- app.register_plugin_options()
- app.parse_configuration_and_cli(config_finder, remaining_args)
- else:
- app.parse_preliminary_options_and_args(args)
- app.make_config_finder()
- app.find_plugins()
- app.register_plugin_options()
- app.parse_configuration_and_cli(args)
+ prelim_opts, remaining_args = app.parse_preliminary_options(args)
+ config_finder = config.ConfigFileFinder(
+ app.program,
+ prelim_opts.append_config,
+ config_file=prelim_opts.config,
+ ignore_config_files=prelim_opts.isolated,
+ )
+ app.find_plugins(config_finder)
+ app.register_plugin_options()
+ app.parse_configuration_and_cli(config_finder, remaining_args)
if flake8ignore:
app.options.ignore = flake8ignore
app.make_formatter() # fix this
- if hasattr(app, 'make_notifier'):
- # removed in flake8 3.7+
- app.make_notifier()
app.make_guide()
app.make_file_checker_manager()
app.run_checks([str(path)])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-flake8-1.0.7/setup.py
new/pytest-flake8-1.1.1/setup.py
--- old/pytest-flake8-1.0.7/setup.py 2020-12-16 23:33:06.000000000 +0100
+++ new/pytest-flake8-1.1.1/setup.py 2022-03-18 22:36:43.000000000 +0100
@@ -6,7 +6,7 @@
setup(
name='pytest-flake8',
- version='1.0.7',
+ version='1.1.1',
description='pytest plugin to check FLAKE8 requirements',
long_description=open("README.rst").read(),
classifiers=[
@@ -14,13 +14,12 @@
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python",
- "Programming Language :: Python :: 2",
- "Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
- "Programming Language :: Python :: 3.4",
- "Programming Language :: Python :: 3.5",
- "Programming Language :: Python :: 3.6",
+ "Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
+ "Programming Language :: Python :: 3.8",
+ "Programming Language :: Python :: 3.9",
+ "Programming Language :: Python :: 3.10",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development",
@@ -38,7 +37,7 @@
'pytest11': ['flake8 = pytest_flake8'],
},
install_requires=[
- 'flake8>=3.5',
- 'pytest>=3.5',
+ 'flake8>=4.0',
+ 'pytest>=7.0',
],
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-flake8-1.0.7/tox.ini
new/pytest-flake8-1.1.1/tox.ini
--- old/pytest-flake8-1.0.7/tox.ini 2020-12-16 23:26:23.000000000 +0100
+++ new/pytest-flake8-1.1.1/tox.ini 2022-03-05 07:00:52.000000000 +0100
@@ -1,16 +1,16 @@
[tox]
-envlist=py27,py36-pytesttrunk,py36-xdist,py34,py35,py36,py37,py38,pypy,pypy3
+envlist=py310-pytesttrunk,py310-xdist,py37,py38,py39,py310,pypy3
[testenv]
deps=pytest
commands=
pytest --junitxml={envlogdir}/junit-{envname}.xml {posargs}
-[testenv:py36-pytesttrunk]
+[testenv:py310-pytesttrunk]
pip_pre=true
deps=pytest
-[testenv:py36-xdist]
+[testenv:py310-xdist]
deps={[testenv]deps}
pytest-xdist
commands=
++++++ support-flake8-5.patch ++++++
>From 976e6180201f7808a3007c8c5903a1637b18c0c8 Mon Sep 17 00:00:00 2001
From: Dominic Oram <[email protected]>
Date: Fri, 5 Aug 2022 17:55:24 +0100
Subject: [PATCH] Update to work for flake8==5.0.0
---
pytest_flake8.py | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/pytest_flake8.py b/pytest_flake8.py
index 2555f8a..c693789 100644
--- a/pytest_flake8.py
+++ b/pytest_flake8.py
@@ -212,23 +212,28 @@ def check_file(path, flake8ignore, maxlength,
maxdoclenght, maxcomplexity,
args += ['--show-source']
if statistics:
args += ['--statistics']
+ args += [str(path)]
app = application.Application()
prelim_opts, remaining_args = app.parse_preliminary_options(args)
- config_finder = config.ConfigFileFinder(
- app.program,
- prelim_opts.append_config,
- config_file=prelim_opts.config,
- ignore_config_files=prelim_opts.isolated,
+ cfg, cfg_dir = config.load_config(
+ config=prelim_opts.config,
+ extra=prelim_opts.append_config,
+ isolated=prelim_opts.isolated,
+ )
+ app.find_plugins(
+ cfg,
+ cfg_dir,
+ enable_extensions=prelim_opts.enable_extensions,
+ require_plugins=prelim_opts.require_plugins,
)
- app.find_plugins(config_finder)
app.register_plugin_options()
- app.parse_configuration_and_cli(config_finder, remaining_args)
+ app.parse_configuration_and_cli(cfg, cfg_dir, remaining_args)
if flake8ignore:
app.options.ignore = flake8ignore
app.make_formatter() # fix this
app.make_guide()
app.make_file_checker_manager()
- app.run_checks([str(path)])
+ app.run_checks()
app.formatter.start()
app.report_errors()
app.formatter.stop()