Skip to content

4.1.0

Choose a tag to compare

@CorneiZeR CorneiZeR released this 05 Sep 22:27
· 146 commits to master since this release
faf31c2

Eight additions, none of which change what 4.0 already does: every setting keeps its meaning and its default, the wire format is unchanged, and the bot container and the web tier may be deployed in either order. One required step — run migrate: this release adds two tables.

  • A send can name a time instead of going now. eta on every form that queues, in a table because no transport can hold a message for a week.
  • A failed send can be replayed from the row that recorded it. manage.py tgbot_replay rebuilds the call from the event log, and two runs at once cannot recover one message twice — each failure is claimed against a unique constraint before its message is queued.
  • A send can be checked before it is made, by aiogram rather than by us. bot.send(SendMessage(chat_id=42, text='hello')): a misspelled method is impossible and a wrong argument is a type error at the call site. This package declares none of those signatures on purpose.
  • A caller can find out which message its send produced. bot.outcome() reads the ending back from the feed.
  • A send inside transaction.atomic() can now wait for the commit, so a rolled-back transaction sends nothing.
  • Testing helpers, so a project's suite stops reading this package's wire format: an in-memory broker, capture_sends, and a pytest fixture.
  • A Prometheus exporter, so the metrics seam has a consumer.
  • A value the log could not keep whole says so — detail carries markers instead of quietly shortened data, which is what makes a replay from a recorded row trustworthy.

Full entry, with what each one costs: CHANGELOG.md. Upgrading from 4.0: Upgrading.