Skip to content

Commit

Permalink
Add todo notes related to dropped py3.7 support #578
Browse files Browse the repository at this point in the history
  • Loading branch information
soxofaan committed Oct 31, 2024
1 parent 10d1b14 commit 26bc871
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"mock",
"requests-mock>=1.8.0",
"httpretty>=1.1.4",
# Conditional netCDF4 constraint: no more py3.7 wheels since 1.6.5 (#489)
# TODO #578 Conditional netCDF4 constraint: no more py3.7 wheels since 1.6.5 (#489)
"netCDF4<1.6.5 ; python_version <= '3.7'",
"netCDF4 ; python_version > '3.7'",
"matplotlib",
Expand All @@ -31,7 +31,7 @@
"time_machine",
"pyproj>=3.2.0", # Pyproj is an optional, best-effort runtime dependency
"dirty_equals>=0.6.0",
# (#578) On Python 3.7: avoid dirty_equals 0.7.1 which wrongly claims to be Python 3.7 compatible
# TODO #578 On Python 3.7: avoid dirty_equals 0.7.1 which wrongly claims to be Python 3.7 compatible
"dirty_equals<0.7.1 ; python_version <= '3.7'",
"pyarrow>=10.0.1", # For Parquet read/write support in pandas
]
Expand Down Expand Up @@ -77,7 +77,8 @@
"numpy>=1.17.0",
"xarray>=0.12.3",
"pandas>0.20.0",
"pystac>=1.5.0", # pystac 1.5.0 is highest version available for lowest Python version we still support (3.7).
# TODO #578: pystac 1.5.0 is highest version available for lowest Python version we still support (3.7).
"pystac>=1.5.0",
"deprecated>=1.2.12",
'oschmod>=0.3.12; sys_platform == "win32"',
"importlib_resources; python_version<'3.9'",
Expand Down
2 changes: 1 addition & 1 deletion tests/rest/datacube/test_datacube100.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def _get_normalizable_crs_inputs():
yield "EPSG:32631"
yield 32631
if pyproj.__version__ >= ComparableVersion("3.3.1"):
# TODO drop this skip once support for python 3.7 is dropped (pyproj 3.3.0 requires at least python 3.8)
# TODO #578 drop this skip once support for python 3.7 is dropped (pyproj 3.3.0 requires at least python 3.8)
# pyproj below 3.3.1 does not support int-like strings
yield "32631"
yield "+proj=utm +zone=31 +datum=WGS84 +units=m +no_defs" # is also EPSG:32631, in proj format
Expand Down
2 changes: 1 addition & 1 deletion tests/rest/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -2719,7 +2719,7 @@ def test_list_service_types_error(requests_mock):
def test_list_udf_runtimes(requests_mock):
requests_mock.get(API_URL, json={"api_version": "1.0.0"})
conn = Connection(API_URL)
runtimes = {"Python": {"type": "language", "versions": {"3.7": {}}, "default": "3.7"}}
runtimes = {"Python": {"type": "language", "versions": {"3.7": {}}, "default": "3.7"}} # TODO #578
m = requests_mock.get(API_URL + "udf_runtimes", json=runtimes)
assert conn.list_udf_runtimes() == runtimes
assert m.call_count == 1
Expand Down
10 changes: 5 additions & 5 deletions tests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ def test_init(self):
}

@pytest.mark.skipif(
# TODO #460 this skip is only necessary for python 3.6 and lower
# TODO #460 #578 this skip is only necessary for python 3.6 and lower
pyproj.__version__ < ComparableVersion("3.3.1"),
reason="pyproj below 3.3.1 does not support int-like strings",
)
Expand Down Expand Up @@ -731,7 +731,7 @@ def test_to_bbox_dict_from_sequence(self):
}

@pytest.mark.skipif(
# TODO #460 this skip is only necessary for python 3.6 and lower
# TODO #460 #578 this skip is only necessary for python 3.6 and lower
pyproj.__version__ < ComparableVersion("3.3.1"),
reason="pyproj below 3.3.1 does not support int-like strings",
)
Expand Down Expand Up @@ -789,7 +789,7 @@ def test_to_bbox_dict_from_dict(self):
) == {"west": 1, "south": 2, "east": 3, "north": 4, "crs": 4326}

@pytest.mark.skipif(
# TODO #460 this skip is only necessary for python 3.6 and lower
# TODO #460 #578 this skip is only necessary for python 3.6 and lower
pyproj.__version__ < ComparableVersion("3.3.1"),
reason="pyproj below 3.3.1 does not support int-like strings",
)
Expand Down Expand Up @@ -933,7 +933,7 @@ class TestNormalizeCrs:
def test_normalize_crs_succeeds_with_correct_crses(self, epsg_input, expected):
"""Happy path, values that are allowed"""
if isinstance(epsg_input, str) and epsg_input.isnumeric() and pyproj.__version__ < ComparableVersion("3.3.1"):
# TODO drop this skip once support for python 3.7 is dropped (pyproj 3.3.0 requires at least python 3.8)
# TODO #578 drop this skip once support for python 3.7 is dropped (pyproj 3.3.0 requires at least python 3.8)
pytest.skip("pyproj below 3.3.1 does not support int-like strings")

assert normalize_crs(epsg_input) == expected
Expand Down Expand Up @@ -1052,7 +1052,7 @@ def test_normalize_crs_without_pyproj_succeeds_with_wkt2_input(self):
}

@pytest.mark.skipif(
# TODO drop this skip once support for python 3.7 is dropped (pyproj 3.3.0 requires at least python 3.8)
# TODO #578 drop this skip once support for python 3.7 is dropped (pyproj 3.3.0 requires at least python 3.8)
pyproj.__version__ < ComparableVersion("3.3.0"),
reason="PROJJSON format support requires pyproj 3.3.0 or higher",
)
Expand Down
2 changes: 1 addition & 1 deletion tests/udf/test_xarraydatacube.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def _get_netcdf_engines() -> List[str]:
]
else:
# Poor man's hardcoded fallback
# TODO: drop this once we can require "xarray>=0.17" (which requires "python>=3.7")
# TODO #578: drop this once we can require "xarray>=0.17" (which requires "python>=3.7")
netcdf_engines = ["netcdf4"]
return netcdf_engines

Expand Down

0 comments on commit 26bc871

Please sign in to comment.