Hello community, here is the log from the commit of package python3-curtsies for openSUSE:Factory checked in at 2016-02-01 19:57:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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 2016-01-04 09:22:28.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.python3-curtsies.new/python3-curtsies.changes 2016-02-01 19:57:30.000000000 +0100 @@ -1,0 +2,16 @@ +Sat Jan 30 18:55:54 UTC 2016 - arun@gmx.de + +- update to version 0.2.6: + * version bump after fixing debian tests again + * Check isatty instead + +- changes from version 0.2.5: + * bump version for bpython0.15rc1 + * detect notatty the right way + * skip tests when blessings Terminal can't be made + * add a doctest to peel_off_esc_code + * fix unicode -> bytes + * shorter comment + * add keys + +------------------------------------------------------------------- Old: ---- curtsies-0.2.4.tar.gz New: ---- curtsies-0.2.6.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python3-curtsies.spec ++++++ --- /var/tmp/diff_new_pack.WFlEwP/_old 2016-02-01 19:57:31.000000000 +0100 +++ /var/tmp/diff_new_pack.WFlEwP/_new 2016-02-01 19:57:31.000000000 +0100 @@ -17,7 +17,7 @@ Name: python3-curtsies -Version: 0.2.4 +Version: 0.2.6 Release: 0 Summary: Curses-like terminal wrapper, with colored strings! License: MIT ++++++ curtsies-0.2.4.tar.gz -> curtsies-0.2.6.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/curtsies-0.2.4/PKG-INFO new/curtsies-0.2.6/PKG-INFO --- old/curtsies-0.2.4/PKG-INFO 2015-12-16 14:48:21.000000000 +0100 +++ new/curtsies-0.2.6/PKG-INFO 2016-01-11 23:37:59.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: curtsies -Version: 0.2.4 +Version: 0.2.6 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.4/curtsies/__init__.py new/curtsies-0.2.6/curtsies/__init__.py --- old/curtsies-0.2.4/curtsies/__init__.py 2015-12-16 14:47:50.000000000 +0100 +++ new/curtsies-0.2.6/curtsies/__init__.py 2016-01-11 23:37:06.000000000 +0100 @@ -1,5 +1,5 @@ """Terminal-formatted strings""" -__version__='0.2.4' +__version__='0.2.6' from .window import FullscreenWindow, CursorAwareWindow from .input import Input diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/curtsies-0.2.4/curtsies/escseqparse.py new/curtsies-0.2.6/curtsies/escseqparse.py --- old/curtsies-0.2.4/curtsies/escseqparse.py 2015-12-16 14:47:31.000000000 +0100 +++ new/curtsies-0.2.6/curtsies/escseqparse.py 2016-01-11 23:36:53.000000000 +0100 @@ -38,8 +38,16 @@ break return stuff + def peel_off_esc_code(s): - """Returns processed text, the next token, and unprocessed text""" + r"""Returns processed text, the next token, and unprocessed text + + >>> front, d, rest = peel_off_esc_code('some[2Astuff') + >>> front, rest + ('some', 'stuff') + >>> d == {'numbers': [2], 'command': 'A', 'intermed': '', 'private': '', 'csi': '\x1b[', 'seq': '\x1b[2A'} + True + """ p = r"""(?P<front>.*?) (?P<seq> (?P<csi> @@ -53,8 +61,8 @@ (?P<intermed>""" + '[\x20-\x2f]*)' + r""" (?P<command>""" + '[\x40-\x7e]))' + r""" (?P<rest>.*)""" - m1 = re.match(p, s, re.VERBOSE) #multibyte esc seq - m2 = re.match('(?P<front>.*?)(?P<seq>(?P<csi>)(?P<command>[\x40-\x5f]))(?P<rest>.*)', s) # 2 byte escape sequence + m1 = re.match(p, s, re.VERBOSE) # multibyte esc seq + m2 = re.match('(?P<front>.*?)(?P<seq>(?P<csi>)(?P<command>[\x40-\x5f]))(?P<rest>.*)', s) # 2 byte escape sequence if m1 and m2: m = m1 if len(m1.groupdict()['front']) <= len(m2.groupdict()['front']) else m2 # choose the match which has less processed text in order to get the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/curtsies-0.2.4/curtsies/events.py new/curtsies-0.2.6/curtsies/events.py --- old/curtsies-0.2.4/curtsies/events.py 2015-12-16 14:47:31.000000000 +0100 +++ new/curtsies-0.2.6/curtsies/events.py 2016-01-11 23:36:53.000000000 +0100 @@ -45,6 +45,8 @@ CURSES_NAMES[b'\x1b[B'] = u'KEY_DOWN' CURSES_NAMES[b'\x1b[C'] = u'KEY_RIGHT' CURSES_NAMES[b'\x1b[D'] = u'KEY_LEFT' +CURSES_NAMES[b'\x1b[F'] = u'KEY_END' # https://github.com/bpython/bpython/issues/490 +CURSES_NAMES[b'\x1b[H'] = u'KEY_HOME' # https://github.com/bpython/bpython/issues/490 CURSES_NAMES[b'\x08'] = u'KEY_BACKSPACE' CURSES_NAMES[b'\x1b[Z'] = u'KEY_BTAB' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/curtsies-0.2.4/curtsies.egg-info/PKG-INFO new/curtsies-0.2.6/curtsies.egg-info/PKG-INFO --- old/curtsies-0.2.4/curtsies.egg-info/PKG-INFO 2015-12-16 14:48:21.000000000 +0100 +++ new/curtsies-0.2.6/curtsies.egg-info/PKG-INFO 2016-01-11 23:37:58.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: curtsies -Version: 0.2.4 +Version: 0.2.6 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.4/tests/test_input.py new/curtsies-0.2.6/tests/test_input.py --- old/curtsies-0.2.4/tests/test_input.py 2015-12-16 14:47:31.000000000 +0100 +++ new/curtsies-0.2.6/tests/test_input.py 2016-01-11 23:36:53.000000000 +0100 @@ -1,18 +1,25 @@ import os import signal +import sys import threading import time import unittest from mock import Mock try: - from unittest import skip + from unittest import skip, skipUnless except ImportError: + def skip(f): return lambda self: None -from curtsies import events + def skipUnless(condition, reason): + if condition: + return lambda x: x + else: + return lambda x: None +from curtsies import events from curtsies.input import Input @@ -24,6 +31,7 @@ pass +@skipUnless(sys.stdin.isatty(), "stdin must be a tty") class TestInput(unittest.TestCase): def test_create(self): Input() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/curtsies-0.2.4/tests/test_terminal.py new/curtsies-0.2.6/tests/test_terminal.py --- old/curtsies-0.2.4/tests/test_terminal.py 2015-12-16 14:47:31.000000000 +0100 +++ new/curtsies-0.2.6/tests/test_terminal.py 2016-01-11 23:36:53.000000000 +0100 @@ -17,6 +17,16 @@ from curtsies.window import BaseWindow, FullscreenWindow, CursorAwareWindow +try: + from unittest import skipUnless +except ImportError: + def skipUnless(condition, reason): + if condition: + return lambda x: None + else: + return lambda x: x + + class FakeStdin(StringIO): encoding = 'ascii' @@ -85,6 +95,7 @@ def flush(self): pass +@skipUnless(sys.stdin.isatty(), 'blessings Terminal needs streams open') class TestFullscreenWindow(unittest.TestCase): def setUp(self): self.screen = pyte.Screen(10, 3) @@ -110,6 +121,7 @@ def __exit__(*args): pass +@skipUnless(sys.stdin.isatty(), 'blessings Terminal needs streams open') class TestCursorAwareWindow(unittest.TestCase): def setUp(self): self.screen = ReportingScreen(6, 3) @@ -143,6 +155,7 @@ self.assertEqual(self.screen.display, [u' ', u'hi ', u'there ']) +@skipUnless(sys.stdin.isatty(), 'blessings Terminal needs streams open') class TestCursorAwareWindowWithExtraInput(unittest.TestCase): def setUp(self): self.screen = ReportingScreenWithExtra(6, 3) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/curtsies-0.2.4/tests/test_window.py new/curtsies-0.2.6/tests/test_window.py --- old/curtsies-0.2.4/tests/test_window.py 2015-12-16 14:47:31.000000000 +0100 +++ new/curtsies-0.2.6/tests/test_window.py 2016-01-11 23:36:53.000000000 +0100 @@ -10,10 +10,24 @@ else: from cStringIO import StringIO +try: + from unittest import skipIf +except ImportError: + def skipIf(condition, reason): + if condition: + return lambda x: x + else: + return lambda x: None + + +fds_closed = not sys.stdin.isatty() or not sys.stdout.isatty() + + class FakeFullscreenWindow(FullscreenWindow): width = property(lambda self: 10) height = property(lambda self: 4) +@skipIf(fds_closed, "blessings Terminal needs streams open") class TestBaseWindow(unittest.TestCase): """Pretty pathetic tests for window""" def test_window(self):