diff --git a/requirements.txt b/requirements.txt index bd9bfc3..4c710cd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,6 +6,5 @@ setuptools xmltodict iso8601 beautifulsoup4 -pytz launchpadlib tenacity diff --git a/swh/lister/gnu/tree.py b/swh/lister/gnu/tree.py index f666cb5..ba74e04 100644 --- 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 @@ import re 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 @@ def format_date(timestamp: str) -> str: """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()