Hello community,

here is the log from the commit of package python3-pylint for openSUSE:Factory 
checked in at 2016-01-26 10:15:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-pylint (Old)
 and      /work/SRC/openSUSE:Factory/.python3-pylint.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python3-pylint"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-pylint/python3-pylint.changes    
2016-01-22 01:07:00.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python3-pylint.new/python3-pylint.changes       
2016-01-26 10:15:20.000000000 +0100
@@ -1,0 +2,10 @@
+Sun Jan 17 00:03:04 UTC 2016 - a...@gmx.de
+
+- update to version 1.5.4:
+  * Merge StringMethodChecker with StringFormatChecker. This fixes a
+    bug where disabling all the messages and enabling only a handful of
+    messages from the StringFormatChecker would have resulted in no
+    messages at all.
+  * Don't apply unneeded-not over sets.
+
+-------------------------------------------------------------------

Old:
----
  pylint-1.5.3.tar.gz

New:
----
  pylint-1.5.4.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python3-pylint.spec ++++++
--- /var/tmp/diff_new_pack.8vJoPX/_old  2016-01-26 10:15:21.000000000 +0100
+++ /var/tmp/diff_new_pack.8vJoPX/_new  2016-01-26 10:15:21.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           python3-pylint
-Version:        1.5.3
+Version:        1.5.4
 Release:        0
 Summary:        Syntax and style checker for Python code
 License:        GPL-2.0+

++++++ pylint-1.5.3.tar.gz -> pylint-1.5.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pylint-1.5.3/ChangeLog new/pylint-1.5.4/ChangeLog
--- old/pylint-1.5.3/ChangeLog  2016-01-11 10:51:49.000000000 +0100
+++ new/pylint-1.5.4/ChangeLog  2016-01-15 21:26:34.000000000 +0100
@@ -1,6 +1,17 @@
 ChangeLog for Pylint
 --------------------
 
+
+2016-01-15 -- 1.5.4
+
+    * Merge StringMethodChecker with StringFormatChecker. This fixes a
+      bug where disabling all the messages and enabling only a handful of
+      messages from the StringFormatChecker would have resulted in no
+      messages at all.
+
+    * Don't apply unneeded-not over sets.
+
+
 2016-01-11 -- 1.5.3
 
     * Handle the import fallback idiom with regard to wrong-import-order.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pylint-1.5.3/PKG-INFO new/pylint-1.5.4/PKG-INFO
--- old/pylint-1.5.3/PKG-INFO   2016-01-11 11:07:57.000000000 +0100
+++ new/pylint-1.5.4/PKG-INFO   2016-01-15 21:32:52.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pylint
-Version: 1.5.3
+Version: 1.5.4
 Summary: python code static checker
 Home-page: http://www.pylint.org
 Author: Logilab
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pylint-1.5.3/pylint/__pkginfo__.py 
new/pylint-1.5.4/pylint/__pkginfo__.py
--- old/pylint-1.5.3/pylint/__pkginfo__.py      2016-01-11 10:51:17.000000000 
+0100
+++ new/pylint-1.5.4/pylint/__pkginfo__.py      2016-01-15 21:26:42.000000000 
+0100
@@ -23,7 +23,7 @@
 
 modname = distname = 'pylint'
 
-numversion = (1, 5, 3)
+numversion = (1, 5, 4)
 version = '.'.join([str(num) for num in numversion])
 
 install_requires = [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pylint-1.5.3/pylint/checkers/base.py 
new/pylint-1.5.4/pylint/checkers/base.py
--- old/pylint-1.5.3/pylint/checkers/base.py    2016-01-09 21:13:05.000000000 
+0100
+++ new/pylint-1.5.4/pylint/checkers/base.py    2016-01-15 20:56:43.000000000 
+0100
@@ -197,6 +197,12 @@
     return 'method'
 
 
+def _is_none(node):
+    return (node is None or
+            (isinstance(node, astroid.Const) and node.value is None) or
+            (isinstance(node, astroid.Name)  and node.name == 'None')
+           )
+
 
 def _has_abstract_methods(node):
     """
@@ -264,6 +270,28 @@
                 return True
     return False
 
+
+def _node_type(node):
+    """Return the inferred type for `node`
+
+    If there is more than one possible type, or if inferred type is YES or 
None,
+    return None
+    """
+    # check there is only one possible type for the assign node. Else we
+    # don't handle it for now
+    types = set()
+    try:
+        for var_type in node.infer():
+            if var_type == astroid.YES or _is_none(var_type):
+                continue
+            types.add(var_type)
+            if len(types) > 1:
+                return
+    except InferenceError:
+        return
+    return types.pop() if types else None
+
+
 class _BasicChecker(BaseChecker):
     __implements__ = IAstroidChecker
     name = 'basic'
@@ -397,11 +425,7 @@
             else:
                 values = [r.value for r in returns]
                 # Are we returning anything but None from constructors
-                if [v for v in values
-                        if not (v is None or
-                                (isinstance(v, astroid.Const) and v.value is 
None) or
-                                (isinstance(v, astroid.Name)  and v.name == 
'None')
-                               )]:
+                if [v for v in values if not _is_none(v)]:
                     self.add_message('return-in-init', node=node)
         elif node.is_generator():
             # make sure we don't mix non-None returns and yields
@@ -1794,7 +1818,7 @@
     def visit_comprehension(self, node):
         self._if_counter += len(node.ifs)
 
-    @check_messages('too-many-nested-blocks')
+    @check_messages('too-many-nested-blocks', 'simplifiable-if-statement')
     def visit_if(self, node):
         self._check_simplifiable_if(node)
         self._check_nested_blocks(node)
@@ -1862,6 +1886,12 @@
 
     reverse_op = {'<': '>=', '<=': '>', '>': '<=', '>=': '<', '==': '!=',
                   '!=': '==', 'in': 'not in', 'is': 'is not'}
+    # sets are not ordered, so for example "not set(LEFT_VALS) <= 
set(RIGHT_VALS)" is
+    # not equivalent to "set(LEFT_VALS) > set(RIGHT_VALS)"
+    skipped_nodes = (astroid.Set, )
+    # 'builtins' py3, '__builtin__' py2
+    skipped_classnames = ['%s.%s' % (six.moves.builtins.__name__, qname)
+                          for qname in ('set', 'frozenset')]
 
     @check_messages('unneeded-not')
     def visit_unaryop(self, node):
@@ -1881,12 +1911,18 @@
             operator, right = operand.ops[0]
             if operator not in self.reverse_op:
                 return
-
             # Ignore __ne__ as function of __eq__
             frame = node.frame()
             if frame.name == '__ne__' and operator == '==':
                 return
-
+            for _type in (_node_type(left), _node_type(right)):
+                if not _type:
+                    return
+                if isinstance(_type, self.skipped_nodes):
+                    return
+                if (isinstance(_type, astroid.Instance) and
+                        _type.qname() in self.skipped_classnames):
+                    return
             suggestion = '%s %s %s' % (left.as_string(),
                                        self.reverse_op[operator],
                                        right.as_string())
@@ -1951,23 +1987,12 @@
         if isinstance(target, (astroid.Tuple, astroid.Subscript)):
             return
         # ignore NoneType
-        if node.value.as_string() == 'None':
-            return
-        # check there is only one possible type for the assign node. Else we
-        # don't handle it for now
-        types = set()
-        try:
-            for var_type in node.value.infer():
-                if var_type == astroid.YES or var_type.as_string() == 'None':
-                    continue
-                var_type = var_type.pytype()
-                types.add(var_type)
-                if len(types) > 1:
-                    return
-        except InferenceError:
+        if _is_none(node):
             return
-        if types:
-            self._assigns[-1].setdefault(target.as_string(), []).append((node, 
types.pop()))
+        _type = _node_type(node.value)
+        if _type:
+            self._assigns[-1].setdefault(target.as_string(), []).append(
+                (node, _type.pytype()))
 
 
 def register(linter):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pylint-1.5.3/pylint/checkers/classes.py 
new/pylint-1.5.4/pylint/checkers/classes.py
--- old/pylint-1.5.3/pylint/checkers/classes.py 2016-01-09 21:13:05.000000000 
+0100
+++ new/pylint-1.5.4/pylint/checkers/classes.py 2016-01-15 16:54:29.000000000 
+0100
@@ -348,6 +348,11 @@
         self._first_attrs = []
         self._meth_could_be_func = None
 
+    @check_messages('no-init', 'invalid-slots', 'inherit-non-class',
+                    'inconsistent-mro', 'duplicate-bases',
+                    'invalid-slots', 'invalid-slots-object', 'abstract-method',
+                    'access-member-before-definition',
+                    'attribute-defined-outside-init')
     def visit_classdef(self, node):
         """init visit variable _accessed
         """
@@ -363,7 +368,6 @@
         self._check_proper_bases(node)
         self._check_consistent_mro(node)
 
-    @check_messages('inconsistent-mro', 'duplicate-bases')
     def _check_consistent_mro(self, node):
         """Detect that a class has a consistent mro or duplicate bases."""
         try:
@@ -376,7 +380,6 @@
             # Old style class, there's no mro so don't do anything.
             pass
 
-    @check_messages('inherit-non-class')
     def _check_proper_bases(self, node):
         """
         Detect that a class inherits something which is not
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pylint-1.5.3/pylint/checkers/exceptions.py 
new/pylint-1.5.4/pylint/checkers/exceptions.py
--- old/pylint-1.5.3/pylint/checkers/exceptions.py      2015-12-24 
17:12:25.000000000 +0100
+++ new/pylint-1.5.4/pylint/checkers/exceptions.py      2016-01-15 
15:00:42.000000000 +0100
@@ -307,7 +307,7 @@
 
     @check_messages('bare-except', 'broad-except',
                     'binary-op-exception', 'bad-except-order',
-                    'catching-non-exception')
+                    'catching-non-exception', 'duplicate-except')
     def visit_tryexcept(self, node):
         """check for empty except"""
         exceptions_classes = []
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pylint-1.5.3/pylint/checkers/strings.py 
new/pylint-1.5.4/pylint/checkers/strings.py
--- old/pylint-1.5.3/pylint/checkers/strings.py 2015-12-24 17:12:25.000000000 
+0100
+++ new/pylint-1.5.4/pylint/checkers/strings.py 2016-01-13 15:25:49.000000000 
+0100
@@ -76,7 +76,10 @@
               "too-few-format-args",
               "Used when a format string that uses unnamed conversion \
               specifiers is given too few arguments"),
-
+    'E1310': ("Suspicious argument in %s.%s call",
+              "bad-str-strip-call",
+              "The argument to a str.{l,r,}strip call contains a"
+              " duplicate character, "),
     'W1302': ("Invalid format string",
               "bad-format-string",
               "Used when a PEP 3101 format string is invalid.",
@@ -319,16 +322,6 @@
                     self.add_message('too-few-format-args', node=node)
 
 
-class StringMethodsChecker(BaseChecker):
-    __implements__ = (IAstroidChecker,)
-    name = 'string'
-    msgs = {
-        'E1310': ("Suspicious argument in %s.%s call",
-                  "bad-str-strip-call",
-                  "The argument to a str.{l,r,}strip call contains a"
-                  " duplicate character, "),
-        }
-
     @check_messages(*(MSGS.keys()))
     def visit_call(self, node):
         func = utils.safe_infer(node.func)
@@ -622,5 +615,4 @@
 def register(linter):
     """required method to auto register this checker """
     linter.register_checker(StringFormatChecker(linter))
-    linter.register_checker(StringMethodsChecker(linter))
     linter.register_checker(StringConstantChecker(linter))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pylint-1.5.3/pylint/test/functional/string_formatting_disable.py 
new/pylint-1.5.4/pylint/test/functional/string_formatting_disable.py
--- old/pylint-1.5.3/pylint/test/functional/string_formatting_disable.py        
1970-01-01 01:00:00.000000000 +0100
+++ new/pylint-1.5.4/pylint/test/functional/string_formatting_disable.py        
2016-01-13 15:25:49.000000000 +0100
@@ -0,0 +1 @@
+"a {} {".format(1) # [bad-format-string]
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pylint-1.5.3/pylint/test/functional/string_formatting_disable.rc 
new/pylint-1.5.4/pylint/test/functional/string_formatting_disable.rc
--- old/pylint-1.5.3/pylint/test/functional/string_formatting_disable.rc        
1970-01-01 01:00:00.000000000 +0100
+++ new/pylint-1.5.4/pylint/test/functional/string_formatting_disable.rc        
2016-01-13 15:25:49.000000000 +0100
@@ -0,0 +1,3 @@
+[Messages Control]
+disable=all
+enable=bad-format-string
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pylint-1.5.3/pylint/test/functional/string_formatting_disable.txt 
new/pylint-1.5.4/pylint/test/functional/string_formatting_disable.txt
--- old/pylint-1.5.3/pylint/test/functional/string_formatting_disable.txt       
1970-01-01 01:00:00.000000000 +0100
+++ new/pylint-1.5.4/pylint/test/functional/string_formatting_disable.txt       
2016-01-13 15:25:49.000000000 +0100
@@ -0,0 +1 @@
+bad-format-string:1::Invalid format string
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pylint-1.5.3/pylint/test/functional/super_checks.py 
new/pylint-1.5.4/pylint/test/functional/super_checks.py
--- old/pylint-1.5.3/pylint/test/functional/super_checks.py     2015-12-24 
17:12:25.000000000 +0100
+++ new/pylint-1.5.4/pylint/test/functional/super_checks.py     2016-01-12 
08:40:27.000000000 +0100
@@ -1,4 +1,4 @@
-# pylint: disable=too-few-public-methods,import-error, 
no-absolute-import,missing-docstring
+# pylint: disable=too-few-public-methods,import-error, 
no-absolute-import,missing-docstring, wrong-import-position,invalid-name
 """check use of super"""
 
 from unknown import Missing
@@ -96,3 +96,19 @@
         # Even though BaseClass has a __getattr__, that won't
         # be called.
         super(InvalidSuperChecks, self).attribute_error() # [no-member]
+
+
+
+# Regression for PyCQA/pylint/issues/773
+import subprocess
+
+# The problem was related to astroid not filtering statements
+# at scope level properly, basically not doing strong updates.
+try:
+    TimeoutExpired = subprocess.TimeoutExpired
+except AttributeError:
+    class TimeoutExpired(subprocess.CalledProcessError):
+        def __init__(self):
+            returncode = -1
+            self.timeout = -1
+            super(TimeoutExpired, self).__init__(returncode)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pylint-1.5.3/pylint/test/functional/unneeded_not.py 
new/pylint-1.5.4/pylint/test/functional/unneeded_not.py
--- old/pylint-1.5.3/pylint/test/functional/unneeded_not.py     2016-01-11 
10:42:15.000000000 +0100
+++ new/pylint-1.5.4/pylint/test/functional/unneeded_not.py     2016-01-15 
20:56:43.000000000 +0100
@@ -1,6 +1,6 @@
 """Check exceeding negations in boolean expressions trigger warnings"""
 
-# pylint: disable=singleton-comparison, too-many-branches, 
too-few-public-methods
+# pylint: 
disable=singleton-comparison,too-many-branches,too-few-public-methods,undefined-variable
 
 def unneeded_not():
     """This is not ok
@@ -37,7 +37,7 @@
         pass
 
 
-def not_checked():
+def tolerated_statements():
     """This is ok"""
     bool_var = True
     someint = 2
@@ -49,6 +49,13 @@
         pass
     if not 2 <= someint < 3 < 4:
         pass
+    if not set('bar') <= set('foobaz'):
+        pass
+    if not set(something) <= 3:
+        pass
+    if not frozenset(something) <= 3:
+        pass
+
 
 class Klass(object):
     """This is also ok"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pylint-1.5.3/pylint/test/unittest_checker_strings.py 
new/pylint-1.5.4/pylint/test/unittest_checker_strings.py
--- old/pylint-1.5.3/pylint/test/unittest_checker_strings.py    2015-12-24 
17:12:26.000000000 +0100
+++ new/pylint-1.5.4/pylint/test/unittest_checker_strings.py    2016-01-13 
15:25:49.000000000 +0100
@@ -24,7 +24,7 @@
 
 
 class StringCheckerTest(CheckerTestCase):
-    CHECKER_CLASS = strings.StringMethodsChecker
+    CHECKER_CLASS = strings.StringFormatChecker
 
     @unittest.skipUnless(sys.version_info > (3, 0),
                          "Tests that the string formatting checker "
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pylint-1.5.3/pylint.egg-info/PKG-INFO 
new/pylint-1.5.4/pylint.egg-info/PKG-INFO
--- old/pylint-1.5.3/pylint.egg-info/PKG-INFO   2016-01-11 11:07:49.000000000 
+0100
+++ new/pylint-1.5.4/pylint.egg-info/PKG-INFO   2016-01-15 21:32:43.000000000 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pylint
-Version: 1.5.3
+Version: 1.5.4
 Summary: python code static checker
 Home-page: http://www.pylint.org
 Author: Logilab
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pylint-1.5.3/pylint.egg-info/SOURCES.txt 
new/pylint-1.5.4/pylint.egg-info/SOURCES.txt
--- old/pylint-1.5.3/pylint.egg-info/SOURCES.txt        2016-01-11 
11:07:49.000000000 +0100
+++ new/pylint-1.5.4/pylint.egg-info/SOURCES.txt        2016-01-15 
21:32:43.000000000 +0100
@@ -468,6 +468,9 @@
 pylint/test/functional/statement_without_effect.txt
 pylint/test/functional/string_formatting.py
 pylint/test/functional/string_formatting.txt
+pylint/test/functional/string_formatting_disable.py
+pylint/test/functional/string_formatting_disable.rc
+pylint/test/functional/string_formatting_disable.txt
 pylint/test/functional/string_formatting_failed_inference.py
 pylint/test/functional/string_formatting_py27.py
 pylint/test/functional/string_formatting_py27.rc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pylint-1.5.3/setup.cfg new/pylint-1.5.4/setup.cfg
--- old/pylint-1.5.3/setup.cfg  2016-01-11 11:07:57.000000000 +0100
+++ new/pylint-1.5.4/setup.cfg  2016-01-15 21:32:52.000000000 +0100
@@ -6,7 +6,7 @@
 provides = pylint
 
 [egg_info]
+tag_date = 0
 tag_build = 
 tag_svn_revision = 0
-tag_date = 0
 


Reply via email to