diff --git a/.gitignore b/.gitignore index de4f178..dcbc194 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ urwid-0.9.9.1.tar.gz /urwid-1.2.1.tar.gz /urwid-1.3.0.tar.gz /urwid-1.3.1.tar.gz +/urwid-2.0.1.tar.gz diff --git a/python-urwid-test_event_loops.patch b/python-urwid-test_event_loops.patch deleted file mode 100644 index 2622a0e..0000000 --- a/python-urwid-test_event_loops.patch +++ /dev/null @@ -1,32 +0,0 @@ -commit 4b0ed8b6030450e6d99909a7c683e9642e546387 -Author: Michael Hudson-Doyle -Date: Wed Jun 7 13:52:17 2017 -0700 - - fix test_remove_watch_file flakiness - - pass a known-good file descriptor to watch_file rather than hard-coding 5 - - Fixes #164 - -diff --git a/urwid/tests/test_event_loops.py b/urwid/tests/test_event_loops.py -index c85bbed..b01212d 100644 ---- a/urwid/tests/test_event_loops.py -+++ b/urwid/tests/test_event_loops.py -@@ -30,9 +30,14 @@ class EventLoopTestMixin(object): - - def test_remove_watch_file(self): - evl = self.evl -- handle = evl.watch_file(5, lambda: None) -- self.assertTrue(evl.remove_watch_file(handle)) -- self.assertFalse(evl.remove_watch_file(handle)) -+ fd_r, fd_w = os.pipe() -+ try: -+ handle = evl.watch_file(fd_r, lambda: None) -+ self.assertTrue(evl.remove_watch_file(handle)) -+ self.assertFalse(evl.remove_watch_file(handle)) -+ finally: -+ os.close(fd_r) -+ os.close(fd_w) - - _expected_idle_handle = 1 - diff --git a/python-urwid-test_vterm-EINTR.patch b/python-urwid-test_vterm-EINTR.patch deleted file mode 100644 index caec6db..0000000 --- a/python-urwid-test_vterm-EINTR.patch +++ /dev/null @@ -1,49 +0,0 @@ -commit f68f2cf089cfd5ec45863baf59a91d5aeb0cf5c3 -Author: Mike Gilbert -Date: Sat Jun 3 14:53:51 2017 -0400 - - test_vterm: handle EINTR when reading from pipe - - Fixes: https://github.com/urwid/urwid/issues/230 - -diff --git a/urwid/tests/test_vterm.py b/urwid/tests/test_vterm.py -index 4dadfcc..075c653 100644 ---- a/urwid/tests/test_vterm.py -+++ b/urwid/tests/test_vterm.py -@@ -18,6 +18,7 @@ - # - # Urwid web site: http://excess.org/urwid/ - -+import errno - import os - import sys - import unittest -@@ -28,7 +29,6 @@ from urwid import vterm - from urwid import signals - from urwid.compat import B - -- - class DummyCommand(object): - QUITSTRING = B('|||quit|||') - -@@ -41,12 +41,20 @@ class DummyCommand(object): - stdout.write(B('\x1bc')) - - while True: -- data = os.read(self.reader, 1024) -+ data = self.read(1024) - if self.QUITSTRING == data: - break - stdout.write(data) - stdout.flush() - -+ def read(self, size): -+ while True: -+ try: -+ return os.read(self.reader, size) -+ except OSError as e: -+ if e.errno != errno.EINTR: -+ raise -+ - def write(self, data): - os.write(self.writer, data) diff --git a/python-urwid-test_vterm-NUL.patch b/python-urwid-test_vterm-NUL.patch deleted file mode 100644 index ca184db..0000000 --- a/python-urwid-test_vterm-NUL.patch +++ /dev/null @@ -1,47 +0,0 @@ -commit 701138a380fac06023e5915448af92ba13614cb9 -Author: aszlig -Date: Thu Feb 11 03:14:07 2016 +0100 - - vterm: Fix handling of NUL characters - - According to the VT100 programmers manual, the NUL character has to be - ignored (at least on our side, because we are not a printer): - - http://vt100.net/docs/tp83/appendixb.html - - According to the bug reporter the VMS console driver inserts NUL - characters after line feeds and our implementation prints those as "?". - - Tested against Python 2.7, 3.2, 3.3, 3.4 and 3.5. - - Signed-off-by: aszlig - Reported-by: Robert Urban - -diff --git a/urwid/tests/test_vterm.py b/urwid/tests/test_vterm.py -index 59fe166..4dadfcc 100644 ---- a/urwid/tests/test_vterm.py -+++ b/urwid/tests/test_vterm.py -@@ -143,6 +143,10 @@ class TermTest(unittest.TestCase): - self.write('1\n2\n3\n4\e[2;1f\e[2M') - self.expect('1\n4') - -+ def test_nul(self): -+ self.write('a\0b') -+ self.expect('ab') -+ - def test_movement(self): - self.write('\e[10;20H11\e[10;0f\e[20C\e[K') - self.expect('\n' * 9 + ' ' * 19 + '1') -diff --git a/urwid/vterm.py b/urwid/vterm.py -index cc4eb7f..0f091ea 100644 ---- a/urwid/vterm.py -+++ b/urwid/vterm.py -@@ -671,7 +671,7 @@ class TermCanvas(Canvas): - self.widget.beep() - elif not dc and char in B("\x18\x1a"): # CAN/SUB - self.leave_escape() -- elif not dc and char == B("\x7f"): # DEL -+ elif not dc and char in B("\x00\x7f"): # NUL/DEL - pass # this is ignored - elif self.within_escape: - self.parse_escape(char) diff --git a/python-urwid.spec b/python-urwid.spec index 208412b..958de06 100644 --- a/python-urwid.spec +++ b/python-urwid.spec @@ -1,21 +1,12 @@ Name: python-urwid -Version: 1.3.1 -Release: 4%{?dist} +Version: 2.0.1 +Release: 1%{?dist} Summary: Console user interface library License: LGPLv2+ URL: http://excess.org/urwid/ Source0: https://pypi.python.org/packages/source/u/urwid/urwid-%{version}.tar.gz -# https://github.com/urwid/urwid/pull/237/commits/f68f2cf089cfd5ec45863baf59a91d5aeb0cf5c3 -Patch0: python-urwid-test_vterm-EINTR.patch - -# https://github.com/urwid/urwid/commit/701138a380fac06023e5915448af92ba13614cb9 -Patch1: python-urwid-test_vterm-NUL.patch - -# https://github.com/urwid/urwid/commit/4b0ed8b6030450e6d99909a7c683e9642e546387 -Patch2: python-urwid-test_event_loops.patch - %global _description\ Urwid is a Python library for making text console applications. It has\ many features including fluid interface resizing, support for UTF-8 and\ @@ -51,9 +42,6 @@ BuildRequires: /usr/bin/2to3 %prep %setup -q -n urwid-%{version} -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 find urwid -type f -name "*.py" -exec sed -i -e '/^#!\//, 1d' {} \; find urwid -type f -name "*.py" -exec chmod 644 {} \; @@ -96,6 +84,9 @@ popd %{python3_sitearch}/urwid-%{version}*.egg-info %changelog +* Fri Jun 29 2018 David Cantrell - 2.0.1-1 +- Upgrade to urwid-2.0.1 + * Tue Jun 19 2018 Miro HronĨok - 1.3.1-4 - Rebuilt for Python 3.7 diff --git a/sources b/sources index 83ccdae..847b7a8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (urwid-1.3.1.tar.gz) = 8b505d38f3a0c04bbf527b324dc36212f2580213dd55eca61c66705d3beaac4f074c39aaa0f4f71add1fe5f3fce4c4c6dc88dd1e981b04bac6d52195d7a3f0ed +SHA512 (urwid-2.0.1.tar.gz) = 99c86a26b08c624c23207ce8e587e8442bece1f522e0c788600ad5f01a4c679efff95dd947edade8b6f4adc376edca949a40c305f9d5ddaf6a0ff97f13c6da30