Hello community,
here is the log from the commit of package python3-curtsies for openSUSE:Factory checked in at 2016-01-04 09:22:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-curtsies (Old)
and /work/SRC/openSUSE:Factory/.python3-curtsies.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-curtsies"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-curtsies/python3-curtsies.changes 2015-03-19 21:11:40.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python3-curtsies.new/python3-curtsies.changes 2016-01-04 09:22:28.000000000 +0100
@@ -1,0 +2,14 @@
+Sat Jan 2 19:11:51 UTC 2016 - arun@gmx.de
+
+- update to version 0.2.4:
+ * bump version for FmtStr equality fix
+ * fix #84 equality of FmtStr objects and nonstrings
+ * fix #76
+ * added keys, fixes #78
+ * Fix arguments given to split
+ * fix example broken in main example
+ * disable ctrl-y (dsusp) on OSX
+ * Allow empty reads when interrupted
+ * fix travis irc announce link
+
+-------------------------------------------------------------------
Old:
----
curtsies-0.2.3.tar.gz
New:
----
curtsies-0.2.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-curtsies.spec ++++++
--- /var/tmp/diff_new_pack.iQhJKI/_old 2016-01-04 09:22:28.000000000 +0100
+++ /var/tmp/diff_new_pack.iQhJKI/_new 2016-01-04 09:22:28.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python3-curtsies
#
-# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 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
@@ -17,7 +17,7 @@
Name: python3-curtsies
-Version: 0.2.3
+Version: 0.2.4
Release: 0
Summary: Curses-like terminal wrapper, with colored strings!
License: MIT
@@ -25,11 +25,11 @@
Url: https://github.com/thomasballinger/curtsies
Source: https://pypi.python.org/packages/source/c/curtsies/curtsies-%{version}.tar.gz
BuildRequires: fdupes
+BuildRequires: python3-blessings
BuildRequires: python3-devel
BuildRequires: python3-mock
BuildRequires: python3-pyte
BuildRequires: python3-setuptools
-BuildRequires: python3-blessings
Requires: python3-blessings
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
++++++ curtsies-0.2.3.tar.gz -> curtsies-0.2.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/curtsies-0.2.3/PKG-INFO new/curtsies-0.2.4/PKG-INFO
--- old/curtsies-0.2.3/PKG-INFO 2015-02-26 14:40:03.000000000 +0100
+++ new/curtsies-0.2.4/PKG-INFO 2015-12-16 14:48:21.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: curtsies
-Version: 0.2.3
+Version: 0.2.4
Summary: Curses-like terminal wrapper, with colored strings!
Home-page: https://github.com/thomasballinger/curtsies
Author: Thomas Ballinger
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/curtsies-0.2.3/curtsies/__init__.py new/curtsies-0.2.4/curtsies/__init__.py
--- old/curtsies-0.2.3/curtsies/__init__.py 2015-02-26 14:37:36.000000000 +0100
+++ new/curtsies-0.2.4/curtsies/__init__.py 2015-12-16 14:47:50.000000000 +0100
@@ -1,5 +1,5 @@
"""Terminal-formatted strings"""
-__version__='0.2.3'
+__version__='0.2.4'
from .window import FullscreenWindow, CursorAwareWindow
from .input import Input
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/curtsies-0.2.3/curtsies/curtsieskeys.py new/curtsies-0.2.4/curtsies/curtsieskeys.py
--- old/curtsies-0.2.3/curtsies/curtsieskeys.py 2015-02-26 14:35:09.000000000 +0100
+++ new/curtsies-0.2.4/curtsies/curtsieskeys.py 2015-12-16 14:47:31.000000000 +0100
@@ -67,14 +67,33 @@
(b'\x1b\x1b[D', u''),
(b'\x1b', u'<ESC>'),
(b'\x1b[1~', u'<HOME>'),
- (b'\x1b[2~', u'<PADENTER>'), #TODO untested
- (b'\x1b[3~', u'<PADDELETE>'), #TODO check this name
(b'\x1b[4~', u'<END>'),
- (b'\x1b[5~', u'<PAGEUP>'),
- (b'\x1b[6~', u'<PAGEDOWN>'),
(b'\x1b\x1b[5~',u''),
(b'\x1b\x1b[6~',u''),
(b'\x1b[H', u'<HOME>'), # reported by amorozov in bpython #490
(b'\x1b[F', u'<END>'), # reported by amorozov in bpython #490
+
+ # see curtsies #78 - taken from https://github.com/jquast/blessed/blob/e9ad7b85dfcbbba49010ab8c13e3a5920d81b...
+
+ # not fixing for back compat.
+ # (b"\x1b[1~", u'<FIND>'), # find
+
+ (b"\x1b[2~", u'<INSERT>'), # insert (0)
+ (b"\x1b[3~", u'<DELETE>'), # delete (.), "Execute"
+
+ # not fixing for back compat.
+ # (b"\x1b[4~", u'<SELECT>'), # select
+
+ (b"\x1b[5~", u'<PAGEUP>'), # pgup (9)
+ (b"\x1b[6~", u'<PAGEDOWN>'), # pgdown (3)
+ (b"\x1b[7~", u'<HOME>'), # home
+ (b"\x1b[8~", u'<END>'), # end
+ (b"\x1b[OA", u'<UP>'), # up (8)
+ (b"\x1b[OB", u'<DOWN>'), # down (2)
+ (b"\x1b[OC", u'<RIGHT>'), # right (6)
+ (b"\x1b[OD", u'<LEFT>'), # left (4)
+ (b"\x1b[OF", u'<END>'), # end (1)
+ (b"\x1b[OH", u'<HOME>'), # home (7)
+
])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/curtsies-0.2.3/curtsies/escseqparse.py new/curtsies-0.2.4/curtsies/escseqparse.py
--- old/curtsies-0.2.3/curtsies/escseqparse.py 2015-02-18 01:02:23.000000000 +0100
+++ new/curtsies-0.2.4/curtsies/escseqparse.py 2015-12-16 14:47:31.000000000 +0100
@@ -29,7 +29,9 @@
stuff.append(front)
if token:
try:
- stuff.append(token_type(token))
+ tok = token_type(token)
+ if tok:
+ stuff.append(tok)
except ValueError:
raise ValueError("Can't parse escape sequence: %r %r %r %r" % (s, repr(front), token, repr(rest)))
if not rest:
@@ -66,7 +68,7 @@
del d['front']
del d['rest']
if 'numbers' in d and d['numbers'].split(';'):
- d['numbers'] = [int(x) for x in d['numbers'].split()]
+ d['numbers'] = [int(x) for x in d['numbers'].split(';')]
return m.groupdict()['front'], d, m.groupdict()['rest']
else:
@@ -83,6 +85,10 @@
if value == RESET_ALL: return dict(dict((k, None) for k in STYLES), **{'fg':None, 'bg':None})
if value == RESET_FG: return {'fg':None}
if value == RESET_BG: return {'bg':None}
+
+ elif info['command'] == 'H': # fix for bpython #76
+ return {}
+
raise ValueError("Can't parse escape seq %r" % info)
if __name__ == '__main__':
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/curtsies-0.2.3/curtsies/events.py new/curtsies-0.2.4/curtsies/events.py
--- old/curtsies-0.2.3/curtsies/events.py 2015-02-18 01:02:23.000000000 +0100
+++ new/curtsies-0.2.4/curtsies/events.py 2015-12-16 14:47:31.000000000 +0100
@@ -46,11 +46,23 @@
CURSES_NAMES[b'\x1b[C'] = u'KEY_RIGHT'
CURSES_NAMES[b'\x1b[D'] = u'KEY_LEFT'
CURSES_NAMES[b'\x08'] = u'KEY_BACKSPACE'
-CURSES_NAMES[b'\x1b[3~'] = u'KEY_DC'
-CURSES_NAMES[b'\x1b[5~'] = u'KEY_PPAGE'
-CURSES_NAMES[b'\x1b[6~'] = u'KEY_NPAGE'
CURSES_NAMES[b'\x1b[Z'] = u'KEY_BTAB'
-#TODO add home and end? and everything else
+
+# see curtsies #78 - taken from https://github.com/jquast/blessed/blob/e9ad7b85dfcbbba49010ab8c13e3a5920d81b...
+CURSES_NAMES[b'\x1b[1~'] = u'KEY_FIND' # find
+CURSES_NAMES[b'\x1b[2~'] = u'KEY_IC' # insert (0)
+CURSES_NAMES[b'\x1b[3~'] = u'KEY_DC' # delete (.), "Execute"
+CURSES_NAMES[b'\x1b[4~'] = u'KEY_SELECT' # select
+CURSES_NAMES[b'\x1b[5~'] = u'KEY_PPAGE' # pgup (9)
+CURSES_NAMES[b'\x1b[6~'] = u'KEY_NPAGE' # pgdown (3)
+CURSES_NAMES[b'\x1b[7~'] = u'KEY_HOME' # home
+CURSES_NAMES[b'\x1b[8~'] = u'KEY_END' # end
+CURSES_NAMES[b'\x1b[OA'] = u'KEY_UP' # up (8)
+CURSES_NAMES[b'\x1b[OB'] = u'KEY_DOWN' # down (2)
+CURSES_NAMES[b'\x1b[OC'] = u'KEY_RIGHT' # right (6)
+CURSES_NAMES[b'\x1b[OD'] = u'KEY_LEFT' # left (4)
+CURSES_NAMES[b'\x1b[OF'] = u'KEY_END' # end (1)
+CURSES_NAMES[b'\x1b[OH'] = u'KEY_HOME' # home (7)
KEYMAP_PREFIXES = set()
for table in (CURSES_NAMES, CURTSIES_NAMES):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/curtsies-0.2.3/curtsies/formatstring.py new/curtsies-0.2.4/curtsies/formatstring.py
--- old/curtsies-0.2.3/curtsies/formatstring.py 2015-02-23 20:25:03.000000000 +0100
+++ new/curtsies-0.2.4/curtsies/formatstring.py 2015-12-16 14:47:31.000000000 +0100
@@ -352,7 +352,9 @@
return '+'.join(repr(fs) for fs in self.basefmtstrs)
def __eq__(self, other):
- return str(self) == str(other)
+ if isinstance(other, (unicode, bytes, FmtStr)):
+ return str(self) == str(other)
+ return False
# TODO corresponding hash method
def __add__(self, other):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/curtsies-0.2.3/curtsies/input.py new/curtsies-0.2.4/curtsies/input.py
--- old/curtsies-0.2.3/curtsies/input.py 2015-02-25 20:00:23.000000000 +0100
+++ new/curtsies-0.2.4/curtsies/input.py 2015-12-16 14:47:31.000000000 +0100
@@ -72,6 +72,13 @@
def __enter__(self):
self.original_stty = termios.tcgetattr(self.in_stream)
tty.setcbreak(self.in_stream, termios.TCSANOW)
+
+ if sys.platform == 'darwin':
+ attrs = termios.tcgetattr(self.in_stream)
+ VDSUSP = termios.VSUSP + 1
+ attrs[-1][VDSUSP] = 0
+ termios.tcsetattr(self.in_stream, termios.TCSANOW, attrs)
+
if self.sigint_event:
self.orig_sigint_handler = signal.getsignal(signal.SIGINT)
signal.signal(signal.SIGINT, self.sigint_handler)
@@ -103,10 +110,12 @@
for i in range(len(string)))
def _wait_for_read_ready_or_timeout(self, timeout):
- """Returns tuple of whether stdin has bytes to read and an event.
+ """Returns tuple of whether stdin is ready to read and an event.
If an event is returned, that event is more pressing than reading
- bytes on stdin to create a keyboard input event."""
+ bytes on stdin to create a keyboard input event.
+ If stdin is ready, either there are bytes to read or a SIGTSTP
+ triggered by dsusp has been received"""
remaining_timeout = timeout
t0 = time.time()
while True:
@@ -184,7 +193,7 @@
if e is not None:
return e
- stdin_has_bytes, event = self._wait_for_read_ready_or_timeout(time_until_check)
+ stdin_ready_for_read, event = self._wait_for_read_ready_or_timeout(time_until_check)
if event:
return event
if self.queued_scheduled_events and when < time.time(): # when should always be defined
@@ -192,11 +201,15 @@
logger.warning('popping an event! %r %r', self.queued_scheduled_events[0],
self.queued_scheduled_events[1:])
return self.queued_scheduled_events.pop(0)[1]
- if not stdin_has_bytes:
+ if not stdin_ready_for_read:
return None
num_bytes = self._nonblocking_read()
- assert num_bytes > 0, num_bytes
+ if num_bytes == 0:
+ # thought stdin was ready, but not bytes to read is triggered
+ # when SIGTSTP was send by dsusp
+ return None
+
if self.paste_threshold is not None and num_bytes > self.paste_threshold:
paste = events.PasteEvent()
while True:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/curtsies-0.2.3/curtsies/window.py new/curtsies-0.2.4/curtsies/window.py
--- old/curtsies-0.2.3/curtsies/window.py 2015-02-25 22:58:31.000000000 +0100
+++ new/curtsies-0.2.4/curtsies/window.py 2015-12-16 14:47:31.000000000 +0100
@@ -1,6 +1,8 @@
# All windows write only unicode to the terminal -
# that's what blessings does, so we match it.
+from __future__ import unicode_literals
+
import locale
import logging
import re
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/curtsies-0.2.3/curtsies.egg-info/PKG-INFO new/curtsies-0.2.4/curtsies.egg-info/PKG-INFO
--- old/curtsies-0.2.3/curtsies.egg-info/PKG-INFO 2015-02-26 14:40:02.000000000 +0100
+++ new/curtsies-0.2.4/curtsies.egg-info/PKG-INFO 2015-12-16 14:48:21.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: curtsies
-Version: 0.2.3
+Version: 0.2.4
Summary: Curses-like terminal wrapper, with colored strings!
Home-page: https://github.com/thomasballinger/curtsies
Author: Thomas Ballinger
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/curtsies-0.2.3/curtsies.egg-info/requires.txt new/curtsies-0.2.4/curtsies.egg-info/requires.txt
--- old/curtsies-0.2.3/curtsies.egg-info/requires.txt 2015-02-26 14:40:02.000000000 +0100
+++ new/curtsies-0.2.4/curtsies.egg-info/requires.txt 2015-12-16 14:48:21.000000000 +0100
@@ -1,2 +1,2 @@
blessings>=1.5
-wcwidth>=0.1.4
\ No newline at end of file
+wcwidth>=0.1.4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/curtsies-0.2.3/examples/quickstart.py new/curtsies-0.2.4/examples/quickstart.py
--- old/curtsies-0.2.3/examples/quickstart.py 2015-02-18 01:02:23.000000000 +0100
+++ new/curtsies-0.2.4/examples/quickstart.py 2015-12-16 14:47:31.000000000 +0100
@@ -17,7 +17,7 @@
elif c == '<SPACE>':
a = FSArray(window.height, window.width)
else:
- s = repr(c).decode()
+ s = repr(c)
row = random.choice(range(window.height))
column = random.choice(range(window.width-len(s)))
color = random.choice([red, green, on_blue, yellow])