diff --git a/requirements.txt b/requirements.txt --- a/requirements.txt +++ b/requirements.txt @@ -6,6 +6,5 @@ xmltodict iso8601 beautifulsoup4 -pytz launchpadlib tenacity diff --git a/swh/lister/gnu/tree.py b/swh/lister/gnu/tree.py --- a/swh/lister/gnu/tree.py +++ b/swh/lister/gnu/tree.py @@ -1,9 +1,9 @@ -# Copyright (C) 2019 The Software Heritage developers +# Copyright (C) 2019-2021 The Software Heritage developers # See the AUTHORS file at the top-level directory of this distribution # License: GNU General Public License version 3, or any later version # See top-level LICENSE file for more information -from datetime import datetime +from datetime import datetime, timezone import gzip import json import logging @@ -13,7 +13,6 @@ from typing import Any, List, Mapping, Sequence, Tuple from urllib.parse import urlparse -from pytz import utc import requests logger = logging.getLogger(__name__) @@ -334,4 +333,4 @@ """Format a string timestamp to an isoformat string """ - return datetime.fromtimestamp(int(timestamp), tz=utc).isoformat() + return datetime.fromtimestamp(int(timestamp), tz=timezone.utc).isoformat()