diff --git a/requirements-swh.txt b/requirements-swh.txt --- a/requirements-swh.txt +++ b/requirements-swh.txt @@ -1,3 +1,3 @@ swh.core >= 0.10.0 -swh.model >= 0.7.0 +swh.model >= 0.13.0 swh.web.client >= 0.2.4 diff --git a/swh/fuse/cache.py b/swh/fuse/cache.py --- a/swh/fuse/cache.py +++ b/swh/fuse/cache.py @@ -23,7 +23,9 @@ from swh.fuse.fs.entry import FuseDirEntry, FuseEntry from swh.fuse.fs.mountpoint import CacheDir, OriginDir from swh.model.exceptions import ValidationError -from swh.model.identifiers import REVISION, SWHID, parse_swhid +from swh.model.identifiers import CoreSWHID as SWHID +from swh.model.identifiers import REVISION +from swh.model.identifiers import parse_swhid from swh.web.client.client import ORIGIN_VISIT, typify_json diff --git a/swh/fuse/fs/artifact.py b/swh/fuse/fs/artifact.py --- a/swh/fuse/fs/artifact.py +++ b/swh/fuse/fs/artifact.py @@ -20,7 +20,8 @@ FuseSymlinkEntry, ) from swh.model.from_disk import DentryPerms -from swh.model.identifiers import CONTENT, DIRECTORY, RELEASE, REVISION, SNAPSHOT, SWHID +from swh.model.identifiers import CONTENT, DIRECTORY, RELEASE, REVISION, SNAPSHOT +from swh.model.identifiers import CoreSWHID as SWHID SWHID_REGEXP = r"swh:1:(cnt|dir|rel|rev|snp):[0-9a-f]{40}" diff --git a/swh/fuse/fs/mountpoint.py b/swh/fuse/fs/mountpoint.py --- a/swh/fuse/fs/mountpoint.py +++ b/swh/fuse/fs/mountpoint.py @@ -18,7 +18,9 @@ FuseSymlinkEntry, ) from swh.model.exceptions import ValidationError -from swh.model.identifiers import CONTENT, SWHID, parse_swhid +from swh.model.identifiers import CONTENT +from swh.model.identifiers import CoreSWHID as SWHID +from swh.model.identifiers import parse_swhid JSON_SUFFIX = ".json" diff --git a/swh/fuse/fuse.py b/swh/fuse/fuse.py --- a/swh/fuse/fuse.py +++ b/swh/fuse/fuse.py @@ -21,7 +21,8 @@ from swh.fuse.cache import FuseCache from swh.fuse.fs.entry import FuseDirEntry, FuseEntry, FuseFileEntry, FuseSymlinkEntry from swh.fuse.fs.mountpoint import Root -from swh.model.identifiers import CONTENT, REVISION, SWHID +from swh.model.identifiers import CONTENT, REVISION +from swh.model.identifiers import CoreSWHID as SWHID from swh.web.client.client import WebAPIClient diff --git a/swh/fuse/tests/api_url.py b/swh/fuse/tests/api_url.py --- a/swh/fuse/tests/api_url.py +++ b/swh/fuse/tests/api_url.py @@ -6,15 +6,9 @@ from enum import Enum from typing import Union -from swh.model.identifiers import ( - CONTENT, - DIRECTORY, - RELEASE, - REVISION, - SNAPSHOT, - SWHID, - parse_swhid, -) +from swh.model.identifiers import CONTENT, DIRECTORY, RELEASE, REVISION, SNAPSHOT +from swh.model.identifiers import CoreSWHID as SWHID +from swh.model.identifiers import parse_swhid GRAPH_API_REQUEST = Enum("GRAPH_API_REQUEST", "HISTORY") diff --git a/swh/fuse/tests/data/gen-api-data.py b/swh/fuse/tests/data/gen-api-data.py --- a/swh/fuse/tests/data/gen-api-data.py +++ b/swh/fuse/tests/data/gen-api-data.py @@ -23,15 +23,9 @@ ORIGIN_URL, REV_SMALL_HISTORY, ) -from swh.model.identifiers import ( - CONTENT, - DIRECTORY, - RELEASE, - REVISION, - SNAPSHOT, - SWHID, - parse_swhid, -) +from swh.model.identifiers import CONTENT, DIRECTORY, RELEASE, REVISION, SNAPSHOT +from swh.model.identifiers import CoreSWHID as SWHID +from swh.model.identifiers import parse_swhid API_URL_real = "https://archive.softwareheritage.org/api/1" API_URL_test = "https://invalid-test-only.archive.softwareheritage.org/api/1"