Changes¶
Every time I thought I’d got it made
It seemed the taste was not so sweet
The listed updates resemble rather a Best Of than a full record of changes. Intentionally.
0.5 (2025-01-01)¶
This iteration took quiet long to complete as it presumably solved the hardest
problem on the way to shed off the essential dependency on lxml, also
resulting in human-friendly serializations that achieve unprecedented clarity.
The library’s robustness is now proven with integration tests that are verified
against eleven diverse TEI encoded corpora that sum up to more than 360k
documents with a total volume of 3.33 GB.
News¶
delb is now autonomously serializing contents, the Serialization chapter details current capabilities and interfaces.
The HTML documentation received a big revision for pleasant discovery and reading.
Methods that add nodes to a tree now return the added concrete nodes.
The new
delb.compare_trees()is available to compare nested contents.⚠️ To align with Python standard behaviour, accessing a non-existing attribute with subscript notation now raises a
KeyError.⚠️ The use of namespace declarations (to prefixes) that were used in a parsed source stream is deprecated. Notably queries will not use them as fallback when invoked without the
namespacesargument. Instead they will likely use the called-on node’s namespace as default namespace.⚠️
delb.ParserOptions.collapse_whitespacewas renamed todelb.ParserOptions.reduce_whitespace, as there is nowdelb.Document.reduce_whitespace()to reflect that they also trim excessive whitespace.⚠️ The Xpath evaluation expressions of absolute paths on the child axis in the first location step is fixed. Consider to double check your usages.
Comparing
TagNodeinstances is now de facto an identity check. The previous behaviour can be achieved by comparingTagNode.universal_nameandTagNode.attributes.⚠️
delb.Document.head_nodeswas renamed todelb.Document.prologue,delb.Document.tail_nodestodelb.Document.epilogue.⚠️
delb.get_traverser()now only accepts keyword arguments.⚠️ Support for Python 3.7 was removed.
Support for Python 3.12 and 3.13 was added.
⚠️ The
_delb.plugins.core_loaders.etree_loader()is marked as deprecated.
Previously deprecated contents have been removed.
0.4 (2022-11-02)¶
News¶
delb now uses its own XPath implementation, please investigate
_delb.xpathfor details.⚠️ Many of the nodes’ methods that relate to relative nodes have been renamed. Watch out for
DeprecationWarnings!⚠️ The method
delb.NodeBase.iterate_descendants()is added as a replacement for the formerdelb.NodeBase.child_nodes()invoked with the now deprecated argumentrecurse.⚠️ The
https-loaderextension is now required for loading documents via plain and secured HTTP connections.Under the hood httpx is now employed as HTTP/S client.
⚠️ The contributed loader for FTP connections is marked as deprecated.
⚠️ The
parserargument todelb.Documentanddelb.TagNode.parse()is deprecated and replaced byparser_options.⚠️
delb.Document.xslt()is marked as deprecated.⚠️ Evoked exceptions changed in various places.
⚠️ Document mixin extensions are now facilitated by subclassing
_delb.plugins.DocumentMixinBase. It replaces_delb.plugins.DocumentExtensionHooksand_delb.plugins.PluginManager.register_document_mixin()without a backward-compatible mechanic.Support for the very good Python 3.10 and the even better 3.11 is added.
The code repository is now part of an umbrella namespace for related projects: https://github.com/delb-xml/
A
CITATION.cffis available in the repository and shipped with source distributions for researchers that are citing their employed software.
0.3 (2022-01-31)¶
News¶
- Adds the
delb.TagNode.fetch_or_create_by_xpath()method. ⚠️Because of that a pre-mature parser of XPath expressions has been implemented and you can expect some expressions to cause failures, e.g. with functions that take more than one argument.
- Adds the
Subclasses of
delb.Documentcan claim to be the default class based on the evaluation of a document’s content and configuration by implementing__class_test__.⚠️
_delb.plugins.PluginManager._register_document_extension()is renamed to_delb.plugins.PluginManager._register_document_mixin().⚠️
_delb.plugins.DocumentExtensionHooks()is renamed to_delb.plugins.DocumentMixinHooks().⚠️
_delb.plugins.DocumentMixinHooks._init_config()is now aclassmethod()and now also takes the config namespace as first argument.Adds
delb.Document.collapse_whitespace()and the initialization option fordelb.Documentinstances with the same name.Adds the
retain_child_nodesargument todelb.NodeBase.detach().Adds the
delb.NodeBase.last_descendantproperty.Adds the
delb.TagNode.idproperty.Adds the
delb.TagNode.parse()method.⚠️
TagNode.qualified_name()is marked deprecated and the same property is now available asTagNode.universal_name().Adds support for Python 3.9 & 3.10.
⚠️ Drops support for Python 3.6
Uses GitHub actions for CI checks.
Fixes¶
Detached
delb.TagNodes now drop references todelb.TextNodesiblings.Ensures that
delb.TagNode.location_pathalways consists of indexed steps (/*[i]) only.Avoids hitting the interpreter’s recursion limit when iterating in stream dimension.
0.2 (2020-07-26)¶
News¶
Adds a logo. Gracious thanks to sm!
Adds plugin mechanics. Graciae ad infinitum, TC!
CSS and XPath query results are wrapped in
delb.QueryResults.Adds
delb.Document.head_nodesanddelb.Document.tail_nodesthat allow access to the siblings of a root node.Adds the
delb.Document.source_urlproperty.Adds
delb.get_traverser()and two traverser implementations that yield nodes related to a root node according to their defined order.Document loaders report back the reason why they would or could not load a document from the given object.
Various documentation improvements, including table of contents for class members.
0.1.2 (2019-09-14)¶
There’s nothing super-exciting to report here. It’s just getting better.
0.1.1 (2019-08-15)¶
This was quiet boring, it serves updated dependencies for what it’s worth.
0.1 (2019-05-26)¶
The initial release with a set and sound data model and API.