Repository navigation
Home
Welcome to the Uproot-custom wiki!
Uproot-custom is an extension of Uproot for TTree branches whose classes Uproot cannot read: an overridden Streamer, memberwise storage, or types outside its built-in set. A downstream project writes a reader for the classes its collaboration stores and registers it; the rest of the read stays Uproot's.
- Documentation: https://mrzimu.github.io/uproot-custom/
- Example downstream project: https://github.com/mrzimu/uproot-custom-example
Warning
The 2.x series is a development series, not a stable release: earlier version management made some releases incompatible at the same major number. Pin a minor version when you depend on Uproot-custom, for example uproot-custom==2.6.*, and read the release notes before moving to the next minor.
| Version | Status | Theme |
|---|---|---|
2.6 |
current | Detree becomes the default route |
2.7 |
planned | the C++ kernel leaves the default install |
Detree runs a reader written as Python source: Uproot-custom compiles it to a module for the detree-vm machine, which executes it for every basket. One implementation, no compiler, no ABI to pin.
The 2.6 work closes the remaining gap to the C++ kernel, so a downstream project can ship a Detree reader alone:
- built-in factories and readers cover the classes that previously required a C++ reader;
-
detreebecomes the default backend, so a project no longer has to select one to use it; - the
pythonbackend stays the reference implementation of the byte layout and the executor for debugging a reader; -
cppstays for a read path outside the compilable subset, or a branch that needs the last measure of speed, and is selected explicitly from then on.
Today pip install uproot-custom builds a pybind11 extension from the C++ kernel in kernel/. Only the Python + C++ route needs it, yet every user pays for it: a C++17 toolchain at install time and a wheel per platform and per Python version.
In 2.7 the kernel moves into a separate small package, released on its own under a name still to be decided, and the default Uproot-custom wheel becomes pure Python.
- Default install: no compiler, no build step, no extension module: what the Detree route already needs and nothing more.
-
C++ route:
pip install "uproot-custom[cpp]"pulls the kernel package, with pybind11 and the headers. -
C++ readers: a downstream C++ reader depends on the kernel package rather than on the Uproot-custom version; the
IReaderinterface and its compatibility rule do not change. -
Failure mode: selecting
cppwithout the kernel installed fails with a message that names the missing package;detreeandpythonare unaffected.
This is a breaking change for a project that relies on the cpp backend being importable after a plain install. The migration is one line in its dependency list.
2.5 is where the Python + C++ backend API settled: IReader, plus build_python_reader and build_cpp_reader on a factory. 2.7 changes where the kernel is packaged, not what it exposes, so that API stays.