Releases: volfpeter/htmy
v0.11.0 - AnyIO & Trio
What's Changed
- Upgrade tooling and CI by @volfpeter in #106
- Use anyio and support trio by @davidbrochart in #107
Breaking Changes
- Python 3.10 support was dropped as part of the AnyIO migration
- Renderers can now raise exception groups
Full Changelog: v0.10.3...v0.11.0
v0.10.3
v0.10.2
What's Changed
- Add
is_component_type()andis_htmy_component_type()utilities by @volfpeter in #104
Full Changelog: v0.10.1...v0.10.2
v0.10.1
What's Changed
- Fix: `StreamingRendererType.stream() should be sync by @volfpeter in #99
Full Changelog: v0.10.0...v0.10.1
v0.10.0 - HTML streaming and performance boost
What's Changed
The main feature is that the library now has a StreamingRenderer that lets you optimize TTFB (time to first byte), basically producing instant responses.
Tags (and the entire html module) have been rewritten to improve performance. Tag creation is now ~35% faster.
Rewritten how ErrorBoundary works, which simplified renderers and improved performance by about ~5-10.
Streaming support will soon land in FastHX and holm as well, to give you the best possible web development experience.
Features
- Introduce the streaming renderer concept. The default streaming renderer can be imported as
from htmy import StreamingRenderer. (by @volfpeter in #94) - The baseline renderer can now stream the result, reducing time to first byte to around 0.00001s (several orders of magnitude improvement for a typical webpage). As a side-effect, this renderer's performance is now only about 20-25% worse then the default renderer's. (by @volfpeter in #94)
- The renderer instance can now be loaded from the rendering context using the
RendererContextutility. (by @volfpeter in #94) - Simplified renderers by moving the
ErrorBoundaryrendering logic into the component itself. Also slightly improved renderer performance in the process. (by @volfpeter in #94) - Rewritten how tags work to improve tag creation performance by ~35%. (by @volfpeter in #94)
Breaking changes
These are likely to affect you:
htmltags can no longer be used for type hints. You should useComponentTypeinstead.htmltags no longer have class utilities likelink.css()ormeta.charset()for example. The title-case variants have these utility constructors instead, e.g.Link.css()orMeta.charset().WildcardTagis replace bywildcard_tag.
These likely won't affect you:
- Tag implementations have been moved to
tag.py. - Creating tags can no longer be done with subclassing (well, it can, just quite differently to how it was done before).
TagConfigDictwas removed, configuration is now done directly through theTag()constructor.
Other changes
- Moved the project from
poetrytouv. - Updated dev dependencies.
- Fixed a number of deprecation warnings (most caused by using
asyncioandAwaitableinstead of the correspondinginspectfunctions). - Added tests for new features.
- Migrated from
mkdocs-materialtozensical
Full Changelog: v0.9.0...v0.10.0
v0.9.0
What's Changed
Features:
- Allow
NoneinComponentTypeby @volfpeter in #92
Documentation:
- Documentation: add notes about XSS prevention when using the
MDcomponent by @volfpeter in #84 - Add some notes on AI assistance, compability with other templating frameworks, and performance by @volfpeter in #85
- Update framework integrations section in the documentation by @volfpeter in #87
- Add more notes on XSS prevention by @volfpeter in #90
Full Changelog: v0.8.2...v0.9.0
v0.8.2
What's Changed
- Simplify and streamline poe task names by @volfpeter in #79
- Add missing
<kbd>HTML element by @volfpeter in #81
Full Changelog: v0.8.1...v0.8.2
v0.8.1
v0.8.0
What's Changed
- Add minimal pyright config to get language features working in recent Zed versions by @volfpeter in #70
- Use
lxml.etreeif available instead ofxml.etreeby @volfpeter in #74 - Add
lxmlas optional dependency by @volfpeter in #74 - Upgrade dev dependencies by @volfpeter in #74
Full Changelog: v0.7.4...v0.8.0
v0.7.4
What's Changed
- Change baseclass of
html.iframetoTagby @davidangarita1 in #65
New Contributors
- @davidangarita1 made their first contribution in #65
Full Changelog: v0.7.3...v0.7.4