Compare commits
No commits in common. "c8" and "c9-beta" have entirely different histories.
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
SOURCES/urwid-1.3.1.tar.gz
|
SOURCES/urwid-2.1.2.tar.gz
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
5c562de41e150b87c8e2660f70c699fb6e951127 SOURCES/urwid-1.3.1.tar.gz
|
4ad6eb1cfc8d2c1a53aeab7f47091d6381b6061e SOURCES/urwid-2.1.2.tar.gz
|
||||||
|
|||||||
@ -1,32 +0,0 @@
|
|||||||
commit 4b0ed8b6030450e6d99909a7c683e9642e546387
|
|
||||||
Author: Michael Hudson-Doyle <michael.hudson@canonical.com>
|
|
||||||
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
|
|
||||||
|
|
||||||
@ -1,49 +0,0 @@
|
|||||||
commit f68f2cf089cfd5ec45863baf59a91d5aeb0cf5c3
|
|
||||||
Author: Mike Gilbert <floppym@gentoo.org>
|
|
||||||
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)
|
|
||||||
@ -1,47 +0,0 @@
|
|||||||
commit 701138a380fac06023e5915448af92ba13614cb9
|
|
||||||
Author: aszlig <aszlig@redmoonstudios.org>
|
|
||||||
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 <aszlig@redmoonstudios.org>
|
|
||||||
Reported-by: Robert Urban <urban@unix-beratung.de>
|
|
||||||
|
|
||||||
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)
|
|
||||||
@ -1,20 +1,15 @@
|
|||||||
Name: python-urwid
|
%bcond_without tests
|
||||||
Version: 1.3.1
|
|
||||||
|
%global srcname urwid
|
||||||
|
|
||||||
|
Name: python-%{srcname}
|
||||||
|
Version: 2.1.2
|
||||||
Release: 4%{?dist}
|
Release: 4%{?dist}
|
||||||
Summary: Console user interface library
|
Summary: Console user interface library
|
||||||
|
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: http://excess.org/urwid/
|
URL: http://excess.org/urwid/
|
||||||
Source0: https://pypi.python.org/packages/source/u/urwid/urwid-%{version}.tar.gz
|
Source0: %{pypi_source urwid}
|
||||||
|
|
||||||
# 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\
|
%global _description\
|
||||||
Urwid is a Python library for making text console applications. It has\
|
Urwid is a Python library for making text console applications. It has\
|
||||||
@ -25,22 +20,20 @@ mix of widget types. It is flexible, modular, and leaves the developer in\
|
|||||||
control.
|
control.
|
||||||
|
|
||||||
%description %_description
|
%description %_description
|
||||||
%package -n python3-urwid
|
|
||||||
|
%package -n python3-%{srcname}
|
||||||
Summary: %summary
|
Summary: %summary
|
||||||
%{?python_provide:%python_provide python3-urwid}
|
%{?python_provide:%python_provide python3-urwid}
|
||||||
|
BuildRequires: gcc
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-setuptools
|
BuildRequires: python3-setuptools
|
||||||
BuildRequires: python3-test
|
|
||||||
# needed by selftest suite for test.support
|
# needed by selftest suite for test.support
|
||||||
BuildRequires: %{_bindir}/2to3
|
BuildRequires: python3-test
|
||||||
|
|
||||||
%description -n python3-urwid %_description
|
%description -n python3-%{srcname} %_description
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n urwid-%{version}
|
%setup -q -n %{srcname}-%{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 sed -i -e '/^#!\//, 1d' {} \;
|
||||||
find urwid -type f -name "*.py" -exec chmod 644 {} \;
|
find urwid -type f -name "*.py" -exec chmod 644 {} \;
|
||||||
|
|
||||||
@ -49,22 +42,76 @@ find urwid -type f -name "*.py" -exec chmod 644 {} \;
|
|||||||
|
|
||||||
find examples -type f -exec chmod 0644 \{\} \;
|
find examples -type f -exec chmod 0644 \{\} \;
|
||||||
|
|
||||||
|
%check
|
||||||
|
%if %{with tests}
|
||||||
|
# tests are failing: https://github.com/urwid/urwid/issues/344
|
||||||
|
PYTHON=%{__python3} %{__python3} setup.py test || :
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%py3_install
|
%py3_install
|
||||||
|
|
||||||
%check
|
%files -n python3-%{srcname}
|
||||||
%{__python3} setup.py test
|
|
||||||
|
|
||||||
%files -n python3-urwid
|
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%doc README.rst examples docs
|
%doc README.rst examples docs
|
||||||
%{python3_sitearch}/urwid
|
%{python3_sitearch}/urwid/
|
||||||
%{python3_sitearch}/urwid-%{version}*.egg-info
|
%{python3_sitearch}/urwid-%{version}*.egg-info/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Thu May 31 2018 Petr Viktorin <pviktori@redhat.com> - 1.3.1-4
|
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 2.1.2-4
|
||||||
- Remove Python 2 subpackage
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||||
https://bugzilla.redhat.com/show_bug.cgi?id=1567166
|
Related: rhbz#1991688
|
||||||
|
|
||||||
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.1.2-3
|
||||||
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||||
|
|
||||||
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.2-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Nov 02 2020 Tomas Tomecek <ttomecek@redhat.com> - 2.1.2-1
|
||||||
|
- New upstream release 2.1.2
|
||||||
|
|
||||||
|
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 2.1.0-2
|
||||||
|
- Rebuilt for Python 3.9
|
||||||
|
|
||||||
|
* Wed Apr 01 2020 Tomas Tomecek <ttomecek@redhat.com> - 2.1.0-1
|
||||||
|
- New upstream release 2.1.0
|
||||||
|
|
||||||
|
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-10
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 2.0.1-9
|
||||||
|
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
||||||
|
|
||||||
|
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 2.0.1-8
|
||||||
|
- Rebuilt for Python 3.8
|
||||||
|
|
||||||
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-7
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed May 22 2019 Miro Hrončok <mhroncok@redhat.com> - 2.0.1-6
|
||||||
|
- Resurrect removed python3-urwid package
|
||||||
|
|
||||||
|
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jul 27 2018 David Cantrell <dcantrell@redhat.com> - 2.0.1-4
|
||||||
|
- Fix FTBFS issue in rawhide (#1605975)
|
||||||
|
|
||||||
|
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jun 29 2018 Miro Hrončok <mhroncok@redhat.com> - 2.0.1-2
|
||||||
|
- Rebuilt for Python 3.7
|
||||||
|
|
||||||
|
* Fri Jun 29 2018 David Cantrell <dcantrell@redhat.com> - 2.0.1-1
|
||||||
|
- Upgrade to urwid-2.0.1
|
||||||
|
|
||||||
|
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.3.1-4
|
||||||
|
- Rebuilt for Python 3.7
|
||||||
|
|
||||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-3
|
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-3
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user