From 26bc87148c5bdeb002fa86b3408a682dc88f5f4c Mon Sep 17 00:00:00 2001 From: Stefaan Lippens Date: Thu, 31 Oct 2024 12:23:13 +0100 Subject: [PATCH] Add todo notes related to dropped py3.7 support #578 --- setup.py | 7 ++++--- tests/rest/datacube/test_datacube100.py | 2 +- tests/rest/test_connection.py | 2 +- tests/test_util.py | 10 +++++----- tests/udf/test_xarraydatacube.py | 2 +- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/setup.py b/setup.py index e71a16e68..2516baf9f 100644 --- a/setup.py +++ b/setup.py @@ -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", @@ -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 ] @@ -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'", diff --git a/tests/rest/datacube/test_datacube100.py b/tests/rest/datacube/test_datacube100.py index 97e6bd46e..15b9e3d5b 100644 --- a/tests/rest/datacube/test_datacube100.py +++ b/tests/rest/datacube/test_datacube100.py @@ -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 diff --git a/tests/rest/test_connection.py b/tests/rest/test_connection.py index 78e8679e7..faf23642f 100644 --- a/tests/rest/test_connection.py +++ b/tests/rest/test_connection.py @@ -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 diff --git a/tests/test_util.py b/tests/test_util.py index d1e71ce74..137c31a68 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -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", ) @@ -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", ) @@ -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", ) @@ -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 @@ -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", ) diff --git a/tests/udf/test_xarraydatacube.py b/tests/udf/test_xarraydatacube.py index cfa4dea4b..7ff2af4ff 100644 --- a/tests/udf/test_xarraydatacube.py +++ b/tests/udf/test_xarraydatacube.py @@ -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