diff --git a/requirements-swh.txt b/requirements-swh.txt --- a/requirements-swh.txt +++ b/requirements-swh.txt @@ -1,4 +1,4 @@ -swh.core[db,http] >= 2 +swh.core[db,http] >= 2.9 swh.counters >= v0.8.0 swh.model >= 6.0.0 swh.objstorage >= 0.2.2 diff --git a/swh/storage/postgresql/db.py b/swh/storage/postgresql/db.py --- a/swh/storage/postgresql/db.py +++ b/swh/storage/postgresql/db.py @@ -27,8 +27,6 @@ class Db(BaseDb): """Proxy to the SWH DB, with wrappers around stored procedures""" - current_version = 182 - def mktemp_dir_entry(self, entry_type, cur=None): self._cursor(cur).execute( "SELECT swh_mktemp_dir_entry(%s)", (("directory_entry_%s" % entry_type),) diff --git a/swh/storage/postgresql/storage.py b/swh/storage/postgresql/storage.py --- a/swh/storage/postgresql/storage.py +++ b/swh/storage/postgresql/storage.py @@ -103,6 +103,8 @@ class Storage: """SWH storage proxy, encompassing DB and object storage""" + current_version: int = 182 + def __init__( self, db, @@ -205,11 +207,6 @@ cur.execute("select has_table_privilege(current_user, 'content', %s)", (check,)) return cur.fetchone()[0] - @db_transaction() - def get_current_version(self, *, db: Db, cur=None): - """Returns the current code (expected) version""" - return db.current_version - def _content_unique_key(self, hash, db): """Given a hash (tuple or dict), return a unique key from the aggregation of keys.