Page MenuHomeSoftware Heritage

Deprecate swh.core's postgresql_fact
Closed, ResolvedPublic


This factory function is not really needed any more. It was mostly used to speed postgresql-based tests (using custom setup/teardown methods doing table truncation instead of full db drop and recreate).

Recent(ish) versions of pytest_postgresql do provide a db creation process speedup using a preconfigured and setup template db to create the database used in each test.

With the work done in f8a07dfa0bf6 (an following revisions), we do not need this custom setup/teardown any more, so it should be deprecated and its usage adapted to stock pytest_postgresql factory function in every dependency still using it.

Event Timeline

douardda triaged this task as Normal priority.May 31 2022, 4:22 PM
douardda created this task.

Actually, with a bit more work, it's the entire db/ module that can be deprecated.

douardda claimed this task.