Hello community,

here is the log from the commit of package python-inspektor for 
openSUSE:Factory checked in at 2018-07-28 12:44:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-inspektor (Old)
 and      /work/SRC/openSUSE:Factory/.python-inspektor.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-inspektor"

Sat Jul 28 12:44:59 2018 rev:2 rq:625771 version:0.5.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-inspektor/python-inspektor.changes        
2017-10-09 19:48:46.450125588 +0200
+++ /work/SRC/openSUSE:Factory/.python-inspektor.new/python-inspektor.changes   
2018-07-28 12:45:05.196955507 +0200
@@ -1,0 +2,6 @@
+Fri Jul 27 11:20:41 UTC 2018 - [email protected]
+
+- Update to version 0.5.1:
+  * No changelog available
+
+-------------------------------------------------------------------

Old:
----
  inspektor-0.4.5.tar.gz

New:
----
  inspektor-0.5.1.tar.gz

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

Other differences:
------------------
++++++ python-inspektor.spec ++++++
--- /var/tmp/diff_new_pack.Uy0zxx/_old  2018-07-28 12:45:06.156957252 +0200
+++ /var/tmp/diff_new_pack.Uy0zxx/_new  2018-07-28 12:45:06.160957259 +0200
@@ -1,7 +1,7 @@
 #
-# spec file for package python
+# spec file for package python-inspektor
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,26 +19,33 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %global         pkgname inspektor
 Name:           python-%{pkgname}
-Version:        0.4.5
+Version:        0.5.1
 Release:        0
 Summary:        Program used to verify the code of your python project
-License:        GPL-2.0
+License:        GPL-2.0-only
 Group:          Development/Languages/Python
-Url:            https://github.com/avocado-framework/inspektor
+URL:            https://github.com/avocado-framework/inspektor
 Source:         
https://github.com/avocado-framework/inspektor/archive/%{version}.tar.gz#/%{pkgname}-%{version}.tar.gz
-BuildRequires:  %{python_module base}
+BuildRequires:  %{python_module astroid} >= 1.2.1
+BuildRequires:  %{python_module cliff}
+BuildRequires:  %{python_module cmd2}
 BuildRequires:  %{python_module devel}
-BuildRequires:  %{python_module logutils}
-BuildRequires:  %{python_module pep8}
-BuildRequires:  %{python_module pylint}
+BuildRequires:  %{python_module logutils} >= 0.3.3
+BuildRequires:  %{python_module pbr} >= 1.4
+BuildRequires:  %{python_module pycodestyle} >= 2.0.0
+BuildRequires:  %{python_module pylint} >= 1.3.1
 BuildRequires:  %{python_module setuptools}
-BuildRequires:  %{python_module six}
+BuildRequires:  %{python_module stevedore}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
-Requires:       python-logutils
-Requires:       python-pep8
-Requires:       python-pylint
-Requires:       python-six
+Requires:       python-astroid >= 1.2.1
+Requires:       python-cliff
+Requires:       python-cmd2
+Requires:       python-logutils >= 0.3.3
+Requires:       python-pbr >= 1.4
+Requires:       python-pycodestyle >= 2.0.0
+Requires:       python-pylint >= 1.3.1
+Requires:       python-stevedore
 Requires(post): update-alternatives
 Requires(postun): update-alternatives
 BuildArch:      noarch
@@ -57,6 +64,9 @@
 %build
 %python_build
 
+%check
+%python_exec setup.py test
+
 %install
 %python_install
 %python_clone -a %{buildroot}%{_bindir}/inspekt
@@ -69,7 +79,8 @@
 %python_uninstall_alternative inspekt
 
 %files %{python_files}
-%doc LICENSE README.rst
+%license LICENSE
+%doc README.rst
 %python_alternative %{_bindir}/inspekt
 %{python_sitelib}/*
 

++++++ inspektor-0.4.5.tar.gz -> inspektor-0.5.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/inspektor-0.4.5/documentation/source/conf.py 
new/inspektor-0.5.1/documentation/source/conf.py
--- old/inspektor-0.4.5/documentation/source/conf.py    2017-08-11 
11:36:39.000000000 +0200
+++ new/inspektor-0.5.1/documentation/source/conf.py    2018-05-03 
19:52:49.000000000 +0200
@@ -56,9 +56,9 @@
 # built documents.
 #
 # The short X.Y version.
-version = '0.1.5'
+version = '0.5.1'
 # The full version, including alpha/beta/rc tags.
-release = '0.1.5'
+release = '0.5.1'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/inspektor-0.4.5/inspektor/cli/app.py 
new/inspektor-0.5.1/inspektor/cli/app.py
--- old/inspektor-0.4.5/inspektor/cli/app.py    2017-08-11 11:36:39.000000000 
+0200
+++ new/inspektor-0.5.1/inspektor/cli/app.py    2018-05-03 19:52:49.000000000 
+0200
@@ -26,7 +26,7 @@
     def __init__(self):
         super(InspektorApp, self).__init__(
             description='Inspektor python code checker and fixer',
-            version='0.4.0',
+            version='0.5.1',
             command_manager=CommandManager('inspektor.app'),
             deferred_help=True,
             )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/inspektor-0.4.5/inspektor/commands/checkall.py 
new/inspektor-0.5.1/inspektor/commands/checkall.py
--- old/inspektor-0.4.5/inspektor/commands/checkall.py  2017-08-11 
11:36:39.000000000 +0200
+++ new/inspektor-0.5.1/inspektor/commands/checkall.py  2018-05-03 
19:52:49.000000000 +0200
@@ -69,8 +69,6 @@
         parser.add_argument('--author', type=str,
                             help='Author string. Ex: "Author: Brandon Lindon 
<[email protected]>"',
                             default="")
-        parser.add_argument('--verbose', action='store_true',
-                            help='Print extra debug messages')
         return parser
 
     def take_action(self, parsed_args):
@@ -88,9 +86,8 @@
             self.log.info('License check: disabled')
             license_checker = None
 
-        status = True
+        status = linter.check(checked_paths)
         for path in checked_paths:
-            status &= linter.check(path=path)
             status &= reindenter.check(path=path)
             status &= style_checker.check(path=path)
             if license_checker is not None:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/inspektor-0.4.5/inspektor/commands/github.py 
new/inspektor-0.5.1/inspektor/commands/github.py
--- old/inspektor-0.4.5/inspektor/commands/github.py    2017-08-11 
11:36:39.000000000 +0200
+++ new/inspektor-0.5.1/inspektor/commands/github.py    2018-05-03 
19:52:49.000000000 +0200
@@ -91,8 +91,6 @@
                             help='Quoted string containing paths or '
                                  'patterns to be excluded from '
                                  'checking, comma separated')
-        parser.add_argument('--verbose', action='store_true',
-                            help='Print extra debug messages')
         return parser
 
     def take_action(self, parsed_args):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/inspektor-0.4.5/inspektor/commands/indent.py 
new/inspektor-0.5.1/inspektor/commands/indent.py
--- old/inspektor-0.4.5/inspektor/commands/indent.py    2017-08-11 
11:36:39.000000000 +0200
+++ new/inspektor-0.5.1/inspektor/commands/indent.py    2018-05-03 
19:52:49.000000000 +0200
@@ -35,8 +35,6 @@
                             help='Quoted string containing paths or '
                                  'patterns to be excluded from '
                                  'checking, comma separated')
-        parser.add_argument('--verbose', action='store_true',
-                            help='Print extra debug messages')
         return parser
 
     def take_action(self, parsed_args):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/inspektor-0.4.5/inspektor/commands/license.py 
new/inspektor-0.5.1/inspektor/commands/license.py
--- old/inspektor-0.4.5/inspektor/commands/license.py   2017-08-11 
11:36:39.000000000 +0200
+++ new/inspektor-0.5.1/inspektor/commands/license.py   2018-05-03 
19:52:49.000000000 +0200
@@ -46,8 +46,6 @@
                             help='Quoted string containing paths or '
                                  'patterns to be excluded from '
                                  'checking, comma separated')
-        parser.add_argument('--verbose', action='store_true',
-                            help='Print extra debug messages')
         parser.add_argument('--fix', action='store_true', default=False,
                             help='Fix any style problems found '
                                  '(needs autopep8 installed)')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/inspektor-0.4.5/inspektor/commands/lint.py 
new/inspektor-0.5.1/inspektor/commands/lint.py
--- old/inspektor-0.4.5/inspektor/commands/lint.py      2017-08-11 
11:36:39.000000000 +0200
+++ new/inspektor-0.5.1/inspektor/commands/lint.py      2018-05-03 
19:52:49.000000000 +0200
@@ -10,6 +10,7 @@
 # See LICENSE for more details.
 
 import logging
+import multiprocessing
 import os
 
 from cliff.command import Command
@@ -41,8 +42,9 @@
                             help='Quoted string containing paths or '
                                  'patterns to be excluded from '
                                  'checking, comma separated')
-        parser.add_argument('--verbose', action='store_true',
-                            help='Print extra debug messages')
+        parser.add_argument('--parallel', action='store', nargs='?',
+                            default=multiprocessing.cpu_count(),
+                            help="How many threads to use")
         return parser
 
     def take_action(self, parsed_args):
@@ -50,10 +52,8 @@
             parsed_args.path = [os.getcwd()]
 
         linter = Linter(parsed_args, logger=self.log)
+        status = linter.check(parsed_args.path)
 
-        status = True
-        for path in parsed_args.path:
-            status &= linter.check(path)
         if status:
             self.log.info("Syntax check PASS")
             return 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/inspektor-0.4.5/inspektor/commands/style.py 
new/inspektor-0.5.1/inspektor/commands/style.py
--- old/inspektor-0.4.5/inspektor/commands/style.py     2017-08-11 
11:36:39.000000000 +0200
+++ new/inspektor-0.5.1/inspektor/commands/style.py     2018-05-03 
19:52:49.000000000 +0200
@@ -43,8 +43,6 @@
                             help='Quoted string containing paths or '
                                  'patterns to be excluded from '
                                  'checking, comma separated')
-        parser.add_argument('--verbose', action='store_true',
-                            help='Print extra debug messages')
         return parser
 
     def take_action(self, parsed_args):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/inspektor-0.4.5/inspektor/lint.py 
new/inspektor-0.5.1/inspektor/lint.py
--- old/inspektor-0.4.5/inspektor/lint.py       2017-08-11 11:36:39.000000000 
+0200
+++ new/inspektor-0.5.1/inspektor/lint.py       2018-05-03 19:52:49.000000000 
+0200
@@ -16,7 +16,7 @@
 import os
 import sys
 
-from pylint.lint import Run
+from pylint.lint import Run, PyLinter
 
 from .path import PathChecker
 from .utils import process
@@ -24,6 +24,20 @@
 _PYLINT_HELP_TEXT = process.run('pylint --help', verbose=False).stdout
 
 
+class QuietPyLinter(PyLinter):
+    def read_config_file(self, config_file=None):
+        quiet = self.quiet
+        try:
+            self.quiet = 1
+            return super(QuietPyLinter, self).read_config_file()
+        finally:
+            self.quiet = quiet
+
+
+class QuietLintRun(Run):
+    LinterClass = QuietPyLinter
+
+
 class Linter(object):
 
     def __init__(self, args, logger=logging.getLogger('')):
@@ -39,18 +53,15 @@
             self.enabled_errors = args.enable_lint
         self.log = logger
         self.args = args
-        self.verbose = args.verbose
+        if hasattr(args, 'parallel'):
+            self.parallel = args.parallel
+        else:
+            import multiprocessing
+            self.parallel = multiprocessing.cpu_count()
         # Be able to analyze all imports inside the project
         sys.path.insert(0, os.getcwd())
-        self.failed_paths = []
-        if not self.verbose:
-            self.log.info('Pylint disabled: %s' % self.ignored_errors)
-            self.log.info('Pylint enabled : %s' % self.enabled_errors)
-        else:
-            self.log.info('Verbose mode, no disable/enable, full reports')
-
-    def set_verbose(self):
-        self.verbose = True
+        self.log.info('Pylint disabled: %s', self.ignored_errors)
+        self.log.info('Pylint enabled : %s', self.enabled_errors)
 
     @staticmethod
     def _pylint_has_option(option):
@@ -65,62 +76,52 @@
                        ('--msg-template='
                         '"{msg_id}:{line:3d},{column}: {obj}: {msg}"')]
 
-        if not self.verbose:
-            if self.ignored_errors:
-                pylint_args.append('--disable=%s' % self.ignored_errors)
-            if self.enabled_errors:
-                pylint_args.append('--enable=%s' % self.enabled_errors)
-            if self._pylint_has_option('--reports='):
-                pylint_args.append('--reports=no')
-            if self._pylint_has_option('--score='):
-                pylint_args.append('--score=no')
+        if self.ignored_errors:
+            pylint_args.append('--disable=%s' % self.ignored_errors)
+        if self.enabled_errors:
+            pylint_args.append('--enable=%s' % self.enabled_errors)
+        if self._pylint_has_option('--reports='):
+            pylint_args.append('--reports=no')
+        if self._pylint_has_option('--score='):
+            pylint_args.append('--score=no')
+        if self._pylint_has_option('--jobs='):
+            pylint_args.append('--jobs=%s' % self.parallel)
 
         return pylint_args
 
-    def check_dir(self, path):
-        """
-        Recursively go on a directory checking files with pylint.
-
-        :param path: Path to a directory.
-        """
-        for root, dirs, files in os.walk(path):
-            for filename in files:
-                self.check_file(os.path.join(root, filename))
-
-        return not self.failed_paths
-
-    def check_file(self, path):
-        """
-        Check one regular file with pylint for py syntax errors.
-
-        :param path: Path to a regular file.
-        :return: False, if pylint found syntax problems, True, if pylint didn't
-                 find problems, or path is not a python module or script.
-        """
-        checker = PathChecker(path=path, args=self.args, label='Lint',
-                              logger=self.log)
-        if not checker.check_attributes('text', 'python', 'not_empty'):
-            return True
-        try:
-            runner = Run(self.get_opts() + [path], exit=False)
-            if runner.linter.msg_status != 0:
-                self.failed_paths.append(path)
-                checker.log_status(status='FAIL')
+    def check(self, file_or_dirs):
+        def should_be_checked(path):
+            checker = PathChecker(path=path, args=self.args, label='Lint',
+                                  logger=self.log)
+            return checker.check_attributes('text', 'python', 'not_empty')
+        paths = []
+        not_file_or_dirs = []
+        for file_or_dir in file_or_dirs:
+            if os.path.isdir(file_or_dir):
+                for root, _, files in os.walk(file_or_dir):
+                    for filename in files:
+                        path = os.path.join(root, filename)
+                        if should_be_checked(path):
+                            paths.append(path)
+            elif os.path.isfile(file_or_dir):
+                if should_be_checked(file_or_dir):
+                    paths.append(file_or_dir)
             else:
-                checker.log_status(status='PASS')
-            return runner.linter.msg_status == 0
-        except Exception as details:
-            self.log.error('Pylint check fail: %s (pylint exception: %s)',
-                           path, details)
-            self.failed_paths.append(path)
-            checker.log_status(status='FAIL')
-            return False
-
-    def check(self, path):
-        if os.path.isfile(path):
-            return self.check_file(path)
-        elif os.path.isdir(path):
-            return self.check_dir(path)
-        else:
-            self.log.error("Invalid location '%s'", path)
-            return False
+                not_file_or_dirs.append(file_or_dir)
+        linter_failed = True
+        if paths:
+            runner = QuietLintRun(self.get_opts() + paths, exit=False)
+            for module, status in runner.linter.stats.get('by_module').items():
+                if any(status.values()):
+                    self.log.debug('Lint: %s FAIL', module)
+                else:
+                    self.log.debug('Lint: %s PASS', module)
+            if runner.linter.msg_status == 0:
+                linter_failed = False
+        if not_file_or_dirs:
+            self.log.error("Following arguments are not files nor dirs: %s",
+                           ", ".join(not_file_or_dirs))
+            return 0
+        if linter_failed:
+            return 0
+        return 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/inspektor-0.4.5/inspektor/style.py 
new/inspektor-0.5.1/inspektor/style.py
--- old/inspektor-0.4.5/inspektor/style.py      2017-08-11 11:36:39.000000000 
+0200
+++ new/inspektor-0.5.1/inspektor/style.py      2018-05-03 19:52:49.000000000 
+0200
@@ -43,7 +43,7 @@
         elif hasattr(args, 'disable_style'):
             self.ignored_errors = args.disable_style
         self.args = args
-        self.log.info('PEP8 disabled: %s' % self.ignored_errors)
+        self.log.info('PEP8 disabled: %s', self.ignored_errors)
 
     def check_dir(self, path):
         """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/inspektor-0.4.5/inspektor/utils/__init__.py 
new/inspektor-0.5.1/inspektor/utils/__init__.py
--- old/inspektor-0.4.5/inspektor/utils/__init__.py     2017-08-11 
11:36:39.000000000 +0200
+++ new/inspektor-0.5.1/inspektor/utils/__init__.py     2018-05-03 
19:52:49.000000000 +0200
@@ -36,9 +36,9 @@
     :param auto: Whether to return "y" instead of asking the question
     """
     if auto:
-        log.info("%s (%s) y" % (question, options))
+        log.info("%s (%s) y", question, options)
         return "y"
-    return input("%s (%s) " % (question, options))
+    return input("%s (%s) ", question, options)
 
 
 def random_string(length, ignore_str=string.punctuation,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/inspektor-0.4.5/inspektor/utils/vcs.py 
new/inspektor-0.5.1/inspektor/utils/vcs.py
--- old/inspektor-0.4.5/inspektor/utils/vcs.py  2017-08-11 11:36:39.000000000 
+0200
+++ new/inspektor-0.5.1/inspektor/utils/vcs.py  2018-05-03 19:52:49.000000000 
+0200
@@ -234,8 +234,8 @@
     def update(self):
         try:
             process.run("svn update")
-        except exceptions.CmdError as e:
-            self.log.error("SVN tree update failed: %s" % e)
+        except exceptions.CmdError as details:
+            self.log.error("SVN tree update failed: %s", details)
 
     def get_modified_files_patch(self, untracked_files_before, patch):
         """
@@ -281,10 +281,10 @@
 
     def get_repo_name(self):
         """
-        Get tje repository name from git remote command output.
+        Get the repository name from git remote command output.
         """
         cmd = "git remote -v | head -n1 | awk '{print $2}'"
-        cmd += " | sed -e 's,.*:\(.*/\)\?,,' -e 's/\.git$//'"
+        cmd += " | sed -e 's,.*:\\(.*/\\)\\?,,' -e 's/\\.git$//'"
         return process.run(cmd, verbose=False, shell=True).stdout.strip()
 
     def get_unknown_files(self):
@@ -376,8 +376,7 @@
             process.run("git checkout -b %s" % branch,
                         verbose=False)
         except exceptions.CmdError:
-            self.log.error("branch %s already exists!"
-                           % branch)
+            self.log.error("branch %s already exists!", branch)
             answer = ask("What would you like to do?",
                          options="Abort/Delete/Rename/OldBase/NewBase")
             if not answer:
@@ -427,15 +426,16 @@
                 process.run("git checkout -b %s" % branch, verbose=False)
         try:
             process.run("git am -3 %s" % patch, verbose=False)
-        except exceptions.CmdError as e:
-            self.log.error("Failed to apply patch to the git repo: %s" % e)
+        except exceptions.CmdError as details:
+            self.log.error("Failed to apply patch to the git repo: %s",
+                           details)
             return 1
 
     def update(self):
         try:
             process.run("git pull", verbose=False)
-        except exceptions.CmdError as e:
-            self.log.error("git tree update failed: %s" % e)
+        except exceptions.CmdError as details:
+            self.log.error("git tree update failed: %s", details)
 
     def get_modified_files_patch(self, untracked_files_before, patch):
         """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/inspektor-0.4.5/inspektor.spec 
new/inspektor-0.5.1/inspektor.spec
--- old/inspektor-0.4.5/inspektor.spec  2017-08-11 11:36:39.000000000 +0200
+++ new/inspektor-0.5.1/inspektor.spec  2018-05-03 19:52:49.000000000 +0200
@@ -1,11 +1,11 @@
-%global inspektorversion 0.4.5
+%global inspektorversion 0.5.1
 Summary: Inspektor python project checker
 Name: inspektor
 Version: %{inspektorversion}
 Release: 0%{?dist}
 License: GPLv2
 Group: Development/Tools
-URL: https://github.com/autotest/inspektor
+URL: https://github.com/avocado-framework/inspektor
 Source: inspektor-%{inspektorversion}.tar.gz
 BuildArch: noarch
 
@@ -44,6 +44,11 @@
 
 
 %changelog
+* Thu May  3 2018 Cleber Rosa <[email protected]> - 0.5.1-0
+- New upstream version 0.5.1
+* Thu May  3 2018 Cleber Rosa <[email protected]> - 0.4.6-0
+- New upstream version 0.4.6
+- Updated URL from autotest to avocado-framework project
 * Fri Aug 11 2017 Lucas Meneghel Rodrigues <[email protected]> - 0.4.5-0
 - New upstream version 0.4.5
 * Wed Jul 19 2017 Lucas Meneghel Rodrigues <[email protected]> - 0.4.0-0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/inspektor-0.4.5/setup.py new/inspektor-0.5.1/setup.py
--- old/inspektor-0.4.5/setup.py        2017-08-11 11:36:39.000000000 +0200
+++ new/inspektor-0.5.1/setup.py        2018-05-03 19:52:49.000000000 +0200
@@ -19,8 +19,8 @@
 
 PROJECT = 'inspektor'
 
-# Change docs/sphinx/conf.py too!
-VERSION = '0.4.5'
+# Change documentation/source/conf.py and inspektor/cli/app.py
+VERSION = '0.5.1'
 
 REQUIRES = ['six']
 if sys.version_info[:2] == (2, 6):


Reply via email to