AI Briefing
KO

Resource cleanup patch

·2026.04.17 13:01

Key point

Fixes a compatibility issue introduced in 1.0a27 and strengthens shutdown cleanup functionality.

Details

Datasette 1.0a28 is a fix release that corrects unintended breakage introduced in the previous alpha version, 1.0a27. Centered on issues discovered while upgrading Datasette Cloud to 1.0a27, callback compatibility and resource shutdown handling have been fixed.

In particular, a compatibility bug in the execute_write_fn() callback that caused an error when the parameter name wasn't conn has been fixed. Also, database.close() was changed to close the write connection for that database as well, and a new datasette.close() method was added to clean up all databases and resources. This method is automatically called on server shutdown.

The testing environment has also been improved. Datasette now includes a pytest plugin, which automatically calls datasette.close() for function-scoped fixtures or temporary instances created during tests. This helps prevent file descriptor exhaustion in plugin tests written in the style used before 1.0a27, prior to the introduction of the Database(is_temp_disk=True) feature.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.