Hello community, here is the log from the commit of package python3-pylint for openSUSE:Factory checked in at 2015-12-23 08:50:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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 2015-12-17 15:54:44.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.python3-pylint.new/python3-pylint.changes 2015-12-23 08:50:40.000000000 +0100 @@ -1,0 +2,18 @@ +Mon Dec 21 19:31:18 UTC 2015 - a...@gmx.de + +- specfile: + * README->README.rst + * deleted README.python3, not in tar-ball anymore + +- update to version 1.5.2: + * Don't crash if graphviz is not installed, instead emit a warning + letting the user to know. Closes issue #168. + * Accept only functions and methods for the deprecated-method + checker. This prevents a crash which can occur when an object + doesn't have .qname() method after the inference. + * Don't emit super-on-old-class on classes with unknown bases. + Closes issue #721. + * Allow statements in `if` or `try` blocks containing imports. + Closes issue #714. + +------------------------------------------------------------------- Old: ---- pylint-1.5.1.tar.gz New: ---- pylint-1.5.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python3-pylint.spec ++++++ --- /var/tmp/diff_new_pack.gfq1BW/_old 2015-12-23 08:50:41.000000000 +0100 +++ /var/tmp/diff_new_pack.gfq1BW/_new 2015-12-23 08:50:41.000000000 +0100 @@ -17,7 +17,7 @@ Name: python3-pylint -Version: 1.5.1 +Version: 1.5.2 Release: 0 Summary: Syntax and style checker for Python code License: GPL-2.0+ @@ -98,7 +98,7 @@ %files %defattr(-,root,root) -%doc ChangeLog COPYING README README.Python3 examples/ +%doc ChangeLog COPYING README.rst examples/ %{_bindir}/pylint-%{py3_ver} %{_bindir}/epylint-%{py3_ver} %{_bindir}/pylint-gui-%{py3_ver} ++++++ pylint-1.5.1.tar.gz -> pylint-1.5.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pylint-1.5.1/ChangeLog new/pylint-1.5.2/ChangeLog --- old/pylint-1.5.1/ChangeLog 2015-12-02 16:51:44.000000000 +0100 +++ new/pylint-1.5.2/ChangeLog 2015-12-21 01:15:06.000000000 +0100 @@ -1,6 +1,26 @@ ChangeLog for Pylint -------------------- +2015-12-21 + + * Don't crash if graphviz is not installed, instead emit a + warning letting the user to know. + + Closes issue #168. + + * Accept only functions and methods for the deprecated-method checker. + + This prevents a crash which can occur when an object doesn't have + .qname() method after the inference. + + * Don't emit super-on-old-class on classes with unknown bases. + Closes issue #721. + + * Allow statements in `if` or `try` blocks containing imports. + + Closes issue #714. + + 2015-12-02 -- 1.5.1 * Don't emit unsubscriptable-object if the node is found diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pylint-1.5.1/PKG-INFO new/pylint-1.5.2/PKG-INFO --- old/pylint-1.5.1/PKG-INFO 2015-12-02 16:57:04.000000000 +0100 +++ new/pylint-1.5.2/PKG-INFO 2015-12-21 01:21:43.000000000 +0100 @@ -1,71 +1,12 @@ Metadata-Version: 1.1 Name: pylint -Version: 1.5.1 +Version: 1.5.2 Summary: python code static checker Home-page: http://www.pylint.org Author: Logilab Author-email: python-proje...@lists.logilab.org License: GPL -Description: - .. image:: https://drone.io/bitbucket.org/logilab/pylint/status.png - :alt: drone.io Build Status - :target: https://drone.io/bitbucket.org/logilab/pylint - - README for Pylint - http://www.pylint.org/ - ========================================== - - Pylint is a Python source code analyzer which looks for programming errors, - helps enforcing a coding standard and sniffs for some code smells (as defined in - Martin Fowler's Refactoring book). - - Pylint has many rules enabled by default, way too much to silence them all on a - minimally sized program. It's highly configurable and handle pragmas to control - it from within your code. Additionally, it is possible to write plugins to add - your own checks. - - It's a free software distributed under the GNU Public Licence. - - Development is hosted on bitbucket: https://bitbucket.org/logilab/pylint/ - - You can use the code-qual...@python.org mailing list to discuss about - Pylint. Subscribe at https://mail.python.org/mailman/listinfo/code-quality/ - or read the archives at https://mail.python.org/pipermail/code-quality/ - - Install - ------- - - Pylint requires astroid package (the later the better). - - * https://bitbucket.org/logilab/astroid - - Installation should be as simple as :: - - python -m pip install astroid - - - If you want to install from a source distribution, extract the tarball and run - the following commands :: - - hg update master - python setup.py install - - You'll have to install dependencies in a similar way. For debian and - rpm packages, use your usual tools according to your Linux distribution. - - More information about installation and available distribution format - may be found in the user manual in the *doc* subdirectory. - - Documentation - ------------- - - Look in the doc/ subdirectory or at http://docs.pylint.org - - Pylint is shipped with following additional commands: - - * pyreverse: an UML diagram generator - * symilar: an independent similarities checker - * epylint: Emacs and Flymake compatible Pylint - * pylint-gui: a graphical interface +Description: UNKNOWN Platform: UNKNOWN Classifier: Development Status :: 4 - Beta Classifier: Environment :: Console diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pylint-1.5.1/README new/pylint-1.5.2/README --- old/pylint-1.5.1/README 2015-12-02 15:27:25.000000000 +0100 +++ new/pylint-1.5.2/README 1970-01-01 01:00:00.000000000 +0100 @@ -1,60 +0,0 @@ - -.. image:: https://drone.io/bitbucket.org/logilab/pylint/status.png - :alt: drone.io Build Status - :target: https://drone.io/bitbucket.org/logilab/pylint - -README for Pylint - http://www.pylint.org/ -========================================== - -Pylint is a Python source code analyzer which looks for programming errors, -helps enforcing a coding standard and sniffs for some code smells (as defined in -Martin Fowler's Refactoring book). - -Pylint has many rules enabled by default, way too much to silence them all on a -minimally sized program. It's highly configurable and handle pragmas to control -it from within your code. Additionally, it is possible to write plugins to add -your own checks. - -It's a free software distributed under the GNU Public Licence. - -Development is hosted on bitbucket: https://bitbucket.org/logilab/pylint/ - -You can use the code-qual...@python.org mailing list to discuss about -Pylint. Subscribe at https://mail.python.org/mailman/listinfo/code-quality/ -or read the archives at https://mail.python.org/pipermail/code-quality/ - -Install -------- - -Pylint requires astroid package (the later the better). - -* https://bitbucket.org/logilab/astroid - -Installation should be as simple as :: - - python -m pip install astroid - - -If you want to install from a source distribution, extract the tarball and run -the following commands :: - - hg update master - python setup.py install - -You'll have to install dependencies in a similar way. For debian and -rpm packages, use your usual tools according to your Linux distribution. - -More information about installation and available distribution format -may be found in the user manual in the *doc* subdirectory. - -Documentation -------------- - -Look in the doc/ subdirectory or at http://docs.pylint.org - -Pylint is shipped with following additional commands: - -* pyreverse: an UML diagram generator -* symilar: an independent similarities checker -* epylint: Emacs and Flymake compatible Pylint -* pylint-gui: a graphical interface \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pylint-1.5.1/README.Python3 new/pylint-1.5.2/README.Python3 --- old/pylint-1.5.1/README.Python3 2015-12-02 15:27:18.000000000 +0100 +++ new/pylint-1.5.2/README.Python3 1970-01-01 01:00:00.000000000 +0100 @@ -1,33 +0,0 @@ -Python3 -======= - -Compatibility -------------- - -Please, consider python3 >= 3.2 only. - - -Approach --------- - -We maintain a code base that is Python 2/3 compatible simultaneously. - -In order to run pylint locally, you have to install the dependencies:: - - easy_install-3.2 logilab-common - easy_install-3.2 astroid - easy_install-3.2 six - - -Debian ------- - -For the Debian packaging, you can use the debian.py3k/ content against -the debian/ folder:: - - cp debian.py3k/* debian/ - - -Resources ---------- -https://docs.python.org/3/howto/pyporting.html diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pylint-1.5.1/README.rst new/pylint-1.5.2/README.rst --- old/pylint-1.5.1/README.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/pylint-1.5.2/README.rst 2015-12-21 00:52:14.000000000 +0100 @@ -0,0 +1,60 @@ + +.. image:: https://drone.io/bitbucket.org/logilab/pylint/status.png + :alt: drone.io Build Status + :target: https://drone.io/bitbucket.org/logilab/pylint + +README for Pylint - http://www.pylint.org/ +========================================== + +Pylint is a Python source code analyzer which looks for programming errors, +helps enforcing a coding standard and sniffs for some code smells (as defined in +Martin Fowler's Refactoring book). + +Pylint has many rules enabled by default, way too much to silence them all on a +minimally sized program. It's highly configurable and handle pragmas to control +it from within your code. Additionally, it is possible to write plugins to add +your own checks. + +It's a free software distributed under the GNU Public Licence. + +Development is hosted on bitbucket: https://bitbucket.org/logilab/pylint/ + +You can use the code-qual...@python.org mailing list to discuss about +Pylint. Subscribe at https://mail.python.org/mailman/listinfo/code-quality/ +or read the archives at https://mail.python.org/pipermail/code-quality/ + +Install +------- + +Pylint requires astroid package (the later the better). + +* https://bitbucket.org/logilab/astroid + +Installation should be as simple as :: + + python -m pip install astroid + + +If you want to install from a source distribution, extract the tarball and run +the following commands :: + + hg update master + python setup.py install + +You'll have to install dependencies in a similar way. For debian and +rpm packages, use your usual tools according to your Linux distribution. + +More information about installation and available distribution format +may be found in the user manual in the *doc* subdirectory. + +Documentation +------------- + +Look in the doc/ subdirectory or at http://docs.pylint.org + +Pylint is shipped with following additional commands: + +* pyreverse: an UML diagram generator +* symilar: an independent similarities checker +* epylint: Emacs and Flymake compatible Pylint +* pylint-gui: a graphical interface \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pylint-1.5.1/pylint/__pkginfo__.py new/pylint-1.5.2/pylint/__pkginfo__.py --- old/pylint-1.5.1/pylint/__pkginfo__.py 2015-12-02 16:51:44.000000000 +0100 +++ new/pylint-1.5.2/pylint/__pkginfo__.py 2015-12-21 01:14:49.000000000 +0100 @@ -23,7 +23,7 @@ modname = distname = 'pylint' -numversion = (1, 5, 1) +numversion = (1, 5, 2) version = '.'.join([str(num) for num in numversion]) install_requires = [ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pylint-1.5.1/pylint/checkers/imports.py new/pylint-1.5.2/pylint/checkers/imports.py --- old/pylint-1.5.1/pylint/checkers/imports.py 2015-12-02 15:27:25.000000000 +0100 +++ new/pylint-1.5.2/pylint/checkers/imports.py 2015-12-21 00:56:43.000000000 +0100 @@ -369,9 +369,24 @@ = visit_ifexp = visit_comprehension = visit_if def visit_functiondef(self, node): - # if it is the first non import instruction of the module, record it - if not self._first_non_import_node: - self._first_non_import_node = node + # If it is the first non import instruction of the module, record it. + if self._first_non_import_node: + return + + # Check if the node belongs to an `If` or a `Try` block. If they + # contain imports, skip recording this node. + if not isinstance(node.parent.scope(), astroid.Module): + return + + root = node + while not isinstance(root.parent, astroid.Module): + root = root.parent + + if isinstance(root, (astroid.If, astroid.TryFinally, astroid.TryExcept)): + if any(root.nodes_of_class((astroid.Import, astroid.ImportFrom))): + return + + self._first_non_import_node = node visit_classdef = visit_for = visit_while = visit_functiondef diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pylint-1.5.1/pylint/checkers/newstyle.py new/pylint-1.5.2/pylint/checkers/newstyle.py --- old/pylint-1.5.1/pylint/checkers/newstyle.py 2015-12-02 15:27:25.000000000 +0100 +++ new/pylint-1.5.2/pylint/checkers/newstyle.py 2015-12-16 16:25:28.000000000 +0100 @@ -128,12 +128,10 @@ isinstance(call.func, astroid.Name) and call.func.name == 'super'): continue - confidence = (INFERENCE if has_known_bases(klass) - else INFERENCE_FAILURE) - if not klass.newstyle: + + if not klass.newstyle and has_known_bases(klass): # super should not be used on an old style class - self.add_message('super-on-old-class', node=node, - confidence=confidence) + self.add_message('super-on-old-class', node=node) else: # super first arg should be the class if not call.args and sys.version_info[0] == 3: @@ -147,8 +145,7 @@ continue if supcls is None: - self.add_message('missing-super-argument', node=call, - confidence=confidence) + self.add_message('missing-super-argument', node=call) continue if klass is not supcls: @@ -162,8 +159,7 @@ if hasattr(call.args[0], 'name'): name = call.args[0].name if name is not None: - self.add_message('bad-super-call', node=call, args=(name, ), - confidence=confidence) + self.add_message('bad-super-call', node=call, args=(name, )) def register(linter): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pylint-1.5.1/pylint/checkers/stdlib.py new/pylint-1.5.2/pylint/checkers/stdlib.py --- old/pylint-1.5.1/pylint/checkers/stdlib.py 2015-12-02 15:27:25.000000000 +0100 +++ new/pylint-1.5.2/pylint/checkers/stdlib.py 2015-12-10 16:29:47.000000000 +0100 @@ -211,7 +211,7 @@ for value in node.values: self._check_datetime(value) - def _check_deprecated_method(self, node, infer): + def _check_deprecated_method(self, node, inferred): py_vers = sys.version_info[0] if isinstance(node.func, astroid.Attribute): @@ -222,7 +222,14 @@ # Not interested in other nodes. return - qname = infer.qname() + # Reject nodes which aren't of interest to us. + acceptable_nodes = (astroid.BoundMethod, + astroid.UnboundMethod, + astroid.FunctionDef) + if not isinstance(inferred, acceptable_nodes): + return + + qname = inferred.qname() if qname in self.deprecated[0]: self.add_message('deprecated-method', node=node, args=(func_name, )) @@ -233,7 +240,6 @@ args=(func_name, )) break - def _check_redundant_assert(self, node, infer): if (isinstance(infer, astroid.BoundMethod) and node.args and isinstance(node.args[0], astroid.Const) and diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pylint-1.5.1/pylint/checkers/typecheck.py new/pylint-1.5.2/pylint/checkers/typecheck.py --- old/pylint-1.5.1/pylint/checkers/typecheck.py 2015-12-02 16:51:44.000000000 +0100 +++ new/pylint-1.5.2/pylint/checkers/typecheck.py 2015-12-21 00:56:58.000000000 +0100 @@ -306,7 +306,15 @@ def open(self): # do this in open since config not fully initialized in __init__ - self.generated_members = list(self.config.generated_members) + # generated_members may contain regular expressions + # (surrounded by quote `"` and followed by a comma `,`) + # REQUEST,aq_parent,"[a-zA-Z]+_set{1,2}"' => + # ('REQUEST', 'aq_parent', '[a-zA-Z]+_set{1,2}') + if isinstance(self.config.generated_members, str): + gen = shlex.shlex(self.config.generated_members) + gen.whitespace += ',' + gen.wordchars += '[]-+' + self.config.generated_members = tuple(tok.strip('"') for tok in gen) def visit_assignattr(self, node): if isinstance(node.assign_type(), astroid.AugAssign): @@ -324,19 +332,11 @@ function/method, super call and metaclasses are ignored """ - # generated_members may contain regular expressions - # (surrounded by quote `"` and followed by a comma `,`) - # REQUEST,aq_parent,"[a-zA-Z]+_set{1,2}"' => - # ('REQUEST', 'aq_parent', '[a-zA-Z]+_set{1,2}') - if isinstance(self.config.generated_members, str): - gen = shlex.shlex(self.config.generated_members) - gen.whitespace += ',' - gen.wordchars += '[]-+' - self.config.generated_members = tuple(tok.strip('"') for tok in gen) for pattern in self.config.generated_members: # attribute is marked as generated, stop here if re.match(pattern, node.attrname): return + try: infered = list(node.expr.infer()) except exceptions.InferenceError: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pylint-1.5.1/pylint/config.py new/pylint-1.5.2/pylint/config.py --- old/pylint-1.5.1/pylint/config.py 2015-12-02 15:27:18.000000000 +0100 +++ new/pylint-1.5.2/pylint/config.py 2015-12-10 16:29:47.000000000 +0100 @@ -97,6 +97,8 @@ curdir = os.path.abspath(os.path.join(curdir, '..')) if os.path.isfile(os.path.join(curdir, 'pylintrc')): return os.path.join(curdir, 'pylintrc') + if os.path.isfile(os.path.join(curdir, '.pylintrc')): + return os.path.join(curdir, '.pylintrc') if 'PYLINTRC' in os.environ and os.path.exists(os.environ['PYLINTRC']): pylintrc = os.environ['PYLINTRC'] else: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pylint-1.5.1/pylint/pyreverse/main.py new/pylint-1.5.2/pylint/pyreverse/main.py --- old/pylint-1.5.1/pylint/pyreverse/main.py 2015-12-02 15:27:18.000000000 +0100 +++ new/pylint-1.5.2/pylint/pyreverse/main.py 2015-12-10 16:29:47.000000000 +0100 @@ -21,6 +21,7 @@ from __future__ import print_function import os +import subprocess import sys from pylint.config import ConfigurationMixIn @@ -91,6 +92,19 @@ #( ('quiet', #dict(help='run quietly', action='store_true', short='q')), ) +def _check_graphviz_available(output_format): + """check if we need graphviz for different output format""" + try: + subprocess.call(['dot', '-V'], stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + except OSError: + print("The output format '%s' is currently not available.\n" + "Please install 'Graphviz' to have other output formats " + "than 'dot' or 'vcg'." % output_format) + sys.exit(32) + + + class Run(ConfigurationMixIn): """base class providing common behaviour for pyreverse commands""" @@ -100,6 +114,9 @@ ConfigurationMixIn.__init__(self, usage=__doc__) insert_default_options() args = self.load_command_line_configuration() + if self.config.output_format not in ('dot', 'vcg'): + _check_graphviz_available(self.config.output_format) + sys.exit(self.run(args)) def run(self, args): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pylint-1.5.1/pylint/test/functional/boolean_datetime.py new/pylint-1.5.2/pylint/test/functional/boolean_datetime.py --- old/pylint-1.5.1/pylint/test/functional/boolean_datetime.py 2015-12-02 15:27:18.000000000 +0100 +++ new/pylint-1.5.2/pylint/test/functional/boolean_datetime.py 2015-12-21 00:56:14.000000000 +0100 @@ -13,11 +13,11 @@ print("datetime.time(0,0,1) is a bug!") DATA = not datetime.time(0, 0, 0) # [boolean-datetime] -DATA = True if datetime.time(0, 0, 0) else False # [boolean-datetime] -DATA = datetime.time(0, 0, 0) or True # [boolean-datetime] -DATA = datetime.time(0, 0, 0) and True # [boolean-datetime] -DATA = False or True or datetime.time(0, 0, 0) # [boolean-datetime] -DATA = False and datetime.time(0, 0, 0) or True # [boolean-datetime] +DATA1 = True if datetime.time(0, 0, 0) else False # [boolean-datetime] +DATA2 = datetime.time(0, 0, 0) or True # [boolean-datetime] +DATA3 = datetime.time(0, 0, 0) and True # [boolean-datetime] +DATA4 = False or True or datetime.time(0, 0, 0) # [boolean-datetime] +DATA5 = False and datetime.time(0, 0, 0) or True # [boolean-datetime] def cant_infer(data): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pylint-1.5.1/pylint/test/functional/super_checks.py new/pylint-1.5.2/pylint/test/functional/super_checks.py --- old/pylint-1.5.1/pylint/test/functional/super_checks.py 2015-12-02 15:27:18.000000000 +0100 +++ new/pylint-1.5.2/pylint/test/functional/super_checks.py 2015-12-10 16:29:47.000000000 +0100 @@ -65,9 +65,9 @@ class UnknownBases(Missing): """Don't emit if we don't know all the bases.""" def __init__(self): - # pylint: disable=super-on-old-class super(UnknownBases, self).__init__() super(UnknownBases, self).test() + super(Missing, self).test() # [bad-super-call] # Test that we are detecting proper super errors. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pylint-1.5.1/pylint/test/functional/super_checks.txt new/pylint-1.5.2/pylint/test/functional/super_checks.txt --- old/pylint-1.5.1/pylint/test/functional/super_checks.txt 2015-12-02 15:27:18.000000000 +0100 +++ new/pylint-1.5.2/pylint/test/functional/super_checks.txt 2015-12-10 16:29:47.000000000 +0100 @@ -1,18 +1,19 @@ old-style-class:6:Aaaa:Old-style class defined. -super-on-old-class:8:Aaaa.hop:Use of super on an old style class:INFERENCE +super-on-old-class:8:Aaaa.hop:Use of super on an old style class no-member:10:Aaaa.hop:Super of 'Aaaa' has no 'hop' member:INFERENCE -super-on-old-class:12:Aaaa.__init__:Use of super on an old style class:INFERENCE +super-on-old-class:12:Aaaa.__init__:Use of super on an old style class no-member:19:NewAaaa.hop:Super of 'NewAaaa' has no 'hop' member:INFERENCE -bad-super-call:22:NewAaaa.__init__:Bad first argument 'Aaaa' given to super():INFERENCE -missing-super-argument:27:Py3kAaaa.__init__:Missing argument to super():INFERENCE -bad-super-call:32:Py3kWrongSuper.__init__:Bad first argument 'NewAaaa' given to super():INFERENCE -bad-super-call:37:WrongNameRegression.__init__:Bad first argument 'Missing' given to super():INFERENCE -bad-super-call:46:CrashSuper.__init__:Bad first argument 'NewAaaa' given to super():INFERENCE -bad-super-call:62:SuperDifferentScope.test:Bad first argument 'object' given to super():INFERENCE -not-callable:89:InvalidSuperChecks.__init__:super(InvalidSuperChecks, self).not_a_method is not callable:HIGH +bad-super-call:22:NewAaaa.__init__:Bad first argument 'Aaaa' given to super() +missing-super-argument:27:Py3kAaaa.__init__:Missing argument to super() +bad-super-call:32:Py3kWrongSuper.__init__:Bad first argument 'NewAaaa' given to super() +bad-super-call:37:WrongNameRegression.__init__:Bad first argument 'Missing' given to super() +bad-super-call:46:CrashSuper.__init__:Bad first argument 'NewAaaa' given to super() +bad-super-call:62:SuperDifferentScope.test:Bad first argument 'object' given to super() +bad-super-call:70:UnknownBases.__init__:Bad first argument 'Missing' given to super() +not-callable:89:InvalidSuperChecks.__init__:super(InvalidSuperChecks, self).not_a_method is not callable no-member:90:InvalidSuperChecks.__init__:Super of 'InvalidSuperChecks' has no 'attribute_error' member:INFERENCE -no-value-for-parameter:92:InvalidSuperChecks.__init__:No value for argument 'param' in method call:HIGH -too-many-function-args:93:InvalidSuperChecks.__init__:Too many positional arguments for method call:HIGH -no-value-for-parameter:95:InvalidSuperChecks.__init__:No value for argument 'param' in method call:HIGH -unexpected-keyword-arg:95:InvalidSuperChecks.__init__:Unexpected keyword argument 'lala' in method call:HIGH +no-value-for-parameter:92:InvalidSuperChecks.__init__:No value for argument 'param' in method call +too-many-function-args:93:InvalidSuperChecks.__init__:Too many positional arguments for method call +no-value-for-parameter:95:InvalidSuperChecks.__init__:No value for argument 'param' in method call +unexpected-keyword-arg:95:InvalidSuperChecks.__init__:Unexpected keyword argument 'lala' in method call no-member:98:InvalidSuperChecks.__init__:Super of 'InvalidSuperChecks' has no 'attribute_error' member:INFERENCE \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pylint-1.5.1/pylint/test/functional/wrong_import_position.py new/pylint-1.5.2/pylint/test/functional/wrong_import_position.py --- old/pylint-1.5.1/pylint/test/functional/wrong_import_position.py 2015-12-02 15:27:25.000000000 +0100 +++ new/pylint-1.5.2/pylint/test/functional/wrong_import_position.py 2015-12-10 16:29:47.000000000 +0100 @@ -1,13 +1,25 @@ """Checks import order rule""" # pylint: disable=unused-import,relative-import,ungrouped-imports,wrong-import-order,using-constant-test -# pylint: disable=import-error +# pylint: disable=import-error, too-few-public-methods, missing-docstring import os.path + if True: from astroid import are_exclusive try: import sys except ImportError: - import datetime + class Myclass(object): + """docstring""" + +if sys.version_info[0] == 3: + from collections import OrderedDict +else: + class OrderedDict(object): + """Nothing to see here.""" + def some_func(self): + pass + +import six CONSTANT = True diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pylint-1.5.1/pylint/test/functional/wrong_import_position.txt new/pylint-1.5.2/pylint/test/functional/wrong_import_position.txt --- old/pylint-1.5.1/pylint/test/functional/wrong_import_position.txt 2015-12-02 15:27:25.000000000 +0100 +++ new/pylint-1.5.2/pylint/test/functional/wrong_import_position.txt 2015-12-10 16:29:47.000000000 +0100 @@ -1,3 +1,3 @@ -wrong-import-position:14::Import "import datetime" should be placed at the top of the module -wrong-import-position:20::Import "import scipy" should be placed at the top of the module -wrong-import-position:21::Import "import astroid" should be placed at the top of the module +wrong-import-position:26::Import "import datetime" should be placed at the top of the module +wrong-import-position:32::Import "import scipy" should be placed at the top of the module +wrong-import-position:33::Import "import astroid" should be placed at the top of the module diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pylint-1.5.1/pylint/test/unittest_checker_stdlib.py new/pylint-1.5.2/pylint/test/unittest_checker_stdlib.py --- old/pylint-1.5.1/pylint/test/unittest_checker_stdlib.py 1970-01-01 01:00:00.000000000 +0100 +++ new/pylint-1.5.2/pylint/test/unittest_checker_stdlib.py 2015-12-10 16:29:47.000000000 +0100 @@ -0,0 +1,65 @@ +# Copyright (c) 2003-2015 LOGILAB S.A. (Paris, FRANCE). +# http://www.logilab.fr/ -- mailto:cont...@logilab.fr +# +# This program is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +import contextlib +import unittest + +import astroid +from astroid import test_utils + +from pylint.checkers import stdlib +from pylint.testutils import CheckerTestCase + + +@contextlib.contextmanager +def _add_transform(manager, node, transform, predicate=None): + manager.register_transform(node, transform, predicate) + try: + yield + finally: + manager.unregister_transform(node, transform, predicate) + + +class StdlibCheckerTest(CheckerTestCase): + CHECKER_CLASS = stdlib.StdlibChecker + + def test_deprecated_no_qname_on_unexpected_nodes(self): + # Test that we don't crash on nodes which don't have + # a qname method. While this test might seem weird since + # it uses a transform, it's actually testing a crash that + # happened in production, but there was no way to retrieve + # the code for which this occurred (how an AssignAttr + # got to be the result of a function inference + # beats me..) + + def infer_func(node, context=None): + new_node = astroid.AssignAttr() + new_node.parent = node + yield new_node + + manager = astroid.MANAGER + transform = astroid.inference_tip(infer_func) + with _add_transform(manager, astroid.Name, transform): + node = test_utils.extract_node(''' + call_something() + ''') + with self.assertNoMessages(): + self.checker.visit_call(node) + + + +if __name__ == '__main__': + unittest.main() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pylint-1.5.1/pylint.egg-info/PKG-INFO new/pylint-1.5.2/pylint.egg-info/PKG-INFO --- old/pylint-1.5.1/pylint.egg-info/PKG-INFO 2015-12-02 16:56:54.000000000 +0100 +++ new/pylint-1.5.2/pylint.egg-info/PKG-INFO 2015-12-21 01:21:34.000000000 +0100 @@ -1,71 +1,12 @@ Metadata-Version: 1.1 Name: pylint -Version: 1.5.1 +Version: 1.5.2 Summary: python code static checker Home-page: http://www.pylint.org Author: Logilab Author-email: python-proje...@lists.logilab.org License: GPL -Description: - .. image:: https://drone.io/bitbucket.org/logilab/pylint/status.png - :alt: drone.io Build Status - :target: https://drone.io/bitbucket.org/logilab/pylint - - README for Pylint - http://www.pylint.org/ - ========================================== - - Pylint is a Python source code analyzer which looks for programming errors, - helps enforcing a coding standard and sniffs for some code smells (as defined in - Martin Fowler's Refactoring book). - - Pylint has many rules enabled by default, way too much to silence them all on a - minimally sized program. It's highly configurable and handle pragmas to control - it from within your code. Additionally, it is possible to write plugins to add - your own checks. - - It's a free software distributed under the GNU Public Licence. - - Development is hosted on bitbucket: https://bitbucket.org/logilab/pylint/ - - You can use the code-qual...@python.org mailing list to discuss about - Pylint. Subscribe at https://mail.python.org/mailman/listinfo/code-quality/ - or read the archives at https://mail.python.org/pipermail/code-quality/ - - Install - ------- - - Pylint requires astroid package (the later the better). - - * https://bitbucket.org/logilab/astroid - - Installation should be as simple as :: - - python -m pip install astroid - - - If you want to install from a source distribution, extract the tarball and run - the following commands :: - - hg update master - python setup.py install - - You'll have to install dependencies in a similar way. For debian and - rpm packages, use your usual tools according to your Linux distribution. - - More information about installation and available distribution format - may be found in the user manual in the *doc* subdirectory. - - Documentation - ------------- - - Look in the doc/ subdirectory or at http://docs.pylint.org - - Pylint is shipped with following additional commands: - - * pyreverse: an UML diagram generator - * symilar: an independent similarities checker - * epylint: Emacs and Flymake compatible Pylint - * pylint-gui: a graphical interface +Description: UNKNOWN Platform: UNKNOWN Classifier: Development Status :: 4 - Beta Classifier: Environment :: Console diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pylint-1.5.1/pylint.egg-info/SOURCES.txt new/pylint-1.5.2/pylint.egg-info/SOURCES.txt --- old/pylint-1.5.1/pylint.egg-info/SOURCES.txt 2015-12-02 16:56:55.000000000 +0100 +++ new/pylint-1.5.2/pylint.egg-info/SOURCES.txt 2015-12-21 01:21:34.000000000 +0100 @@ -2,8 +2,7 @@ ChangeLog DEPENDS MANIFEST.in -README -README.Python3 +README.rst setup.cfg setup.py bin/epylint @@ -119,6 +118,7 @@ pylint/test/unittest_checker_python3.py pylint/test/unittest_checker_similar.py pylint/test/unittest_checker_spelling.py +pylint/test/unittest_checker_stdlib.py pylint/test/unittest_checker_strings.py pylint/test/unittest_checker_typecheck.py pylint/test/unittest_checker_variables.py