Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-pytest-flakes for
openSUSE:Factory checked in at 2022-01-10 23:54:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-flakes (Old)
and /work/SRC/openSUSE:Factory/.python-pytest-flakes.new.1892 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-flakes"
Mon Jan 10 23:54:05 2022 rev:5 rq:945416 version:4.0.5
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-pytest-flakes/python-pytest-flakes.changes
2020-08-14 10:04:57.301336292 +0200
+++
/work/SRC/openSUSE:Factory/.python-pytest-flakes.new.1892/python-pytest-flakes.changes
2022-01-10 23:54:41.312861411 +0100
@@ -1,0 +2,17 @@
+Mon Jan 10 21:23:01 UTC 2022 - Matej Cepl <[email protected]>
+
+- Update to version 4.0.5:
+ - Drop support for EOL Python 2.7 and 3.4
+ - Add python_requires to help pip
+ - Upgrade Python syntax with pyupgrade --py3-plus
+ - Require pytest 5+ to remove hasattr('from_parent') check
+ - Fix typo: setup.cfg or pytest.ini
+ - implement collect
+ - switch to cooperative ctors and correct node trees to future
+ proof
+ - Remove FlakesItem.collect
+ - Remove add_marker backward compat check
+ - Remove tokenize.open backward compat
+ - Prepare for upcoming pytest 7.0 deprecations
+
+-------------------------------------------------------------------
Old:
----
pytest-flakes-4.0.1.tar.gz
New:
----
pytest-flakes-4.0.5.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pytest-flakes.spec ++++++
--- /var/tmp/diff_new_pack.OCq8yg/_old 2022-01-10 23:54:41.612861674 +0100
+++ /var/tmp/diff_new_pack.OCq8yg/_new 2022-01-10 23:54:41.620861681 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-pytest-flakes
#
-# Copyright (c) 2020 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,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pytest-flakes
-Version: 4.0.1
+Version: 4.0.5
Release: 0
Summary: Pytest plugin to check source code with pyflakes
License: MIT
++++++ pytest-flakes-4.0.1.tar.gz -> pytest-flakes-4.0.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-flakes-4.0.1/PKG-INFO
new/pytest-flakes-4.0.5/PKG-INFO
--- old/pytest-flakes-4.0.1/PKG-INFO 2020-07-28 23:52:00.000000000 +0200
+++ new/pytest-flakes-4.0.5/PKG-INFO 2021-12-02 23:09:00.234081700 +0100
@@ -1,244 +1,268 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
Name: pytest-flakes
-Version: 4.0.1
+Version: 4.0.5
Summary: pytest plugin to check source code with pyflakes
Home-page: https://github.com/asmeurer/pytest-flakes
Author: Florian Schulze, Holger Krekel and Ronny Pfannschmidt
-Author-email: UNKNOWN
License: MIT license
-Description: pytest-flakes
- =============
-
- py.test plugin for efficiently checking python source with pyflakes.
-
-
- Usage
- -----
-
- install via::
-
- pip install pytest-flakes
-
- if you then type::
-
- py.test --flakes
-
- every file ending in ``.py`` will be discovered and run through
pyflakes,
- starting from the command line arguments.
-
- Simple usage example
- -----------------------------
-
- Consider you have this code::
-
- # content of module.py
-
- import os
- from os.path import *
-
- def some_function():
- pass
-
- Running it with pytest-flakes installed shows two issues::
-
- $ py.test -q --flakes
- F
- ================================= FAILURES
=================================
- ______________________________ pyflakes-check
______________________________
- /tmp/doc-exec-685/module.py:2: UnusedImport
- 'os' imported but unused
- /tmp/doc-exec-685/module.py:3: ImportStarUsed
- 'from os.path import *' used; unable to detect undefined names
- 1 failed in 0.00 seconds
-
- These are only two of the many issues that pytest-flakes can find.
-
- Configuring pyflakes options per project and file
- -------------------------------------------------
-
- You may configure pyflakes-checking options for your project
- by adding an ``flakes-ignore`` entry to your ``setup.cfg``
- or ``setup.cfg`` file like this::
-
- # content of setup.cfg
- [pytest]
- flakes-ignore = ImportStarUsed
-
- This would globally prevent complaints about star imports.
- Rerunning with the above example will now look better::
-
- $ py.test -q --flakes
- F
- ================================= FAILURES
=================================
- _________________ pyflakes-check(ignoring ImportStarUsed)
__________________
- /tmp/doc-exec-685/module.py:2: UnusedImport
- 'os' imported but unused
- 1 failed in 0.00 seconds
-
- But of course we still would want to delete the ``import os`` line to
- have a clean pass.
-
- If you have some files where you want to specifically ignore
- some errors or warnings you can start a flakes-ignore line with
- a glob-pattern and a space-separated list of codes::
-
- # content of setup.cfg
- [pytest]
- flakes-ignore =
- *.py UnusedImport
- doc/conf.py ALL
-
-
- Ignoring certain lines in files
- -------------------------------
-
- You can ignore errors per line by appending special comments to them
like this::
-
- import sys # noqa
- app # pragma: no flakes
-
-
- Running pyflakes checks and no other tests
- ------------------------------------------
-
- You can restrict your test run to only perform "flakes" tests
- and not any other tests by typing::
-
- py.test --flakes -m flakes
-
- This will only run tests that are marked with the "flakes" keyword
- which is added for the flakes test items added by this plugin.
-
- If you are using pytest < 2.4, then use the following invocation
- to the same effect::
-
- py.test --flakes -k flakes
-
-
- Notes
- -----
-
- The repository of this plugin is at
https://github.com/asmeurer/pytest-flakes
-
- For more info on py.test see http://pytest.org
-
- The code is partially based on Ronny Pfannschmidt's
pytest-codecheckers plugin
- and Holger Krekel's pytest-pep8.
-
-
- Changes
- =======
-
- 4.0.1 - 2020-07-28
- ------------------
-
- - Maintenance of pytest-flakes has moved from fschulze to asmeurer.
The repo
- for pytest-flakes is now at
https://github.com/asmeurer/pytest-flakes/
-
- - Fix test failures.
- [asmeurer]
-
- - Fix deprecation warnings from pytest.
- [asmeurer]
-
- - Fix invalid escape sequences.
- [akeeman]
-
- 4.0.0 - 2018-08-01
- ------------------
-
- - Require pytest >= 2.8.0 and remove pytest-cache requirement.
- Cache is included in pytest since that version.
- [smarlowucf (Sean Marlow)]
-
-
- 3.0.2 - 2018-05-16
- ------------------
-
- - Fix typo in name of ``flakes`` marker.
- [fschulze]
-
-
- 3.0.1 - 2018-05-16
- ------------------
-
- - Always register ``flakes`` marker, not only when the ``--flakes``
option
- is used.
- [fschulze]
-
-
- 3.0.0 - 2018-05-16
- ------------------
-
- - Drop support for Python 3.3. It still works so far, but isn't tested
anymore.
- [fschulze]
-
- - Add ``flakes`` marker required since pytest 3.1.
- [fschulze]
-
- - Use pyflakes.api.isPythonFile to detect Python files. This might
test more
- files than before and thus could cause previously uncaught failures.
- [asmeurer (Aaron Meurer)]
-
-
- 2.0.0 - 2017-05-12
- ------------------
-
- - Dropped support/testing for Python 2.5, 2.6, 3.2.
- [fschulze]
-
- - Added testing for Python 3.6.
- [fschulze]
-
- - Fixed some packaging and metadata errors.
- [fladi (Michael Fladischer), fschulze]
-
-
- 1.0.1 - 2015-09-17
- ------------------
-
- - Compatibility with upcoming pytest.
- [RonnyPfannschmidt (Ronny Pfannschmidt)]
-
-
- 1.0.0 - 2015-05-01
- ------------------
-
- - Fix issue #6 - support PEP263 for source file encoding.
- [The-Compiler (Florian Bruhin), fschulze]
-
- - Clarified license to be MIT like pytest-pep8 from which this is
derived.
- [fschulze]
-
-
- 0.2 - 2013-02-11
- ----------------
-
- - Adapt to pytest-2.4.2 using ``add_marker()`` API.
- [fschulze, hpk42 (Holger Krekel)]
-
- - Allow errors to be skipped per line by appending # noqa or # pragma:
no flakes
- [fschulze, silviot (Silvio Tomatis)]
-
- - Python 3.x compatibility.
- [fschulze, encukou (Petr Viktorin)]
-
-
- 0.1 - 2013-02-04
- ----------------
-
- - Initial release.
- [fschulze (Florian Schulze)]
-
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: Pytest
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
-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.7
+Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Testing
+Requires-Python: >=3.5
+License-File: LICENSE
+
+pytest-flakes
+=============
+
+py.test plugin for efficiently checking python source with pyflakes.
+
+
+Usage
+-----
+
+install via::
+
+ pip install pytest-flakes
+
+if you then type::
+
+ py.test --flakes
+
+every file ending in ``.py`` will be discovered and run through pyflakes,
+starting from the command line arguments.
+
+Simple usage example
+-----------------------------
+
+Consider you have this code::
+
+ # content of module.py
+
+ import os
+ from os.path import *
+
+ def some_function():
+ pass
+
+Running it with pytest-flakes installed shows two issues::
+
+ $ py.test -q --flakes
+ F
+ ================================= FAILURES
=================================
+ ______________________________ pyflakes-check
______________________________
+ /tmp/doc-exec-685/module.py:2: UnusedImport
+ 'os' imported but unused
+ /tmp/doc-exec-685/module.py:3: ImportStarUsed
+ 'from os.path import *' used; unable to detect undefined names
+ 1 failed in 0.00 seconds
+
+These are only two of the many issues that pytest-flakes can find.
+
+Configuring pyflakes options per project and file
+-------------------------------------------------
+
+You may configure pyflakes-checking options for your project
+by adding an ``flakes-ignore`` entry to your ``setup.cfg``
+or ``pytest.ini`` file like this::
+
+ # content of setup.cfg
+ [pytest]
+ flakes-ignore = ImportStarUsed
+
+This would globally prevent complaints about star imports.
+Rerunning with the above example will now look better::
+
+ $ py.test -q --flakes
+ F
+ ================================= FAILURES
=================================
+ _________________ pyflakes-check(ignoring ImportStarUsed)
__________________
+ /tmp/doc-exec-685/module.py:2: UnusedImport
+ 'os' imported but unused
+ 1 failed in 0.00 seconds
+
+But of course we still would want to delete the ``import os`` line to
+have a clean pass.
+
+If you have some files where you want to specifically ignore
+some errors or warnings you can start a flakes-ignore line with
+a glob-pattern and a space-separated list of codes::
+
+ # content of setup.cfg
+ [pytest]
+ flakes-ignore =
+ *.py UnusedImport
+ doc/conf.py ALL
+
+
+Ignoring certain lines in files
+-------------------------------
+
+You can ignore errors per line by appending special comments to them like
this::
+
+ import sys # noqa
+ app # pragma: no flakes
+
+
+Running pyflakes checks and no other tests
+------------------------------------------
+
+You can restrict your test run to only perform "flakes" tests
+and not any other tests by typing::
+
+ py.test --flakes -m flakes
+
+This will only run tests that are marked with the "flakes" keyword
+which is added for the flakes test items added by this plugin.
+
+If you are using pytest < 2.4, then use the following invocation
+to the same effect::
+
+ py.test --flakes -k flakes
+
+
+Notes
+-----
+
+The repository of this plugin is at https://github.com/asmeurer/pytest-flakes
+
+For more info on py.test see http://pytest.org
+
+The code is partially based on Ronny Pfannschmidt's pytest-codecheckers plugin
+and Holger Krekel's pytest-pep8.
+
+
+Changes
+=======
+
+4.0.5 - 2021-12-02
+------------------
+- Further fixes for deprecations in the upcoming pytest 7.0. [nicoddemus]
+
+4.0.4 - 2021-10-26
+------------------
+- Fix pytest-flakes for deprecations in the upcoming pytest 7.0. [bluetech]
+- Fix the pytest-flakes test suite in Python 3.10. [bluetech]
+- Replace Travis CI with GitHub Actions. [bluetech]
+
+4.0.3 - 2020-11-27
+------------------
+
+- Future proof some code against future versions of pytest. [RonnyPfannschmidt]
+
+4.0.2 - 2020-09-18
+------------------
+
+- Fix calling pytest --flakes directly on an __init__.py file. [akeeman]
+
+4.0.1 - 2020-07-28
+------------------
+
+- Maintenance of pytest-flakes has moved from fschulze to asmeurer. The repo
+ for pytest-flakes is now at https://github.com/asmeurer/pytest-flakes/
+
+- Fix test failures.
+ [asmeurer]
+
+- Fix deprecation warnings from pytest.
+ [asmeurer]
+
+- Fix invalid escape sequences.
+ [akeeman]
+
+4.0.0 - 2018-08-01
+------------------
+
+- Require pytest >= 2.8.0 and remove pytest-cache requirement.
+ Cache is included in pytest since that version.
+ [smarlowucf (Sean Marlow)]
+
+
+3.0.2 - 2018-05-16
+------------------
+
+- Fix typo in name of ``flakes`` marker.
+ [fschulze]
+
+
+3.0.1 - 2018-05-16
+------------------
+
+- Always register ``flakes`` marker, not only when the ``--flakes`` option
+ is used.
+ [fschulze]
+
+
+3.0.0 - 2018-05-16
+------------------
+
+- Drop support for Python 3.3. It still works so far, but isn't tested anymore.
+ [fschulze]
+
+- Add ``flakes`` marker required since pytest 3.1.
+ [fschulze]
+
+- Use pyflakes.api.isPythonFile to detect Python files. This might test more
+ files than before and thus could cause previously uncaught failures.
+ [asmeurer (Aaron Meurer)]
+
+
+2.0.0 - 2017-05-12
+------------------
+
+- Dropped support/testing for Python 2.5, 2.6, 3.2.
+ [fschulze]
+
+- Added testing for Python 3.6.
+ [fschulze]
+
+- Fixed some packaging and metadata errors.
+ [fladi (Michael Fladischer), fschulze]
+
+
+1.0.1 - 2015-09-17
+------------------
+
+- Compatibility with upcoming pytest.
+ [RonnyPfannschmidt (Ronny Pfannschmidt)]
+
+
+1.0.0 - 2015-05-01
+------------------
+
+- Fix issue #6 - support PEP263 for source file encoding.
+ [The-Compiler (Florian Bruhin), fschulze]
+
+- Clarified license to be MIT like pytest-pep8 from which this is derived.
+ [fschulze]
+
+
+0.2 - 2013-02-11
+----------------
+
+- Adapt to pytest-2.4.2 using ``add_marker()`` API.
+ [fschulze, hpk42 (Holger Krekel)]
+
+- Allow errors to be skipped per line by appending # noqa or # pragma: no
flakes
+ [fschulze, silviot (Silvio Tomatis)]
+
+- Python 3.x compatibility.
+ [fschulze, encukou (Petr Viktorin)]
+
+
+0.1 - 2013-02-04
+----------------
+
+- Initial release.
+ [fschulze (Florian Schulze)]
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-flakes-4.0.1/README.rst
new/pytest-flakes-4.0.5/README.rst
--- old/pytest-flakes-4.0.1/README.rst 2020-07-28 23:50:26.000000000 +0200
+++ new/pytest-flakes-4.0.5/README.rst 2021-12-02 23:08:33.000000000 +0100
@@ -50,7 +50,7 @@
You may configure pyflakes-checking options for your project
by adding an ``flakes-ignore`` entry to your ``setup.cfg``
-or ``setup.cfg`` file like this::
+or ``pytest.ini`` file like this::
# content of setup.cfg
[pytest]
@@ -121,6 +121,26 @@
Changes
=======
+4.0.5 - 2021-12-02
+------------------
+- Further fixes for deprecations in the upcoming pytest 7.0. [nicoddemus]
+
+4.0.4 - 2021-10-26
+------------------
+- Fix pytest-flakes for deprecations in the upcoming pytest 7.0. [bluetech]
+- Fix the pytest-flakes test suite in Python 3.10. [bluetech]
+- Replace Travis CI with GitHub Actions. [bluetech]
+
+4.0.3 - 2020-11-27
+------------------
+
+- Future proof some code against future versions of pytest. [RonnyPfannschmidt]
+
+4.0.2 - 2020-09-18
+------------------
+
+- Fix calling pytest --flakes directly on an __init__.py file. [akeeman]
+
4.0.1 - 2020-07-28
------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-flakes-4.0.1/pytest_flakes.egg-info/PKG-INFO
new/pytest-flakes-4.0.5/pytest_flakes.egg-info/PKG-INFO
--- old/pytest-flakes-4.0.1/pytest_flakes.egg-info/PKG-INFO 2020-07-28
23:51:59.000000000 +0200
+++ new/pytest-flakes-4.0.5/pytest_flakes.egg-info/PKG-INFO 2021-12-02
23:09:00.000000000 +0100
@@ -1,244 +1,268 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
Name: pytest-flakes
-Version: 4.0.1
+Version: 4.0.5
Summary: pytest plugin to check source code with pyflakes
Home-page: https://github.com/asmeurer/pytest-flakes
Author: Florian Schulze, Holger Krekel and Ronny Pfannschmidt
-Author-email: UNKNOWN
License: MIT license
-Description: pytest-flakes
- =============
-
- py.test plugin for efficiently checking python source with pyflakes.
-
-
- Usage
- -----
-
- install via::
-
- pip install pytest-flakes
-
- if you then type::
-
- py.test --flakes
-
- every file ending in ``.py`` will be discovered and run through
pyflakes,
- starting from the command line arguments.
-
- Simple usage example
- -----------------------------
-
- Consider you have this code::
-
- # content of module.py
-
- import os
- from os.path import *
-
- def some_function():
- pass
-
- Running it with pytest-flakes installed shows two issues::
-
- $ py.test -q --flakes
- F
- ================================= FAILURES
=================================
- ______________________________ pyflakes-check
______________________________
- /tmp/doc-exec-685/module.py:2: UnusedImport
- 'os' imported but unused
- /tmp/doc-exec-685/module.py:3: ImportStarUsed
- 'from os.path import *' used; unable to detect undefined names
- 1 failed in 0.00 seconds
-
- These are only two of the many issues that pytest-flakes can find.
-
- Configuring pyflakes options per project and file
- -------------------------------------------------
-
- You may configure pyflakes-checking options for your project
- by adding an ``flakes-ignore`` entry to your ``setup.cfg``
- or ``setup.cfg`` file like this::
-
- # content of setup.cfg
- [pytest]
- flakes-ignore = ImportStarUsed
-
- This would globally prevent complaints about star imports.
- Rerunning with the above example will now look better::
-
- $ py.test -q --flakes
- F
- ================================= FAILURES
=================================
- _________________ pyflakes-check(ignoring ImportStarUsed)
__________________
- /tmp/doc-exec-685/module.py:2: UnusedImport
- 'os' imported but unused
- 1 failed in 0.00 seconds
-
- But of course we still would want to delete the ``import os`` line to
- have a clean pass.
-
- If you have some files where you want to specifically ignore
- some errors or warnings you can start a flakes-ignore line with
- a glob-pattern and a space-separated list of codes::
-
- # content of setup.cfg
- [pytest]
- flakes-ignore =
- *.py UnusedImport
- doc/conf.py ALL
-
-
- Ignoring certain lines in files
- -------------------------------
-
- You can ignore errors per line by appending special comments to them
like this::
-
- import sys # noqa
- app # pragma: no flakes
-
-
- Running pyflakes checks and no other tests
- ------------------------------------------
-
- You can restrict your test run to only perform "flakes" tests
- and not any other tests by typing::
-
- py.test --flakes -m flakes
-
- This will only run tests that are marked with the "flakes" keyword
- which is added for the flakes test items added by this plugin.
-
- If you are using pytest < 2.4, then use the following invocation
- to the same effect::
-
- py.test --flakes -k flakes
-
-
- Notes
- -----
-
- The repository of this plugin is at
https://github.com/asmeurer/pytest-flakes
-
- For more info on py.test see http://pytest.org
-
- The code is partially based on Ronny Pfannschmidt's
pytest-codecheckers plugin
- and Holger Krekel's pytest-pep8.
-
-
- Changes
- =======
-
- 4.0.1 - 2020-07-28
- ------------------
-
- - Maintenance of pytest-flakes has moved from fschulze to asmeurer.
The repo
- for pytest-flakes is now at
https://github.com/asmeurer/pytest-flakes/
-
- - Fix test failures.
- [asmeurer]
-
- - Fix deprecation warnings from pytest.
- [asmeurer]
-
- - Fix invalid escape sequences.
- [akeeman]
-
- 4.0.0 - 2018-08-01
- ------------------
-
- - Require pytest >= 2.8.0 and remove pytest-cache requirement.
- Cache is included in pytest since that version.
- [smarlowucf (Sean Marlow)]
-
-
- 3.0.2 - 2018-05-16
- ------------------
-
- - Fix typo in name of ``flakes`` marker.
- [fschulze]
-
-
- 3.0.1 - 2018-05-16
- ------------------
-
- - Always register ``flakes`` marker, not only when the ``--flakes``
option
- is used.
- [fschulze]
-
-
- 3.0.0 - 2018-05-16
- ------------------
-
- - Drop support for Python 3.3. It still works so far, but isn't tested
anymore.
- [fschulze]
-
- - Add ``flakes`` marker required since pytest 3.1.
- [fschulze]
-
- - Use pyflakes.api.isPythonFile to detect Python files. This might
test more
- files than before and thus could cause previously uncaught failures.
- [asmeurer (Aaron Meurer)]
-
-
- 2.0.0 - 2017-05-12
- ------------------
-
- - Dropped support/testing for Python 2.5, 2.6, 3.2.
- [fschulze]
-
- - Added testing for Python 3.6.
- [fschulze]
-
- - Fixed some packaging and metadata errors.
- [fladi (Michael Fladischer), fschulze]
-
-
- 1.0.1 - 2015-09-17
- ------------------
-
- - Compatibility with upcoming pytest.
- [RonnyPfannschmidt (Ronny Pfannschmidt)]
-
-
- 1.0.0 - 2015-05-01
- ------------------
-
- - Fix issue #6 - support PEP263 for source file encoding.
- [The-Compiler (Florian Bruhin), fschulze]
-
- - Clarified license to be MIT like pytest-pep8 from which this is
derived.
- [fschulze]
-
-
- 0.2 - 2013-02-11
- ----------------
-
- - Adapt to pytest-2.4.2 using ``add_marker()`` API.
- [fschulze, hpk42 (Holger Krekel)]
-
- - Allow errors to be skipped per line by appending # noqa or # pragma:
no flakes
- [fschulze, silviot (Silvio Tomatis)]
-
- - Python 3.x compatibility.
- [fschulze, encukou (Petr Viktorin)]
-
-
- 0.1 - 2013-02-04
- ----------------
-
- - Initial release.
- [fschulze (Florian Schulze)]
-
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: Pytest
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
-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.7
+Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Testing
+Requires-Python: >=3.5
+License-File: LICENSE
+
+pytest-flakes
+=============
+
+py.test plugin for efficiently checking python source with pyflakes.
+
+
+Usage
+-----
+
+install via::
+
+ pip install pytest-flakes
+
+if you then type::
+
+ py.test --flakes
+
+every file ending in ``.py`` will be discovered and run through pyflakes,
+starting from the command line arguments.
+
+Simple usage example
+-----------------------------
+
+Consider you have this code::
+
+ # content of module.py
+
+ import os
+ from os.path import *
+
+ def some_function():
+ pass
+
+Running it with pytest-flakes installed shows two issues::
+
+ $ py.test -q --flakes
+ F
+ ================================= FAILURES
=================================
+ ______________________________ pyflakes-check
______________________________
+ /tmp/doc-exec-685/module.py:2: UnusedImport
+ 'os' imported but unused
+ /tmp/doc-exec-685/module.py:3: ImportStarUsed
+ 'from os.path import *' used; unable to detect undefined names
+ 1 failed in 0.00 seconds
+
+These are only two of the many issues that pytest-flakes can find.
+
+Configuring pyflakes options per project and file
+-------------------------------------------------
+
+You may configure pyflakes-checking options for your project
+by adding an ``flakes-ignore`` entry to your ``setup.cfg``
+or ``pytest.ini`` file like this::
+
+ # content of setup.cfg
+ [pytest]
+ flakes-ignore = ImportStarUsed
+
+This would globally prevent complaints about star imports.
+Rerunning with the above example will now look better::
+
+ $ py.test -q --flakes
+ F
+ ================================= FAILURES
=================================
+ _________________ pyflakes-check(ignoring ImportStarUsed)
__________________
+ /tmp/doc-exec-685/module.py:2: UnusedImport
+ 'os' imported but unused
+ 1 failed in 0.00 seconds
+
+But of course we still would want to delete the ``import os`` line to
+have a clean pass.
+
+If you have some files where you want to specifically ignore
+some errors or warnings you can start a flakes-ignore line with
+a glob-pattern and a space-separated list of codes::
+
+ # content of setup.cfg
+ [pytest]
+ flakes-ignore =
+ *.py UnusedImport
+ doc/conf.py ALL
+
+
+Ignoring certain lines in files
+-------------------------------
+
+You can ignore errors per line by appending special comments to them like
this::
+
+ import sys # noqa
+ app # pragma: no flakes
+
+
+Running pyflakes checks and no other tests
+------------------------------------------
+
+You can restrict your test run to only perform "flakes" tests
+and not any other tests by typing::
+
+ py.test --flakes -m flakes
+
+This will only run tests that are marked with the "flakes" keyword
+which is added for the flakes test items added by this plugin.
+
+If you are using pytest < 2.4, then use the following invocation
+to the same effect::
+
+ py.test --flakes -k flakes
+
+
+Notes
+-----
+
+The repository of this plugin is at https://github.com/asmeurer/pytest-flakes
+
+For more info on py.test see http://pytest.org
+
+The code is partially based on Ronny Pfannschmidt's pytest-codecheckers plugin
+and Holger Krekel's pytest-pep8.
+
+
+Changes
+=======
+
+4.0.5 - 2021-12-02
+------------------
+- Further fixes for deprecations in the upcoming pytest 7.0. [nicoddemus]
+
+4.0.4 - 2021-10-26
+------------------
+- Fix pytest-flakes for deprecations in the upcoming pytest 7.0. [bluetech]
+- Fix the pytest-flakes test suite in Python 3.10. [bluetech]
+- Replace Travis CI with GitHub Actions. [bluetech]
+
+4.0.3 - 2020-11-27
+------------------
+
+- Future proof some code against future versions of pytest. [RonnyPfannschmidt]
+
+4.0.2 - 2020-09-18
+------------------
+
+- Fix calling pytest --flakes directly on an __init__.py file. [akeeman]
+
+4.0.1 - 2020-07-28
+------------------
+
+- Maintenance of pytest-flakes has moved from fschulze to asmeurer. The repo
+ for pytest-flakes is now at https://github.com/asmeurer/pytest-flakes/
+
+- Fix test failures.
+ [asmeurer]
+
+- Fix deprecation warnings from pytest.
+ [asmeurer]
+
+- Fix invalid escape sequences.
+ [akeeman]
+
+4.0.0 - 2018-08-01
+------------------
+
+- Require pytest >= 2.8.0 and remove pytest-cache requirement.
+ Cache is included in pytest since that version.
+ [smarlowucf (Sean Marlow)]
+
+
+3.0.2 - 2018-05-16
+------------------
+
+- Fix typo in name of ``flakes`` marker.
+ [fschulze]
+
+
+3.0.1 - 2018-05-16
+------------------
+
+- Always register ``flakes`` marker, not only when the ``--flakes`` option
+ is used.
+ [fschulze]
+
+
+3.0.0 - 2018-05-16
+------------------
+
+- Drop support for Python 3.3. It still works so far, but isn't tested anymore.
+ [fschulze]
+
+- Add ``flakes`` marker required since pytest 3.1.
+ [fschulze]
+
+- Use pyflakes.api.isPythonFile to detect Python files. This might test more
+ files than before and thus could cause previously uncaught failures.
+ [asmeurer (Aaron Meurer)]
+
+
+2.0.0 - 2017-05-12
+------------------
+
+- Dropped support/testing for Python 2.5, 2.6, 3.2.
+ [fschulze]
+
+- Added testing for Python 3.6.
+ [fschulze]
+
+- Fixed some packaging and metadata errors.
+ [fladi (Michael Fladischer), fschulze]
+
+
+1.0.1 - 2015-09-17
+------------------
+
+- Compatibility with upcoming pytest.
+ [RonnyPfannschmidt (Ronny Pfannschmidt)]
+
+
+1.0.0 - 2015-05-01
+------------------
+
+- Fix issue #6 - support PEP263 for source file encoding.
+ [The-Compiler (Florian Bruhin), fschulze]
+
+- Clarified license to be MIT like pytest-pep8 from which this is derived.
+ [fschulze]
+
+
+0.2 - 2013-02-11
+----------------
+
+- Adapt to pytest-2.4.2 using ``add_marker()`` API.
+ [fschulze, hpk42 (Holger Krekel)]
+
+- Allow errors to be skipped per line by appending # noqa or # pragma: no
flakes
+ [fschulze, silviot (Silvio Tomatis)]
+
+- Python 3.x compatibility.
+ [fschulze, encukou (Petr Viktorin)]
+
+
+0.1 - 2013-02-04
+----------------
+
+- Initial release.
+ [fschulze (Florian Schulze)]
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-flakes-4.0.1/pytest_flakes.egg-info/requires.txt
new/pytest-flakes-4.0.5/pytest_flakes.egg-info/requires.txt
--- old/pytest-flakes-4.0.1/pytest_flakes.egg-info/requires.txt 2020-07-28
23:51:59.000000000 +0200
+++ new/pytest-flakes-4.0.5/pytest_flakes.egg-info/requires.txt 2021-12-02
23:09:00.000000000 +0100
@@ -1,2 +1,2 @@
-pytest>=2.8.0
+pytest>=5
pyflakes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-flakes-4.0.1/pytest_flakes.py
new/pytest-flakes-4.0.5/pytest_flakes.py
--- old/pytest-flakes-4.0.1/pytest_flakes.py 2020-07-28 23:48:07.000000000
+0200
+++ new/pytest-flakes-4.0.5/pytest_flakes.py 2021-12-02 23:07:40.000000000
+0100
@@ -2,12 +2,15 @@
from pyflakes.api import isPythonFile
import _ast
import re
-import py
+import pathlib
import pytest
import sys
import tokenize
+PYTEST_GTE_7 = hasattr(pytest, 'version_tuple') and pytest.version_tuple >=
(7, 0)
+
+
def assignment_monkeypatched_init(self, name, source):
Binding.__init__(self, name, source)
if name == '__tracebackhide__':
@@ -38,23 +41,29 @@
config.addinivalue_line('markers', "flakes: Tests which run flake.")
-class FlakesPlugin(object):
+class FlakesPlugin:
def __init__(self, config):
self.ignore = Ignorer(config.getini("flakes-ignore"))
self.mtimes = config.cache.get(HISTKEY, {})
- def pytest_collect_file(self, path, parent):
- config = parent.config
- if config.option.flakes and isPythonFile(path.strpath):
- flakesignore = self.ignore(path)
- if flakesignore is not None:
- if hasattr(FlakesItem, 'from_parent'):
- item = FlakesItem.from_parent(parent,
+ if PYTEST_GTE_7:
+ def pytest_collect_file(self, file_path, parent):
+ config = parent.config
+ if config.option.flakes and isPythonFile(str(file_path)):
+ flakesignore = self.ignore(file_path)
+ if flakesignore is not None:
+ return FlakesFile.from_parent(parent,
+ path=file_path,
+ flakesignore=flakesignore)
+ else:
+ def pytest_collect_file(self, path, parent):
+ config = parent.config
+ if config.option.flakes and isPythonFile(path.strpath):
+ flakesignore = self.ignore(pathlib.Path(str(path)))
+ if flakesignore is not None:
+ return FlakesFile.from_parent(parent,
fspath=path,
flakesignore=flakesignore)
- else:
- item = FlakesItem(path, parent, flakesignore)
- return item
def pytest_sessionfinish(self, session):
session.config.cache.set(HISTKEY, self.mtimes)
@@ -64,25 +73,38 @@
""" indicates an error during pyflakes checks. """
-class FlakesItem(pytest.Item, pytest.File):
-
- def __init__(self, fspath, parent, flakesignore):
- super(FlakesItem, self).__init__(fspath, parent)
- if hasattr(self, 'add_marker'):
- self.add_marker("flakes")
- else:
- self.keywords["flakes"] = True
+class FlakesFile(pytest.File):
+ def __init__(self, *k, flakesignore, **kw):
+ super().__init__(*k, **kw)
self.flakesignore = flakesignore
+ def collect(self):
+ return [FlakesItem.from_parent(self, name="flake-8")]
+
+
+class FlakesItem(pytest.Item):
+
+ def __init__(self, *k, **kw):
+ super().__init__(*k, **kw)
+ self.add_marker("flakes")
+ self.flakesignore = self.parent.flakesignore
+
def setup(self):
flakesmtimes = self.config._flakes.mtimes
- self._flakesmtime = self.fspath.mtime()
+ if PYTEST_GTE_7:
+ self._flakesmtime = self.path.stat().st_mtime
+ else:
+ self._flakesmtime = self.fspath.mtime()
old = flakesmtimes.get(self.nodeid, 0)
if old == [self._flakesmtime, self.flakesignore]:
pytest.skip("file(s) previously passed pyflakes checks")
def runtest(self):
- found_errors, out = check_file(self.fspath, self.flakesignore)
+ if PYTEST_GTE_7:
+ found_errors, out = check_file(self.path, self.flakesignore)
+ else:
+ path = pathlib.Path(str(self.fspath))
+ found_errors, out = check_file(path, self.flakesignore)
if found_errors:
raise FlakesError("\n".join(out))
# update mtime only if test passed
@@ -92,14 +114,17 @@
def repr_failure(self, excinfo):
if excinfo.errisinstance(FlakesError):
return excinfo.value.args[0]
- return super(FlakesItem, self).repr_failure(excinfo)
+ return super().repr_failure(excinfo)
def reportinfo(self):
if self.flakesignore:
ignores = "(ignoring %s)" % " ".join(self.flakesignore)
else:
ignores = ""
- return (self.fspath, -1, "pyflakes-check%s" % ignores)
+ if PYTEST_GTE_7:
+ return (self.path, -1, "pyflakes-check%s" % ignores)
+ else:
+ return (self.fspath, -1, "pyflakes-check%s" % ignores)
class Ignorer:
@@ -123,7 +148,7 @@
def __call__(self, path):
l = set()
for (glob, ignlist) in self.ignores:
- if not glob or path.fnmatch(glob):
+ if not glob or path.glob(glob):
if ignlist is None:
return None
l.update(set(ignlist))
@@ -131,12 +156,9 @@
def check_file(path, flakesignore):
- if not hasattr(tokenize, 'open'):
- codeString = path.read()
- else:
- with tokenize.open(path.strpath) as f:
- codeString = f.read()
- filename = py.builtin._totext(path)
+ with tokenize.open(str(path)) as f:
+ codeString = f.read()
+ filename = str(path)
errors = []
try:
tree = compile(codeString, filename, "exec", _ast.PyCF_ONLY_AST)
@@ -152,10 +174,10 @@
offset = offset - (len(text) - len(line))
msg = '%s:%d: %s' % (filename, lineno, value.args[0])
- msg = "%s\n%s" % (msg, line)
+ msg = "{}\n{}".format(msg, line)
if offset is not None:
- msg = "%s\n%s" % (msg, "%s^" % (" " * offset))
+ msg = "{}\n{}".format(msg, "%s^" % (" " * offset))
errors.append(msg)
return 1, errors
else:
@@ -167,7 +189,7 @@
if warning.__class__.__name__ in flakesignore or
is_ignored_line(lines[warning.lineno - 1].strip()):
continue
errors.append(
- '%s:%s: %s\n%s' % (
+ '{}:{}: {}\n{}'.format(
warning.filename,
warning.lineno,
warning.__class__.__name__,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-flakes-4.0.1/setup.py
new/pytest-flakes-4.0.5/setup.py
--- old/pytest-flakes-4.0.1/setup.py 2020-07-28 23:50:48.000000000 +0200
+++ new/pytest-flakes-4.0.5/setup.py 2021-12-02 23:07:53.000000000 +0100
@@ -5,22 +5,24 @@
description='pytest plugin to check source code with pyflakes',
long_description=open("README.rst").read(),
license="MIT license",
- version='4.0.1',
+ version='4.0.5',
author='Florian Schulze, Holger Krekel and Ronny Pfannschmidt',
url='https://github.com/asmeurer/pytest-flakes',
+ python_requires='>=3.5',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Framework :: Pytest',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
- '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.7',
+ 'Programming Language :: Python :: 3.8',
+ 'Programming Language :: Python :: 3 :: Only',
'Topic :: Software Development :: Testing',
],
py_modules=['pytest_flakes'],
entry_points={'pytest11': ['flakes = pytest_flakes']},
- install_requires=['pytest>=2.8.0', 'pyflakes'])
+ install_requires=['pytest>=5', 'pyflakes'])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-flakes-4.0.1/test_flakes.py
new/pytest-flakes-4.0.5/test_flakes.py
--- old/pytest-flakes-4.0.1/test_flakes.py 2020-07-28 23:48:07.000000000
+0200
+++ new/pytest-flakes-4.0.5/test_flakes.py 2021-10-26 21:41:05.000000000
+0200
@@ -1,4 +1,6 @@
-# coding=utf8
+import sys
+
+
pytest_plugins = "pytester",
@@ -21,7 +23,10 @@
pass
""")
result = testdir.runpytest("--flakes", "--ignore", testdir.tmpdir)
- assert "1: invalid syntax" in result.stdout.str()
+ if sys.version_info >= (3, 10):
+ assert "1: expected ':'" in result.stdout.str()
+ else:
+ assert "1: invalid syntax" in result.stdout.str()
assert 'passed' not in result.stdout.str()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-flakes-4.0.1/tox.ini
new/pytest-flakes-4.0.5/tox.ini
--- old/pytest-flakes-4.0.1/tox.ini 2020-07-28 23:48:07.000000000 +0200
+++ new/pytest-flakes-4.0.5/tox.ini 2021-10-26 21:41:05.000000000 +0200
@@ -1,10 +1,10 @@
[tox]
-envlist = py27,py34,py35,py36,py37,py38
+envlist = py35,py36,py37,py38,py39,py310
[testenv]
usedevelop = true
deps =
- pytest
+ pytest>=5
pytest-pep8
coverage
commands =