diff --git a/juju/__init__.py b/juju/__init__.py index 9da2b17a..742d5ace 100644 --- a/juju/__init__.py +++ b/juju/__init__.py @@ -1,3 +1,7 @@ # Copyright 2024 Canonical Ltd. # Licensed under the Apache V2, see LICENCE file for details. """Python Library for Juju.""" + +from backports.datetime_fromisoformat import MonkeyPatch + +MonkeyPatch.patch_fromisoformat() diff --git a/pyproject.toml b/pyproject.toml index b3c2d427..7a761c9b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,6 @@ classifiers = [ ] dependencies = [ "macaroonbakery>=1.1,<2.0", - "pyRFC3339>=1.0,<2.0", "pyyaml>=5.1.2", "websockets>=13.0.1", "paramiko>=2.4.0", @@ -35,6 +34,7 @@ dependencies = [ "packaging", "typing-extensions>=4.5.0", 'backports.strenum>=1.3.1; python_version < "3.11"', + "backports-datetime-fromisoformat>=2.0.2", ] [project.optional-dependencies] dev = [ diff --git a/tox.ini b/tox.ini index d284673b..c9b8f975 100644 --- a/tox.ini +++ b/tox.ini @@ -50,6 +50,10 @@ commands = [testenv:unit] envdir = {toxworkdir}/py3 +deps = + backports-datetime-fromisoformat +allowlist_externals = + pytest commands = pytest {toxinidir}/tests/unit {posargs}