Skip to content

Commit

Permalink
stop using deprecated datetime.utcnow()
Browse files Browse the repository at this point in the history
Deprecated since python 3.12. The suggested API seems as having been
available since 3.2 at least.
  • Loading branch information
martyone committed Nov 21, 2024
1 parent dbc05a4 commit ebb8b51
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pytest_docker_compose/plugin.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os.path
import warnings
from datetime import datetime
from datetime import datetime, timezone
from pathlib import Path

import pytest
Expand Down Expand Up @@ -222,7 +222,7 @@ def generate_scoped_containers_fixture(cls, scope: str):

@pytest.fixture(scope=scope) # type: ignore
def scoped_containers_fixture(docker_project: DockerClient, request):
now = datetime.utcnow()
now = datetime.now(timezone.utc)
if not request.config.getoption("--use-running-containers"):
if any(
(
Expand Down

0 comments on commit ebb8b51

Please sign in to comment.