Skip to content

Commit bd2d254

Browse files
committed
Merge branch 'master' into issue653-add-py313
2 parents 1fa6a8b + e667c43 commit bd2d254

File tree

6 files changed

+8
-52
lines changed

6 files changed

+8
-52
lines changed

setup.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,13 @@
2222
"mock",
2323
"requests-mock>=1.8.0",
2424
"httpretty>=1.1.4",
25-
# TODO #578 Conditional netCDF4 constraint: no more py3.7 wheels since 1.6.5 (#489)
26-
"netCDF4<1.6.5 ; python_version <= '3.7'",
27-
"netCDF4 ; python_version > '3.7'",
28-
"matplotlib",
25+
"netCDF4>=1.7.0",
26+
"matplotlib", # TODO: eliminate matplotlib as test dependency
2927
"geopandas",
3028
"flake8>=5.0.0",
3129
"time_machine",
3230
"pyproj>=3.2.0", # Pyproj is an optional, best-effort runtime dependency
33-
"dirty_equals>=0.6.0",
34-
# TODO #578 On Python 3.7: avoid dirty_equals 0.7.1 which wrongly claims to be Python 3.7 compatible
35-
"dirty_equals<0.7.1 ; python_version <= '3.7'",
31+
"dirty_equals>=0.8.0",
3632
"pyarrow>=10.0.1", # For Parquet read/write support in pandas
3733
]
3834

tests/extra/test_job_management.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -678,11 +678,6 @@ def test_automatic_cancel_of_too_long_running_jobs(
678678
cancel_after_seconds,
679679
expected_status,
680680
):
681-
if not hasattr(time_machine, "shift"):
682-
# TODO #578 remove this hack to skip this test on Python 3.7
683-
# `time_machine.shift` is only available since timemachine>=2.13.0, which only support Python 3.8 and up
684-
pytest.skip("time_machine.shift not available")
685-
686681
fake_backend = FakeBackend(requests_mock=requests_mock)
687682

688683
# For simplicity, set up pre-existing job with status "running" (instead of job manager creating+starting it)

tests/rest/datacube/test_datacube100.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -198,14 +198,9 @@ def _get_normalizable_crs_inputs():
198198
"""
199199
yield "EPSG:32631"
200200
yield 32631
201-
if pyproj.__version__ >= ComparableVersion("3.3.1"):
202-
# TODO #578 drop this skip once support for python 3.7 is dropped (pyproj 3.3.0 requires at least python 3.8)
203-
# pyproj below 3.3.1 does not support int-like strings
204-
yield "32631"
201+
yield "32631"
205202
yield "+proj=utm +zone=31 +datum=WGS84 +units=m +no_defs" # is also EPSG:32631, in proj format
206-
if pyproj.__version__ >= ComparableVersion("3.1.0"):
207-
# WKT2 format support requires pyproj 3.1.0 or higher
208-
yield WKT2_FOR_EPSG23631
203+
yield WKT2_FOR_EPSG23631
209204

210205

211206
def _get_leaf_node(cube: DataCube) -> dict:

tests/rest/test_connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2719,7 +2719,7 @@ def test_list_service_types_error(requests_mock):
27192719
def test_list_udf_runtimes(requests_mock):
27202720
requests_mock.get(API_URL, json={"api_version": "1.0.0"})
27212721
conn = Connection(API_URL)
2722-
runtimes = {"Python": {"type": "language", "versions": {"3.7": {}}, "default": "3.7"}} # TODO #578
2722+
runtimes = {"Python": {"type": "language", "versions": {"3.12": {}}, "default": "3.12"}}
27232723
m = requests_mock.get(API_URL + "udf_runtimes", json=runtimes)
27242724
assert conn.list_udf_runtimes() == runtimes
27252725
assert m.call_count == 1

tests/test_util.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -689,11 +689,6 @@ def test_init(self):
689689
"crs": 4326,
690690
}
691691

692-
@pytest.mark.skipif(
693-
# TODO #460 #578 this skip is only necessary for python 3.6 and lower
694-
pyproj.__version__ < ComparableVersion("3.3.1"),
695-
reason="pyproj below 3.3.1 does not support int-like strings",
696-
)
697692
def test_init_python_for_pyprojv331(self):
698693
"""Extra test case that does not work with old pyproj versions that we get on python version 3.7 and below."""
699694
assert BBoxDict(west=1, south=2, east=3, north=4, crs="4326") == {
@@ -730,11 +725,6 @@ def test_to_bbox_dict_from_sequence(self):
730725
"crs": 4326,
731726
}
732727

733-
@pytest.mark.skipif(
734-
# TODO #460 #578 this skip is only necessary for python 3.6 and lower
735-
pyproj.__version__ < ComparableVersion("3.3.1"),
736-
reason="pyproj below 3.3.1 does not support int-like strings",
737-
)
738728
def test_to_bbox_dict_from_sequence_pyprojv331(self):
739729
"""Extra test cases that do not work with old pyproj versions that we get on python version 3.7 and below."""
740730
assert to_bbox_dict([1, 2, 3, 4], crs="4326") == {
@@ -788,11 +778,6 @@ def test_to_bbox_dict_from_dict(self):
788778
}
789779
) == {"west": 1, "south": 2, "east": 3, "north": 4, "crs": 4326}
790780

791-
@pytest.mark.skipif(
792-
# TODO #460 #578 this skip is only necessary for python 3.6 and lower
793-
pyproj.__version__ < ComparableVersion("3.3.1"),
794-
reason="pyproj below 3.3.1 does not support int-like strings",
795-
)
796781
def test_to_bbox_dict_from_dict_for_pyprojv331(self):
797782
"""Extra test cases that do not work with old pyproj versions that we get on python version 3.7 and below."""
798783
assert to_bbox_dict({"west": 1, "south": 2, "east": 3, "north": 4, "crs": "4326"}) == {
@@ -932,10 +917,6 @@ class TestNormalizeCrs:
932917
)
933918
def test_normalize_crs_succeeds_with_correct_crses(self, epsg_input, expected):
934919
"""Happy path, values that are allowed"""
935-
if isinstance(epsg_input, str) and epsg_input.isnumeric() and pyproj.__version__ < ComparableVersion("3.3.1"):
936-
# TODO #578 drop this skip once support for python 3.7 is dropped (pyproj 3.3.0 requires at least python 3.8)
937-
pytest.skip("pyproj below 3.3.1 does not support int-like strings")
938-
939920
assert normalize_crs(epsg_input) == expected
940921

941922
@pytest.mark.parametrize(
@@ -1051,11 +1032,6 @@ def test_normalize_crs_without_pyproj_succeeds_with_wkt2_input(self):
10511032
"id": {"authority": "EPSG", "code": 32631},
10521033
}
10531034

1054-
@pytest.mark.skipif(
1055-
# TODO #578 drop this skip once support for python 3.7 is dropped (pyproj 3.3.0 requires at least python 3.8)
1056-
pyproj.__version__ < ComparableVersion("3.3.0"),
1057-
reason="PROJJSON format support requires pyproj 3.3.0 or higher",
1058-
)
10591035
def test_normalize_crs_succeeds_with_correct_projjson(
10601036
self,
10611037
):

tests/udf/test_xarraydatacube.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -147,17 +147,11 @@ class _SaveLoadRoundTrip(NamedTuple):
147147

148148

149149
def _get_netcdf_engines() -> List[str]:
150-
if hasattr(xarray.backends, "list_engines"):
151-
# xarray 0.17 or higher provides xarray.backends.list_engines
152-
netcdf_engines = [
150+
netcdf_engines = [
153151
name
154152
for name, engine in xarray.backends.list_engines().items()
155153
if engine.guess_can_open("dummy.nc")
156-
]
157-
else:
158-
# Poor man's hardcoded fallback
159-
# TODO #578: drop this once we can require "xarray>=0.17" (which requires "python>=3.7")
160-
netcdf_engines = ["netcdf4"]
154+
]
161155
return netcdf_engines
162156

163157

0 commit comments

Comments
 (0)