From 0ba06268022b87fa46649581e9a5f3bd5b5b2c19 Mon Sep 17 00:00:00 2001 From: Jon Holba Date: Tue, 3 Dec 2024 15:23:44 +0100 Subject: [PATCH] Remove backport of datetime functions This is no longer needed as python <3.11 is not supported anymore --- pyproject.toml | 1 - src/ert/ensemble_evaluator/snapshot.py | 6 ------ src/ert/gui/model/snapshot.py | 6 ------ 3 files changed, 13 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 5599f7430e9..e353f4ceb9c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,6 @@ classifiers = [ dynamic = ["version"] dependencies = [ "aiohttp", - "backports-datetime_fromisoformat; python_version < '3.11'", "cryptography", "dnspython >= 2", "fastapi", diff --git a/src/ert/ensemble_evaluator/snapshot.py b/src/ert/ensemble_evaluator/snapshot.py index f2027f4e964..e0f990c2b4a 100644 --- a/src/ert/ensemble_evaluator/snapshot.py +++ b/src/ert/ensemble_evaluator/snapshot.py @@ -1,5 +1,4 @@ import logging -import sys import typing from collections import defaultdict from datetime import datetime @@ -49,11 +48,6 @@ logger = logging.getLogger(__name__) -if sys.version_info < (3, 11): - from backports.datetime_fromisoformat import MonkeyPatch # type: ignore - - MonkeyPatch.patch_fromisoformat() - class UnsupportedOperationException(ValueError): pass diff --git a/src/ert/gui/model/snapshot.py b/src/ert/gui/model/snapshot.py index cc984e015a1..38107daf9d6 100644 --- a/src/ert/gui/model/snapshot.py +++ b/src/ert/gui/model/snapshot.py @@ -1,5 +1,4 @@ import logging -import sys from collections import defaultdict from contextlib import ExitStack from datetime import datetime, timedelta @@ -26,11 +25,6 @@ ) from ert.shared.status.utils import byte_with_unit, file_has_content -if sys.version_info < (3, 11): - from backports.datetime_fromisoformat import MonkeyPatch # type: ignore - - MonkeyPatch.patch_fromisoformat() - logger = logging.getLogger(__name__) UserRole = Qt.ItemDataRole.UserRole