Skip to content

Commit

Permalink
FEAT-#0000: update the minimum supported python version up to 3.9
Browse files Browse the repository at this point in the history
Signed-off-by: Anatoly Myachev <[email protected]>
  • Loading branch information
anmyachev committed Aug 25, 2023
1 parent da385c9 commit 3d0bddb
Show file tree
Hide file tree
Showing 18 changed files with 22 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .github/actions/mamba-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: "Prepare the environment to run Modin"
inputs:
python-version:
description: "Python version to install"
default: "3.8"
default: "3.9"
environment-file:
description: "Conda environment yml"
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/python-only/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: "Prepare the environment to run simple tasks"
inputs:
python-version:
description: "Python version to install"
default: "3.8.x"
default: "3.9.x"

runs:
using: "composite"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-required.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
fetch-depth: 1
- uses: actions/setup-python@v4
with:
python-version: "3.8.x"
python-version: "3.9.x"
architecture: "x64"
cache: "pip"
cache-dependency-path: '**/requirements-doc.txt'
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ jobs:
execution: [BaseOnPython]
env:
MODIN_TEST_DATASET_SIZE: "small"
name: Test ${{ matrix.execution }} execution, Python 3.8
name: Test ${{ matrix.execution }} execution, Python 3.9
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/mamba-env
Expand Down Expand Up @@ -164,7 +164,7 @@ jobs:
MODIN_EXPERIMENTAL: "True"
MODIN_ENGINE: "native"
MODIN_STORAGE_FORMAT: "hdk"
name: Test HDK storage format, Python 3.8
name: Test HDK storage format, Python 3.9
services:
moto:
image: motoserver/moto
Expand Down Expand Up @@ -334,7 +334,7 @@ jobs:
shell: bash -l {0}
strategy:
matrix:
python-version: ["3.8"]
python-version: ["3.9"]
unidist-backend: ["mpi"]
env:
MODIN_ENGINE: "Unidist"
Expand Down Expand Up @@ -397,7 +397,7 @@ jobs:
os:
- ubuntu
- windows
python-version: ["3.8"]
python-version: ["3.9"]
engine: ${{ fromJSON( github.event_name == 'push' && '["python", "ray", "dask"]' || needs.execution-filter.outputs.engines ) }}
test_task:
- group_1
Expand Down Expand Up @@ -532,7 +532,7 @@ jobs:
os:
- ubuntu
- windows
python-version: ["3.8"]
python-version: ["3.9"]
execution:
- name: ray
shell-ex: "python -m pytest"
Expand Down Expand Up @@ -684,7 +684,7 @@ jobs:
shell: bash -l {0}
strategy:
matrix:
python-version: ["3.8"]
python-version: ["3.9"]
env:
MODIN_STORAGE_FORMAT: pyarrow
MODIN_EXPERIMENTAL: "True"
Expand Down Expand Up @@ -714,7 +714,7 @@ jobs:
shell: bash -l {0}
strategy:
matrix:
python-version: ["3.8"]
python-version: ["3.9"]
engine: ["ray", "dask"]
env:
MODIN_EXPERIMENTAL: "True"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fuzzydata-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
shell: bash -l {0}
strategy:
matrix:
python-version: ["3.8"]
python-version: ["3.9"]
engine: ["ray", "dask"]
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push-to-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
AWS_SECRET_ACCESS_KEY: foobar_secret
strategy:
matrix:
python-version: ["3.8"]
python-version: ["3.9"]
test-task:
- modin/pandas/test/dataframe/test_binary.py
- modin/pandas/test/dataframe/test_default.py
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ version: 2
build:
os: ubuntu-20.04
tools:
python: "3.8"
python: "3.9"

# Build documentation in the docs/ directory with Sphinx
sphinx:
Expand Down
2 changes: 1 addition & 1 deletion asv_bench/asv.conf.dask.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

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

// The list of conda channel names to be searched for benchmark
// dependency packages in the specified order
Expand Down
2 changes: 1 addition & 1 deletion asv_bench/asv.conf.hdk.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

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

// The list of conda channel names to be searched for benchmark
// dependency packages in the specified order
Expand Down
2 changes: 1 addition & 1 deletion asv_bench/asv.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

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

// The list of conda channel names to be searched for benchmark
// dependency packages in the specified order
Expand Down
2 changes: 1 addition & 1 deletion asv_bench/asv.conf.unidist.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

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

// The list of conda channel names to be searched for benchmark
// dependency packages in the specified order
Expand Down
2 changes: 0 additions & 2 deletions modin/pandas/test/dataframe/test_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@
)
def test_ops_defaulting_to_pandas(op, make_args):
modin_df = pd.DataFrame(test_data_diff_dtype).drop(["str_col", "bool_col"], axis=1)
if op == "to_xarray" and sys.version_info < (3, 9):
pytest.skip("xarray doesn't support pandas>=2.0 for python 3.8")
with warns_that_defaulting_to_pandas():
operation = getattr(modin_df, op)
if make_args is not None:
Expand Down
4 changes: 0 additions & 4 deletions modin/pandas/test/test_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -3539,10 +3539,6 @@ def test_to_timestamp():
series.to_period().to_timestamp()


@pytest.mark.skipif(
condition=sys.version_info < (3, 9),
reason="xarray doesn't support pandas>=2.0 for python 3.8",
)
@pytest.mark.parametrize("data", test_data_values, ids=test_data_keys)
def test_to_xarray(data):
modin_series, _ = create_test_series(data) # noqa: F841
Expand Down
5 changes: 1 addition & 4 deletions modin/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@
import codecs
import functools

if sys.version_info < (3, 8):
from typing_extensions import Protocol, runtime_checkable
else:
from typing import Protocol, runtime_checkable
from typing import Protocol, runtime_checkable

from textwrap import dedent, indent
from packaging import version
Expand Down
3 changes: 1 addition & 2 deletions requirements/env_hdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ dependencies:
- sqlalchemy>=1.4.0,<1.4.46
- scipy>=1.7.1
- matplotlib>=3.6.1
# TODO: uncomment after Modin switch to python>=3.9
# - xarray
- xarray
- pytables>=3.6.1
- fastparquet>=0.6.3
# pandas isn't compatible with numexpr=2.8.5: https://github.com/modin-project/modin/issues/6469
Expand Down
3 changes: 1 addition & 2 deletions requirements/env_unidist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ dependencies:

# optional dependencies
- pyarrow>=7.0.0
# TODO: uncomment after Modin switch to python>=3.9
# - xarray
- xarray
- Jinja2>=3.0.0
- scipy>=1.7.1
- s3fs>=2021.8
Expand Down
3 changes: 1 addition & 2 deletions requirements/requirements-no-engine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ dependencies:

# optional dependencies
- pyarrow>=7.0.0
# TODO: uncomment after Modin switch to python>=3.9
# - xarray
- xarray
- Jinja2>=3.0.0
- scipy>=1.7.1
- s3fs>=2021.8
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ def make_distribution(self):
"sql": sql_deps,
"all": all_deps,
},
python_requires=">=3.8",
python_requires=">=3.9",
)

0 comments on commit 3d0bddb

Please sign in to comment.