Compare commits
4 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| a7c2083047 | |||
| b5df993daf | |||
| f235d1b078 | |||
| dc74ba42ce |
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:45d838dbac94a1363942899708b6ce7c71c1cad9e1b9d048affab4f630c4cb98
|
||||
size 368623
|
||||
3
powerline-2.8.4.tar.gz
Normal file
3
powerline-2.8.4.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9e846af9379b57e410efe264cff3a6b98eb78dd9526e83016776ae5ffc5798f4
|
||||
size 369057
|
||||
@@ -1,96 +0,0 @@
|
||||
From 6238d9e8b78f5327f60bd1d2606a37f951a3cd9c Mon Sep 17 00:00:00 2001
|
||||
From: Christoph Erhardt <github@sicherha.de>
|
||||
Date: Wed, 22 Jun 2022 21:42:53 +0200
|
||||
Subject: [PATCH] Ensure compatibility with Python 3.11
|
||||
|
||||
* Replace deprecated `getargspec()` with `getfullargspec()`
|
||||
* Replace deprecated `formatargspec()` with custom implementation
|
||||
|
||||
Fixes #2209.
|
||||
---
|
||||
docs/source/powerline_autodoc.py | 6 ++----
|
||||
powerline/lint/inspect.py | 34 +++++++++++++++++++++++++++++---
|
||||
2 files changed, 33 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/docs/source/powerline_autodoc.py b/docs/source/powerline_autodoc.py
|
||||
index eba42edb7..83996aeaf 100644
|
||||
--- a/docs/source/powerline_autodoc.py
|
||||
+++ b/docs/source/powerline_autodoc.py
|
||||
@@ -3,11 +3,9 @@
|
||||
|
||||
import os
|
||||
|
||||
-from inspect import formatargspec
|
||||
-
|
||||
from sphinx.ext import autodoc
|
||||
|
||||
-from powerline.lint.inspect import getconfigargspec
|
||||
+from powerline.lint.inspect import formatconfigargspec, getconfigargspec
|
||||
from powerline.segments import Segment
|
||||
from powerline.lib.unicode import unicode
|
||||
|
||||
@@ -28,7 +26,7 @@ def can_document_member(cls, member, membername, isattr, parent):
|
||||
|
||||
def format_args(self):
|
||||
argspec = getconfigargspec(self.object)
|
||||
- return formatargspec(*argspec, formatvalue=formatvalue).replace('\\', '\\\\')
|
||||
+ return formatconfigargspec(*argspec, formatvalue=formatvalue).replace('\\', '\\\\')
|
||||
|
||||
|
||||
class Repr(object):
|
||||
diff --git a/powerline/lint/inspect.py b/powerline/lint/inspect.py
|
||||
index 15bb6103b..7ab720f84 100644
|
||||
--- a/powerline/lint/inspect.py
|
||||
+++ b/powerline/lint/inspect.py
|
||||
@@ -1,7 +1,8 @@
|
||||
# vim:fileencoding=utf-8:noet
|
||||
from __future__ import (unicode_literals, division, absolute_import, print_function)
|
||||
|
||||
-from inspect import ArgSpec, getargspec
|
||||
+from inspect import FullArgSpec, getfullargspec
|
||||
+from itertools import zip_longest
|
||||
|
||||
from powerline.segments import Segment
|
||||
|
||||
@@ -33,7 +34,7 @@ def getconfigargspec(obj):
|
||||
requires_filesystem_watcher = hasattr(obj, 'powerline_requires_filesystem_watcher')
|
||||
|
||||
for name, method in argspecobjs:
|
||||
- argspec = getargspec(method)
|
||||
+ argspec = getfullargspec(method)
|
||||
omitted_args = get_omitted_args(name, method)
|
||||
largs = len(argspec.args)
|
||||
for i, arg in enumerate(reversed(argspec.args)):
|
||||
@@ -60,4 +61,31 @@ def getconfigargspec(obj):
|
||||
if arg not in args:
|
||||
args.insert(0, arg)
|
||||
|
||||
- return ArgSpec(args=args, varargs=None, keywords=None, defaults=tuple(defaults))
|
||||
+ return FullArgSpec(args=args, varargs=None, varkw=None, defaults=tuple(defaults), kwonlyargs=(), kwonlydefaults={}, annotations={})
|
||||
+
|
||||
+
|
||||
+def formatconfigargspec(args, varargs=None, varkw=None, defaults=None,
|
||||
+ kwonlyargs=(), kwonlydefaults={}, annotations={},
|
||||
+ formatvalue=lambda value: '=' + repr(value)):
|
||||
+ '''Format an argument spec from the values returned by getconfigargspec.
|
||||
+
|
||||
+ This is a specialized replacement for inspect.formatargspec, which has been
|
||||
+ deprecated since Python 3.5 and was removed in Python 3.11. It supports
|
||||
+ valid values for args, defaults and formatvalue; all other parameters are
|
||||
+ expected to be either empty or None.
|
||||
+ '''
|
||||
+ assert varargs is None
|
||||
+ assert varkw is None
|
||||
+ assert not kwonlyargs
|
||||
+ assert not kwonlydefaults
|
||||
+ assert not annotations
|
||||
+
|
||||
+ specs = []
|
||||
+ if defaults:
|
||||
+ firstdefault = len(args) - len(defaults)
|
||||
+ for i, arg in enumerate(args):
|
||||
+ spec = arg
|
||||
+ if defaults and i >= firstdefault:
|
||||
+ spec += formatvalue(defaults[i - firstdefault])
|
||||
+ specs.append(spec)
|
||||
+ return '(' + ', '.join(specs) + ')'
|
||||
204
powerline-python3_13-compat.patch
Normal file
204
powerline-python3_13-compat.patch
Normal file
@@ -0,0 +1,204 @@
|
||||
From c97afc9d9dbc872217434cd7ce406968e0759e56 Mon Sep 17 00:00:00 2001
|
||||
From: Christoph Erhardt <github@sicherha.de>
|
||||
Date: Fri, 10 Jan 2025 23:56:26 +0100
|
||||
Subject: [PATCH 1/4] Fix `TypeError: bad argument type for built-in operation`
|
||||
in Vim status line
|
||||
|
||||
This occurs when opening a file inside a Git repository; the `path`
|
||||
parameter is of type `bytes` instead of the expected `str`. The above
|
||||
error message gets printed at the position where the file name and size
|
||||
would normally be displayed.
|
||||
|
||||
The error was observed on Fedora 41 with Python 3.13. The exact root
|
||||
cause is unclear - but explicitly converting `path` to `str` prevents
|
||||
the `TypeError`.
|
||||
---
|
||||
powerline/lib/vcs/git.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: powerline-2.8.4/powerline/lib/vcs/git.py
|
||||
===================================================================
|
||||
--- powerline-2.8.4.orig/powerline/lib/vcs/git.py
|
||||
+++ powerline-2.8.4/powerline/lib/vcs/git.py
|
||||
@@ -112,7 +112,7 @@ try:
|
||||
def do_status(self, directory, path):
|
||||
if path:
|
||||
try:
|
||||
- status = git.Repository(directory).status_file(path)
|
||||
+ status = git.Repository(directory).status_file(str(path))
|
||||
except (KeyError, ValueError):
|
||||
return None
|
||||
|
||||
Index: powerline-2.8.4/powerline/commands/daemon.py
|
||||
===================================================================
|
||||
--- powerline-2.8.4.orig/powerline/commands/daemon.py
|
||||
+++ powerline-2.8.4/powerline/commands/daemon.py
|
||||
@@ -16,9 +16,7 @@ def get_argparser(ArgumentParser=argpars
|
||||
'Does not silence exceptions in any case.'
|
||||
)
|
||||
parser.add_argument('--socket', '-s', help='Specify socket which will be used for connecting to daemon.')
|
||||
- exclusive_group = parser.add_mutually_exclusive_group()
|
||||
- exclusive_group.add_argument('--kill', '-k', action='store_true', help='Kill an already running instance.')
|
||||
- replace_group = exclusive_group.add_argument_group()
|
||||
- replace_group.add_argument('--foreground', '-f', action='store_true', help='Run in the foreground (don’t daemonize).')
|
||||
- replace_group.add_argument('--replace', '-r', action='store_true', help='Replace an already running instance.')
|
||||
+ parser.add_argument('--kill', '-k', action='store_true', help='Kill an already running instance.')
|
||||
+ parser.add_argument('--foreground', '-f', action='store_true', help='Run in the foreground (don’t daemonize).')
|
||||
+ parser.add_argument('--replace', '-r', action='store_true', help='Replace an already running instance.')
|
||||
return parser
|
||||
Index: powerline-2.8.4/docs/source/develop/local-themes.rst
|
||||
===================================================================
|
||||
--- powerline-2.8.4.orig/docs/source/develop/local-themes.rst
|
||||
+++ powerline-2.8.4/docs/source/develop/local-themes.rst
|
||||
@@ -10,7 +10,7 @@ prompt). Used themes are defined in :ref
|
||||
Vim local themes
|
||||
================
|
||||
|
||||
-Vim is the only available extension that has a wide variaty of options for local
|
||||
+Vim is the only available extension that has a wide variety of options for local
|
||||
themes. It is the only extension where local theme key refers to a function as
|
||||
described in :ref:`local_themes value documentation <config-ext-local_themes>`.
|
||||
|
||||
Index: powerline-2.8.4/docs/source/troubleshooting.rst
|
||||
===================================================================
|
||||
--- powerline-2.8.4.orig/docs/source/troubleshooting.rst
|
||||
+++ powerline-2.8.4/docs/source/troubleshooting.rst
|
||||
@@ -19,7 +19,7 @@ After an update something stopped workin
|
||||
Assuming powerline was working before update and stopped only after there are
|
||||
two possible explanations:
|
||||
|
||||
-* You have more then one powerline installation (e.g. ``pip`` and ``Vundle``
|
||||
+* You have more than one powerline installation (e.g. ``pip`` and ``Vundle``
|
||||
installations) and you have updated only one.
|
||||
* Update brought some bug to powerline.
|
||||
|
||||
Index: powerline-2.8.4/powerline/__init__.py
|
||||
===================================================================
|
||||
--- powerline-2.8.4.orig/powerline/__init__.py
|
||||
+++ powerline-2.8.4/powerline/__init__.py
|
||||
@@ -958,7 +958,7 @@ class Powerline(object):
|
||||
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
|
||||
+ If set to False this does nothing more than resolving reference
|
||||
cycle ``powerline → config_loader → bound methods → powerline`` by
|
||||
unsubscribing from config_loader events.
|
||||
'''
|
||||
Index: powerline-2.8.4/powerline/lib/unicode.py
|
||||
===================================================================
|
||||
--- powerline-2.8.4.orig/powerline/lib/unicode.py
|
||||
+++ powerline-2.8.4/powerline/lib/unicode.py
|
||||
@@ -85,7 +85,7 @@ def register_strwidth_error(strwidth):
|
||||
needed settings) and emits new error handling method name.
|
||||
|
||||
:param function strwidth:
|
||||
- Function that computs string width measured in display cells the string
|
||||
+ Function that computes string width measured in display cells the string
|
||||
occupies when displayed.
|
||||
|
||||
:return: New error handling method name.
|
||||
Index: powerline-2.8.4/powerline/lint/markedjson/scanner.py
|
||||
===================================================================
|
||||
--- powerline-2.8.4.orig/powerline/lint/markedjson/scanner.py
|
||||
+++ powerline-2.8.4/powerline/lint/markedjson/scanner.py
|
||||
@@ -423,7 +423,7 @@ class Scanner:
|
||||
if self.peek(k) not in hexdigits:
|
||||
raise ScannerError(
|
||||
'while scanning a double-quoted scalar', start_mark,
|
||||
- 'expected escape sequence of %d hexdecimal numbers, but found %r' % (
|
||||
+ 'expected escape sequence of %d hexadecimal numbers, but found %r' % (
|
||||
length, self.peek(k)),
|
||||
self.get_mark()
|
||||
)
|
||||
Index: powerline-2.8.4/powerline/lint/spec.py
|
||||
===================================================================
|
||||
--- powerline-2.8.4.orig/powerline/lint/spec.py
|
||||
+++ powerline-2.8.4/powerline/lint/spec.py
|
||||
@@ -46,7 +46,7 @@ class Spec(object):
|
||||
|
||||
.. note::
|
||||
In ``check_`` and ``match`` methods specifications are identified by
|
||||
- their indexes for the purpose of simplyfying :py:meth:`Spec.copy`
|
||||
+ their indexes for the purpose of simplifying :py:meth:`Spec.copy`
|
||||
method.
|
||||
|
||||
Some common parameters:
|
||||
Index: powerline-2.8.4/powerline/segments/i3wm.py
|
||||
===================================================================
|
||||
--- powerline-2.8.4.orig/powerline/segments/i3wm.py
|
||||
+++ powerline-2.8.4/powerline/segments/i3wm.py
|
||||
@@ -247,7 +247,7 @@ def mode(pl, segment_info, names={'defau
|
||||
Specifies the string to show for various modes.
|
||||
Use ``null`` to hide a mode (``default`` is hidden by default).
|
||||
|
||||
- Highligh groups used: ``mode``
|
||||
+ Highlight groups used: ``mode``
|
||||
'''
|
||||
mode = segment_info['mode']
|
||||
if mode in names:
|
||||
Index: powerline-2.8.4/powerline/segments/vim/__init__.py
|
||||
===================================================================
|
||||
--- powerline-2.8.4.orig/powerline/segments/vim/__init__.py
|
||||
+++ powerline-2.8.4/powerline/segments/vim/__init__.py
|
||||
@@ -127,7 +127,7 @@ def visual_range(pl, segment_info, CTRL_
|
||||
selection occupies only one line.
|
||||
:param str v_text_multiline:
|
||||
Text to display when in charaterwise visual or select mode, assuming
|
||||
- selection occupies more then one line.
|
||||
+ selection occupies more than one line.
|
||||
:param str V_text:
|
||||
Text to display when in linewise visual or select mode.
|
||||
|
||||
Index: powerline-2.8.4/scripts/powerline-daemon
|
||||
===================================================================
|
||||
--- powerline-2.8.4.orig/scripts/powerline-daemon
|
||||
+++ powerline-2.8.4/scripts/powerline-daemon
|
||||
@@ -268,7 +268,7 @@ def shutdown(sock, read_sockets, write_s
|
||||
#. Notifies segments based on
|
||||
:py:class:`powerline.lib.threaded.ThreadedSegment` and WM-specific
|
||||
threads that daemon is shutting down.
|
||||
- #. Waits for threads to finish, but no more then 2 seconds total.
|
||||
+ #. Waits for threads to finish, but no more than 2 seconds total.
|
||||
#. Waits so that total execution time of this function is 2 seconds in order
|
||||
to allow ThreadedSegments to finish.
|
||||
'''
|
||||
Index: powerline-2.8.4/tests/test_shells/test.sh
|
||||
===================================================================
|
||||
--- powerline-2.8.4.orig/tests/test_shells/test.sh
|
||||
+++ powerline-2.8.4/tests/test_shells/test.sh
|
||||
@@ -217,7 +217,7 @@ IPYTHON_PYTHON=ipython
|
||||
|
||||
if test -z "$POWERLINE_RC_EXE" ; then
|
||||
if which rc-status >/dev/null ; then
|
||||
- # On Gentoo `rc` executable is from OpenRC. Thus app-shells/rc instals
|
||||
+ # On Gentoo `rc` executable is from OpenRC. Thus app-shells/rc installs
|
||||
# `rcsh` executable.
|
||||
POWERLINE_RC_EXE=rcsh
|
||||
else
|
||||
Index: powerline-2.8.4/.github/workflows/main.yaml
|
||||
===================================================================
|
||||
--- powerline-2.8.4.orig/.github/workflows/main.yaml
|
||||
+++ powerline-2.8.4/.github/workflows/main.yaml
|
||||
@@ -16,7 +16,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
- python-version: [3.7, 3.8, 3.9, 3.11, 3.12]
|
||||
+ python-version: [3.8, 3.9, 3.11, 3.12, 3.13]
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
Index: powerline-2.8.4/tests/test_python/test_cmdline.py
|
||||
===================================================================
|
||||
--- powerline-2.8.4.orig/tests/test_python/test_cmdline.py
|
||||
+++ powerline-2.8.4/tests/test_python/test_cmdline.py
|
||||
@@ -52,7 +52,7 @@ class TestParser(TestCase):
|
||||
]:
|
||||
self.assertRaises(SystemExit, parser.parse_args, raising_args)
|
||||
self.assertFalse(out.getvalue())
|
||||
- self.assertRegexpMatches(err.getvalue(), raising_reg)
|
||||
+ self.assertRegex(err.getvalue(), raising_reg)
|
||||
flush()
|
||||
|
||||
def test_main_normal(self):
|
||||
@@ -1,3 +1,17 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 11 10:01:27 UTC 2025 - Atri Bhattacharya <badshah400@gmail.com>
|
||||
|
||||
- Add powerline-python3_13-compat.patch: Fix TypeError with python
|
||||
3.13 in vim status line; upstream PR + test fix
|
||||
[gh#powerline/powerline#2271].
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 19 13:07:16 UTC 2024 - Atri Bhattacharya <badshah400@gmail.com>
|
||||
|
||||
- Update to version 2.8.4:
|
||||
* Minor improvements and bug fixes.
|
||||
- Drop powerline-python3.11-compat.patch: upstreamed.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 5 07:41:41 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
@@ -94,7 +108,7 @@ Mon Aug 13 09:03:59 UTC 2018 - asn@cryptomilk.org
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 10 10:18:25 UTC 2018 - mimi.vx@gmail.com
|
||||
|
||||
- add powerline-2.6-gcc7_fixes.patch
|
||||
- add powerline-2.6-gcc7_fixes.patch
|
||||
- add powerline-py2v3-fix.patch fixes boo#1101303
|
||||
- cleanup spec
|
||||
- correctly install systemd service
|
||||
@@ -102,7 +116,7 @@ Fri Aug 10 10:18:25 UTC 2018 - mimi.vx@gmail.com
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 28 09:42:56 UTC 2018 - asn@cryptomilk.org
|
||||
|
||||
- Fix powerline requiring both python2 and python3
|
||||
- Fix powerline requiring both python2 and python3
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 10 08:42:53 UTC 2017 - asn@cryptomilk.org
|
||||
@@ -188,7 +202,7 @@ Tue Oct 20 10:49:29 UTC 2015 - asn@cryptomilk.org
|
||||
* Added systemd service file.
|
||||
* Added ability to detect internal_ip interface using default gateway.
|
||||
* Added support for password-protected connections in mpd player bindings.
|
||||
* Added `output` option to i3wm.workspaces segment to filter workspaces based on
|
||||
* Added `output` option to i3wm.workspaces segment to filter workspaces based on
|
||||
their output.
|
||||
* Added “charging” indicator to battery segment.
|
||||
* Made tmux bindings show zoom indicator in window status.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package powerline
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -18,15 +18,15 @@
|
||||
|
||||
%define powerline_python_sitelib %{python3_sitelib}
|
||||
Name: powerline
|
||||
Version: 2.8.3
|
||||
Version: 2.8.4
|
||||
Release: 0
|
||||
Summary: Status line and prompt utility
|
||||
License: MIT
|
||||
Group: System/Console
|
||||
URL: https://github.com/powerline/powerline
|
||||
Source0: https://github.com/powerline/powerline/archive/%{version}/powerline-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM powerline-python3.11-compat.patch gh#powerline/powerline#2209 badshah400@gmail.com -- Make powerline compatible with python 3.11
|
||||
Patch0: https://patch-diff.githubusercontent.com/raw/powerline/powerline/pull/2212.patch#/powerline-python3.11-compat.patch
|
||||
# PATCH-FIX-UPSTREAM powerline-python3_13-compat.patch gh#powerline/powerline#2271 badshah400@gmail.com -- Fix TypeError with python 3.13 in vim status line; upstream PR
|
||||
Patch0: powerline-python3_13-compat.patch
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: fontconfig
|
||||
BuildRequires: git-core
|
||||
|
||||
Reference in New Issue
Block a user