Skip to content

Commit e7d0fff

Browse files
Merge branch 'master' into issue525-onnx-process
2 parents de1e7e2 + 2612c8d commit e7d0fff

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

openeo/metadata.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import functools
44
import logging
5-
import warnings
65
from typing import (
76
Any,
87
Callable,
@@ -540,7 +539,7 @@ def __init__(self, metadata: dict, dimensions: List[Dimension] = None, _federati
540539
self._federation = _federation
541540

542541
@classmethod
543-
def _parse_dimensions(cls, spec: dict, complain: Callable[[str], None] = warnings.warn) -> List[Dimension]:
542+
def _parse_dimensions(cls, spec: dict, complain: Callable[[str], None] = _log.warning) -> List[Dimension]:
544543
"""
545544
Extract data cube dimension metadata from STAC-like description of a collection.
546545

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"geopandas>=0.14; python_version>='3.9'",
2828
"geopandas", # Best-effort geopandas dependency for Python 3.8
2929
"flake8>=5.0.0",
30-
"time_machine",
30+
"time_machine>=2.13.0",
3131
"pyproj>=3.2.0", # Pyproj is an optional, best-effort runtime dependency
3232
"dirty_equals>=0.8.0",
3333
"pyarrow>=10.0.1", # For Parquet read/write support in pandas

tests/rest/conftest.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import contextlib
22
import re
3+
import time
34
import typing
45
from unittest import mock
56

@@ -25,9 +26,7 @@ def __init__(self):
2526
@contextlib.contextmanager
2627
def patch(self, time_machine: time_machine.TimeMachineFixture) -> typing.Iterator["_Sleeper"]:
2728
def sleep(seconds):
28-
# Note: this requires that `time_machine.move_to()` has been called before
29-
# also see https://github.com/adamchainz/time-machine/issues/247
30-
time_machine.coordinates.shift(seconds)
29+
time_machine.shift(seconds)
3130
self.history.append(seconds)
3231

3332
with mock.patch("time.sleep", new=sleep):
@@ -58,15 +57,15 @@ def oidc_device_code_flow_checker(time_machine, simple_time, fast_sleep, capsys)
5857

5958
@contextlib.contextmanager
6059
def assert_oidc_device_code_flow(url: str = "https://oidc.test/dc", elapsed: float = 3, check_capsys: bool = True):
61-
start = time_machine.coordinates.time()
60+
start = time.time()
6261
yield
6362
assert fast_sleep.did_sleep()
6463
if check_capsys:
6564
stdout, _ = capsys.readouterr()
6665
assert f"Visit {url} and enter" in stdout
6766
assert re.search(r"\[#+-*\] Authorization pending *\r\[#+-*\] Polling *\r", stdout)
6867
assert re.search(r"Authorized successfully *\r\n", stdout)
69-
assert time_machine.coordinates.time() - start >= elapsed
68+
assert time.time() - start >= elapsed
7069

7170
return assert_oidc_device_code_flow
7271

0 commit comments

Comments
 (0)