The api.py file is quite big and difficult to follow, and I'm convinced that's behind the issues with abstracting everything properly, so let's not do that!
This patch breaks api.py into a bunch of smaller files, which makes this code easier to follow. I can also better articulate the difference between the different abstractions. As part of this, I'm getting rid of any distinction between extras – all callers now get everything. It's a bit less efficient, but it's probably fine for now, and I can revisit it if it actually becomes a problem – premature optimisation, etc.
The
api.py
file is quite big and difficult to follow, and I'm convinced that's behind the issues with abstracting everything properly, so let's not do that!This patch breaks
api.py
into a bunch of smaller files, which makes this code easier to follow. I can also better articulate the difference between the different abstractions. As part of this, I'm getting rid of any distinction betweenextras
– all callers now get everything. It's a bit less efficient, but it's probably fine for now, and I can revisit it if it actually becomes a problem – premature optimisation, etc.