Skip to content

v1.3.0

Latest

Choose a tag to compare

@leoetlino leoetlino released this 21 Sep 21:27
· 26 commits to master since this release
5b72cb9

This is mainly a maintenance release, with some improvements to the Python bindings on top of various bug fixes.

Highlights

  • Wheels for Python 3.13 and 3.14. macOS wheels are back, for both x86-64 and arm64.
  • Type stubs are now shipped, so IDEs and type checkers get completion and type checking for oead.
  • Several crashes and memory-safety bugs in the Python bindings are fixed.

Breaking changes

  • Python 3.10 or newer is required. Python 3.6 to 3.9 and PyPy wheels are no longer built. (3.9 has been EOL for about 5 years at this point.)
  • A C++20 compiler is now required to build the library.
  • CMake 3.15 or newer is required.
  • The Python map view classes (KeysView, ValuesView, ItemsView) now live at the top level of oead instead of under whichever of oead.aamp or oead.byml was bound first.
  • Buffer arguments must now be contiguous. Strided buffers were previously accepted and silently misread, and are now rejected. Non-buffer objects are also rejected properly.

Library

Improvements:

  • aamp: added one more name to the BotW hashed names list (id).
  • oead no longer sets global CMake variables when embedded with add_subdirectory. It no longer overrides the consumer's C++ standard or PIC settings, or adds entries to their cache.
  • Worked around an MSVC 19.51 (VS 2026) compiler bug that broke the build, and fixed most compiler warnings.

Bug fixes:

  • sarc: GetFile(index) with index == number of files now throws instead of reading past the last FAT entry.
  • yaz0: DecompressUnsafe now validates the header instead of invoking undefined behaviour on input that is not Yaz0.

Python bindings

Improvements:

  • Type stubs
  • Added arithmetic operators to the number types (U8, S32, F32, …). (#63)
  • Map.get() now behaves like dict.get(). Previously it raised TypeError for str/bool values and for most defaults, and raised KeyError for missing keys. It also returned a deep copy, so mutations were lost.

Bug fixes:

  • Fixed a segfault when calling Sarc.get_file() with an index. More generally, some functions crashed when called with bad arguments instead of raising TypeError.
  • Fixed use-after-free issues with buffers:
    • File.data could dangle once the Sarc was garbage collected.
    • Sarc could read from a bytearray or mmap that had since been resized or closed.
    • Files yielded by get_files() did not keep the archive alive.
  • Fixed copy.copy() and copy.deepcopy() of aamp.Parameter, which always raised TypeError.
  • Every type name in signatures and docstrings is now resolvable:
    • Containers have fully qualified names.
    • collections.abc.Buffer replaces BytesLike.
    • Enum defaults are readable.

Build, dependencies and packaging

  • The Python package now builds with scikit-build-core and setuptools_scm, replacing the custom setup.py and versioneer. pip install provisions CMake itself, and debug builds can now be requested.
  • Data files are no longer installed into sys.prefix.
  • pybind11 is now the upstream v3.1.0 release instead of our unmaintained fork.
  • Updated abseil to 20260817.0, rapidyaml to 0.16.0 and zlib-ng to 2.3.3. The zlib-ng update fixes the macOS arm64 build.
  • PyPI releases are now published via trusted publishing.