flexablelib 3.5.5__tar.gz → 3.6.0__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.
Files changed (126) hide show
  1. {flexablelib-3.5.5 → flexablelib-3.6.0}/CHANGELOG.md +51 -0
  2. {flexablelib-3.5.5 → flexablelib-3.6.0}/PKG-INFO +12 -9
  3. {flexablelib-3.5.5 → flexablelib-3.6.0}/README.md +3 -0
  4. {flexablelib-3.5.5 → flexablelib-3.6.0}/flexablelib/_images.py +21 -3
  5. {flexablelib-3.5.5 → flexablelib-3.6.0}/flexablelib.egg-info/PKG-INFO +12 -9
  6. {flexablelib-3.5.5 → flexablelib-3.6.0}/flexablelib.egg-info/SOURCES.txt +1 -0
  7. flexablelib-3.6.0/flexablelib.egg-info/requires.txt +35 -0
  8. {flexablelib-3.5.5 → flexablelib-3.6.0}/package.json +1 -1
  9. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v330_components.py +1 -1
  10. flexablelib-3.6.0/tests/test_v360_features.py +710 -0
  11. flexablelib-3.5.5/flexablelib.egg-info/requires.txt +0 -35
  12. {flexablelib-3.5.5 → flexablelib-3.6.0}/.coveragerc +0 -0
  13. {flexablelib-3.5.5 → flexablelib-3.6.0}/LICENSE +0 -0
  14. {flexablelib-3.5.5 → flexablelib-3.6.0}/MANIFEST.in +0 -0
  15. {flexablelib-3.5.5 → flexablelib-3.6.0}/examples/admin.py +0 -0
  16. {flexablelib-3.5.5 → flexablelib-3.6.0}/examples/dashboard.py +0 -0
  17. {flexablelib-3.5.5 → flexablelib-3.6.0}/examples/keys.py +0 -0
  18. {flexablelib-3.5.5 → flexablelib-3.6.0}/examples/video/demo.py +0 -0
  19. {flexablelib-3.5.5 → flexablelib-3.6.0}/examples/video/render.py +0 -0
  20. {flexablelib-3.5.5 → flexablelib-3.6.0}/examples/video/scenes.py +0 -0
  21. {flexablelib-3.5.5 → flexablelib-3.6.0}/examples/video/thumbnail.py +0 -0
  22. {flexablelib-3.5.5 → flexablelib-3.6.0}/flexablelib/__init__.py +0 -0
  23. {flexablelib-3.5.5 → flexablelib-3.6.0}/flexablelib/_frames.py +0 -0
  24. {flexablelib-3.5.5 → flexablelib-3.6.0}/flexablelib/_legacy/__init__.py +0 -0
  25. {flexablelib-3.5.5 → flexablelib-3.6.0}/flexablelib/_legacy/screen.py +0 -0
  26. {flexablelib-3.5.5 → flexablelib-3.6.0}/flexablelib/_legacy/widgets.py +0 -0
  27. {flexablelib-3.5.5 → flexablelib-3.6.0}/flexablelib/_speedups.c +0 -0
  28. {flexablelib-3.5.5 → flexablelib-3.6.0}/flexablelib/_width_tables.h +0 -0
  29. {flexablelib-3.5.5 → flexablelib-3.6.0}/flexablelib/box_topology.py +0 -0
  30. {flexablelib-3.5.5 → flexablelib-3.6.0}/flexablelib/cells.py +0 -0
  31. {flexablelib-3.5.5 → flexablelib-3.6.0}/flexablelib/colors.py +0 -0
  32. {flexablelib-3.5.5 → flexablelib-3.6.0}/flexablelib/columns.py +0 -0
  33. {flexablelib-3.5.5 → flexablelib-3.6.0}/flexablelib/fast.py +0 -0
  34. {flexablelib-3.5.5 → flexablelib-3.6.0}/flexablelib/identifiers.py +0 -0
  35. {flexablelib-3.5.5 → flexablelib-3.6.0}/flexablelib/layout.py +0 -0
  36. {flexablelib-3.5.5 → flexablelib-3.6.0}/flexablelib/merges.py +0 -0
  37. {flexablelib-3.5.5 → flexablelib-3.6.0}/flexablelib/options.py +0 -0
  38. {flexablelib-3.5.5 → flexablelib-3.6.0}/flexablelib/py.typed +0 -0
  39. {flexablelib-3.5.5 → flexablelib-3.6.0}/flexablelib/readers.py +0 -0
  40. {flexablelib-3.5.5 → flexablelib-3.6.0}/flexablelib/screen.py +0 -0
  41. {flexablelib-3.5.5 → flexablelib-3.6.0}/flexablelib/style_compositions.py +0 -0
  42. {flexablelib-3.5.5 → flexablelib-3.6.0}/flexablelib/table.py +0 -0
  43. {flexablelib-3.5.5 → flexablelib-3.6.0}/flexablelib/table_strings.py +0 -0
  44. {flexablelib-3.5.5 → flexablelib-3.6.0}/flexablelib/text_width.py +0 -0
  45. {flexablelib-3.5.5 → flexablelib-3.6.0}/flexablelib/utils.py +0 -0
  46. {flexablelib-3.5.5 → flexablelib-3.6.0}/flexablelib/widgets.py +0 -0
  47. {flexablelib-3.5.5 → flexablelib-3.6.0}/flexablelib/writers.py +0 -0
  48. {flexablelib-3.5.5 → flexablelib-3.6.0}/flexablelib.egg-info/dependency_links.txt +0 -0
  49. {flexablelib-3.5.5 → flexablelib-3.6.0}/flexablelib.egg-info/top_level.txt +0 -0
  50. {flexablelib-3.5.5 → flexablelib-3.6.0}/pytest.ini +0 -0
  51. {flexablelib-3.5.5 → flexablelib-3.6.0}/setup.cfg +0 -0
  52. {flexablelib-3.5.5 → flexablelib-3.6.0}/setup.py +0 -0
  53. {flexablelib-3.5.5 → flexablelib-3.6.0}/style_examples.md +0 -0
  54. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/conftest.py +0 -0
  55. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/helpers.py +0 -0
  56. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_align_indicators.py +0 -0
  57. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_box_topology.py +0 -0
  58. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_cells.py +0 -0
  59. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_columns.py +0 -0
  60. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_excel.py +0 -0
  61. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_features.py +0 -0
  62. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_issues.py +0 -0
  63. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_merge_edge_matrix.py +0 -0
  64. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_merge_fill.py +0 -0
  65. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_merges.py +0 -0
  66. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_public_api_edges.py +0 -0
  67. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_readme_examples.py +0 -0
  68. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_stress_matrix.py +0 -0
  69. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_style_line_widths.py +0 -0
  70. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_styles.py +0 -0
  71. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_text_width.py +0 -0
  72. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_two_pass_measurement.py +0 -0
  73. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_upstream_issues.py +0 -0
  74. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v2021_fixes.py +0 -0
  75. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v210_rows_copy.py +0 -0
  76. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v2110_fixes.py +0 -0
  77. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v211_fixes.py +0 -0
  78. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v213_features.py +0 -0
  79. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v214_features.py +0 -0
  80. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v215_features.py +0 -0
  81. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v216_features.py +0 -0
  82. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v217_features.py +0 -0
  83. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v218_features.py +0 -0
  84. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v219_coverage.py +0 -0
  85. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v219_fixes.py +0 -0
  86. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v220_exports.py +0 -0
  87. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v221_fixes.py +0 -0
  88. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v222_fixes.py +0 -0
  89. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v223_fixes.py +0 -0
  90. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v224_fixes.py +0 -0
  91. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v230_none.py +0 -0
  92. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v231_fixes.py +0 -0
  93. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v232_merge_ansi.py +0 -0
  94. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v300_style_names.py +0 -0
  95. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v310_layout.py +0 -0
  96. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v320_tui.py +0 -0
  97. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v330_frames.py +0 -0
  98. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v330_layout.py +0 -0
  99. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v330_tui.py +0 -0
  100. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v331_formats.py +0 -0
  101. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v331_panel_width.py +0 -0
  102. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v331_readers_bom.py +0 -0
  103. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v331_readers_edges.py +0 -0
  104. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v331_tabs.py +0 -0
  105. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v340_accessibility.py +0 -0
  106. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v340_core.py +0 -0
  107. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v340_input.py +0 -0
  108. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v350_images.py +0 -0
  109. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v350_images_core.py +0 -0
  110. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v352_fixes.py +0 -0
  111. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v353_fixes.py +0 -0
  112. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v354_fixes.py +0 -0
  113. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/test_v355_fixes.py +0 -0
  114. {flexablelib-3.5.5 → flexablelib-3.6.0}/tests/wincon_child.py +0 -0
  115. {flexablelib-3.5.5 → flexablelib-3.6.0}/tools/bench_frames.py +0 -0
  116. {flexablelib-3.5.5 → flexablelib-3.6.0}/tools/bench_images.py +0 -0
  117. {flexablelib-3.5.5 → flexablelib-3.6.0}/tools/benchmark.py +0 -0
  118. {flexablelib-3.5.5 → flexablelib-3.6.0}/tools/gen_ascii_table.py +0 -0
  119. {flexablelib-3.5.5 → flexablelib-3.6.0}/tools/generate_width_tables.py +0 -0
  120. {flexablelib-3.5.5 → flexablelib-3.6.0}/tools/image_demo.py +0 -0
  121. {flexablelib-3.5.5 → flexablelib-3.6.0}/tools/pty_check.py +0 -0
  122. {flexablelib-3.5.5 → flexablelib-3.6.0}/tools/readme_gallery.py +0 -0
  123. {flexablelib-3.5.5 → flexablelib-3.6.0}/tools/stress_matrix.py +0 -0
  124. {flexablelib-3.5.5 → flexablelib-3.6.0}/tools/style_examples.py +0 -0
  125. {flexablelib-3.5.5 → flexablelib-3.6.0}/tools/text_to_png.py +0 -0
  126. {flexablelib-3.5.5 → flexablelib-3.6.0}/tools/wheel_check.py +0 -0
@@ -2,6 +2,57 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [3.6.0] - 2026-11-13
6
+
7
+ ### Added
8
+ - **`SignatureInput`**: a signature pad drawn with the mouse (press and
9
+ drag) or the keyboard (arrows move the pen, Space puts it down and lifts
10
+ it, `x` erases, Backspace undoes, `c` clears). `value` is the list of
11
+ strokes; `to_text()`, `to_bitmap(scale)` and `to_png(scale)` export it.
12
+ - **`Stopwatch`**: a stopwatch input for forms -- start / stop (Space or
13
+ Enter), laps (`l`), reset (`r`); `value` is the elapsed
14
+ `datetime.timedelta`, `laps` the split times, `on_lap(split)`.
15
+ - **`VStack`**: children one below the other sharing the stack's height by
16
+ `weights`, within `min_heights` / `max_heights`; when they do not fit it
17
+ scrolls and follows the focus (the child holding the focused component
18
+ comes into view; Tab reaches the ones out of view). Wheel and PgUp/PgDn
19
+ scroll it, with an optional scroll bar.
20
+ - **`CatalogGrid` pictures**: items take an `image` (path, URL, bytes or
21
+ bitmap) and `image_alt`; `image_height`, `image_method` and
22
+ `image_headers` control them. Enter or a click on the current card sets
23
+ `selected` / `value`.
24
+ - **Image downloads with headers**: `Image(headers=)`,
25
+ `ImageViewer(headers=)`, `CatalogGrid(image_headers=)` and
26
+ `_images.load(url, headers=)` send e.g. an `Authorization` bearer token.
27
+ `Authorization`, `Proxy-Authorization` and `Cookie` are not sent on to
28
+ redirects, and no header value appears in errors.
29
+ - **`ValidationSummary` from a list**: messages, `(field, message)` pairs,
30
+ dicts with `field` / `message` or exceptions, besides the
31
+ `{field: message}` dict. With `fields` (a `Form` or inputs) or
32
+ `on_select` it takes the focus and Enter moves the focus to the field.
33
+ `entries` and `messages` list them.
34
+ - **`EditableTable(name=)`** and its `value` (a copy of the rows), so a
35
+ `Form` collects it.
36
+
37
+ ### Changed
38
+ - **`Form.values()` and `Form.fields()` reach nested fields**: inputs inside
39
+ containers (`Stack`, `VStack`, `Tabs` -- hidden tabs too --, `Wizard`
40
+ steps, `Accordion` sections, grids, cards) and named `EditableTable`s,
41
+ not only the top-level ones. Validation and "Enter moves to the next
42
+ field" reach them too.
43
+ - **`ScanInput` keeps the code it read** (`keep_value=True`, the new
44
+ default): `value` and a `Form` still have it after the read, the next
45
+ read replaces it as soon as it starts typing, and Enter on the shown code
46
+ does not read it twice. `keep_value=False` restores the old behaviour of
47
+ clearing the field after every read. `last_code` is the latest code.
48
+ - **Focus without colour**: a focused empty `DataTable`, an `Image` drawn as
49
+ text (alt text, `[alt]`, the warning) and the `ImageViewer` info line now
50
+ show a `▸` marker (`>` without colour or in ASCII mode) and reverse
51
+ video, not only a colour. A focused `CatalogGrid` card always has the
52
+ `▸` marker besides its heavy border.
53
+ - Image download errors give the HTTP status or the reason
54
+ (`no se pudo descargar (HTTP 401)`) instead of the exception text.
55
+
5
56
  ## [3.5.5] - 2026-11-13
6
57
 
7
58
  ### Fixed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flexablelib
3
- Version: 3.5.5
3
+ Version: 3.6.0
4
4
  Summary: Fast, dependency-free terminal tables for Python: 54 border styles, ANSI colors, cell merges, decimal alignment, width fitting, and CSV/Markdown/HTML/Excel/LaTeX I/O.
5
5
  Home-page: https://github.com/Opus-Perpetuus/flexablelib
6
6
  Author: Benjamin Ramirez
@@ -46,15 +46,15 @@ Requires-Dist: openpyxl>=3.0; extra == "excel"
46
46
  Provides-Extra: html
47
47
  Requires-Dist: lxml>=4.0; extra == "html"
48
48
  Provides-Extra: tui
49
- Requires-Dist: flexablelib-tui==3.5.5; extra == "tui"
49
+ Requires-Dist: flexablelib-tui==3.6.0; extra == "tui"
50
50
  Provides-Extra: components
51
- Requires-Dist: flexablelib-components==3.5.5; extra == "components"
51
+ Requires-Dist: flexablelib-components==3.6.0; extra == "components"
52
52
  Provides-Extra: speed
53
- Requires-Dist: flexablelib-speedups==3.5.5; extra == "speed"
53
+ Requires-Dist: flexablelib-speedups==3.6.0; extra == "speed"
54
54
  Provides-Extra: images
55
55
  Requires-Dist: Pillow>=8; extra == "images"
56
- Requires-Dist: flexablelib-tui==3.5.5; extra == "images"
57
- Requires-Dist: flexablelib-components==3.5.5; extra == "images"
56
+ Requires-Dist: flexablelib-tui==3.6.0; extra == "images"
57
+ Requires-Dist: flexablelib-components==3.6.0; extra == "images"
58
58
  Provides-Extra: svg
59
59
  Requires-Dist: cairosvg>=2.5; extra == "svg"
60
60
  Provides-Extra: all
@@ -62,9 +62,9 @@ Requires-Dist: pandas>=1.0; extra == "all"
62
62
  Requires-Dist: openpyxl>=3.0; extra == "all"
63
63
  Requires-Dist: lxml>=4.0; extra == "all"
64
64
  Requires-Dist: Pillow>=8; extra == "all"
65
- Requires-Dist: flexablelib-tui==3.5.5; extra == "all"
66
- Requires-Dist: flexablelib-components==3.5.5; extra == "all"
67
- Requires-Dist: flexablelib-speedups==3.5.5; extra == "all"
65
+ Requires-Dist: flexablelib-tui==3.6.0; extra == "all"
66
+ Requires-Dist: flexablelib-components==3.6.0; extra == "all"
67
+ Requires-Dist: flexablelib-speedups==3.6.0; extra == "all"
68
68
  Dynamic: author
69
69
  Dynamic: author-email
70
70
  Dynamic: classifier
@@ -186,6 +186,9 @@ in colour or plain text: the full list, what each does and its keys is in
186
186
  <td><b>Data</b> — interactive table, filters, editable table, catalog, forms, login<br><img src="https://raw.githubusercontent.com/Opus-Perpetuus/flexablelib/main/docs/img/v33/12_datos.png" alt="Data components" width="420"></td>
187
187
  <td><b>Dialogs</b> — modal, confirm, prompt, loading, popover<br><img src="https://raw.githubusercontent.com/Opus-Perpetuus/flexablelib/main/docs/img/v33/13_dialogos.png" alt="Dialog components" width="420"></td>
188
188
  </tr>
189
+ <tr>
190
+ <td colspan="2"><b>New in 3.6.0</b> — signature pad, stopwatch, a vertical stack that shares its height and follows the focus, focus shown without colour, forms that collect nested fields and editable tables, scanners that keep the code read, catalog cards with pictures, pictures downloaded with an <code>Authorization</code> header, a validation summary from a list of errors<br><img src="https://raw.githubusercontent.com/Opus-Perpetuus/flexablelib/main/docs/img/v36/01_novedades.png" alt="3.6.0 components: SignatureInput, Stopwatch, VStack, focus markers, ScanInput, CatalogGrid with images, ValidationSummary" width="520"></td>
191
+ </tr>
189
192
  </table>
190
193
 
191
194
  ### Keyboard, mouse and accessibility
@@ -105,6 +105,9 @@ in colour or plain text: the full list, what each does and its keys is in
105
105
  <td><b>Data</b> — interactive table, filters, editable table, catalog, forms, login<br><img src="https://raw.githubusercontent.com/Opus-Perpetuus/flexablelib/main/docs/img/v33/12_datos.png" alt="Data components" width="420"></td>
106
106
  <td><b>Dialogs</b> — modal, confirm, prompt, loading, popover<br><img src="https://raw.githubusercontent.com/Opus-Perpetuus/flexablelib/main/docs/img/v33/13_dialogos.png" alt="Dialog components" width="420"></td>
107
107
  </tr>
108
+ <tr>
109
+ <td colspan="2"><b>New in 3.6.0</b> — signature pad, stopwatch, a vertical stack that shares its height and follows the focus, focus shown without colour, forms that collect nested fields and editable tables, scanners that keep the code read, catalog cards with pictures, pictures downloaded with an <code>Authorization</code> header, a validation summary from a list of errors<br><img src="https://raw.githubusercontent.com/Opus-Perpetuus/flexablelib/main/docs/img/v36/01_novedades.png" alt="3.6.0 components: SignatureInput, Stopwatch, VStack, focus markers, ScanInput, CatalogGrid with images, ValidationSummary" width="520"></td>
110
+ </tr>
108
111
  </table>
109
112
 
110
113
  ### Keyboard, mouse and accessibility
@@ -733,8 +733,17 @@ def render_pdf(data, dpi=96):
733
733
  raise ImageError('PDF necesita PyMuPDF o pdftoppm (poppler)')
734
734
 
735
735
 
736
- def read_source(source, timeout=5.0, max_bytes=64 * 1024 * 1024):
737
- """``(bytes, name)`` for a path, URL, bytes or file object."""
736
+ _PRIVATE_HEADERS = ('authorization', 'proxy-authorization', 'cookie')
737
+
738
+
739
+ def read_source(source, timeout=5.0, max_bytes=64 * 1024 * 1024,
740
+ headers=None):
741
+ """``(bytes, name)`` for a path, URL, bytes or file object.
742
+
743
+ ``headers`` (a dict) go with an ``http(s)://`` request, e.g.
744
+ ``{'Authorization': 'Bearer <token>'}`` for images behind a session.
745
+ ``Authorization``, ``Proxy-Authorization`` and ``Cookie`` are never
746
+ sent on to a redirect, and no header value appears in errors."""
738
747
  if isinstance(source, (bytes, bytearray, memoryview)):
739
748
  return bytes(source), None
740
749
  if hasattr(source, 'read'):
@@ -744,10 +753,19 @@ def read_source(source, timeout=5.0, max_bytes=64 * 1024 * 1024):
744
753
  from urllib.request import Request, urlopen
745
754
  try:
746
755
  req = Request(path, headers={'User-Agent': 'flexablelib'})
756
+ for name, value in (headers or {}).items():
757
+ if str(name).lower() in _PRIVATE_HEADERS:
758
+ req.add_unredirected_header(str(name).capitalize(),
759
+ str(value))
760
+ else:
761
+ req.add_header(str(name), str(value))
747
762
  with urlopen(req, timeout=timeout) as resp:
748
763
  data = resp.read(max_bytes + 1)
749
764
  except Exception as error:
750
- raise ImageError('no se pudo descargar ({0})'.format(error))
765
+ code = getattr(error, 'code', None)
766
+ reason = 'HTTP {0}'.format(code) if isinstance(code, int) else \
767
+ (getattr(error, 'reason', None) or error)
768
+ raise ImageError('no se pudo descargar ({0})'.format(reason))
751
769
  if len(data) > max_bytes:
752
770
  raise ImageError('imagen demasiado grande')
753
771
  return data, path
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flexablelib
3
- Version: 3.5.5
3
+ Version: 3.6.0
4
4
  Summary: Fast, dependency-free terminal tables for Python: 54 border styles, ANSI colors, cell merges, decimal alignment, width fitting, and CSV/Markdown/HTML/Excel/LaTeX I/O.
5
5
  Home-page: https://github.com/Opus-Perpetuus/flexablelib
6
6
  Author: Benjamin Ramirez
@@ -46,15 +46,15 @@ Requires-Dist: openpyxl>=3.0; extra == "excel"
46
46
  Provides-Extra: html
47
47
  Requires-Dist: lxml>=4.0; extra == "html"
48
48
  Provides-Extra: tui
49
- Requires-Dist: flexablelib-tui==3.5.5; extra == "tui"
49
+ Requires-Dist: flexablelib-tui==3.6.0; extra == "tui"
50
50
  Provides-Extra: components
51
- Requires-Dist: flexablelib-components==3.5.5; extra == "components"
51
+ Requires-Dist: flexablelib-components==3.6.0; extra == "components"
52
52
  Provides-Extra: speed
53
- Requires-Dist: flexablelib-speedups==3.5.5; extra == "speed"
53
+ Requires-Dist: flexablelib-speedups==3.6.0; extra == "speed"
54
54
  Provides-Extra: images
55
55
  Requires-Dist: Pillow>=8; extra == "images"
56
- Requires-Dist: flexablelib-tui==3.5.5; extra == "images"
57
- Requires-Dist: flexablelib-components==3.5.5; extra == "images"
56
+ Requires-Dist: flexablelib-tui==3.6.0; extra == "images"
57
+ Requires-Dist: flexablelib-components==3.6.0; extra == "images"
58
58
  Provides-Extra: svg
59
59
  Requires-Dist: cairosvg>=2.5; extra == "svg"
60
60
  Provides-Extra: all
@@ -62,9 +62,9 @@ Requires-Dist: pandas>=1.0; extra == "all"
62
62
  Requires-Dist: openpyxl>=3.0; extra == "all"
63
63
  Requires-Dist: lxml>=4.0; extra == "all"
64
64
  Requires-Dist: Pillow>=8; extra == "all"
65
- Requires-Dist: flexablelib-tui==3.5.5; extra == "all"
66
- Requires-Dist: flexablelib-components==3.5.5; extra == "all"
67
- Requires-Dist: flexablelib-speedups==3.5.5; extra == "all"
65
+ Requires-Dist: flexablelib-tui==3.6.0; extra == "all"
66
+ Requires-Dist: flexablelib-components==3.6.0; extra == "all"
67
+ Requires-Dist: flexablelib-speedups==3.6.0; extra == "all"
68
68
  Dynamic: author
69
69
  Dynamic: author-email
70
70
  Dynamic: classifier
@@ -186,6 +186,9 @@ in colour or plain text: the full list, what each does and its keys is in
186
186
  <td><b>Data</b> — interactive table, filters, editable table, catalog, forms, login<br><img src="https://raw.githubusercontent.com/Opus-Perpetuus/flexablelib/main/docs/img/v33/12_datos.png" alt="Data components" width="420"></td>
187
187
  <td><b>Dialogs</b> — modal, confirm, prompt, loading, popover<br><img src="https://raw.githubusercontent.com/Opus-Perpetuus/flexablelib/main/docs/img/v33/13_dialogos.png" alt="Dialog components" width="420"></td>
188
188
  </tr>
189
+ <tr>
190
+ <td colspan="2"><b>New in 3.6.0</b> — signature pad, stopwatch, a vertical stack that shares its height and follows the focus, focus shown without colour, forms that collect nested fields and editable tables, scanners that keep the code read, catalog cards with pictures, pictures downloaded with an <code>Authorization</code> header, a validation summary from a list of errors<br><img src="https://raw.githubusercontent.com/Opus-Perpetuus/flexablelib/main/docs/img/v36/01_novedades.png" alt="3.6.0 components: SignatureInput, Stopwatch, VStack, focus markers, ScanInput, CatalogGrid with images, ValidationSummary" width="520"></td>
191
+ </tr>
189
192
  </table>
190
193
 
191
194
  ### Keyboard, mouse and accessibility
@@ -108,6 +108,7 @@ tests/test_v352_fixes.py
108
108
  tests/test_v353_fixes.py
109
109
  tests/test_v354_fixes.py
110
110
  tests/test_v355_fixes.py
111
+ tests/test_v360_features.py
111
112
  tests/wincon_child.py
112
113
  tools/bench_frames.py
113
114
  tools/bench_images.py
@@ -0,0 +1,35 @@
1
+
2
+ [all]
3
+ pandas>=1.0
4
+ openpyxl>=3.0
5
+ lxml>=4.0
6
+ Pillow>=8
7
+ flexablelib-tui==3.6.0
8
+ flexablelib-components==3.6.0
9
+ flexablelib-speedups==3.6.0
10
+
11
+ [components]
12
+ flexablelib-components==3.6.0
13
+
14
+ [excel]
15
+ openpyxl>=3.0
16
+
17
+ [html]
18
+ lxml>=4.0
19
+
20
+ [images]
21
+ Pillow>=8
22
+ flexablelib-tui==3.6.0
23
+ flexablelib-components==3.6.0
24
+
25
+ [pandas]
26
+ pandas>=1.0
27
+
28
+ [speed]
29
+ flexablelib-speedups==3.6.0
30
+
31
+ [svg]
32
+ cairosvg>=2.5
33
+
34
+ [tui]
35
+ flexablelib-tui==3.6.0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flexablelib",
3
- "version": "3.5.5",
3
+ "version": "3.6.0",
4
4
  "private": true,
5
5
  "description": "Flexible console and HTML tables for Python: styles, merges, colors, widths, decimal alignment.",
6
6
  "repository": {
@@ -367,7 +367,7 @@ class TestOtherTextInputs:
367
367
  for c in 'P123#':
368
368
  press(s, c)
369
369
  press(s, 'enter')
370
- assert codes == ['123'] and s.text == ''
370
+ assert codes == ['123'] and s.text == '123' # 3.6.0: kept
371
371
  for c in '123':
372
372
  press(s, c)
373
373
  press(s, 'enter') # duplicate within the window: dropped