urwid 3.0.0__py3-none-any.whl → 3.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of urwid might be problematic. Click here for more details.
- urwid/canvas.py +1 -1
- urwid/event_loop/asyncio_loop.py +32 -13
- urwid/version.py +2 -2
- {urwid-3.0.0.dist-info → urwid-3.0.1.dist-info}/METADATA +4 -7
- {urwid-3.0.0.dist-info → urwid-3.0.1.dist-info}/RECORD +8 -8
- {urwid-3.0.0.dist-info → urwid-3.0.1.dist-info}/WHEEL +0 -0
- {urwid-3.0.0.dist-info → urwid-3.0.1.dist-info}/licenses/COPYING +0 -0
- {urwid-3.0.0.dist-info → urwid-3.0.1.dist-info}/top_level.txt +0 -0
urwid/canvas.py
CHANGED
|
@@ -1170,7 +1170,7 @@ def cview_trim_rows(cv, rows: int):
|
|
|
1170
1170
|
|
|
1171
1171
|
|
|
1172
1172
|
def cview_trim_top(cv, trim: int):
|
|
1173
|
-
return (cv[0], trim + cv[1], cv[2], cv[3] - trim
|
|
1173
|
+
return (cv[0], trim + cv[1], cv[2], cv[3] - trim, *cv[4:])
|
|
1174
1174
|
|
|
1175
1175
|
|
|
1176
1176
|
def cview_trim_left(cv, trim: int):
|
urwid/event_loop/asyncio_loop.py
CHANGED
|
@@ -41,7 +41,6 @@ if typing.TYPE_CHECKING:
|
|
|
41
41
|
_T = typing.TypeVar("_T")
|
|
42
42
|
|
|
43
43
|
__all__ = ("AsyncioEventLoop",)
|
|
44
|
-
IS_WINDOWS = sys.platform == "win32"
|
|
45
44
|
|
|
46
45
|
|
|
47
46
|
class AsyncioEventLoop(EventLoop):
|
|
@@ -67,20 +66,37 @@ class AsyncioEventLoop(EventLoop):
|
|
|
67
66
|
def __init__(self, *, loop: asyncio.AbstractEventLoop | None = None, **kwargs) -> None:
|
|
68
67
|
super().__init__()
|
|
69
68
|
self.logger = logging.getLogger(__name__).getChild(self.__class__.__name__)
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
|
|
70
|
+
if sys.version_info[:2] < (3, 11):
|
|
72
71
|
self._event_loop_policy_altered: bool = False
|
|
73
72
|
self._original_event_loop_policy: asyncio.AbstractEventLoopPolicy | None = None
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
self.logger.debug("Set WindowsSelectorEventLoopPolicy as asyncio event loop policy")
|
|
78
|
-
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
|
|
79
|
-
self._event_loop_policy_altered = True
|
|
73
|
+
|
|
74
|
+
if loop:
|
|
75
|
+
self._loop: asyncio.AbstractEventLoop = loop
|
|
80
76
|
else:
|
|
81
|
-
self.
|
|
77
|
+
self._original_event_loop_policy = asyncio.get_event_loop_policy()
|
|
78
|
+
if sys.platform == "win32" and not isinstance(
|
|
79
|
+
self._original_event_loop_policy, asyncio.WindowsSelectorEventLoopPolicy
|
|
80
|
+
):
|
|
81
|
+
self.logger.debug("Set WindowsSelectorEventLoopPolicy as asyncio event loop policy")
|
|
82
|
+
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
|
|
83
|
+
self._event_loop_policy_altered = True
|
|
84
|
+
else:
|
|
85
|
+
self._event_loop_policy_altered = False
|
|
86
|
+
|
|
87
|
+
self._loop = asyncio.get_event_loop()
|
|
82
88
|
|
|
83
|
-
|
|
89
|
+
else:
|
|
90
|
+
self._runner: asyncio.Runner | None = None
|
|
91
|
+
|
|
92
|
+
if loop:
|
|
93
|
+
self._loop: asyncio.AbstractEventLoop = loop
|
|
94
|
+
else:
|
|
95
|
+
try:
|
|
96
|
+
self._loop = asyncio.get_running_loop()
|
|
97
|
+
except RuntimeError:
|
|
98
|
+
self._runner = asyncio.Runner(loop_factory=asyncio.SelectorEventLoop)
|
|
99
|
+
self._loop = self._runner.get_loop()
|
|
84
100
|
|
|
85
101
|
self._exc: BaseException | None = None
|
|
86
102
|
|
|
@@ -89,8 +105,11 @@ class AsyncioEventLoop(EventLoop):
|
|
|
89
105
|
self._idle_callbacks: dict[int, Callable[[], typing.Any]] = {}
|
|
90
106
|
|
|
91
107
|
def __del__(self) -> None:
|
|
92
|
-
if
|
|
93
|
-
|
|
108
|
+
if sys.version_info[:2] < (3, 11):
|
|
109
|
+
if self._event_loop_policy_altered:
|
|
110
|
+
asyncio.set_event_loop_policy(self._original_event_loop_policy) # Restore default event loop policy
|
|
111
|
+
elif self._runner is not None:
|
|
112
|
+
self._runner.close()
|
|
94
113
|
|
|
95
114
|
def _also_call_idle(self, callback: Callable[_Spec, _T]) -> Callable[_Spec, _T]:
|
|
96
115
|
"""
|
urwid/version.py
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: urwid
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.1
|
|
4
4
|
Summary: A full-featured console (xterm et al.) user interface library
|
|
5
|
-
Home-page: https://urwid.org/
|
|
6
5
|
Author-email: Ian Ward <ian@excess.org>
|
|
7
6
|
License: LGPL-2.1-only
|
|
8
7
|
Project-URL: Homepage, https://urwid.org/
|
|
@@ -31,7 +30,7 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
31
30
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
32
31
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
33
32
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
34
|
-
Requires-Python:
|
|
33
|
+
Requires-Python: >=3.9.0
|
|
35
34
|
Description-Content-Type: text/x-rst
|
|
36
35
|
License-File: COPYING
|
|
37
36
|
Requires-Dist: wcwidth
|
|
@@ -42,8 +41,8 @@ Requires-Dist: PyGObject; extra == "glib"
|
|
|
42
41
|
Provides-Extra: tornado
|
|
43
42
|
Requires-Dist: tornado>=5.0; extra == "tornado"
|
|
44
43
|
Provides-Extra: trio
|
|
45
|
-
Requires-Dist: trio>=0.
|
|
46
|
-
Requires-Dist: exceptiongroup; extra == "trio"
|
|
44
|
+
Requires-Dist: trio>=0.24.0; extra == "trio"
|
|
45
|
+
Requires-Dist: exceptiongroup; python_version < "3.11" and extra == "trio"
|
|
47
46
|
Provides-Extra: twisted
|
|
48
47
|
Requires-Dist: twisted; extra == "twisted"
|
|
49
48
|
Provides-Extra: zmq
|
|
@@ -52,9 +51,7 @@ Provides-Extra: serial
|
|
|
52
51
|
Requires-Dist: pyserial; extra == "serial"
|
|
53
52
|
Provides-Extra: lcd
|
|
54
53
|
Requires-Dist: pyserial; extra == "lcd"
|
|
55
|
-
Dynamic: home-page
|
|
56
54
|
Dynamic: license-file
|
|
57
|
-
Dynamic: requires-python
|
|
58
55
|
|
|
59
56
|
Urwid
|
|
60
57
|
=====
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
urwid/__init__.py,sha256=t5n8QWni3FbasOyKIulm_7-Go3A0puBKiie_79rxifU,7979
|
|
2
|
-
urwid/canvas.py,sha256=
|
|
2
|
+
urwid/canvas.py,sha256=mHwPJ494ivdhm_06d5rJzTR9cB_aYLDCz6RAzzHl8L0,46092
|
|
3
3
|
urwid/command_map.py,sha256=UUOC11O0SlNhMiBoYqNaSAfGcg0RmjjGEgz6Xt96iA4,4369
|
|
4
4
|
urwid/container.py,sha256=WOodISzyS4NSs3arijXuXLsDvF1GVIn4ufcPzfxSkdA,1594
|
|
5
5
|
urwid/decoration.py,sha256=dwoYY0tiZS4toGgrxEAALKeVvnoDV9W-LadkV9G4CZg,1777
|
|
@@ -11,7 +11,7 @@ urwid/split_repr.py,sha256=pXzuddzQ4RnfIl537Gvoe8PVaBRHCPnxgdYvKK0qm8k,3899
|
|
|
11
11
|
urwid/str_util.py,sha256=oQVTyDWAIRuCsNl_jeAxX1zbldWgU58MMU3YPWKlFbA,10823
|
|
12
12
|
urwid/text_layout.py,sha256=EqsT64CUfP_QPTnhyVy4erEhXaCShxGqynBm6xS5qpI,22792
|
|
13
13
|
urwid/util.py,sha256=cZ2qtutEThZSq4FGu3DMX2Tds0CXXRghn8b8QQasR7w,15337
|
|
14
|
-
urwid/version.py,sha256=
|
|
14
|
+
urwid/version.py,sha256=LoHm4tYT8EC9S2qaIOxZkFh7b3UUZ5jNAQr7bVyLo6Q,511
|
|
15
15
|
urwid/vterm.py,sha256=vzzgf1P8M5j6uEePSEMVhQVMzqGeVnJc1L6DZCH9kRg,57744
|
|
16
16
|
urwid/wimp.py,sha256=CRpUWYsrCSrnTX1AH7FnBI_8EvLHHy6eypg8-zno5MI,572
|
|
17
17
|
urwid/display/__init__.py,sha256=y90WbHPNRHlimPrXhzsSfFsBbBHy8QErmB1y4Xza-xo,1732
|
|
@@ -30,7 +30,7 @@ urwid/display/raw.py,sha256=TSkIEM6KnQHPmmpBkWKdirZOwVXhSV67k7hWmuuR2OY,1125
|
|
|
30
30
|
urwid/display/web.py,sha256=pd8PjKskTomdSSuYFRxvJo_9oefdXuN0R2UA3UpIwpg,19129
|
|
31
31
|
urwid/event_loop/__init__.py,sha256=6di4AYD6HbCf6v5p0rZOoteKnM9U5tfk4NKcWMH4FV4,1199
|
|
32
32
|
urwid/event_loop/abstract_loop.py,sha256=6Kkw3KCJ4ndiI2I1P8fPdtHzjuekRxUuvzFOiR0Myok,5494
|
|
33
|
-
urwid/event_loop/asyncio_loop.py,sha256=
|
|
33
|
+
urwid/event_loop/asyncio_loop.py,sha256=V86z4ezyLOXh0c3rgJPr4P1W3jfN6gvTKowe8PqmcwI,9122
|
|
34
34
|
urwid/event_loop/glib_loop.py,sha256=GFoLAenoWKm-13rTBKzCF2JdCEryJKpMo25aidZ7BWs,9351
|
|
35
35
|
urwid/event_loop/main_loop.py,sha256=KlCPzvwsrqLe289Gmznyt02rQC52xvKf70fC-rcUEHk,25989
|
|
36
36
|
urwid/event_loop/select_loop.py,sha256=5ZkIPqyIVJdWRTC89Ca5h8ub_-jpqXjFZaKqiWhdkDg,7534
|
|
@@ -67,8 +67,8 @@ urwid/widget/treetools.py,sha256=NehR7ELL2vvBHIlwtRCGyTfPLdx0Uis5opufC3xNkcE,170
|
|
|
67
67
|
urwid/widget/widget.py,sha256=uWHGpOueiDa8wJykFhR38wHV9Wg59E2lENDrWZZm9xI,26432
|
|
68
68
|
urwid/widget/widget_decoration.py,sha256=zqB41ytmZo8-kSp4iurx06ax-t_IEI9GLbEzn7ZdqsU,4621
|
|
69
69
|
urwid/widget/wimp.py,sha256=4wfzTQBLMbhicSlL64hBPb-1W5FAFrIKfb43i10MKSY,27305
|
|
70
|
-
urwid-3.0.
|
|
71
|
-
urwid-3.0.
|
|
72
|
-
urwid-3.0.
|
|
73
|
-
urwid-3.0.
|
|
74
|
-
urwid-3.0.
|
|
70
|
+
urwid-3.0.1.dist-info/licenses/COPYING,sha256=NrbT-keRaUP9X-wxPFhHhJRgR-wTN6eLRA5ZkstZX4k,26434
|
|
71
|
+
urwid-3.0.1.dist-info/METADATA,sha256=SK5H3Ky7ALmNNfchNIoOInXiJmdbJonxdBzPBkGZYs4,10965
|
|
72
|
+
urwid-3.0.1.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
|
|
73
|
+
urwid-3.0.1.dist-info/top_level.txt,sha256=AwxQA43kNkjHbhYELXHBKrQ01X5CR2KnDzU07cVqilY,6
|
|
74
|
+
urwid-3.0.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|