Compare commits

...

No commits in common. "c8" and "c10s" have entirely different histories.
c8 ... c10s

10 changed files with 198 additions and 183 deletions

23
.gitignore vendored
View File

@ -1 +1,22 @@
SOURCES/urwid-1.3.1.tar.gz
urwid-0.9.9.1.tar.gz
/urwid-1.0.0.tar.gz
/urwid-1.0.2.tar.gz
/urwid-1.1.0.tar.gz
/urwid-1.1.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
/urwid-2.1.0.tar.gz
/urwid-2.1.2.tar.gz
/urwid-2.2.1.tar.gz
/urwid-2.2.2.tar.gz
/urwid-2.2.3.tar.gz
/urwid-2.3.4.tar.gz
/urwid-2.4.0.tar.gz
/urwid-2.4.1.tar.gz
/urwid-2.4.2.tar.gz
/urwid-2.4.3.tar.gz
/urwid-2.4.4.tar.gz
/urwid-2.4.6.tar.gz
/urwid-2.5.3.tar.gz

22
.packit.yaml Normal file
View File

@ -0,0 +1,22 @@
---
specfile_path: python-urwid.spec
downstream_package_name: python-urwid
upstream_project_url: https://github.com/urwid/urwid
actions:
create-archive:
- "python3 setup.py sdist --dist-dir ."
- "ls -1 ./*.tar.gz"
get-current-version: "python3 setup.py --version"
changelog-entry: bash -c "echo '- New upstream release' ${PACKIT_PROJECT_VERSION}"
jobs:
- job: pull_from_upstream
trigger: release
dist_git_branches:
- fedora-rawhide
- job: koji_build
trigger: commit
dist_git_branches:
- fedora-rawhide
allowed_committers: [packit, ttomecek]

View File

@ -1 +0,0 @@
5c562de41e150b87c8e2660f70c699fb6e951127 SOURCES/urwid-1.3.1.tar.gz

3
README.packit Normal file
View File

@ -0,0 +1,3 @@
This repository is maintained by packit.
https://packit.dev/
The file was generated using packit 0.91.0.post1.dev2+g269d9a5d.

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -1,70 +1,104 @@
Name: python-urwid
Version: 1.3.1
Release: 4%{?dist}
Summary: Console user interface library
* Thu Jan 22 2024 Packit <hello@packit.dev> - 2.4.4-1
- New upstream release 2.4.4
License: LGPLv2+
URL: http://excess.org/urwid/
Source0: https://pypi.python.org/packages/source/u/urwid/urwid-%{version}.tar.gz
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
# https://github.com/urwid/urwid/pull/237/commits/f68f2cf089cfd5ec45863baf59a91d5aeb0cf5c3
Patch0: python-urwid-test_vterm-EINTR.patch
* Wed Jan 17 2024 Packit <hello@packit.dev> - 2.4.3-1
- New upstream release 2.4.3
# https://github.com/urwid/urwid/commit/701138a380fac06023e5915448af92ba13614cb9
Patch1: python-urwid-test_vterm-NUL.patch
* Thu Jan 11 2024 Packit <hello@packit.dev> - 2.4.2-1
- New upstream release 2.4.2
# https://github.com/urwid/urwid/commit/4b0ed8b6030450e6d99909a7c683e9642e546387
Patch2: python-urwid-test_event_loops.patch
* Wed Jan 03 2024 Packit <hello@packit.dev> - 2.4.1-1
- New upstream release 2.4.1
%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\
CJK encodings, standard and custom text layout modes, simple markup for\
setting text attributes, and a powerful, dynamic list box that handles a\
mix of widget types. It is flexible, modular, and leaves the developer in\
control.
* Wed Jan 03 2024 Packit <hello@packit.dev> - 2.4.0-1
- New upstream release 2.4.0
%description %_description
%package -n python3-urwid
Summary: %summary
%{?python_provide:%python_provide python3-urwid}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-test
# needed by selftest suite for test.support
BuildRequires: %{_bindir}/2to3
* Tue Dec 05 2023 Packit <hello@packit.dev> - 2.3.4-1
- New upstream release 2.3.4
%description -n python3-urwid %_description
* Thu Oct 19 2023 Packit <hello@packit.dev> - 2.2.3-1
- New upstream release 2.2.3
%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 {} \;
* Mon Sep 25 2023 Packit <hello@packit.dev> - 2.2.2-1
- New upstream release 2.2.2
%build
%py3_build
* Fri Sep 22 2023 Packit <hello@packit.dev> - 2.2.1-1
- New upstream release 2.2.1
find examples -type f -exec chmod 0644 \{\} \;
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.2-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
%install
%py3_install
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 2.1.2-9
- Rebuilt for Python 3.12
%check
%{__python3} setup.py test
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
%files -n python3-urwid
%license COPYING
%doc README.rst examples docs
%{python3_sitearch}/urwid
%{python3_sitearch}/urwid-%{version}*.egg-info
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
%changelog
* Thu May 31 2018 Petr Viktorin <pviktori@redhat.com> - 1.3.1-4
- Remove Python 2 subpackage
https://bugzilla.redhat.com/show_bug.cgi?id=1567166
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 2.1.2-6
- Rebuilt for Python 3.11
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 2.1.2-3
- Rebuilt for Python 3.10
* 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
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

63
python-urwid.spec Normal file
View File

@ -0,0 +1,63 @@
%bcond_without tests
%global srcname urwid
Name: python-%{srcname}
Version: 2.5.3
Release: %autorelease
Summary: Console user interface library
# examples/twisted_serve_ssh.py is MIT
License: LGPL-2.1-or-later AND MIT
URL: http://excess.org/urwid/
Source0: %{pypi_source urwid}
%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\
CJK encodings, standard and custom text layout modes, simple markup for\
setting text attributes, and a powerful, dynamic list box that handles a\
mix of widget types. It is flexible, modular, and leaves the developer in\
control.
%description %_description
%package -n python3-%{srcname}
Summary: %summary
%{?python_provide:%python_provide python3-urwid}
BuildRequires: gcc
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-setuptools_scm
# needed by selftest suite for test.support
BuildRequires: python3-test
%description -n python3-%{srcname} %_description
%prep
%autosetup -n %{srcname}-%{version}
find urwid -type f -name "*.py" -exec sed -i -e '/^#!\//, 1d' {} \;
find urwid -type f -name "*.py" -exec chmod 644 {} \;
%build
%py3_build
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
%py3_install
%files -n python3-%{srcname}
%license COPYING
%doc README.rst examples docs
%{python3_sitearch}/urwid/
%{python3_sitearch}/urwid-%{version}*.egg-info/
%changelog
%autochangelog

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (urwid-2.5.3.tar.gz) = 80c32138347a618fc40e1a26fd174e708a9f8e4e9a8e09edc1d9261a9d73a644e356ce375654a55b5fb8838a820b8ba8b1cc47560c5b44c5c74677399845f578