Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-flake8-blind-except for
openSUSE:Factory checked in at 2022-01-15 20:05:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-flake8-blind-except (Old)
and /work/SRC/openSUSE:Factory/.python-flake8-blind-except.new.1892 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-flake8-blind-except"
Sat Jan 15 20:05:17 2022 rev:2 rq:946646 version:0.2.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-flake8-blind-except/python-flake8-blind-except.changes
2019-01-03 18:09:48.411968448 +0100
+++
/work/SRC/openSUSE:Factory/.python-flake8-blind-except.new.1892/python-flake8-blind-except.changes
2022-01-15 20:05:29.841772926 +0100
@@ -1,0 +2,6 @@
+Sat Jan 15 15:39:23 UTC 2022 - Dirk M??ller <[email protected]>
+
+- update to 0.2.0:
+ * B902 error added for cases where a blind ``Exception`` is caught
+
+-------------------------------------------------------------------
Old:
----
flake8-blind-except-0.1.1.tar.gz
New:
----
flake8-blind-except-0.2.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-flake8-blind-except.spec ++++++
--- /var/tmp/diff_new_pack.7LMUX2/_old 2022-01-15 20:05:30.353773324 +0100
+++ /var/tmp/diff_new_pack.7LMUX2/_new 2022-01-15 20:05:30.357773328 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-flake8-blind-except
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# 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,12 +18,12 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-flake8-blind-except
-Version: 0.1.1
+Version: 0.2.0
Release: 0
Summary: A flake8 extension that checks for blind except: statements
License: MIT
Group: Development/Languages/Python
-Url: https://github.com/elijahandrews/flake8-blind-except
+URL: https://github.com/elijahandrews/flake8-blind-except
Source:
https://files.pythonhosted.org/packages/source/f/flake8-blind-except/flake8-blind-except-%{version}.tar.gz
Source1: LICENSE
BuildRequires: %{python_module setuptools}
@@ -31,7 +31,6 @@
BuildRequires: python-rpm-macros
Requires: python-setuptools
BuildArch: noarch
-
%python_subpackages
%description
++++++ flake8-blind-except-0.1.1.tar.gz -> flake8-blind-except-0.2.0.tar.gz
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/flake8-blind-except-0.1.1/PKG-INFO
new/flake8-blind-except-0.2.0/PKG-INFO
--- old/flake8-blind-except-0.1.1/PKG-INFO 2016-06-27 21:25:24.000000000
+0200
+++ new/flake8-blind-except-0.2.0/PKG-INFO 2021-01-07 20:33:13.113833200
+0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: flake8-blind-except
-Version: 0.1.1
+Version: 0.2.0
Summary: A flake8 extension that checks for blind except: statements
Home-page: https://github.com/elijahandrews/flake8-blind-except
Author: Elijah Andrews
@@ -9,7 +9,9 @@
Description: flake8-blind-except
===================
- A flake8 extension that checks for blind, catch-all ``except:``
statements.
+ A flake8 extension that checks for blind, catch-all ``except:`` and
``except Exception:`` statements.
+
+ As of `pycodestyle 2.1.0
<https://github.com/PyCQA/pycodestyle/commit/543f12b06592c53e2e60edc4846ee02ab9550e8b/>`_,
"E722 do not use bare except, specify exception instead" is built-in. However,
bare ``Exception`` and ``BaseException`` are still allowed. This extension
flags them as `B902`.
Using ``except`` without explicitly specifying which exceptions to
catch is generally considered bad practice, since it catches system signals
like ``SIGINT``. You probably want to handle system interrupts differently than
exceptions occuring in your code.
@@ -58,14 +60,30 @@
B901 blind except: statement
+ or::
+
+ B902 blind except Exception: statement
+
+ Contributing
+ ------------
+
+ I'm not working on Python these days, so probably won't be making
updates anytime soon. PRs are welcome though!
+
+ Testing
+ -------
+ Tests can be run with ``pytest --doctest-modules
flake8_blind_except.py``.
Changes
- ------
+ -------
+
+ 0.2.0 - 2021-01-07
+ ``````````````````
+ * B902 error added for cases where a blind ``Exception`` is caught.
0.1.1 - 2016-06-27
``````````````````
- * ``pep8`` was renamed to ``pycodestyle`` in its 2.0 release.
Compatibility update for this change
+ * ``pep8`` was renamed to ``pycodestyle`` in its 2.0 release.
Compatibility update for this change.
0.1.0 - 2014-02-07
``````````````````
@@ -74,7 +92,7 @@
Notes
-----
- I've tested this package with flake8 2.6.2 and Python 2.7.3. It is
untested (but likely compatible) with other software versions.
+ I've tested this package with flake8 2.6.2 + Python 2.7.3 and flake8
3.7.9 + Python 3.7.5.
Keywords: flake8 except exception
Platform: UNKNOWN
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/flake8-blind-except-0.1.1/README.rst
new/flake8-blind-except-0.2.0/README.rst
--- old/flake8-blind-except-0.1.1/README.rst 2016-06-27 21:15:23.000000000
+0200
+++ new/flake8-blind-except-0.2.0/README.rst 2021-01-07 20:33:11.000000000
+0100
@@ -1,7 +1,9 @@
flake8-blind-except
===================
-A flake8 extension that checks for blind, catch-all ``except:`` statements.
+A flake8 extension that checks for blind, catch-all ``except:`` and ``except
Exception:`` statements.
+
+As of `pycodestyle 2.1.0
<https://github.com/PyCQA/pycodestyle/commit/543f12b06592c53e2e60edc4846ee02ab9550e8b/>`_,
"E722 do not use bare except, specify exception instead" is built-in. However,
bare ``Exception`` and ``BaseException`` are still allowed. This extension
flags them as `B902`.
Using ``except`` without explicitly specifying which exceptions to catch is
generally considered bad practice, since it catches system signals like
``SIGINT``. You probably want to handle system interrupts differently than
exceptions occuring in your code.
@@ -50,14 +52,30 @@
B901 blind except: statement
+or::
+
+ B902 blind except Exception: statement
+
+Contributing
+------------
+
+I'm not working on Python these days, so probably won't be making updates
anytime soon. PRs are welcome though!
+
+Testing
+-------
+Tests can be run with ``pytest --doctest-modules flake8_blind_except.py``.
Changes
-------
+-------
+
+0.2.0 - 2021-01-07
+``````````````````
+* B902 error added for cases where a blind ``Exception`` is caught.
0.1.1 - 2016-06-27
``````````````````
-* ``pep8`` was renamed to ``pycodestyle`` in its 2.0 release. Compatibility
update for this change
+* ``pep8`` was renamed to ``pycodestyle`` in its 2.0 release. Compatibility
update for this change.
0.1.0 - 2014-02-07
``````````````````
@@ -66,4 +84,4 @@
Notes
-----
-I've tested this package with flake8 2.6.2 and Python 2.7.3. It is untested
(but likely compatible) with other software versions.
+I've tested this package with flake8 2.6.2 + Python 2.7.3 and flake8 3.7.9 +
Python 3.7.5.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/flake8-blind-except-0.1.1/flake8_blind_except.egg-info/PKG-INFO
new/flake8-blind-except-0.2.0/flake8_blind_except.egg-info/PKG-INFO
--- old/flake8-blind-except-0.1.1/flake8_blind_except.egg-info/PKG-INFO
2016-06-27 21:25:24.000000000 +0200
+++ new/flake8-blind-except-0.2.0/flake8_blind_except.egg-info/PKG-INFO
2021-01-07 20:33:13.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: flake8-blind-except
-Version: 0.1.1
+Version: 0.2.0
Summary: A flake8 extension that checks for blind except: statements
Home-page: https://github.com/elijahandrews/flake8-blind-except
Author: Elijah Andrews
@@ -9,7 +9,9 @@
Description: flake8-blind-except
===================
- A flake8 extension that checks for blind, catch-all ``except:``
statements.
+ A flake8 extension that checks for blind, catch-all ``except:`` and
``except Exception:`` statements.
+
+ As of `pycodestyle 2.1.0
<https://github.com/PyCQA/pycodestyle/commit/543f12b06592c53e2e60edc4846ee02ab9550e8b/>`_,
"E722 do not use bare except, specify exception instead" is built-in. However,
bare ``Exception`` and ``BaseException`` are still allowed. This extension
flags them as `B902`.
Using ``except`` without explicitly specifying which exceptions to
catch is generally considered bad practice, since it catches system signals
like ``SIGINT``. You probably want to handle system interrupts differently than
exceptions occuring in your code.
@@ -58,14 +60,30 @@
B901 blind except: statement
+ or::
+
+ B902 blind except Exception: statement
+
+ Contributing
+ ------------
+
+ I'm not working on Python these days, so probably won't be making
updates anytime soon. PRs are welcome though!
+
+ Testing
+ -------
+ Tests can be run with ``pytest --doctest-modules
flake8_blind_except.py``.
Changes
- ------
+ -------
+
+ 0.2.0 - 2021-01-07
+ ``````````````````
+ * B902 error added for cases where a blind ``Exception`` is caught.
0.1.1 - 2016-06-27
``````````````````
- * ``pep8`` was renamed to ``pycodestyle`` in its 2.0 release.
Compatibility update for this change
+ * ``pep8`` was renamed to ``pycodestyle`` in its 2.0 release.
Compatibility update for this change.
0.1.0 - 2014-02-07
``````````````````
@@ -74,7 +92,7 @@
Notes
-----
- I've tested this package with flake8 2.6.2 and Python 2.7.3. It is
untested (but likely compatible) with other software versions.
+ I've tested this package with flake8 2.6.2 + Python 2.7.3 and flake8
3.7.9 + Python 3.7.5.
Keywords: flake8 except exception
Platform: UNKNOWN
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/flake8-blind-except-0.1.1/flake8_blind_except.egg-info/SOURCES.txt
new/flake8-blind-except-0.2.0/flake8_blind_except.egg-info/SOURCES.txt
--- old/flake8-blind-except-0.1.1/flake8_blind_except.egg-info/SOURCES.txt
2016-06-27 21:25:24.000000000 +0200
+++ new/flake8-blind-except-0.2.0/flake8_blind_except.egg-info/SOURCES.txt
2021-01-07 20:33:13.000000000 +0100
@@ -6,6 +6,5 @@
flake8_blind_except.egg-info/dependency_links.txt
flake8_blind_except.egg-info/entry_points.txt
flake8_blind_except.egg-info/not-zip-safe
-flake8_blind_except.egg-info/pbr.json
flake8_blind_except.egg-info/requires.txt
flake8_blind_except.egg-info/top_level.txt
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/flake8-blind-except-0.1.1/flake8_blind_except.egg-info/pbr.json
new/flake8-blind-except-0.2.0/flake8_blind_except.egg-info/pbr.json
--- old/flake8-blind-except-0.1.1/flake8_blind_except.egg-info/pbr.json
2016-06-27 21:25:24.000000000 +0200
+++ new/flake8-blind-except-0.2.0/flake8_blind_except.egg-info/pbr.json
1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-{"is_release": false, "git_version": "5c11477"}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/flake8-blind-except-0.1.1/flake8_blind_except.py
new/flake8-blind-except-0.2.0/flake8_blind_except.py
--- old/flake8-blind-except-0.1.1/flake8_blind_except.py 2016-06-27
21:15:47.000000000 +0200
+++ new/flake8-blind-except-0.2.0/flake8_blind_except.py 2021-01-07
20:33:11.000000000 +0100
@@ -1,21 +1,41 @@
-
try:
import pycodestyle
except ImportError:
import pep8 as pycodestyle
import re
-__version__ = '0.1.1'
-
-BLIND_EXCEPT_REGEX = re.compile(r'(except:)') # noqa
+__version__ = '0.2.0'
+BLIND_EXCEPT_REGEX = re.compile(r'(^[
\t]*except(.*\b(Base)?Exception\b.*)?:)') # noqa
def check_blind_except(physical_line):
+ """Check for blind except statements.
+
+ >>> check_blind_except('except:')
+ (0, 'B901 blind except: statement')
+ >>> check_blind_except('except Exception:')
+ (0, 'B902 blind except Exception: statement')
+ >>> check_blind_except('except Exception as exc:')
+ (0, 'B902 blind except Exception: statement')
+ >>> check_blind_except('except ValueError, Exception as exc:')
+ (0, 'B902 blind except Exception: statement')
+ >>> check_blind_except('except Exception, ValueError as exc:')
+ (0, 'B902 blind except Exception: statement')
+ >>> check_blind_except('except BaseException as exc:')
+ (0, 'B902 blind except Exception: statement')
+ >>> check_blind_except('except GoodException as exc: # except:')
+ >>> check_blind_except('except ExceptionGood as exc:')
+ >>> check_blind_except('except Exception') # only trigger with trailing
colon
+ >>> check_blind_except('some code containing except: in string')
+ """
if pycodestyle.noqa(physical_line):
return
match = BLIND_EXCEPT_REGEX.search(physical_line)
if match:
- return match.start(), 'B901 blind except: statement'
+ if match.group(2) is None:
+ return match.start(), 'B901 blind except: statement'
+ else:
+ return match.start(), 'B902 blind except Exception: statement'
check_blind_except.name = 'flake8-blind-except'
check_blind_except.version = __version__
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/flake8-blind-except-0.1.1/setup.cfg
new/flake8-blind-except-0.2.0/setup.cfg
--- old/flake8-blind-except-0.1.1/setup.cfg 2016-06-27 21:25:24.000000000
+0200
+++ new/flake8-blind-except-0.2.0/setup.cfg 2021-01-07 20:33:13.114300500
+0100
@@ -1,5 +1,4 @@
[egg_info]
tag_build =
tag_date = 0
-tag_svn_revision = 0