Publ: Development Blog

Publ v0.7.15, Authl v0.6.1

Posted (a week ago)

I haven’t been working on this stuff in a while, but there were reasons to make some updates and releases for both Publ and Authl.

Publ changes:

  • Updated dependencies and fixed code standards to the latest pylint and mypy
  • Fixed a bug where if an image file disappears before the async rendition is generated, it was generating a 503 error instead of a 404

Authl changes:

  • Updated packages and fixed code standards to the latest pylint and mypy
  • Removed a couple of Fediverse method hacks which are no longer necessary due to updates in mastodon.py

Some of the dependency changes necessitated updating the minimum Python version; in particular, Publ and Authl now require Python 3.7.2 or greater. But if you’re still running Python 3.6 for some reason you’re used to things being broken or outdated.

Also, due to an impending change in Flask, the Publ API is going to have to change somewhat; the short version is that app.secret_key will no longer be the means of configuring authentication. Most likely the config will change to get a secret_key key within the auth section instead. This actually makes the configuration a lot easier to deal with anyway, and I was never happy about this inconsistency. (In fact, I’m pretty sure that’s how it used to be configured until I changed it to be more Flask-like in the first place!)

It’s also possible that publ.Publ will revert to being a function that constructs a Flask application object, rather than being a subclass of Flask, but I haven’t yet investigated what the implications of this change would be. I believe there are a few places in the Publ codebase which rely directly on the subclass relationship (which would be difficult to change, such as the way that the Authl instance is associated with the application), and prior to that there’s a reason I switched it from a factory to a subclass in the first place, although I can’t quite remember what it was (it was probably either something to do with the ORM’s startup behavior or something to do with Authl’s lifetime). Either way, it’ll take significant investigation, and this will be necessary before Flask 2.3 is released. (In retrospect I meant to pin Publ’s Flask requirement to <2.3.0 before I did this release, but I forgot. Oops.)