Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-curtsies for openSUSE:Factory
checked in at 2023-09-13 20:44:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-curtsies (Old)
and /work/SRC/openSUSE:Factory/.python-curtsies.new.1766 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-curtsies"
Wed Sep 13 20:44:24 2023 rev:15 rq:1110673 version:0.4.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-curtsies/python-curtsies.changes
2022-10-29 20:18:42.846724500 +0200
+++
/work/SRC/openSUSE:Factory/.python-curtsies.new.1766/python-curtsies.changes
2023-09-13 20:45:18.575670880 +0200
@@ -1,0 +2,6 @@
+Tue Sep 12 15:25:02 UTC 2023 - Dirk Müller <[email protected]>
+
+- update to 0.4.2:
+ * Small type annotation clean ups.
+
+-------------------------------------------------------------------
Old:
----
curtsies-0.4.1.tar.gz
New:
----
curtsies-0.4.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-curtsies.spec ++++++
--- /var/tmp/diff_new_pack.77ene6/_old 2023-09-13 20:45:19.831715534 +0200
+++ /var/tmp/diff_new_pack.77ene6/_new 2023-09-13 20:45:19.835715676 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-curtsies
#
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -20,7 +20,7 @@
%define skip_python2 1
%define skip_python36 1
Name: python-curtsies
-Version: 0.4.1
+Version: 0.4.2
Release: 0
Summary: Curses-like terminal wrapper, with colored strings!
License: MIT
++++++ curtsies-0.4.1.tar.gz -> curtsies-0.4.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/curtsies-0.4.1/LICENSE new/curtsies-0.4.2/LICENSE
--- old/curtsies-0.4.1/LICENSE 2022-10-05 23:47:27.000000000 +0200
+++ new/curtsies-0.4.2/LICENSE 2023-07-31 22:18:21.000000000 +0200
@@ -1,6 +1,7 @@
The MIT License (MIT)
Copyright (c) 2014 Thomas Ballinger
+Copyright (c) 2020-2023 Sebastian Ramacher
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/curtsies-0.4.1/PKG-INFO new/curtsies-0.4.2/PKG-INFO
--- old/curtsies-0.4.1/PKG-INFO 2022-10-05 23:47:31.333721000 +0200
+++ new/curtsies-0.4.2/PKG-INFO 2023-07-31 22:18:29.564929200 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: curtsies
-Version: 0.4.1
+Version: 0.4.2
Summary: Curses-like terminal wrapper, with colored strings!
Home-page: https://github.com/bpython/curtsies
Author: Thomas Ballinger
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/curtsies-0.4.1/curtsies/__init__.py
new/curtsies-0.4.2/curtsies/__init__.py
--- old/curtsies-0.4.1/curtsies/__init__.py 2022-10-05 23:47:27.000000000
+0200
+++ new/curtsies-0.4.2/curtsies/__init__.py 2023-07-31 22:18:21.000000000
+0200
@@ -1,5 +1,5 @@
"""Terminal-formatted strings"""
-__version__ = "0.4.1"
+__version__ = "0.4.2"
from .window import FullscreenWindow, CursorAwareWindow
from .input import Input
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/curtsies-0.4.1/curtsies/configfile_keynames.py
new/curtsies-0.4.2/curtsies/configfile_keynames.py
--- old/curtsies-0.4.1/curtsies/configfile_keynames.py 2022-10-05
23:47:27.000000000 +0200
+++ new/curtsies-0.4.2/curtsies/configfile_keynames.py 2023-07-31
22:18:21.000000000 +0200
@@ -10,6 +10,7 @@
"C-_": "<Ctrl-/>",
}
+
# TODO make a precalculated version of this
class KeyMap:
"""Maps config file key syntax to Curtsies names"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/curtsies-0.4.1/curtsies/formatstring.py
new/curtsies-0.4.2/curtsies/formatstring.py
--- old/curtsies-0.4.1/curtsies/formatstring.py 2022-10-05 23:47:27.000000000
+0200
+++ new/curtsies-0.4.2/curtsies/formatstring.py 2023-07-31 22:18:21.000000000
+0200
@@ -73,12 +73,10 @@
class FrozenAttributes(Dict[str, Union[int, bool]]):
"""Immutable dictionary class for format string attributes"""
- @no_type_check
- def __setitem__(self, key, value):
+ def __setitem__(self, key: str, value: Union[int, bool]) -> None:
raise Exception("Cannot change value.")
- @no_type_check
- def update(self, *args, **kwds):
+ def update(self, *args: Any, **kwds: Any) -> None:
raise Exception("Cannot change value.")
def extend(self, dictlike: Mapping[str, Union[int, bool]]) ->
"FrozenAttributes":
@@ -205,6 +203,11 @@
"""
def __init__(self, chunk: Chunk) -> None:
+ self.reinit(chunk)
+
+ def reinit(self, chunk: Chunk) -> None:
+ """Reuse an existing Splitter instance for speed."""
+ # TODO benchmark to prove this is worthwhile
self.chunk = chunk
self.internal_offset = 0 # index into chunk.s
self.internal_width = 0 # width of chunks.s[:self.internal_offset]
@@ -213,11 +216,6 @@
divides.append(divides[-1] + wcwidth(c))
self.divides = divides
- def reinit(self, chunk: Chunk) -> None:
- """Reuse an existing Splitter instance for speed."""
- # TODO benchmark to prove this is worthwhile
- self.__init__(chunk) # type: ignore
-
def request(self, max_width: int) -> Optional[Tuple[int, Chunk]]:
"""Requests a sub-chunk of max_width or shorter. Returns None if no
chunks left."""
if max_width < 1:
@@ -563,7 +561,7 @@
# TODO ensure empty FmtStr isn't a problem
@property
- def shared_atts(self) -> Mapping[str, Union[int, bool]]:
+ def shared_atts(self) -> Dict[str, Union[int, bool]]:
"""Gets atts shared among all nonzero length component Chunks"""
# TODO cache this, could get ugly for large FmtStrs
atts = {}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/curtsies-0.4.1/curtsies/formatstringarray.py
new/curtsies-0.4.2/curtsies/formatstringarray.py
--- old/curtsies-0.4.1/curtsies/formatstringarray.py 2022-10-05
23:47:27.000000000 +0200
+++ new/curtsies-0.4.2/curtsies/formatstringarray.py 2023-07-31
22:18:21.000000000 +0200
@@ -31,6 +31,7 @@
from typing import (
Any,
+ Optional,
Union,
List,
Sequence,
@@ -249,7 +250,10 @@
def fsarray(
- strings: Sequence[Union[FmtStr, str]], *args: Any, **kwargs: Any
+ strings: Sequence[Union[FmtStr, str]],
+ width: Optional[int] = None,
+ *args: Any,
+ **kwargs: Any,
) -> FSArray:
"""fsarray(list_of_FmtStrs_or_strings, width=None) -> FSArray
@@ -259,20 +263,21 @@
are of length greater than this width"""
strings = list(strings)
- if "width" in kwargs:
- width = kwargs["width"]
- del kwargs["width"]
+ if width is not None:
if strings and any(len(s) > width for s in strings):
raise ValueError(f"Those strings won't fit for width {width}")
else:
width = max(len(s) for s in strings) if strings else 0
- fstrings = [
- s if isinstance(s, FmtStr) else fmtstr(s, *args, **kwargs) for s in
strings
- ]
- arr = FSArray(len(fstrings), width, *args, **kwargs)
+ arr = FSArray(len(strings), width, *args, **kwargs)
rows = [
fs.setslice_with_length(0, len(s), s, width)
- for fs, s in zip(arr.rows, fstrings)
+ for fs, s in zip(
+ arr.rows,
+ (
+ s if isinstance(s, FmtStr) else fmtstr(s, *args, **kwargs)
+ for s in strings
+ ),
+ )
]
arr.rows = rows
return arr
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/curtsies-0.4.1/curtsies.egg-info/PKG-INFO
new/curtsies-0.4.2/curtsies.egg-info/PKG-INFO
--- old/curtsies-0.4.1/curtsies.egg-info/PKG-INFO 2022-10-05
23:47:31.000000000 +0200
+++ new/curtsies-0.4.2/curtsies.egg-info/PKG-INFO 2023-07-31
22:18:29.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: curtsies
-Version: 0.4.1
+Version: 0.4.2
Summary: Curses-like terminal wrapper, with colored strings!
Home-page: https://github.com/bpython/curtsies
Author: Thomas Ballinger
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/curtsies-0.4.1/pyproject.toml
new/curtsies-0.4.2/pyproject.toml
--- old/curtsies-0.4.1/pyproject.toml 2022-10-05 23:47:27.000000000 +0200
+++ new/curtsies-0.4.2/pyproject.toml 2023-07-31 22:18:21.000000000 +0200
@@ -1,8 +1,8 @@
[build-system]
requires = [
"setuptools >= 43",
- "wheel",
]
+build-backend = "setuptools.build_meta"
[tool.black]
line-length = 88
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/curtsies-0.4.1/setup.cfg new/curtsies-0.4.2/setup.cfg
--- old/curtsies-0.4.1/setup.cfg 2022-10-05 23:47:31.337720900 +0200
+++ new/curtsies-0.4.2/setup.cfg 2023-07-31 22:18:29.568929400 +0200
@@ -7,7 +7,7 @@
author = Thomas Ballinger
author_email = [email protected]
license = MIT
-license_file = LICENSE
+license_files = LICENSE
classifiers =
Development Status :: 3 - Alpha
Environment :: Console
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/curtsies-0.4.1/tests/test_fmtstr.py
new/curtsies-0.4.2/tests/test_fmtstr.py
--- old/curtsies-0.4.1/tests/test_fmtstr.py 2022-10-05 23:47:27.000000000
+0200
+++ new/curtsies-0.4.2/tests/test_fmtstr.py 2023-07-31 22:18:21.000000000
+0200
@@ -1,4 +1,3 @@
-import sys
import unittest
from curtsies.formatstring import (
FmtStr,
@@ -372,7 +371,7 @@
def test_funny_chars(self) -> None:
fmtstr("â", "blue")
- str(Chunk("â", {"fg": "blue"}))
+ str(Chunk("â", {"fg": 34}))
str(fmtstr("â", "blue"))
self.assertTrue(True)
@@ -401,7 +400,6 @@
# self.assertEqual(len(fmtstr('ââ')), 2)
def test_len_of_unicode_in_fsarray(self) -> None:
-
fsa = FSArray(3, 2)
fsa.rows[0] = fsa.rows[0].setslice_with_length(0, 2, "ââ", 2)
self.assertEqual(fsa.shape, (3, 2))
@@ -559,8 +557,7 @@
def test_assignment_working(self) -> None:
t = FSArray(10, 10)
t[2, 2] = "a"
- # TODO: is this supposed to check something?
- t[2, 2] == "a"
+ self.assertEqual(t[2, 2], ["a"])
def test_normalize_slice(self) -> None:
class SliceBuilder:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/curtsies-0.4.1/tests/test_terminal.py
new/curtsies-0.4.2/tests/test_terminal.py
--- old/curtsies-0.4.1/tests/test_terminal.py 2022-10-05 23:47:27.000000000
+0200
+++ new/curtsies-0.4.2/tests/test_terminal.py 2023-07-31 22:18:21.000000000
+0200
@@ -1,4 +1,3 @@
-import functools
import locale
import os
import sys
@@ -154,7 +153,6 @@
# This isn't passing locally for me anymore :/
@expectedFailure
def test_inital_cursor_position(self):
-
self.screen.cursor.y += 1
with self.window:
self.assertEqual(self.window.top_usable_row, 1)