Hello community, here is the log from the commit of package powerline for openSUSE:Factory checked in at 2020-07-17 20:50:48 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/powerline (Old) and /work/SRC/openSUSE:Factory/.powerline.new.3592 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "powerline" Fri Jul 17 20:50:48 2020 rev:8 rq:821414 version:2.8.1 Changes: -------- --- /work/SRC/openSUSE:Factory/powerline/powerline.changes 2020-05-15 23:52:05.769518653 +0200 +++ /work/SRC/openSUSE:Factory/.powerline.new.3592/powerline.changes 2020-07-17 20:51:36.172967403 +0200 @@ -1,0 +2,12 @@ +Fri Jul 17 05:55:06 UTC 2020 - John Vandenberg <[email protected]> + +- Activate test suite +- Require python3-psutil needed for segments env, net and sys +- Add Provides python3-powerline-status for compatibility with + python_module macro +- Recommend python3-i3ipc needed for bindings to i3 and lemonbar +- Recommend git-core needed for most git functionality +- Update to v2.8.1 + * Add __version__ + +------------------------------------------------------------------- Old: ---- powerline-2.8.tar.gz New: ---- powerline-2.8.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ powerline.spec ++++++ --- /var/tmp/diff_new_pack.8AqONU/_old 2020-07-17 20:51:37.252968530 +0200 +++ /var/tmp/diff_new_pack.8AqONU/_new 2020-07-17 20:51:37.256968534 +0200 @@ -18,7 +18,7 @@ %define powerline_python_sitelib %{python3_sitelib} Name: powerline -Version: 2.8 +Version: 2.8.1 Release: 0 Summary: Status line and prompt utility License: MIT @@ -27,16 +27,33 @@ Source0: https://github.com/powerline/powerline/archive/%{version}/powerline-%{version}.tar.gz BuildRequires: fdupes BuildRequires: fontconfig +BuildRequires: git-core +BuildRequires: lemonbar +BuildRequires: python-rpm-macros BuildRequires: python3-Sphinx -BuildRequires: python3-base +BuildRequires: python3-i3ipc +BuildRequires: python3-netifaces +BuildRequires: python3-pexpect +BuildRequires: python3-psutil +BuildRequires: python3-pytest +BuildRequires: python3-pyuv BuildRequires: python3-setuptools -BuildRequires: sed BuildRequires: systemd-rpm-macros BuildRequires: tmux BuildRequires: vim-base Requires: powerline-fonts Requires: python3 +Requires: python3-psutil +Recommends: git-core +Recommends: python3-i3ipc +Recommends: python3-netifaces Recommends: python3-pygit2 +Suggests: i3 +Suggests: lemonbar +Suggests: python3-pyuv +Suggests: tmux +Provides: python3-powerline-status = %{version} +Obsoletes: python3-powerline-status < %{version} %{?systemd_requires} %description @@ -196,6 +213,14 @@ %fdupes %{buildroot}%{powerline_python_sitelib} +%check +# test_user and test_system_load mock logic may be broken +# test_network_load or test_threaded_segment or test_kw_threaded_segment appear incompatible with OBS VM +# test_top_log_format or test_logger_format are newish failures, possibly due to Python 3.8 +export TEST_ROOT=${CWD} +export PYTHONPATH=$TEST_ROOT:%{buildroot}%{powerline_python_sitelib} +python3 -m pytest -vv -rs -k 'not (test_user or test_system_load or test_network_load or test_threaded_segment or test_kw_threaded_segment or test_top_log_format or test_logger_format)' + %pre %service_add_pre powerline.service ++++++ powerline-2.8.tar.gz -> powerline-2.8.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/powerline-2.8/.travis.yml new/powerline-2.8.1/.travis.yml --- old/powerline-2.8/.travis.yml 2020-05-14 22:33:27.000000000 +0200 +++ new/powerline-2.8.1/.travis.yml 2020-05-20 13:32:35.000000000 +0200 @@ -20,20 +20,11 @@ script: tests/test.sh jobs: include: - - stage: UCS2 python - python: "2.7" - env: >- - USE_UCS2_PYTHON=1 - UCS2_PYTHON_VARIANT="2.7" - - stage: Old Python - python: "2.6" - - python: "3.2" - stage: PyPy python: "pypy" - python: "pypy3" - stage: Latest Python - python: "2.7" - - python: "3.6" + python: "3.6" - stage: Intermediate versions python: "3.3" - python: "3.4" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/powerline-2.8/powerline/__init__.py new/powerline-2.8.1/powerline/__init__.py --- old/powerline-2.8/powerline/__init__.py 2020-05-14 22:33:27.000000000 +0200 +++ new/powerline-2.8.1/powerline/__init__.py 2020-05-20 13:32:35.000000000 +0200 @@ -14,7 +14,7 @@ from powerline.lib.dict import mergedicts from powerline.lib.encoding import get_preferred_output_encoding from powerline.lib.path import join - +from powerline.version import __version__ class NotInterceptedError(BaseException): pass @@ -55,8 +55,8 @@ ``{message}`` is the original message passed to one of the logging methods. - Each of the methods (``critical``, ``exception``, ``info``, ``error``, - ``warn``, ``debug``) expects to receive message in an ``str.format`` format, + Each of the methods (``critical``, ``exception``, ``info``, ``error``, + ``warn``, ``debug``) expects to receive message in an ``str.format`` format, not in printf-like format. Log is saved to the location :ref:`specified by user <config-common-log>`. @@ -159,11 +159,11 @@ This function will find .json file given its path. :param function get_config_paths: - Function that being called with no arguments will return a list of paths + Function that being called with no arguments will return a list of paths that should be searched for configuration files. :return: - Function that being given configuration file name will return full path + Function that being given configuration file name will return full path to it or raise IOError if it failed to find the file. ''' config_paths = get_config_paths() @@ -178,12 +178,12 @@ :param str cfg_path: Path for configuration file that should be loaded. :param function find_config_files: - Function that finds configuration file. Check out the description of + Function that finds configuration file. Check out the description of the return value of ``generate_config_finder`` function. :param ConfigLoader config_loader: Configuration file loader class instance. :param function loader_callback: - Function that will be called by config_loader when change to + Function that will be called by config_loader when change to configuration file is detected. :return: Configuration file contents. @@ -210,7 +210,7 @@ :param func get_module_attr: :py:func:`gen_module_attr_getter` output. :param file stream: - Stream to use by default for :py:class:`logging.StreamHandler` in place + Stream to use by default for :py:class:`logging.StreamHandler` in place of :py:attr:`sys.stderr`. May be ``None``. ''' log_targets = common_config['log_file'] @@ -266,16 +266,16 @@ :param dict common_config: Common configuration, from :py:func:`finish_common_config`. :param bool use_daemon_threads: - Whether daemon threads should be used. Argument to + Whether daemon threads should be used. Argument to :py:class:`PowerlineLogger` constructor. :param str ext: Used extension. Argument to :py:class:`PowerlineLogger` constructor. :param set imported_modules: - Set where imported modules are saved. Argument to - :py:func:`gen_module_attr_getter`. May be ``None``, in this case new + Set where imported modules are saved. Argument to + :py:func:`gen_module_attr_getter`. May be ``None``, in this case new empty set is used. :param file stream: - Stream to use by default for :py:class:`logging.StreamHandler` in place + Stream to use by default for :py:class:`logging.StreamHandler` in place of :py:attr:`sys.stderr`. May be ``None``. :return: Three objects: @@ -302,7 +302,7 @@ '''Get default theme used by powerline :param bool is_unicode: - If true, return theme for unicode environments, otherwise return theme + If true, return theme for unicode environments, otherwise return theme that is supposed to be ASCII-only. :return: theme name. @@ -317,7 +317,7 @@ Common configuration, as it was just loaded. :return: - Copy of common configuration with all configuration keys and expanded + Copy of common configuration with all configuration keys and expanded paths. ''' encoding = encoding.lower() @@ -379,7 +379,7 @@ in ``fromlist`` tuple. :return: - Attribute value or ``None``. Note: there is no way to distinguish + Attribute value or ``None``. Note: there is no way to distinguish between successful import of attribute equal to ``None`` and unsuccessful import. ''' @@ -411,7 +411,7 @@ Common configuration. :return: - :py:class:`dict` instance which has only keys from + :py:class:`dict` instance which has only keys from :py:attr:`powerline.LOG_KEYS` left. ''' return dict(( @@ -425,29 +425,29 @@ class Powerline(object): - '''Main powerline class, entrance point for all powerline uses. Sets + '''Main powerline class, entrance point for all powerline uses. Sets powerline up and loads the configuration. :param str ext: - extension used. Determines where configuration files will - searched and what renderer module will be used. Affected: used ``ext`` - dictionary from :file:`powerline/config.json`, location of themes and + extension used. Determines where configuration files will + searched and what renderer module will be used. Affected: used ``ext`` + dictionary from :file:`powerline/config.json`, location of themes and colorschemes, render module (``powerline.renders.{ext}``). :param str renderer_module: - Overrides renderer module (defaults to ``ext``). Should be the name of - the package imported like this: ``powerline.renderers.{render_module}``. - If this parameter contains a dot ``powerline.renderers.`` is not - prepended. There is also a special case for renderers defined in - toplevel modules: ``foo.`` (note: dot at the end) tries to get renderer - from module ``foo`` (because ``foo`` (without dot) tries to get renderer - from module ``powerline.renderers.foo``). When ``.foo`` (with leading - dot) variant is used ``renderer_module`` will be + Overrides renderer module (defaults to ``ext``). Should be the name of + the package imported like this: ``powerline.renderers.{render_module}``. + If this parameter contains a dot ``powerline.renderers.`` is not + prepended. There is also a special case for renderers defined in + toplevel modules: ``foo.`` (note: dot at the end) tries to get renderer + from module ``foo`` (because ``foo`` (without dot) tries to get renderer + from module ``powerline.renderers.foo``). When ``.foo`` (with leading + dot) variant is used ``renderer_module`` will be ``powerline.renderers.{ext}{renderer_module}``. :param bool run_once: - Determines whether :py:meth:`render` method will be run only once + Determines whether :py:meth:`render` method will be run only once during python session. :param Logger logger: - If present no new logger will be created and the provided logger will be + If present no new logger will be created and the provided logger will be used. :param bool use_daemon_threads: When creating threads make them daemon ones. @@ -471,10 +471,10 @@ config_loader=None): '''Do actual initialization. - __init__ function only stores the arguments and runs this function. This - function exists for powerline to be able to reload itself: it is easier + __init__ function only stores the arguments and runs this function. This + function exists for powerline to be able to reload itself: it is easier to make ``__init__`` store arguments and call overridable ``init`` than - tell developers that each time they override Powerline.__init__ in + tell developers that each time they override Powerline.__init__ in subclasses they must store actual arguments. ''' self.ext = ext @@ -530,7 +530,7 @@ def create_logger(self): '''Create logger - This function is used to create logger unless it was already specified + This function is used to create logger unless it was already specified at initialization. :return: Three objects: @@ -548,18 +548,18 @@ ) def create_renderer(self, load_main=False, load_colors=False, load_colorscheme=False, load_theme=False): - '''(Re)create renderer object. Can be used after Powerline object was - successfully initialized. If any of the below parameters except + '''(Re)create renderer object. Can be used after Powerline object was + successfully initialized. If any of the below parameters except ``load_main`` is True renderer object will be recreated. :param bool load_main: - Determines whether main configuration file (:file:`config.json`) - should be loaded. If appropriate configuration changes implies - ``load_colorscheme`` and ``load_theme`` and recreation of renderer - object. Won’t trigger recreation if only unrelated configuration + Determines whether main configuration file (:file:`config.json`) + should be loaded. If appropriate configuration changes implies + ``load_colorscheme`` and ``load_theme`` and recreation of renderer + object. Won’t trigger recreation if only unrelated configuration changed. :param bool load_colors: - Determines whether colors configuration from :file:`colors.json` + Determines whether colors configuration from :file:`colors.json` should be (re)loaded. :param bool load_colorscheme: Determines whether colorscheme configuration should be (re)loaded. @@ -682,8 +682,8 @@ else: raise ImportError('Failed to obtain renderer') - # Renderer updates configuration file via segments’ .startup thus it - # should be locked to prevent state when configuration was updated, + # Renderer updates configuration file via segments’ .startup thus it + # should be locked to prevent state when configuration was updated, # but .render still uses old renderer. try: renderer = Renderer(**self.renderer_options) @@ -697,8 +697,8 @@ default_log_stream = sys.stdout '''Default stream for default log handler - Usually it is ``sys.stderr``, but there is sometimes a reason to prefer - ``sys.stdout`` or a custom file-like object. It is not supposed to be used + Usually it is ``sys.stderr``, but there is sometimes a reason to prefer + ``sys.stdout`` or a custom file-like object. It is not supposed to be used to write to some file. ''' @@ -716,7 +716,7 @@ def get_config_paths(): '''Get configuration paths. - Should be overridden in subclasses in order to provide a way to override + Should be overridden in subclasses in order to provide a way to override used paths. :return: list of paths @@ -727,10 +727,10 @@ '''Load configuration and setup watches :param str cfg_path: - Path to the configuration file without any powerline configuration + Path to the configuration file without any powerline configuration directory or ``.json`` suffix. :param str cfg_type: - Configuration type. May be one of ``main`` (for ``config.json`` + Configuration type. May be one of ``main`` (for ``config.json`` file), ``colors``, ``colorscheme``, ``theme``. :return: dictionary with loaded configuration. @@ -758,15 +758,15 @@ '''Load and merge multiple configuration files :param str cfg_type: - Type of the loaded configuration files (e.g. ``colorscheme``, + Type of the loaded configuration files (e.g. ``colorscheme``, ``theme``). :param list levels: - Configuration names resembling levels in hierarchy, sorted by - priority. Configuration file names with higher priority should go + Configuration names resembling levels in hierarchy, sorted by + priority. Configuration file names with higher priority should go last. :param set ignore_levels: - If only files listed in this variable are present then configuration - file is considered not loaded: at least one file on the level not + If only files listed in this variable are present then configuration + file is considered not loaded: at least one file on the level not listed in this variable must be present. ''' config = {} @@ -832,16 +832,16 @@ @staticmethod def get_local_themes(local_themes): - '''Get local themes. No-op here, to be overridden in subclasses if + '''Get local themes. No-op here, to be overridden in subclasses if required. :param dict local_themes: - Usually accepts ``{matcher_name : theme_name}``. May also receive + Usually accepts ``{matcher_name : theme_name}``. May also receive None in case there is no local_themes configuration. :return: - anything accepted by ``self.renderer.get_theme`` and processable by - ``self.renderer.add_local_theme``. Renderer module is determined by + anything accepted by ``self.renderer.get_theme`` and processable by + ``self.renderer.add_local_theme``. Renderer module is determined by ``__init__`` arguments, refer to its documentation. ''' return None @@ -869,7 +869,7 @@ self.cr_kwargs.clear() def render(self, *args, **kwargs): - '''Update/create renderer if needed and pass all arguments further to + '''Update/create renderer if needed and pass all arguments further to ``self.renderer.render()``. ''' try: @@ -904,7 +904,7 @@ def setup(self, *args, **kwargs): '''Setup the environment to use powerline. - Must not be overridden by subclasses. This one only saves setup + Must not be overridden by subclasses. This one only saves setup arguments for :py:meth:`reload` method and calls :py:meth:`do_setup`. ''' self.shutdown_event.clear() @@ -916,7 +916,7 @@ def do_setup(): '''Function that does initialization - Should be overridden by subclasses. May accept any number of regular or + Should be overridden by subclasses. May accept any number of regular or keyword arguments. ''' pass @@ -926,12 +926,12 @@ Should handle most (but not all) powerline updates. - Purges out all powerline modules and modules imported by powerline for - segment and matcher functions. Requires defining ``setup`` function that + Purges out all powerline modules and modules imported by powerline for + segment and matcher functions. Requires defining ``setup`` function that updates reference to main powerline object. .. warning:: - Not guaranteed to work properly, use it at your own risk. It + Not guaranteed to work properly, use it at your own risk. It may break your python code. ''' import sys @@ -939,7 +939,7 @@ modules_holder = [] for module in modules: try: - # Needs to hold module to prevent garbage collecting until they + # Needs to hold module to prevent garbage collecting until they # are all reloaded. modules_holder.append(sys.modules.pop(module)) except KeyError: @@ -954,12 +954,12 @@ '''Shut down all background threads. :param bool set_event: - Set ``shutdown_event`` and call ``renderer.shutdown`` which should - shut down all threads. Set it to False unless you are exiting an + Set ``shutdown_event`` and call ``renderer.shutdown`` which should + shut down all threads. Set it to False unless you are exiting an application. - If set to False this does nothing more then resolving reference - cycle ``powerline → config_loader → bound methods → powerline`` by + If set to False this does nothing more then resolving reference + cycle ``powerline → config_loader → bound methods → powerline`` by unsubscribing from config_loader events. ''' if set_event: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/powerline-2.8/powerline/version.py new/powerline-2.8.1/powerline/version.py --- old/powerline-2.8/powerline/version.py 1970-01-01 01:00:00.000000000 +0100 +++ new/powerline-2.8.1/powerline/version.py 2020-05-20 13:32:35.000000000 +0200 @@ -0,0 +1,15 @@ +# vim:fileencoding=utf-8:noet +from __future__ import (unicode_literals, division, absolute_import, print_function) + +import subprocess +from traceback import print_exc + +__version__ = "2.8.1" + +def get_version(): + try: + return __version__ + '.dev9999+git.' + str(subprocess.check_output(['git', 'rev-parse', 'HEAD']).strip()) + except Exception: + print_exc() + return __version__ + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/powerline-2.8/setup.py new/powerline-2.8.1/setup.py --- old/powerline-2.8/setup.py 2020-05-14 22:33:27.000000000 +0200 +++ new/powerline-2.8.1/setup.py 2020-05-20 13:32:35.000000000 +0200 @@ -4,13 +4,13 @@ import os import sys -import subprocess import logging import shlex +import subprocess -from traceback import print_exc from setuptools import setup, find_packages +from powerline.version import get_version CURRENT_DIR = os.path.abspath(os.path.dirname(__file__)) try: @@ -57,17 +57,6 @@ else: can_use_scripts = False - -def get_version(): - base_version = '2.8' - base_version += '.dev9999' - try: - return base_version + '+git.' + str(subprocess.check_output(['git', 'rev-parse', 'HEAD']).strip()) - except Exception: - print_exc() - return base_version - - setup( name='powerline-status', version=get_version(),
