I think the problem is that after_delete is only used for instances
which have actually been loaded from the DB. Query.delete() doesn't
load the matching rows from the DB, so the event doesn't fire.
There is also a (session, rather than mapper) event called
"after_bulk_delete" which you might be able to use:
http://docs.sqlalchemy.org/en/rel_0_9/orm/events.html#sqlalchemy.orm.events.SessionEvents.after_bulk_delete
You'd probably have to examine the delete_context.query object to see
which class is being deleted, and figuring out exactly which rows have
been deleted might also be a problem (since the filter conditions
passed to the query could be arbitrarily complicated).
Simon