|
1 | 1 | # Changelog |
2 | 2 |
|
3 | 3 | ## 25.5.0 - 2025-05-25 |
4 | | -- Allow multiple attribute dictionaries when defining `Elements`. [PR #117](https://github.com/pelme/htpy/pull/117). Thanks to [Chase Sterling @gazpachoking](https://github.com/gazpachoking). |
| 4 | +- Allow multiple attribute dictionaries when defining `Elements`. |
| 5 | + PR #117. |
| 6 | + Thanks to [Chase Sterling (@gazpachoking)](https://github.com/gazpachoking). |
5 | 7 |
|
6 | 8 | ## 25.4.2 - 2025-04-16 |
7 | | -- Fix import of `@deprecated()` annotation on Python >= 3.13. It is part of the `warnings` module, not the `typing` module. Fixes [issue #106]. [PR #107] |
| 9 | +- Fix import of `@deprecated()` annotation on Python >= 3.13. It is part of the `warnings` module, not the `typing` module. |
| 10 | + Fixes #106. PR #107. |
| 11 | + Thanks to [Stein Magnus Jodal (@jodal)](https://github.com/jodal). |
8 | 12 |
|
9 | 13 | ## 25.4.1 - 2025-04-12 |
10 | | -- Add the `Renderable` protocol, a consistent API to render an `htpy` object as HTML or to iterate over it. `Element`, `Fragment`, `ContextProvider`, and `ContextConsumer` are all `Renderable`. [PR #92](https://github.com/pelme/htpy/pull/92). Thanks to [Stein Magnus Jodal (@jodal)](https://github.com/jodal) and [Dave Peck (@davepeck)](https://github.com/davepeck). |
11 | | -- Deprecate `render_node()` and `iter_node()` and direct iteration over elements. Call `Renderable.__str__()` or `Renderable.iter_chunks()` instead. [Read the Usage docs for more details](usage.md#renderable). |
| 14 | +- Add the `Renderable` protocol, a consistent API to render an `htpy` object as HTML or to iterate over it. `Element`, `Fragment`, `ContextProvider`, and `ContextConsumer` are all `Renderable`. |
| 15 | + PR #92. |
| 16 | + Thanks to [Stein Magnus Jodal (@jodal)](https://github.com/jodal) and [Dave Peck (@davepeck)](https://github.com/davepeck). |
| 17 | +- Deprecate `render_node()` and `iter_node()` and direct iteration over elements. Call `Renderable.__str__()` or `Renderable.iter_chunks()` instead. |
| 18 | + Read the [Usage docs](usage.md#renderable) for more details. |
12 | 19 |
|
13 | 20 | ## 25.4.0 - 2025-04-10 |
14 | | -- Make Context's repr debug friendly [PR #96](https://github.com/pelme/htpy/pull/96). Thanks to Stein Magnus Jodal ([@jodal](https://github.com/jodal)). |
15 | | -- Strip whitespace around id and class values in CSS selector. Fixes |
16 | | -[issue #97](https://github.com/pelme/htpy/issues/97). See [PR #100](https://github.com/pelme/htpy/pull/100). |
17 | | -Thanks to [William Jackson](https://github.com/williamjacksn). |
| 21 | +- Make `Context`'s repr debug friendly PR #96. |
| 22 | + Thanks to [Stein Magnus Jodal (@jodal)](https://github.com/jodal)). |
| 23 | +- Strip whitespace around id and class values in CSS selector. |
| 24 | + Fixes #97. PR #100. |
| 25 | + Thanks to [William Jackson (@williamjacksn)](https://github.com/williamjacksn). |
18 | 26 |
|
19 | 27 | ## 25.3.0 - 2025-03-16 |
20 | | -- Add `fragment` for explicitly grouping a collection of nodes. [Read the Usage docs for more details](usage.md#fragments) Fixes |
21 | | -[issue #82](https://github.com/pelme/htpy/issues/82). |
22 | | -See [PR #86](https://github.com/pelme/htpy/pull/86) and [PR #95](https://github.com/pelme/htpy/pull/95). Thanks to [Thomas Scholtes (@geigerzaehler)](https://github.com/geigerzaehler). |
| 28 | +- Add `fragment` for explicitly grouping a collection of nodes. |
| 29 | + [Read the Usage docs for more details](usage.md#fragments). |
| 30 | + Fixes #82. PRs #86 and #95. |
| 31 | + Thanks to [Thomas Scholtes (@geigerzaehler)](https://github.com/geigerzaehler). |
23 | 32 |
|
24 | 33 | ## 25.2.0 - 2025-02-01 |
25 | 34 | - Context providers longer require wrapping nodes in a function/lambda. This |
26 | | -simplifies context usage while still being backward compatible. Thanks to Thomas |
27 | | -Scholtes ([@geigerzaehler](https://github.com/geigerzaehler)) for the patch. [PR #83](https://github.com/pelme/htpy/pull/83). |
| 35 | +simplifies context usage while still being backward compatible. |
| 36 | + PR #83. |
| 37 | + Thanks to [Thomas Scholtes (@geigerzaehler)](https://github.com/geigerzaehler) for the patch. |
28 | 38 |
|
29 | 39 | ## 25.1.0 - 2025-01-27 |
30 | | -- Adjust typing for attributes: Allow Mapping instead of just dict. Thanks to |
31 | | -David Svenson ([@Majsvaffla](https://github.com/Majsvaffla)) for the initial report+patch. [PR #80](https://github.com/pelme/htpy/pull/80). |
| 40 | +- Adjust typing for attributes: Allow Mapping instead of just dict. |
| 41 | + PR #80. |
| 42 | + Thanks to [David Svenson (@Majsvaffla)](https://github.com/Majsvaffla) for the initial report+patch. |
32 | 43 |
|
33 | 44 | ## 24.12.0 - 2024-12-15 |
34 | | -- Fixed handling of non-generator iterators such as `itertools.chain()` as |
35 | | -children. Thanks to Aleksei Pirogov ([@astynax](https://github.com/astynax)). |
36 | | -[PR #72](https://github.com/pelme/htpy/pull/72). |
| 45 | +- Fixed handling of non-generator iterators such as `itertools.chain()` as children. |
| 46 | + PR #72. |
| 47 | + Thanks to [Aleksei Pirogov (@astynax)](https://github.com/astynax). |
37 | 48 |
|
38 | 49 | ## 24.10.1 - 2024-10-24 |
39 | | -- Fix handling of Python keywords such as `<del>` in html2htpy. [PR #61](https://github.com/pelme/htpy/pull/61). |
| 50 | +- Fix handling of Python keywords such as `<del>` in html2htpy. |
| 51 | + PR #61. |
40 | 52 |
|
41 | 53 | ## 24.10.0 - 2024-10-23 |
42 | | -- Implement `Element.__html__`. This avoids double escaping when passed to |
43 | | -`markupsafe.escape` and Django's `django.utils.html.conditional_escape`. [PR #65](https://github.com/pelme/htpy/pull/65). |
| 54 | +- Implement `Element.__html__`. This avoids double escaping when passed to `markupsafe.escape` and Django's `django.utils.html.conditional_escape`. |
| 55 | + PR #65. |
44 | 56 | - Raise errors directly on invalid children. This avoids cryptic stack traces. |
45 | | -[PR #56](https://github.com/pelme/htpy/pull/56). |
46 | | -- Raise TypeError rather than ValueError when invalid types are passed as |
47 | | -attributes or children. [PR #59](https://github.com/pelme/htpy/pull/59). |
| 57 | + PR #56. |
| 58 | +- Raise TypeError rather than ValueError when invalid types are passed as attributes or children. |
| 59 | + PR #59. |
48 | 60 |
|
49 | 61 | ## 24.9.1 - 2024-09-09 |
50 | | -- Raise errors directly on invalid attributes. This avoids cryptic stack traces |
51 | | - for invalid attributes. [Issue #49](https://github.com/pelme/htpy/issues/49) |
52 | | - [PR #55](https://github.com/pelme/htpy/pull/55). |
| 62 | +- Raise errors directly on invalid attributes. This avoids cryptic stack traces for invalid attributes. |
| 63 | + Fixes #49. PR #55. |
53 | 64 |
|
54 | 65 | ## 24.8.3 - 2024-08-28 |
55 | | -- Support passing htpy elements directly to Starlette responses. Document Starlette support. [PR #50](https://github.com/pelme/htpy/pull/50). |
56 | | -- Allow passing ints to attributes and children [PR #52](https://github.com/pelme/htpy/pull/52). |
| 66 | +- Support passing htpy elements directly to Starlette responses. Document Starlette support. |
| 67 | + PR #50. |
| 68 | +- Allow passing ints to attributes and children. |
| 69 | + PR #52. |
57 | 70 |
|
58 | 71 | ## 24.8.2 - 2024-08-23 |
59 | | -- Added support for passing data between components via Context. See the [Usage |
60 | | -docs](usage.md#passing-data-with-context) for more information. [PR #48](https://github.com/pelme/htpy/pull/48). |
61 | | -- Added Django template backend. The Django template backend allows you to |
62 | | -integrate htpy components directly with Django. [See the docs for more information](django.md#the-htpy-template-backend). [PR #37](https://github.com/pelme/htpy/pull/37). |
| 72 | +- Added support for passing data between components via `Context`. |
| 73 | + See the [Usage docs](usage.md#passing-data-with-context) for more information. |
| 74 | + PR #48. |
| 75 | +- Added Django template backend. The Django template backend allows you to integrate htpy components directly with Django. |
| 76 | + [See the docs for more information](django.md#the-htpy-template-backend). |
| 77 | + PR #37. |
63 | 78 |
|
64 | 79 | ## 24.8.1 - 2024-08-16 |
65 | 80 | - Added the `comment()` function to render HTML comments. |
66 | | - [Documentation](usage.md#html-comments) / [Issue |
67 | | - #42](https://github.com/pelme/htpy/issues/42). |
68 | | - - Run tests on Python 3.13 RC (no changes were required, earlier versions |
69 | | - should work fine too). [PR #45](https://github.com/pelme/htpy/pull/45). |
70 | | - - Attributes that are not strings will now be rejected runtime. Attributes have |
71 | | - been typed as strings previously but this is now also enforced during runtime. |
72 | | - If you need to pass non-strings as attribute values, wrap them in str() calls. |
| 81 | + See the [documentation](usage.md#html-comments). |
| 82 | + Fixes #42. |
| 83 | + - Run tests on Python 3.13 RC. No changes were required, earlier versions should work fine too. |
| 84 | + PR #45. |
| 85 | + - Attributes that are not strings will now be rejected runtime. Attributes have been typed as strings previously but this is now also enforced during runtime. If you need to pass non-strings as attribute values, wrap them in `str()` calls. |
73 | 86 |
|
74 | 87 | ## 24.8.0 - 2024-08-03 |
75 | | -- Allow conditional rendering based on `bool`. [PR #40](https://github.com/pelme/htpy/pull/41). |
| 88 | +- Allow conditional rendering based on `bool`. |
| 89 | + Fixes #40. PR #41. |
76 | 90 |
|
77 | | -For previous versions and changes, please see the [git commit |
| 91 | +For earlier versions and changes, please see the [git commit |
78 | 92 | history](https://github.com/pelme/htpy/commits/main/?since=2023-10-19&until=2024-07-17). |
0 commit comments