Bigxml

Latest version: v1.0.1

Safety actively analyzes 630130 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 3

0.6.1

v0.6.1 is a minor release.

:house: Internal

- 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 `dataclasses` dependency (Python 3.6 only)

0.6.0

:boom: Breaking changes

- Classes as handlers without a `xml_handler` method now yield the instance instead of
items yielded by sub-handlers

:bug: Fixes

- 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__`

:memo: Documentation

- Add detailed documentation, available online at <https://bigxml.rogdham.net/>

:house: Internal

- Test against some XML attacks
- Tests are now run in Python Development Mode
- Update `defusedxml` dependency

0.5.0

v0.5.0 allows more stream types to be parsed.

:boom: Breaking changes

- `Parser` can not longer be instantiated with a file-like object opened in text mode,
nor with a filename
- Removed `stream` attribute from `Parser` instances

:rocket: Added

- `Parser` can 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. `bytes` or `bytearray` instances)
- Iterable of previous types (recursively)

0.4.0

v0.4.0 is a major refactor in handler types.

:boom: Breaking changes

- `XMLHandler` has been removed: class handlers don't need to inherit from it anymore
- `return_from` now returns the last yielded item instead of the handler
- `HandleMgr` no longer has the confusing `set_handle` method

:rocket: Added

- Several handlers can now be passed to `return_from` / `iter_from`
- More handler variety:
- Regular functions
- `str`/`tuple`/`list` are 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, a `xml_handler` method can be
defined to customize the way yielded items are handled
- It is now possible to use directly `xml_handle_text` in place of `xml_handle_text()`
- Python 3.9 support

0.3.0

v0.3.0 improves namespace support.

:boom: Breaking changes

- `XMLElement`'s `namespace` attribute is now an empty string instead of `None` when the
node has no namespace

:rocket: Added

- Better namespace support in `XMLElement`'s attributes
- Namespace support in `xml_handle_*`
- More readable `__str__` values for `XMLElement` and `XMLText`

:bug: Fixes

- Fix `xml_handle_*` when wrapping `staticmethod` (other way around was already working
properly)

0.2.0

Parser` and `XMLElement` instances.

:boom: Breaking changes

- `XMLElement`'s `handle` method is renamed to `iter_from`
- The `parse` function has been removed in favour of the new `Parser` class; use
`Parser(stream).iter_from(handler)` instead of `parse(stream, handler)`

:rocket: Added

- `XMLElement` now has a `text` property to walk through all children and gather texts
regardless of the tags
- `XMLElement` new `return_from` method can be used when there are no items yielded by
the handler
- PyPy support

:bug: Fixes

- 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 use`
exception in other cases

:memo: Documentation

- Add changelog file

Page 2 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.