Skip to content

Commit cfac1d7

Browse files
authored
FEAT-modin-project#6511: update the minimum supported python version up to 3.9 (modin-project#6508)
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
1 parent 2e6f4c6 commit cfac1d7

21 files changed

+25
-56
lines changed

.github/actions/mamba-env/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: "Prepare the environment to run Modin"
33
inputs:
44
python-version:
55
description: "Python version to install"
6-
default: "3.8"
6+
default: "3.9"
77
environment-file:
88
description: "Conda environment yml"
99
required: true

.github/actions/python-only/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: "Prepare the environment to run simple tasks"
33
inputs:
44
python-version:
55
description: "Python version to install"
6-
default: "3.8.x"
6+
default: "3.9.x"
77

88
runs:
99
using: "composite"

.github/workflows/ci-required.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
fetch-depth: 1
2929
- uses: actions/setup-python@v4
3030
with:
31-
python-version: "3.8.x"
31+
python-version: "3.9.x"
3232
architecture: "x64"
3333
cache: "pip"
3434
cache-dependency-path: '**/requirements-doc.txt'

.github/workflows/ci.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ jobs:
134134
execution: [BaseOnPython]
135135
env:
136136
MODIN_TEST_DATASET_SIZE: "small"
137-
name: Test ${{ matrix.execution }} execution, Python 3.8
137+
name: Test ${{ matrix.execution }} execution, Python 3.9
138138
steps:
139139
- uses: actions/checkout@v3
140140
- uses: ./.github/actions/mamba-env
@@ -164,7 +164,7 @@ jobs:
164164
MODIN_EXPERIMENTAL: "True"
165165
MODIN_ENGINE: "native"
166166
MODIN_STORAGE_FORMAT: "hdk"
167-
name: Test HDK storage format, Python 3.8
167+
name: Test HDK storage format, Python 3.9
168168
services:
169169
moto:
170170
image: motoserver/moto
@@ -334,7 +334,7 @@ jobs:
334334
shell: bash -l {0}
335335
strategy:
336336
matrix:
337-
python-version: ["3.8"]
337+
python-version: ["3.9"]
338338
unidist-backend: ["mpi"]
339339
env:
340340
MODIN_ENGINE: "Unidist"
@@ -397,7 +397,7 @@ jobs:
397397
os:
398398
- ubuntu
399399
- windows
400-
python-version: ["3.8"]
400+
python-version: ["3.9"]
401401
engine: ${{ fromJSON( github.event_name == 'push' && '["python", "ray", "dask"]' || needs.execution-filter.outputs.engines ) }}
402402
test_task:
403403
- group_1
@@ -532,7 +532,7 @@ jobs:
532532
os:
533533
- ubuntu
534534
- windows
535-
python-version: ["3.8"]
535+
python-version: ["3.9"]
536536
execution:
537537
- name: ray
538538
shell-ex: "python -m pytest"
@@ -684,7 +684,7 @@ jobs:
684684
shell: bash -l {0}
685685
strategy:
686686
matrix:
687-
python-version: ["3.8"]
687+
python-version: ["3.9"]
688688
env:
689689
MODIN_STORAGE_FORMAT: pyarrow
690690
MODIN_EXPERIMENTAL: "True"
@@ -714,7 +714,7 @@ jobs:
714714
shell: bash -l {0}
715715
strategy:
716716
matrix:
717-
python-version: ["3.8"]
717+
python-version: ["3.9"]
718718
engine: ["ray", "dask"]
719719
env:
720720
MODIN_EXPERIMENTAL: "True"

.github/workflows/fuzzydata-test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
shell: bash -l {0}
3131
strategy:
3232
matrix:
33-
python-version: ["3.8"]
33+
python-version: ["3.9"]
3434
engine: ["ray", "dask"]
3535
steps:
3636
- uses: actions/checkout@v3

.github/workflows/push-to-master.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
AWS_SECRET_ACCESS_KEY: foobar_secret
100100
strategy:
101101
matrix:
102-
python-version: ["3.8"]
102+
python-version: ["3.9"]
103103
test-task:
104104
- modin/pandas/test/dataframe/test_binary.py
105105
- modin/pandas/test/dataframe/test_default.py

.readthedocs.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ version: 2
99
build:
1010
os: ubuntu-20.04
1111
tools:
12-
python: "3.8"
12+
python: "3.9"
1313

1414
# Build documentation in the docs/ directory with Sphinx
1515
sphinx:

asv_bench/asv.conf.dask.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555

5656
// The Pythons you'd like to test against. If not provided, defaults
5757
// to the current version of Python used to run `asv`.
58-
"pythons": ["3.8"],
58+
"pythons": ["3.9"],
5959

6060
// The list of conda channel names to be searched for benchmark
6161
// dependency packages in the specified order

asv_bench/asv.conf.hdk.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
// The Pythons you'd like to test against. If not provided, defaults
3636
// to the current version of Python used to run `asv`.
37-
"pythons": ["3.8"],
37+
"pythons": ["3.9"],
3838

3939
// The list of conda channel names to be searched for benchmark
4040
// dependency packages in the specified order

asv_bench/asv.conf.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555

5656
// The Pythons you'd like to test against. If not provided, defaults
5757
// to the current version of Python used to run `asv`.
58-
"pythons": ["3.8"],
58+
"pythons": ["3.9"],
5959

6060
// The list of conda channel names to be searched for benchmark
6161
// dependency packages in the specified order

asv_bench/asv.conf.unidist.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555

5656
// The Pythons you'd like to test against. If not provided, defaults
5757
// to the current version of Python used to run `asv`.
58-
"pythons": ["3.8"],
58+
"pythons": ["3.9"],
5959

6060
// The list of conda channel names to be searched for benchmark
6161
// dependency packages in the specified order

environment-dev.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ dependencies:
2222
- grpcio!=1.46.*
2323
- dask>=2.22.0
2424
- distributed>=2.22.0
25-
# TODO: uncomment after Modin switch to python>=3.9
26-
# - xarray
25+
- xarray
2726
- Jinja2>=3.0.0
2827
- scipy>=1.7.1
2928
- s3fs>=2021.8

modin/numpy/test/test_array_arithmetic.py

+2-12
Original file line numberDiff line numberDiff line change
@@ -101,18 +101,8 @@ def test_basic_arithmetic_with_broadcast(operand1_shape, operand2_shape, operato
101101
"__gt__",
102102
"__lt__",
103103
"__le__",
104-
pytest.param(
105-
"__eq__",
106-
marks=pytest.mark.xfail(
107-
reason="numpy behavior on eq/ne is counterintuitive: see GH#5893"
108-
),
109-
),
110-
pytest.param(
111-
"__ne__",
112-
marks=pytest.mark.xfail(
113-
reason="numpy behavior on eq/ne is counterintuitive: see GH#5893"
114-
),
115-
),
104+
"__eq__",
105+
"__ne__",
116106
],
117107
)
118108
def test_binary_bad_broadcast(matched_axis, operator):

modin/pandas/groupby.py

-6
Original file line numberDiff line numberDiff line change
@@ -1690,12 +1690,6 @@ def _try_get_str_func(self, fn):
16901690
"""
16911691
if not isinstance(fn, str) and isinstance(fn, Iterable):
16921692
return [self._try_get_str_func(f) for f in fn]
1693-
if fn is np.max:
1694-
# np.max is called "amax", so it's not a method of the groupby object.
1695-
return "amax"
1696-
elif fn is np.min:
1697-
# np.min is called "amin", so it's not a method of the groupby object.
1698-
return "amin"
16991693
return fn.__name__ if callable(fn) and fn.__name__ in dir(self) else fn
17001694

17011695
def value_counts(

modin/pandas/test/dataframe/test_default.py

-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# ANY KIND, either express or implied. See the License for the specific language
1212
# governing permissions and limitations under the License.
1313

14-
import sys
1514
import pytest
1615
import numpy as np
1716
import pandas
@@ -79,8 +78,6 @@
7978
)
8079
def test_ops_defaulting_to_pandas(op, make_args):
8180
modin_df = pd.DataFrame(test_data_diff_dtype).drop(["str_col", "bool_col"], axis=1)
82-
if op == "to_xarray" and sys.version_info < (3, 9):
83-
pytest.skip("xarray doesn't support pandas>=2.0 for python 3.8")
8481
with warns_that_defaulting_to_pandas():
8582
operation = getattr(modin_df, op)
8683
if make_args is not None:

modin/pandas/test/test_series.py

-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
from __future__ import annotations
1515

16-
import sys
1716
import pytest
1817
import unittest.mock as mock
1918
import numpy as np
@@ -3539,10 +3538,6 @@ def test_to_timestamp():
35393538
series.to_period().to_timestamp()
35403539

35413540

3542-
@pytest.mark.skipif(
3543-
condition=sys.version_info < (3, 9),
3544-
reason="xarray doesn't support pandas>=2.0 for python 3.8",
3545-
)
35463541
@pytest.mark.parametrize("data", test_data_values, ids=test_data_keys)
35473542
def test_to_xarray(data):
35483543
modin_series, _ = create_test_series(data) # noqa: F841

modin/utils.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,7 @@
2525
import codecs
2626
import functools
2727

28-
if sys.version_info < (3, 8):
29-
from typing_extensions import Protocol, runtime_checkable
30-
else:
31-
from typing import Protocol, runtime_checkable
28+
from typing import Protocol, runtime_checkable
3229

3330
from textwrap import dedent, indent
3431
from packaging import version

requirements/env_hdk.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ dependencies:
1919
- sqlalchemy>=1.4.0,<1.4.46
2020
- scipy>=1.7.1
2121
- matplotlib>=3.6.1
22-
# TODO: uncomment after Modin switch to python>=3.9
23-
# - xarray
22+
- xarray
2423
- pytables>=3.6.1
2524
- fastparquet>=0.6.3
2625
# pandas isn't compatible with numexpr=2.8.5: https://github.com/modin-project/modin/issues/6469

requirements/env_unidist.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ dependencies:
1414

1515
# optional dependencies
1616
- pyarrow>=7.0.0
17-
# TODO: uncomment after Modin switch to python>=3.9
18-
# - xarray
17+
- xarray
1918
- Jinja2>=3.0.0
2019
- scipy>=1.7.1
2120
- s3fs>=2021.8

requirements/requirements-no-engine.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ dependencies:
1212

1313
# optional dependencies
1414
- pyarrow>=7.0.0
15-
# TODO: uncomment after Modin switch to python>=3.9
16-
# - xarray
15+
- xarray
1716
- Jinja2>=3.0.0
1817
- scipy>=1.7.1
1918
- s3fs>=2021.8

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,5 @@ def make_distribution(self):
6363
"sql": sql_deps,
6464
"all": all_deps,
6565
},
66-
python_requires=">=3.8",
66+
python_requires=">=3.9",
6767
)

0 commit comments

Comments
 (0)