Skip to content

Commit

Permalink
Support for utc in Py<3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
facundobatista committed Jul 18, 2024
1 parent 8f2c316 commit 0ed44ab
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fades/envbuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import pathlib
import shutil

from datetime import datetime, UTC
from datetime import datetime, timezone
from venv import EnvBuilder
from uuid import uuid4

Expand All @@ -32,6 +32,9 @@

logger = logging.getLogger(__name__)

# UTC can be imported directly from datetime from Python 3.11
UTC = timezone.utc


class _FadesEnvBuilder(EnvBuilder):
"""Create always a virtual environment.
Expand Down

0 comments on commit 0ed44ab

Please sign in to comment.