urwid 2.6.12__tar.gz → 2.6.14__tar.gz

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.

Files changed (318) hide show
  1. {urwid-2.6.12 → urwid-2.6.14}/.github/PULL_REQUEST_TEMPLATE.md +1 -2
  2. {urwid-2.6.12 → urwid-2.6.14}/.github/workflows/isolated_static_check.yml +1 -1
  3. {urwid-2.6.12 → urwid-2.6.14}/.github/workflows/pythonpackage.yml +1 -1
  4. {urwid-2.6.12 → urwid-2.6.14}/.pre-commit-config.yaml +3 -3
  5. {urwid-2.6.12 → urwid-2.6.14}/PKG-INFO +1 -1
  6. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/real_browse.py +4 -4
  7. {urwid-2.6.12 → urwid-2.6.14}/examples/browse.py +4 -4
  8. urwid-2.6.14/pylint-requirements.txt +1 -0
  9. {urwid-2.6.12 → urwid-2.6.14}/pyproject.toml +0 -1
  10. urwid-2.6.14/ruff-requirements.txt +1 -0
  11. {urwid-2.6.12 → urwid-2.6.14}/test_requirements.txt +2 -2
  12. {urwid-2.6.12 → urwid-2.6.14}/tests/test_grid_flow.py +24 -0
  13. {urwid-2.6.12 → urwid-2.6.14}/tests/test_scrollable.py +10 -10
  14. {urwid-2.6.12 → urwid-2.6.14}/urwid/display/_raw_display_base.py +1 -1
  15. {urwid-2.6.12 → urwid-2.6.14}/urwid/display/common.py +2 -3
  16. {urwid-2.6.12 → urwid-2.6.14}/urwid/display/curses.py +2 -2
  17. {urwid-2.6.12 → urwid-2.6.14}/urwid/event_loop/trio_loop.py +13 -7
  18. {urwid-2.6.12 → urwid-2.6.14}/urwid/event_loop/zmq_loop.py +2 -2
  19. {urwid-2.6.12 → urwid-2.6.14}/urwid/version.py +2 -2
  20. {urwid-2.6.12 → urwid-2.6.14}/urwid/widget/grid_flow.py +18 -8
  21. {urwid-2.6.12 → urwid-2.6.14}/urwid/widget/scrollable.py +7 -4
  22. {urwid-2.6.12 → urwid-2.6.14}/urwid.egg-info/PKG-INFO +1 -1
  23. urwid-2.6.12/pylint-requirements.txt +0 -1
  24. urwid-2.6.12/ruff-requirements.txt +0 -1
  25. {urwid-2.6.12 → urwid-2.6.14}/.coveralls.yml +0 -0
  26. {urwid-2.6.12 → urwid-2.6.14}/.devcontainer/dev.dockerfile +0 -0
  27. {urwid-2.6.12 → urwid-2.6.14}/.devcontainer/devcontainer.json +0 -0
  28. {urwid-2.6.12 → urwid-2.6.14}/.dockerignore +0 -0
  29. {urwid-2.6.12 → urwid-2.6.14}/.editorconfig +0 -0
  30. {urwid-2.6.12 → urwid-2.6.14}/.github/CODE_OF_CONDUCT.md +0 -0
  31. {urwid-2.6.12 → urwid-2.6.14}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  32. {urwid-2.6.12 → urwid-2.6.14}/.github/ISSUE_TEMPLATE/docs.md +0 -0
  33. {urwid-2.6.12 → urwid-2.6.14}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  34. {urwid-2.6.12 → urwid-2.6.14}/.github/ISSUE_TEMPLATE/question.md +0 -0
  35. {urwid-2.6.12 → urwid-2.6.14}/.github/dependabot.yml +0 -0
  36. {urwid-2.6.12 → urwid-2.6.14}/.github/labeler.yml +0 -0
  37. {urwid-2.6.12 → urwid-2.6.14}/.github/release.yml +0 -0
  38. {urwid-2.6.12 → urwid-2.6.14}/.github/workflows/documentation.yml +0 -0
  39. {urwid-2.6.12 → urwid-2.6.14}/.github/workflows/labels.yml +0 -0
  40. {urwid-2.6.12 → urwid-2.6.14}/.github/workflows/yamllint.yml +0 -0
  41. {urwid-2.6.12 → urwid-2.6.14}/.gitignore +0 -0
  42. {urwid-2.6.12 → urwid-2.6.14}/.yamllint.yml +0 -0
  43. {urwid-2.6.12 → urwid-2.6.14}/COPYING +0 -0
  44. {urwid-2.6.12 → urwid-2.6.14}/MANIFEST.in +0 -0
  45. {urwid-2.6.12 → urwid-2.6.14}/README.rst +0 -0
  46. {urwid-2.6.12 → urwid-2.6.14}/black-requirements.txt +0 -0
  47. {urwid-2.6.12 → urwid-2.6.14}/classifiers.txt +0 -0
  48. {urwid-2.6.12 → urwid-2.6.14}/docs/Makefile +0 -0
  49. {urwid-2.6.12 → urwid-2.6.14}/docs/changelog.rst +0 -0
  50. {urwid-2.6.12 → urwid-2.6.14}/docs/conf.py +0 -0
  51. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/bigtext.py +0 -0
  52. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/bigtext.py.xdotool +0 -0
  53. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/bigtext1.png +0 -0
  54. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/bigtext2.png +0 -0
  55. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/bigtext3.png +0 -0
  56. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/browse.py +0 -0
  57. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/browse.py.xdotool +0 -0
  58. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/browse1.png +0 -0
  59. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/browse2.png +0 -0
  60. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/edit.py +0 -0
  61. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/edit.py.xdotool +0 -0
  62. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/edit1.png +0 -0
  63. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/edit2.png +0 -0
  64. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/edit_text.txt +0 -0
  65. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/graph.py +0 -0
  66. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/graph.py.xdotool +0 -0
  67. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/graph1.png +0 -0
  68. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/graph2.png +0 -0
  69. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/index.rst +0 -0
  70. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/palette_test.py +0 -0
  71. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/palette_test.py.xdotool +0 -0
  72. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/palette_test1.png +0 -0
  73. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/palette_test2.png +0 -0
  74. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/pop_up.py +0 -0
  75. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/pop_up.py.xdotool +0 -0
  76. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/pop_up1.png +0 -0
  77. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/pop_up2.png +0 -0
  78. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/real_edit.py +0 -0
  79. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/subproc.py +0 -0
  80. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/subproc.py.xdotool +0 -0
  81. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/subproc1.png +0 -0
  82. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/subproc2.png +0 -0
  83. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/subproc2.py +0 -0
  84. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/tour.py +0 -0
  85. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/tour.py.xdotool +0 -0
  86. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/tour1.png +0 -0
  87. {urwid-2.6.12 → urwid-2.6.14}/docs/examples/tour2.png +0 -0
  88. {urwid-2.6.12 → urwid-2.6.14}/docs/index.rst +0 -0
  89. {urwid-2.6.12 → urwid-2.6.14}/docs/manual/bright_combinations.py +0 -0
  90. {urwid-2.6.12 → urwid-2.6.14}/docs/manual/bright_combinations.py.xdotool +0 -0
  91. {urwid-2.6.12 → urwid-2.6.14}/docs/manual/bright_combinations1.png +0 -0
  92. {urwid-2.6.12 → urwid-2.6.14}/docs/manual/canvascache.rst +0 -0
  93. {urwid-2.6.12 → urwid-2.6.14}/docs/manual/displayattributes.rst +0 -0
  94. {urwid-2.6.12 → urwid-2.6.14}/docs/manual/displaymodules.rst +0 -0
  95. {urwid-2.6.12 → urwid-2.6.14}/docs/manual/encodings.rst +0 -0
  96. {urwid-2.6.12 → urwid-2.6.14}/docs/manual/images/display_modules.png +0 -0
  97. {urwid-2.6.12 → urwid-2.6.14}/docs/manual/images/introduction.png +0 -0
  98. {urwid-2.6.12 → urwid-2.6.14}/docs/manual/images/urwid_widgets.svgz +0 -0
  99. {urwid-2.6.12 → urwid-2.6.14}/docs/manual/images/urwid_widgets_1.png +0 -0
  100. {urwid-2.6.12 → urwid-2.6.14}/docs/manual/images/urwid_widgets_1.xcf +0 -0
  101. {urwid-2.6.12 → urwid-2.6.14}/docs/manual/images/urwid_widgets_2.png +0 -0
  102. {urwid-2.6.12 → urwid-2.6.14}/docs/manual/images/urwid_widgets_2.xcf +0 -0
  103. {urwid-2.6.12 → urwid-2.6.14}/docs/manual/images/widget_layout.png +0 -0
  104. {urwid-2.6.12 → urwid-2.6.14}/docs/manual/index.rst +0 -0
  105. {urwid-2.6.12 → urwid-2.6.14}/docs/manual/mainloop.rst +0 -0
  106. {urwid-2.6.12 → urwid-2.6.14}/docs/manual/overview.rst +0 -0
  107. {urwid-2.6.12 → urwid-2.6.14}/docs/manual/safe_combinations.py +0 -0
  108. {urwid-2.6.12 → urwid-2.6.14}/docs/manual/safe_combinations.py.xdotool +0 -0
  109. {urwid-2.6.12 → urwid-2.6.14}/docs/manual/safe_combinations1.png +0 -0
  110. {urwid-2.6.12 → urwid-2.6.14}/docs/manual/textlayout.rst +0 -0
  111. {urwid-2.6.12 → urwid-2.6.14}/docs/manual/userinput.rst +0 -0
  112. {urwid-2.6.12 → urwid-2.6.14}/docs/manual/wanat.py +0 -0
  113. {urwid-2.6.12 → urwid-2.6.14}/docs/manual/wanat_multi.py +0 -0
  114. {urwid-2.6.12 → urwid-2.6.14}/docs/manual/wcur1.py +0 -0
  115. {urwid-2.6.12 → urwid-2.6.14}/docs/manual/wcur2.py +0 -0
  116. {urwid-2.6.12 → urwid-2.6.14}/docs/manual/widgets.rst +0 -0
  117. {urwid-2.6.12 → urwid-2.6.14}/docs/manual/wmod.py +0 -0
  118. {urwid-2.6.12 → urwid-2.6.14}/docs/manual/wsel.py +0 -0
  119. {urwid-2.6.12 → urwid-2.6.14}/docs/reference/attrspec.rst +0 -0
  120. {urwid-2.6.12 → urwid-2.6.14}/docs/reference/canvas.rst +0 -0
  121. {urwid-2.6.12 → urwid-2.6.14}/docs/reference/command_map.rst +0 -0
  122. {urwid-2.6.12 → urwid-2.6.14}/docs/reference/constants.rst +0 -0
  123. {urwid-2.6.12 → urwid-2.6.14}/docs/reference/deprecated.rst +0 -0
  124. {urwid-2.6.12 → urwid-2.6.14}/docs/reference/display_modules.rst +0 -0
  125. {urwid-2.6.12 → urwid-2.6.14}/docs/reference/exceptions.rst +0 -0
  126. {urwid-2.6.12 → urwid-2.6.14}/docs/reference/global_settings.rst +0 -0
  127. {urwid-2.6.12 → urwid-2.6.14}/docs/reference/index.rst +0 -0
  128. {urwid-2.6.12 → urwid-2.6.14}/docs/reference/list_walkers.rst +0 -0
  129. {urwid-2.6.12 → urwid-2.6.14}/docs/reference/main_loop.rst +0 -0
  130. {urwid-2.6.12 → urwid-2.6.14}/docs/reference/meta.rst +0 -0
  131. {urwid-2.6.12 → urwid-2.6.14}/docs/reference/signals.rst +0 -0
  132. {urwid-2.6.12 → urwid-2.6.14}/docs/reference/text_layout.rst +0 -0
  133. {urwid-2.6.12 → urwid-2.6.14}/docs/reference/widget.rst +0 -0
  134. {urwid-2.6.12 → urwid-2.6.14}/docs/tools/compile_pngs.sh +0 -0
  135. {urwid-2.6.12 → urwid-2.6.14}/docs/tools/screenshots.sh +0 -0
  136. {urwid-2.6.12 → urwid-2.6.14}/docs/tools/static/.placeholder +0 -0
  137. {urwid-2.6.12 → urwid-2.6.14}/docs/tools/templates/indexcontent.html +0 -0
  138. {urwid-2.6.12 → urwid-2.6.14}/docs/tools/templates/indexsidebar.html +0 -0
  139. {urwid-2.6.12 → urwid-2.6.14}/docs/tools/templates/localtoc.html +0 -0
  140. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/adventure.py +0 -0
  141. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/adventure.py.xdotool +0 -0
  142. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/adventure1.png +0 -0
  143. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/adventure2.png +0 -0
  144. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/adventure3.png +0 -0
  145. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/adventure4.png +0 -0
  146. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/cmenu.py +0 -0
  147. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/cmenu.py.xdotool +0 -0
  148. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/cmenu1.png +0 -0
  149. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/cmenu2.png +0 -0
  150. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/cmenu3.png +0 -0
  151. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/cmenu4.png +0 -0
  152. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/highcolors.py +0 -0
  153. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/highcolors.py.xdotool +0 -0
  154. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/highcolors1.png +0 -0
  155. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/hmenu.py +0 -0
  156. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/hmenu.py.xdotool +0 -0
  157. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/hmenu1.png +0 -0
  158. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/hmenu2.png +0 -0
  159. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/hmenu3.png +0 -0
  160. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/hmenu4.png +0 -0
  161. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/index.rst +0 -0
  162. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/input.py +0 -0
  163. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/input.py.xdotool +0 -0
  164. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/input1.png +0 -0
  165. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/input2.png +0 -0
  166. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/input3.png +0 -0
  167. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/input4.png +0 -0
  168. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/input5.png +0 -0
  169. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/menu25.png +0 -0
  170. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/minimal.py +0 -0
  171. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/minimal.py.xdotool +0 -0
  172. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/minimal1.png +0 -0
  173. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/multiple.py +0 -0
  174. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/multiple.py.xdotool +0 -0
  175. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/multiple1.png +0 -0
  176. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/multiple2.png +0 -0
  177. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/multiple3.png +0 -0
  178. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/multiple4.png +0 -0
  179. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/qa.py +0 -0
  180. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/qa.py.xdotool +0 -0
  181. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/qa1.png +0 -0
  182. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/qa2.png +0 -0
  183. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/qa3.png +0 -0
  184. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/sig.py +0 -0
  185. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/sig.py.xdotool +0 -0
  186. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/sig1.png +0 -0
  187. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/sig2.png +0 -0
  188. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/sig3.png +0 -0
  189. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/sig4.png +0 -0
  190. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/smenu.py +0 -0
  191. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/smenu.py.xdotool +0 -0
  192. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/smenu1.png +0 -0
  193. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/smenu2.png +0 -0
  194. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/smenu3.png +0 -0
  195. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/urwid_attr.py +0 -0
  196. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/urwid_attr.py.xdotool +0 -0
  197. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/urwid_attr1.png +0 -0
  198. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/urwid_attr2.png +0 -0
  199. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/urwid_attr3.png +0 -0
  200. {urwid-2.6.12 → urwid-2.6.14}/docs/tutorial/urwid_attr4.png +0 -0
  201. {urwid-2.6.12 → urwid-2.6.14}/docs/urwid-logo.png +0 -0
  202. {urwid-2.6.12 → urwid-2.6.14}/examples/asyncio_socket_server.py +0 -0
  203. {urwid-2.6.12 → urwid-2.6.14}/examples/bigtext.py +0 -0
  204. {urwid-2.6.12 → urwid-2.6.14}/examples/calc.py +0 -0
  205. {urwid-2.6.12 → urwid-2.6.14}/examples/dialog.py +0 -0
  206. {urwid-2.6.12 → urwid-2.6.14}/examples/edit.py +0 -0
  207. {urwid-2.6.12 → urwid-2.6.14}/examples/fib.py +0 -0
  208. {urwid-2.6.12 → urwid-2.6.14}/examples/graph.py +0 -0
  209. {urwid-2.6.12 → urwid-2.6.14}/examples/input_test.py +0 -0
  210. {urwid-2.6.12 → urwid-2.6.14}/examples/lcd_cf635.py +0 -0
  211. {urwid-2.6.12 → urwid-2.6.14}/examples/palette_test.py +0 -0
  212. {urwid-2.6.12 → urwid-2.6.14}/examples/pop_up.py +0 -0
  213. {urwid-2.6.12 → urwid-2.6.14}/examples/subproc.py +0 -0
  214. {urwid-2.6.12 → urwid-2.6.14}/examples/subproc2.py +0 -0
  215. {urwid-2.6.12 → urwid-2.6.14}/examples/terminal.py +0 -0
  216. {urwid-2.6.12 → urwid-2.6.14}/examples/tour.py +0 -0
  217. {urwid-2.6.12 → urwid-2.6.14}/examples/treesample.py +0 -0
  218. {urwid-2.6.12 → urwid-2.6.14}/examples/twisted_serve_ssh.py +0 -0
  219. {urwid-2.6.12 → urwid-2.6.14}/examples/twisted_serve_ssh.tac +0 -0
  220. {urwid-2.6.12 → urwid-2.6.14}/isort-requirements.txt +0 -0
  221. {urwid-2.6.12 → urwid-2.6.14}/requirements.txt +0 -0
  222. {urwid-2.6.12 → urwid-2.6.14}/setup.cfg +0 -0
  223. {urwid-2.6.12 → urwid-2.6.14}/setup.py +0 -0
  224. {urwid-2.6.12 → urwid-2.6.14}/tests/__init__.py +0 -0
  225. {urwid-2.6.12 → urwid-2.6.14}/tests/test_canvas.py +0 -0
  226. {urwid-2.6.12 → urwid-2.6.14}/tests/test_columns.py +0 -0
  227. {urwid-2.6.12 → urwid-2.6.14}/tests/test_container.py +0 -0
  228. {urwid-2.6.12 → urwid-2.6.14}/tests/test_doctests.py +0 -0
  229. {urwid-2.6.12 → urwid-2.6.14}/tests/test_escapes.py +0 -0
  230. {urwid-2.6.12 → urwid-2.6.14}/tests/test_event_loops.py +0 -0
  231. {urwid-2.6.12 → urwid-2.6.14}/tests/test_filler.py +0 -0
  232. {urwid-2.6.12 → urwid-2.6.14}/tests/test_floatedit.py +0 -0
  233. {urwid-2.6.12 → urwid-2.6.14}/tests/test_font.py +0 -0
  234. {urwid-2.6.12 → urwid-2.6.14}/tests/test_frame.py +0 -0
  235. {urwid-2.6.12 → urwid-2.6.14}/tests/test_graphics.py +0 -0
  236. {urwid-2.6.12 → urwid-2.6.14}/tests/test_line_box.py +0 -0
  237. {urwid-2.6.12 → urwid-2.6.14}/tests/test_listbox.py +0 -0
  238. {urwid-2.6.12 → urwid-2.6.14}/tests/test_main_loop.py +0 -0
  239. {urwid-2.6.12 → urwid-2.6.14}/tests/test_moved_imports.py +0 -0
  240. {urwid-2.6.12 → urwid-2.6.14}/tests/test_overlay.py +0 -0
  241. {urwid-2.6.12 → urwid-2.6.14}/tests/test_padding.py +0 -0
  242. {urwid-2.6.12 → urwid-2.6.14}/tests/test_pile.py +0 -0
  243. {urwid-2.6.12 → urwid-2.6.14}/tests/test_raw_display.py +0 -0
  244. {urwid-2.6.12 → urwid-2.6.14}/tests/test_signals.py +0 -0
  245. {urwid-2.6.12 → urwid-2.6.14}/tests/test_str_util.py +0 -0
  246. {urwid-2.6.12 → urwid-2.6.14}/tests/test_text_layout.py +0 -0
  247. {urwid-2.6.12 → urwid-2.6.14}/tests/test_tree.py +0 -0
  248. {urwid-2.6.12 → urwid-2.6.14}/tests/test_util.py +0 -0
  249. {urwid-2.6.12 → urwid-2.6.14}/tests/test_vterm.py +0 -0
  250. {urwid-2.6.12 → urwid-2.6.14}/tests/test_widget.py +0 -0
  251. {urwid-2.6.12 → urwid-2.6.14}/tests/util.py +0 -0
  252. {urwid-2.6.12 → urwid-2.6.14}/tox.ini +0 -0
  253. {urwid-2.6.12 → urwid-2.6.14}/urwid/__init__.py +0 -0
  254. {urwid-2.6.12 → urwid-2.6.14}/urwid/canvas.py +0 -0
  255. {urwid-2.6.12 → urwid-2.6.14}/urwid/command_map.py +0 -0
  256. {urwid-2.6.12 → urwid-2.6.14}/urwid/container.py +0 -0
  257. {urwid-2.6.12 → urwid-2.6.14}/urwid/decoration.py +0 -0
  258. {urwid-2.6.12 → urwid-2.6.14}/urwid/display/__init__.py +0 -0
  259. {urwid-2.6.12 → urwid-2.6.14}/urwid/display/_posix_raw_display.py +0 -0
  260. {urwid-2.6.12 → urwid-2.6.14}/urwid/display/_web.css +0 -0
  261. {urwid-2.6.12 → urwid-2.6.14}/urwid/display/_web.js +0 -0
  262. {urwid-2.6.12 → urwid-2.6.14}/urwid/display/_win32.py +0 -0
  263. {urwid-2.6.12 → urwid-2.6.14}/urwid/display/_win32_raw_display.py +0 -0
  264. {urwid-2.6.12 → urwid-2.6.14}/urwid/display/escape.py +0 -0
  265. {urwid-2.6.12 → urwid-2.6.14}/urwid/display/html_fragment.py +0 -0
  266. {urwid-2.6.12 → urwid-2.6.14}/urwid/display/lcd.py +0 -0
  267. {urwid-2.6.12 → urwid-2.6.14}/urwid/display/raw.py +0 -0
  268. {urwid-2.6.12 → urwid-2.6.14}/urwid/display/web.py +0 -0
  269. {urwid-2.6.12 → urwid-2.6.14}/urwid/event_loop/__init__.py +0 -0
  270. {urwid-2.6.12 → urwid-2.6.14}/urwid/event_loop/abstract_loop.py +0 -0
  271. {urwid-2.6.12 → urwid-2.6.14}/urwid/event_loop/asyncio_loop.py +0 -0
  272. {urwid-2.6.12 → urwid-2.6.14}/urwid/event_loop/glib_loop.py +0 -0
  273. {urwid-2.6.12 → urwid-2.6.14}/urwid/event_loop/main_loop.py +0 -0
  274. {urwid-2.6.12 → urwid-2.6.14}/urwid/event_loop/select_loop.py +0 -0
  275. {urwid-2.6.12 → urwid-2.6.14}/urwid/event_loop/tornado_loop.py +0 -0
  276. {urwid-2.6.12 → urwid-2.6.14}/urwid/event_loop/twisted_loop.py +0 -0
  277. {urwid-2.6.12 → urwid-2.6.14}/urwid/font.py +0 -0
  278. {urwid-2.6.12 → urwid-2.6.14}/urwid/graphics.py +0 -0
  279. {urwid-2.6.12 → urwid-2.6.14}/urwid/numedit.py +0 -0
  280. {urwid-2.6.12 → urwid-2.6.14}/urwid/signals.py +0 -0
  281. {urwid-2.6.12 → urwid-2.6.14}/urwid/split_repr.py +0 -0
  282. {urwid-2.6.12 → urwid-2.6.14}/urwid/str_util.py +0 -0
  283. {urwid-2.6.12 → urwid-2.6.14}/urwid/text_layout.py +0 -0
  284. {urwid-2.6.12 → urwid-2.6.14}/urwid/util.py +0 -0
  285. {urwid-2.6.12 → urwid-2.6.14}/urwid/vterm.py +0 -0
  286. {urwid-2.6.12 → urwid-2.6.14}/urwid/widget/__init__.py +0 -0
  287. {urwid-2.6.12 → urwid-2.6.14}/urwid/widget/attr_map.py +0 -0
  288. {urwid-2.6.12 → urwid-2.6.14}/urwid/widget/attr_wrap.py +0 -0
  289. {urwid-2.6.12 → urwid-2.6.14}/urwid/widget/bar_graph.py +0 -0
  290. {urwid-2.6.12 → urwid-2.6.14}/urwid/widget/big_text.py +0 -0
  291. {urwid-2.6.12 → urwid-2.6.14}/urwid/widget/box_adapter.py +0 -0
  292. {urwid-2.6.12 → urwid-2.6.14}/urwid/widget/columns.py +0 -0
  293. {urwid-2.6.12 → urwid-2.6.14}/urwid/widget/constants.py +0 -0
  294. {urwid-2.6.12 → urwid-2.6.14}/urwid/widget/container.py +0 -0
  295. {urwid-2.6.12 → urwid-2.6.14}/urwid/widget/divider.py +0 -0
  296. {urwid-2.6.12 → urwid-2.6.14}/urwid/widget/edit.py +0 -0
  297. {urwid-2.6.12 → urwid-2.6.14}/urwid/widget/filler.py +0 -0
  298. {urwid-2.6.12 → urwid-2.6.14}/urwid/widget/frame.py +0 -0
  299. {urwid-2.6.12 → urwid-2.6.14}/urwid/widget/line_box.py +0 -0
  300. {urwid-2.6.12 → urwid-2.6.14}/urwid/widget/listbox.py +0 -0
  301. {urwid-2.6.12 → urwid-2.6.14}/urwid/widget/monitored_list.py +0 -0
  302. {urwid-2.6.12 → urwid-2.6.14}/urwid/widget/overlay.py +0 -0
  303. {urwid-2.6.12 → urwid-2.6.14}/urwid/widget/padding.py +0 -0
  304. {urwid-2.6.12 → urwid-2.6.14}/urwid/widget/pile.py +0 -0
  305. {urwid-2.6.12 → urwid-2.6.14}/urwid/widget/popup.py +0 -0
  306. {urwid-2.6.12 → urwid-2.6.14}/urwid/widget/progress_bar.py +0 -0
  307. {urwid-2.6.12 → urwid-2.6.14}/urwid/widget/solid_fill.py +0 -0
  308. {urwid-2.6.12 → urwid-2.6.14}/urwid/widget/text.py +0 -0
  309. {urwid-2.6.12 → urwid-2.6.14}/urwid/widget/treetools.py +0 -0
  310. {urwid-2.6.12 → urwid-2.6.14}/urwid/widget/widget.py +0 -0
  311. {urwid-2.6.12 → urwid-2.6.14}/urwid/widget/widget_decoration.py +0 -0
  312. {urwid-2.6.12 → urwid-2.6.14}/urwid/widget/wimp.py +0 -0
  313. {urwid-2.6.12 → urwid-2.6.14}/urwid/wimp.py +0 -0
  314. {urwid-2.6.12 → urwid-2.6.14}/urwid.egg-info/SOURCES.txt +0 -0
  315. {urwid-2.6.12 → urwid-2.6.14}/urwid.egg-info/dependency_links.txt +0 -0
  316. {urwid-2.6.12 → urwid-2.6.14}/urwid.egg-info/not-zip-safe +0 -0
  317. {urwid-2.6.12 → urwid-2.6.14}/urwid.egg-info/requires.txt +0 -0
  318. {urwid-2.6.12 → urwid-2.6.14}/urwid.egg-info/top_level.txt +0 -0
@@ -1,11 +1,10 @@
1
1
  ##### Checklist
2
2
  - [ ] I've ensured that similar functionality has not already been implemented
3
3
  - [ ] I've ensured that similar functionality has not earlier been proposed and declined
4
- - [ ] I've branched off the `master` or `python-dual-support` branch
4
+ - [ ] I've branched off the `master` branch
5
5
  - [ ] I've merged fresh upstream into my branch recently
6
6
  - [ ] I've ran `tox` successfully in local environment
7
7
  - [ ] I've included docstrings and/or documentation and/or examples for my code (if this is a new feature)
8
8
 
9
9
  ##### Description:
10
10
  *(P. S. If this pull requests fixes an existing issue, please specify which one.)*
11
-
@@ -88,4 +88,4 @@ jobs:
88
88
  - name: Install package for test
89
89
  run: pip install -e .
90
90
  - name: Lint with pylint
91
- run: pylint urwid
91
+ run: pylint --output-format=github urwid
@@ -103,7 +103,7 @@ jobs:
103
103
  - name: Install package for test
104
104
  run: pip install -e .
105
105
  - name: Lint with pylint
106
- run: pylint urwid
106
+ run: pylint --output-format=github urwid
107
107
 
108
108
  Test:
109
109
  needs: [ Isort, Black, Ruff, PyLint ]
@@ -1,6 +1,6 @@
1
1
  repos:
2
2
  - repo: https://github.com/pre-commit/pre-commit-hooks
3
- rev: v4.5.0
3
+ rev: v4.6.0
4
4
  hooks:
5
5
  - id: check-yaml
6
6
  - id: end-of-file-fixer
@@ -20,13 +20,13 @@ repos:
20
20
  types: [pyi]
21
21
 
22
22
  - repo: https://github.com/psf/black
23
- rev: 24.2.0
23
+ rev: 24.4.2
24
24
  hooks:
25
25
  - id: black
26
26
 
27
27
  - repo: https://github.com/astral-sh/ruff-pre-commit
28
28
  # Ruff version.
29
- rev: v0.3.2
29
+ rev: v0.4.7
30
30
  hooks:
31
31
  - id: ruff
32
32
  args: [ --fix, --exit-non-zero-on-fix ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: urwid
3
- Version: 2.6.12
3
+ Version: 2.6.14
4
4
  Summary: A full-featured console (xterm et al.) user interface library
5
5
  Home-page: https://urwid.org/
6
6
  Author-email: Ian Ward <ian@excess.org>
@@ -82,11 +82,11 @@ class FlagFileWidget(urwid.TreeWidget):
82
82
  def update_w(self) -> None:
83
83
  """Update the attributes of self.widget based on self.flagged."""
84
84
  if self.flagged:
85
- self._w.attr = "flagged"
86
- self._w.focus_attr = "flagged focus"
85
+ self._w.attr_map = {None: "flagged"}
86
+ self._w.focus_map = {None: "flagged focus"}
87
87
  else:
88
- self._w.attr = "body"
89
- self._w.focus_attr = "focus"
88
+ self._w.attr_map = {None: "body"}
89
+ self._w.focus_map = {None: "focus"}
90
90
 
91
91
 
92
92
  class FileTreeWidget(FlagFileWidget):
@@ -82,11 +82,11 @@ class FlagFileWidget(urwid.TreeWidget):
82
82
  def update_w(self) -> None:
83
83
  """Update the attributes of self.widget based on self.flagged."""
84
84
  if self.flagged:
85
- self._w.attr = "flagged"
86
- self._w.focus_attr = "flagged focus"
85
+ self._w.attr_map = {None: "flagged"}
86
+ self._w.focus_map = {None: "flagged focus"}
87
87
  else:
88
- self._w.attr = "body"
89
- self._w.focus_attr = "focus"
88
+ self._w.attr_map = {None: "body"}
89
+ self._w.focus_map = {None: "focus"}
90
90
 
91
91
 
92
92
  class FileTreeWidget(FlagFileWidget):
@@ -0,0 +1 @@
1
+ pylint==3.2.3
@@ -158,7 +158,6 @@ target-version = "py37"
158
158
  extend-exclude = ["tests"]
159
159
 
160
160
  [tool.ruff.lint]
161
- ignore-init-module-imports = true
162
161
  extend-select = [
163
162
  "E",
164
163
  "W", # also pycodestyle warnings
@@ -0,0 +1 @@
1
+ ruff==0.4.8
@@ -2,8 +2,8 @@ tornado>=5
2
2
  twisted
3
3
  trio
4
4
  zmq
5
- exceptiongroups
5
+ exceptiongroup;python_version<'3.11'
6
6
  windows-curses;sys_platform=="win32"
7
7
  pyserial
8
8
  # for test run
9
- coverage[toml]
9
+ coverage[toml]
@@ -204,3 +204,27 @@ class GridFlowTest(unittest.TestCase):
204
204
  gf.set_focus(t1)
205
205
  self.assertEqual(gf.focus_position, 0)
206
206
  self.assertRaises(ValueError, lambda: gf.set_focus("nonexistant"))
207
+
208
+ def test_empty(self):
209
+ """Test behaviour of empty widget."""
210
+ grid = urwid.GridFlow(
211
+ (),
212
+ cell_width=10,
213
+ h_sep=1,
214
+ v_sep=1,
215
+ align=urwid.CENTER,
216
+ )
217
+ self.assertEqual(frozenset((urwid.FLOW,)), grid.sizing(), "Empty grid can not be handled as FIXED")
218
+ rows = 1
219
+ with self.subTest("Flow"):
220
+ maxcol = 1
221
+ self.assertEqual((maxcol, rows), grid.pack((maxcol,)))
222
+ rendered = grid.render((maxcol,))
223
+ self.assertEqual(maxcol, rendered.cols())
224
+ self.assertEqual(rows, rendered.rows())
225
+
226
+ with self.subTest("Fixed"):
227
+ maxcol = 0
228
+ self.assertEqual((maxcol, rows), grid.pack(()))
229
+ with self.assertRaises(ValueError):
230
+ grid.render(())
@@ -133,11 +133,11 @@ class TestScrollBarScrollable(unittest.TestCase):
133
133
 
134
134
  self.assertEqual(top_position_rendered, widget.render(reduced_size).decoded_text)
135
135
 
136
- widget.mouse_event(reduced_size, "mouse press", 5, 1, 1, False)
136
+ self.assertTrue(widget.mouse_event(reduced_size, "mouse press", 5, 1, 1, False))
137
137
 
138
138
  self.assertEqual(pos_1_down_rendered, widget.render(reduced_size).decoded_text)
139
139
 
140
- widget.mouse_event(reduced_size, "mouse press", 4, 1, 1, False)
140
+ self.assertTrue(widget.mouse_event(reduced_size, "mouse press", 4, 1, 1, False))
141
141
 
142
142
  self.assertEqual(top_position_rendered, widget.render(reduced_size).decoded_text)
143
143
 
@@ -283,11 +283,11 @@ class TestScrollBarListBox(unittest.TestCase):
283
283
 
284
284
  self.assertEqual(top_position_rendered, widget.render(reduced_size).decoded_text)
285
285
 
286
- widget.mouse_event(reduced_size, "mouse press", 5, 1, 1, False)
286
+ self.assertTrue(widget.mouse_event(reduced_size, "mouse press", 5, 1, 1, False))
287
287
 
288
288
  self.assertEqual(pos_1_down_rendered, widget.render(reduced_size).decoded_text)
289
289
 
290
- widget.mouse_event(reduced_size, "mouse press", 4, 1, 1, False)
290
+ self.assertTrue(widget.mouse_event(reduced_size, "mouse press", 4, 1, 1, False))
291
291
 
292
292
  self.assertEqual(top_position_rendered, widget.render(reduced_size).decoded_text)
293
293
 
@@ -401,11 +401,11 @@ class TestScrollBarAttrMap(unittest.TestCase):
401
401
 
402
402
  self.assertEqual(top_position_rendered, widget.render(reduced_size).decoded_text)
403
403
 
404
- widget.mouse_event(reduced_size, "mouse press", 5, 1, 1, False)
404
+ self.assertTrue(widget.mouse_event(reduced_size, "mouse press", 5, 1, 1, False))
405
405
 
406
406
  self.assertEqual(pos_1_down_rendered, widget.render(reduced_size).decoded_text)
407
407
 
408
- widget.mouse_event(reduced_size, "mouse press", 4, 1, 1, False)
408
+ self.assertTrue(widget.mouse_event(reduced_size, "mouse press", 4, 1, 1, False))
409
409
 
410
410
  self.assertEqual(top_position_rendered, widget.render(reduced_size).decoded_text)
411
411
 
@@ -479,11 +479,11 @@ class TestScrollBarListBoxAttrMap(unittest.TestCase):
479
479
 
480
480
  self.assertEqual(top_position_rendered, widget.render(reduced_size).decoded_text)
481
481
 
482
- widget.mouse_event(reduced_size, "mouse press", 5, 1, 1, False)
482
+ self.assertTrue(widget.mouse_event(reduced_size, "mouse press", 5, 1, 1, False))
483
483
 
484
484
  self.assertEqual(pos_1_down_rendered, widget.render(reduced_size).decoded_text)
485
485
 
486
- widget.mouse_event(reduced_size, "mouse press", 4, 1, 1, False)
486
+ self.assertTrue(widget.mouse_event(reduced_size, "mouse press", 4, 1, 1, False))
487
487
 
488
488
  self.assertEqual(top_position_rendered, widget.render(reduced_size).decoded_text)
489
489
 
@@ -518,11 +518,11 @@ class TestScrollBarListBoxAttrMap(unittest.TestCase):
518
518
 
519
519
  self.assertEqual(top_position_rendered, widget.render(reduced_size).decoded_text)
520
520
 
521
- widget.mouse_event(reduced_size, "mouse press", 5, 1, 1, False)
521
+ self.assertTrue(widget.mouse_event(reduced_size, "mouse press", 5, 1, 1, False))
522
522
 
523
523
  self.assertEqual(pos_1_down_rendered, widget.render(reduced_size).decoded_text)
524
524
 
525
- widget.mouse_event(reduced_size, "mouse press", 4, 1, 1, False)
525
+ self.assertTrue(widget.mouse_event(reduced_size, "mouse press", 4, 1, 1, False))
526
526
 
527
527
  self.assertEqual(top_position_rendered, widget.render(reduced_size).decoded_text)
528
528
 
@@ -682,7 +682,7 @@ class Screen(BaseScreen, RealTerminal):
682
682
  if isinstance(inserttext, bytes):
683
683
  inserttext = inserttext.decode(encoding)
684
684
 
685
- output.extend(("\x08" * back, ias))
685
+ output.extend(("\x08" * back, ias)) # pylint: disable=used-before-assignment # defined in `if row`
686
686
 
687
687
  if encoding != "utf-8":
688
688
  if cs is None:
@@ -39,9 +39,6 @@ if typing.TYPE_CHECKING:
39
39
 
40
40
  IS_WINDOWS = sys.platform == "win32"
41
41
 
42
- if not IS_WINDOWS:
43
- import termios
44
-
45
42
  # for replacing unprintable bytes with '?'
46
43
  UNPRINTABLE_TRANS_TABLE = b"?" * 32 + bytes(range(32, 256))
47
44
 
@@ -941,6 +938,8 @@ class RealTerminal:
941
938
  is called.
942
939
  """
943
940
 
941
+ import termios
942
+
944
943
  if fileno is None:
945
944
  fileno = sys.stdin.fileno()
946
945
  if not os.isatty(fileno):
@@ -62,7 +62,7 @@ if IS_WINDOWS:
62
62
  )
63
63
 
64
64
  def initscr():
65
- import curses # pylint: disable=redefined-outer-name,reimported # special case for monkeypatch
65
+ import curses # noqa: I001 # pylint: disable=redefined-outer-name,reimported # special case for monkeypatch
66
66
 
67
67
  import _curses
68
68
 
@@ -666,7 +666,7 @@ class _test:
666
666
  r.text = ([t.ljust(cols) for t in text] + [""] * rows)[:rows]
667
667
  r.attr = (attr + [[] for _ in range(rows)])[:rows]
668
668
  self.ui.draw_screen((cols, rows), r)
669
- keys, raw = self.ui.get_input(raw_keys=True) # pylint: disable=unpacking-non-sequence
669
+ keys, raw = self.ui.get_input(raw_keys=True)
670
670
  if "window resize" in keys:
671
671
  cols, rows = self.ui.get_cols_rows()
672
672
  if not keys:
@@ -26,13 +26,16 @@ Trio library is required.
26
26
  from __future__ import annotations
27
27
 
28
28
  import logging
29
+ import sys
29
30
  import typing
30
31
 
31
- import exceptiongroup
32
32
  import trio
33
33
 
34
34
  from .abstract_loop import EventLoop, ExitMainLoop
35
35
 
36
+ if sys.version_info < (3, 11):
37
+ from exceptiongroup import BaseExceptionGroup # pylint: disable=redefined-builtin # backport
38
+
36
39
  if typing.TYPE_CHECKING:
37
40
  import io
38
41
  from collections.abc import Awaitable, Callable, Hashable, Mapping
@@ -156,8 +159,10 @@ class TrioEventLoop(EventLoop):
156
159
 
157
160
  emulate_idle_callbacks = _TrioIdleCallbackInstrument(self._idle_callbacks)
158
161
 
159
- with exceptiongroup.catch({BaseException: self._handle_main_loop_exception}):
162
+ try:
160
163
  trio.run(self._main_task, instruments=[emulate_idle_callbacks])
164
+ except BaseException as exc:
165
+ self._handle_main_loop_exception(exc)
161
166
 
162
167
  async def run_async(self) -> None:
163
168
  """Starts the main loop and blocks asynchronously until the main loop exits.
@@ -179,12 +184,14 @@ class TrioEventLoop(EventLoop):
179
184
 
180
185
  emulate_idle_callbacks = _TrioIdleCallbackInstrument(self._idle_callbacks)
181
186
 
182
- with exceptiongroup.catch({BaseException: self._handle_main_loop_exception}):
187
+ try:
183
188
  trio.lowlevel.add_instrument(emulate_idle_callbacks)
184
189
  try:
185
190
  await self._main_task()
186
191
  finally:
187
192
  trio.lowlevel.remove_instrument(emulate_idle_callbacks)
193
+ except BaseException as exc:
194
+ self._handle_main_loop_exception(exc)
188
195
 
189
196
  def watch_file(
190
197
  self,
@@ -225,12 +232,11 @@ class TrioEventLoop(EventLoop):
225
232
  """Handles exceptions raised from the main loop, catching ExitMainLoop
226
233
  instead of letting it propagate through.
227
234
 
228
- Note that since Trio may collect multiple exceptions from tasks into a
229
- Trio MultiError, we cannot simply use a try..catch clause, we need a
230
- helper function like this.
235
+ Note that since Trio may collect multiple exceptions from tasks into an ExceptionGroup,
236
+ we cannot simply use a try..catch clause, we need a helper function like this.
231
237
  """
232
238
  self._idle_callbacks.clear()
233
- if isinstance(exc, exceptiongroup.BaseExceptionGroup) and len(exc.exceptions) == 1:
239
+ if isinstance(exc, BaseExceptionGroup) and len(exc.exceptions) == 1:
234
240
  exc = exc.exceptions[0]
235
241
 
236
242
  if isinstance(exc, ExitMainLoop):
@@ -250,17 +250,17 @@ class ZMQEventLoop(EventLoop):
250
250
  """
251
251
  A single iteration of the event loop.
252
252
  """
253
+ state = "wait" # default state not expecting any action
253
254
  if self._alarms or self._did_something:
254
255
  timeout = 0
255
256
  if self._alarms:
256
257
  state = "alarm"
257
- timeout = max(0, self._alarms[0][0] - time.time())
258
+ timeout = max(0.0, self._alarms[0][0] - time.time())
258
259
  if self._did_something and (not self._alarms or (self._alarms and timeout > 0)):
259
260
  state = "idle"
260
261
  timeout = 0
261
262
  ready = dict(self._poller.poll(timeout * 1000))
262
263
  else:
263
- state = "wait"
264
264
  ready = dict(self._poller.poll())
265
265
 
266
266
  if not ready:
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '2.6.12'
16
- __version_tuple__ = version_tuple = (2, 6, 12)
15
+ __version__ = version = '2.6.14'
16
+ __version_tuple__ = version_tuple = (2, 6, 14)
@@ -30,13 +30,18 @@ class GridFlowWarning(WidgetWarning):
30
30
 
31
31
  class GridFlow(WidgetWrap[Pile], WidgetContainerMixin, WidgetContainerListContentsMixin):
32
32
  """
33
- The GridFlow widget is a flow widget that renders all the widgets it
34
- contains the same width and it arranges them from left to right and top to
35
- bottom.
33
+ The GridFlow widget is a flow widget that renders all the widgets it contains the same width,
34
+ and it arranges them from left to right and top to bottom.
36
35
  """
37
36
 
38
37
  def sizing(self) -> frozenset[Sizing]:
39
- return frozenset((Sizing.FLOW, Sizing.FIXED))
38
+ """Widget sizing.
39
+
40
+ ..note:: Empty widget sizing is limited to the FLOW due to no data for width.
41
+ """
42
+ if self:
43
+ return frozenset((Sizing.FLOW, Sizing.FIXED))
44
+ return frozenset((Sizing.FLOW,))
40
45
 
41
46
  def __init__(
42
47
  self,
@@ -422,14 +427,16 @@ class GridFlow(WidgetWrap[Pile], WidgetContainerMixin, WidgetContainerListConten
422
427
  def _get_maxcol(self, size: tuple[int] | tuple[()]) -> int:
423
428
  if size:
424
429
  (maxcol,) = size
425
- if maxcol < self.cell_width:
430
+ if self and maxcol < self.cell_width:
426
431
  warnings.warn(
427
432
  f"Size is smaller than cell width ({maxcol!r} < {self.cell_width!r})",
428
433
  GridFlowWarning,
429
434
  stacklevel=3,
430
435
  )
431
- else:
436
+ elif self:
432
437
  maxcol = len(self) * self.cell_width + (len(self) - 1) * self.h_sep
438
+ else:
439
+ maxcol = 0
433
440
  return maxcol
434
441
 
435
442
  def get_display_widget(self, size: tuple[int] | tuple[()]) -> Divider | Pile:
@@ -525,7 +532,7 @@ class GridFlow(WidgetWrap[Pile], WidgetContainerMixin, WidgetContainerListConten
525
532
 
526
533
  def keypress(
527
534
  self,
528
- size: tuple[int], # type: ignore[override]
535
+ size: tuple[int] | tuple[()], # type: ignore[override]
529
536
  key: str,
530
537
  ) -> str | None:
531
538
  """
@@ -545,7 +552,10 @@ class GridFlow(WidgetWrap[Pile], WidgetContainerMixin, WidgetContainerListConten
545
552
  ) -> tuple[int, int]:
546
553
  if size:
547
554
  return super().pack(size, focus)
548
- cols = len(self) * self.cell_width + (len(self) - 1) * self.h_sep
555
+ if self:
556
+ cols = len(self) * self.cell_width + (len(self) - 1) * self.h_sep
557
+ else:
558
+ cols = 0
549
559
  return cols, self.rows((cols,), focus)
550
560
 
551
561
  def rows(self, size: tuple[int], focus: bool = False) -> int:
@@ -564,10 +564,10 @@ class ScrollBar(WidgetDecoration[WrappedWidget]):
564
564
  thumb_weight = min(1.0, maxrow / max(1, ow_rows_max))
565
565
 
566
566
  # Thumb shrinks/grows according to the ratio of <number of visible lines> / <number of total lines>
567
- thumb_height = max(1, round(thumb_weight * maxrow))
567
+ thumb_height = max(1, round(thumb_weight * maxrow)) # pylint: disable=possibly-used-before-assignment
568
568
 
569
569
  # Thumb may only touch top/bottom if the first/last row is visible
570
- top_weight = float(pos) / max(1, posmax)
570
+ top_weight = float(pos) / max(1, posmax) # pylint: disable=possibly-used-before-assignment
571
571
  top_height = int((maxrow - thumb_height) * top_weight)
572
572
  if top_height == 0 and top_weight > 0:
573
573
  top_height = 1
@@ -591,7 +591,10 @@ class ScrollBar(WidgetDecoration[WrappedWidget]):
591
591
  ),
592
592
  )
593
593
 
594
- combinelist = [(ow_canv, None, True, ow_size[0]), (sb_canv, None, False, sb_width)]
594
+ combinelist = [
595
+ (ow_canv, None, True, ow_size[0]), # pylint: disable=possibly-used-before-assignment
596
+ (sb_canv, None, False, sb_width),
597
+ ]
595
598
 
596
599
  if self._scrollbar_side != SCROLLBAR_LEFT:
597
600
  return canvas.CanvasJoin(combinelist)
@@ -665,4 +668,4 @@ class ScrollBar(WidgetDecoration[WrappedWidget]):
665
668
  ow.set_scrollpos(pos + 1)
666
669
  return True
667
670
 
668
- return False
671
+ return handled
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: urwid
3
- Version: 2.6.12
3
+ Version: 2.6.14
4
4
  Summary: A full-featured console (xterm et al.) user interface library
5
5
  Home-page: https://urwid.org/
6
6
  Author-email: Ian Ward <ian@excess.org>
@@ -1 +0,0 @@
1
- pylint==3.1.0
@@ -1 +0,0 @@
1
- ruff==0.4.4
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes