All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
For the purpose of determining breaking changes:
- Only direct imports from top-level module
bigxmlare considered public API - A change that only impacts type hints validation is not considered a breaking change
- Removing support for a version of Python that is not officially supported anymore is not considered a breaking change
1.2.0 - 2025-11-06
This release updates license information in package metadata, and brings official support for Python 3.14.
- Update license metadata as per PEP 639
- End of Python 3.9 support
- Add tests for CPython 3.14 and PyPy 3.11
- Use CPython 3.14 for misc. tests
- Upgrade dev dependencies
1.1.0 - 2024-10-10
This release adds support for the buffer protocol. It was working already in previous versions, but now it's official.
- Add support for buffer protocol (PEP 688)
- End of Python 3.8 support
- Add tests for CPython 3.13
- Use CPython 3.13 for misc. tests
- Upgrade dev dependencies
1.0.1 - 2024-04-27
This is a maintenance release. Internal tooling is being upgraded, featuring support for pytest version 8 and formatting of the codebase with ruff.
- Change code formatter from black to ruff
- Fix doctests not being run with other tests
- Fix coverage report under some versions of PyPy
- Upgrade dev dependencies
- Remove pylint, assuming its benefits are provided by the ruff+mypy combo
- Use trusted publishing for PyPi releases
1.0.0 - 2023-10-21
Let's celebrate version 1! π We know that bigxml has already been used in
production for years, but now it's official.
- Improve documentation about usage with
requests
- Export
StreamableandXMLElementAttributesto ease type hints - Be explicit about what is part of the public API
- End of Python 3.7 support
- Necessary code changes following dev dependency update: mypy, ruff
- Use
pyproject.tomland modern build system - Improve tox & CI pipelines
- Add tests for PyPy 3.10
- Add tests for CPython 3.12
- Use CPython 3.12 for misc. tests
- Freeze dev dependencies
0.10.0 - 2023-04-22
- Renamed the base class for exceptions to
BigXmlErrorin conformance with PEP8
- Add documentation to explain how to import the library
- Warnings due to wrong usage are now using
UserWarninginstead ofRuntimeWarning - Undocumented parameter
insecurely_allow_entitiestoParser
- Necessary code changes following dev dependency update: mypy
- Use ruff for linting (and remove isort)
0.9.0 - 2022-11-06
v0.9.0 introduces custom exceptions.
- All exceptions raised due to invalid stream content are now instances of
BigXmlExceptioninstead ofxml.etree.ElementTree.ParseErrorordefusedxml.DefusedXmlException.
- Add a workaround against pylint
not-an-iterablefalse-positive oniter_from
- Necessary code changes following dev dependency update: mypy, pylint, pytest
- Add tests for CPython 3.11
- Use CPython 3.11 for misc. tests
- Update Github actions dependencies
0.8.0 - 2022-08-28
v0.8.0 brings type hints!
- Fix an edge case when a class decorated with
xml_handle_texthas an attribute decorated withxml_handle_element
- Type hints
- New export:
HandlerTypeHelperthat can help with type hints in some cases - Sanity check on
xml_handlermethod of class handlers for returned values (Noneor an iterable)
- End of Python 3.6 support
- Add tests for PyPy 3.9
- Refactor handler creator code
- Type validation with mypy
- Distribute
py.typedfile in conformance with PEP 561 - Update
typing-extensionsdependency
0.7.0 - 2022-01-15
v0.7.0 improves dependencies requirements.
- Don't use upper bound constraints on dependencies
- Specify the Python versions required in package metadata
- Improving memory consumption tests by using
tracemallocinstead ofresource
0.6.1 - 2022-01-01
v0.6.1 is a minor release.
- Don't deploy src dir for docs
- Fix minor issues found by automated tools
- Add tests for CPython 3.10 and PyPy 3.8
- Use CPython 3.10 for misc. tests
- Clarify which Python versions are supported in docs
- Update
dataclassesdependency (Python 3.6 only)
0.6.0 - 2021-03-21
v0.6.0 adds documentation!
- Classes as handlers without a
xml_handlermethod now yield the instance instead of items yielded by sub-handlers
- An exception was raised when using a class handlers without any sub-handler attributes
- Fix an error in some Python version for class handlers extending some builtins without
redefining
__init__
- Add detailed documentation, available online at https://bigxml.rogdham.net/
- Test against some XML attacks
- Tests are now run in Python Development Mode
- Update
defusedxmldependency
0.5.0 - 2021-03-01
v0.5.0 allows more stream types to be parsed.
Parsercan not longer be instantiated with a file-like object opened in text mode, nor with a filename- Removed
streamattribute fromParserinstances
Parsercan now be instantiated with several streams as arguments: in that case the streams are concatenated: after the end of a stream, data is taken from the next one- More variety in stream types passed as argument of
Parser:- File-like objects opened in binary mode (was already supported before)
- Bytes-like objects (e.g.
bytesorbytearrayinstances) - Iterable of previous types (recursively)
0.4.0 - 2021-02-14
v0.4.0 is a major refactor in handler types.
XMLHandlerhas been removed: class handlers don't need to inherit from it anymorereturn_fromnow returns the last yielded item instead of the handlerHandleMgrno longer has the confusingset_handlemethod
- Several handlers can now be passed to
return_from/iter_from - More handler variety:
- Regular functions
str/tuple/listare syntactic sugar for a handler marked with that value, which simply yields the node- Classes are instantiated on the fly (if
__init__has one mandatory parameter, the node is passed during instantiation); in that case, axml_handlermethod can be defined to customize the way yielded items are handled
- It is now possible to use directly
@xml_handle_textin place of@xml_handle_text() - Python 3.9 support
0.3.0 - 2020-09-27
v0.3.0 improves namespace support.
XMLElement'snamespaceattribute is now an empty string instead ofNonewhen the node has no namespace
- Better namespace support in
XMLElement's attributes - Namespace support in
xml_handle_* - More readable
__str__values forXMLElementandXMLText
- Fix
xml_handle_*when wrappingstaticmethod(other way around was already working properly)
0.2.0 - 2020-09-06
v0.2.0 changes the API to makes iter_from and return_from methods available on both
Parser and XMLElement instances.
XMLElement'shandlemethod is renamed toiter_from- The
parsefunction has been removed in favour of the newParserclass; useParser(stream).iter_from(handler)instead ofparse(stream, handler)
XMLElementnow has atextproperty to walk through all children and gather texts regardless of the tagsXMLElementnewreturn_frommethod can be used when there are no items yielded by the handler- PyPy support
- An exception is now raised when a node is accessed out of order; this avoids
inconsistent behaviors in some cases, and replaces the obscure
No handle to useexception in other cases
- Add changelog file
0.1.0 - 2020-08-23
- Initial public release π