v0.3.2: a smol bugfix release
I found a few more annoying bugs that were shaken out from the whole PonyORM transition, as well as a couple of bugs in the new shape functionality. There’s probably a few more of these bugs lurking in the codebase (I mean, in addition to the existing bugs I know about), but here’s what’s changed:
I found a few more annoying bugs that were shaken out from the whole PonyORM transition, as well as a couple of bugs in the new shape functionality. There’s probably a few more of these bugs lurking in the codebase (I mean, in addition to the existing bugs I know about), but here’s what’s changed:
- Image shape bugs:
- Fix some
FileNotFound
handling on images (soshape
errors propagate correctly) - Make
img_class
andclass
work correctly per the documentation
- Fix some
- PonyORM bugs:
- Put pessimistic lock around all get-or-creates, (hopefully fixing) a transitory indexing error
- Fix an error where incomplete category paths weren’t forwarding correctly
That last one is something where there’s probably a few other lurking similar things in the codebase; peewee allows you to check for the existence of any matching record with:
which happens to also be a valid expression in PonyORM (one of the few places where they have API in common), but PonyORM only lets you use get
to retrieve a single value. In PonyORM you instead have to do something a bit different to see if any item matches; for example, this is what Publ does now:
which happens to be somewhat more efficient (although it’s basically a micro-optimization).
I suppose I should simply audit all uses of .get()
since most of them are for single-item lookups but there’s probably a few places where I’m using it as a rough .exists()
equivalent, which was never really great anyway.