Skip to content

Releases: OoriData/Amara

4.1.0: More whisking at cobwebs with the goodly besom

Choose a tag to compare

@uogbuji uogbuji released this 01 Jul 16:40
44a3144

Added

  • Files: LICENSE & CONTRIBUTING.md
  • amara.uxml.isxml: pure-Python XML byte-string detection heuristic (XML 1.0 Appendix F encoding autodetection), reviving the long-dead cxmlstring symbol. from amara.uxml import isxml now resolves; the compiled C accelerator remains an optional shadow when built
  • amara.uxml.looks_like_xml(src): opt-in content classifier (accepts bytes, str, or an input source; samples and rewinds seekable streams) — the XML-aware layer built on isxml, kept separate from input-source acceptability
  • amara.iri.inputsource named factories .data(), .filename(), .uri(), .stream() (joining the existing .text()), so callers declare source kind explicitly instead of relying on heuristic guessing
  • inputsource(..., detect=True) (and factory(..., detect=True)): opt-in guessing of a string source's kind — existing file path → open, URI syntax → fetch, else literal content. Off by default; uses only I/O-layer signals (no content sniffing)

Changed

  • Separated two conflated concerns: input-source acceptability (any string is valid literal content — an I/O question owned by amara.iri.inputsource) from content classification (does it look like XML — owned by amara.uxml). The generic iri layer no longer needs the XML-specific uxml layer; looks_like_xml points the dependency the correct way (uxml → iri)
  • Corrected stale amara.lib.inputsource references in uxml docstrings to amara.iri.inputsource
  • Packaging: added [tool.pytest.ini_options] (scopes the default run to test/, registers the integration marker); aligned Python target versions to 3.12; corrected the mypy path

Fixed

  • iriref.__new__ now raises ValueError (not NameError) on invalid IRIs; gettext _ alias wired up properly in iri and irihelper
  • iri.iri_to_uri: non-ASCII percent-encoding no longer raises TypeError (ord() on an already-int byte)
  • iri.os_path_to_uri / uri_to_os_path: import pathname2url/url2pathname from urllib.request (Py3) instead of the removed urllib location
  • inputsource: urlopen now receives the IRI string (was passing the iri module); byte inputs wrap in BytesIO instead of failing in StringIO
  • iridict.has_key: no longer calls the removed dict.has_key
  • asynctools.progress_indicator: use asyncio.all_tasks (was the removed Task.all_tasks)
  • uxml.treeiter: per-pattern event stacks are now independent lists (was aliasing one shared list)
  • uxml.xml.ns_expat_callbacks: fixed TypeError from passing an unknown asyncio_based_handler kwarg to the parent
  • uxpath: fixed ancestor-or-self infinite loop, = node-comparison operand bug, and string-length() (ctx.nodectx.item)

4.0.2: …[Some of these issues are like me—] I've been here for years! Latest

Choose a tag to compare

@uogbuji uogbuji released this 14 Nov 03:19
7876f3a

Added

  • IRI Part Attributes: Direct attribute access to IRI components (scheme, authority, path, query, fragment, userinfo, host, port), with caching

Fixed

  • Fixed regression cases
  • Improved error handling

Changed

  • API cleanup and simplification
  • Enhanced README documentation
  • Build system and linting improvements
  • Removed deprecated utility modules

4.0.1: Don't recall it a comeback…

Choose a tag to compare

@uogbuji uogbuji released this 12 Nov 00:00
135e9cd

Headline is still: Re-consolidating Amara after the various contortions over the years.

But now with a bunch of code cleanup.

4.0.0: Don't call it a comeback…

Choose a tag to compare

@uogbuji uogbuji released this 11 Nov 18:04
118c1f4

Re-consolidating Amara after the various contortions over the years.