diff --git a/.circleci/continue_config.yml b/.circleci/continue_config.yml index c26fb2fbc0..5446be9a41 100644 --- a/.circleci/continue_config.yml +++ b/.circleci/continue_config.yml @@ -327,10 +327,10 @@ jobs: - win_setup: python_version: <> - when: - # Save Python package cache only for Python 3.7. The conda environment itself + # Save Python package cache only for Python 3.8. The conda environment itself # is specific to a Python version and is cached separately for each. condition: - equal: ["3.7", <>] + equal: [<>] steps: - save_cache: name: Save Python package cache @@ -458,7 +458,7 @@ jobs: publish_kedro: executor: name: docker - python_version: "3.7" + python_version: "3.8" steps: - setup - add_ssh_keys @@ -528,7 +528,7 @@ workflows: - lint: matrix: parameters: - python_version: ["3.7", "3.8", "3.9", "3.10"] + python_version: ["3.8", "3.9", "3.10"] - all_circleci_checks_succeeded: requires: - lint @@ -544,31 +544,31 @@ workflows: - e2e_tests: matrix: parameters: - python_version: ["3.7", "3.8", "3.9", "3.10"] + python_version: ["3.8", "3.9", "3.10"] - win_e2e_tests: matrix: parameters: - python_version: ["3.7", "3.8", "3.9", "3.10"] + python_version: ["3.8", "3.9", "3.10"] - unit_tests: matrix: parameters: - python_version: ["3.7", "3.8", "3.9", "3.10"] + python_version: ["3.8", "3.9", "3.10"] - win_unit_tests: matrix: parameters: - python_version: ["3.7", "3.8", "3.9", "3.10"] + python_version: ["3.8", "3.9", "3.10"] - lint: matrix: parameters: - python_version: ["3.7", "3.8", "3.9", "3.10"] + python_version: ["3.8", "3.9", "3.10"] - pip_compile: matrix: parameters: - python_version: ["3.7", "3.8", "3.9", "3.10"] + python_version: ["3.8", "3.9", "3.10"] - win_pip_compile: matrix: parameters: - python_version: ["3.7", "3.8", "3.9", "3.10"] + python_version: ["3.8", "3.9", "3.10"] - all_circleci_checks_succeeded: requires: - e2e_tests @@ -620,14 +620,14 @@ workflows: - kedro-ecr-publish matrix: parameters: - python_version: ["3.7", "3.8", "3.9", "3.10"] + python_version: ["3.8", "3.9", "3.10"] filters: branches: only: main - build_kedro: matrix: parameters: - python_version: ["3.7", "3.8", "3.9", "3.10"] + python_version: ["3.8", "3.9", "3.10"] requires: - build_docker_image-<> filters: @@ -672,7 +672,7 @@ workflows: - build_kedro: matrix: parameters: - python_version: ["3.7", "3.8", "3.9", "3.10"] + python_version: ["3.8", "3.9", "3.10"] - publish_kedro: requires: - build_kedro diff --git a/.github/workflows/all-checks.yml b/.github/workflows/all-checks.yml index 5fe306d018..61e0cf81a6 100644 --- a/.github/workflows/all-checks.yml +++ b/.github/workflows/all-checks.yml @@ -22,7 +22,7 @@ jobs: strategy: matrix: os: [ ubuntu-latest, windows-latest ] - python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ] + python-version: [ "3.8", "3.9", "3.10", "3.11" ] uses: ./.github/workflows/unit-tests.yml with: os: ${{ matrix.os }} @@ -42,7 +42,7 @@ jobs: strategy: matrix: os: [ ubuntu-latest, windows-latest ] - python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ] + python-version: [ "3.8", "3.9", "3.10", "3.11" ] uses: ./.github/workflows/e2e-tests.yml with: os: ${{ matrix.os }} @@ -52,7 +52,7 @@ jobs: strategy: matrix: os: [ ubuntu-latest, windows-latest ] - python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ] + python-version: [ "3.8", "3.9", "3.10", "3.11" ] uses: ./.github/workflows/pip-compile.yml with: os: ${{ matrix.os }} diff --git a/.github/workflows/docs-only-checks.yml b/.github/workflows/docs-only-checks.yml index d13a76c589..1af4aa53e8 100644 --- a/.github/workflows/docs-only-checks.yml +++ b/.github/workflows/docs-only-checks.yml @@ -21,7 +21,7 @@ jobs: strategy: matrix: os: [ ubuntu-latest ] - python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ] + python-version: [ "3.8", "3.9", "3.10", "3.11" ] uses: ./.github/workflows/lint.yml with: os: ${{ matrix.os }} diff --git a/RELEASE.md b/RELEASE.md index 0ae59fb93c..22344caff4 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -5,6 +5,7 @@ ## Bug fixes and other changes ## Breaking changes to the API +* Drop Python 3.7 support. ### DataSets * Remove `kedro.extras.datasets` and tests. diff --git a/docs/source/deployment/databricks/databricks_notebooks_development_workflow.md b/docs/source/deployment/databricks/databricks_notebooks_development_workflow.md index ef2081a28a..b3136d9a9d 100644 --- a/docs/source/deployment/databricks/databricks_notebooks_development_workflow.md +++ b/docs/source/deployment/databricks/databricks_notebooks_development_workflow.md @@ -19,7 +19,7 @@ This tutorial introduces a Kedro project development workflow using only the Dat - An active [Databricks deployment](https://docs.databricks.com/getting-started/index.html). - A [Databricks cluster](https://docs.databricks.com/clusters/configure.html) configured with a recent version (>= 11.3 is recommended) of the Databricks runtime. -- Python >= 3.7 installed. +- Python >= 3.8 installed. - Git installed. - A [GitHub](https://github.com/) account. - A Python environment management system installed, [venv](https://docs.python.org/3/library/venv.html), [virtualenv](https://virtualenv.pypa.io/en/latest/) or [Conda](https://docs.conda.io/en/latest/) are popular choices. diff --git a/docs/source/get_started/install.md b/docs/source/get_started/install.md index 8afea95a57..5f6db082f5 100644 --- a/docs/source/get_started/install.md +++ b/docs/source/get_started/install.md @@ -1,7 +1,7 @@ # Set up Kedro ## Installation prerequisites -* **Python**: Kedro supports macOS, Linux, and Windows and is built for Python 3.7+. You'll select a version of Python when you create a virtual environment for your Kedro project. +* **Python**: Kedro supports macOS, Linux, and Windows and is built for Python 3.8+. You'll select a version of Python when you create a virtual environment for your Kedro project. * **Virtual environment**: You should create a new virtual environment for *each* new Kedro project you work on to isolate its Python dependencies from those of other projects. @@ -23,7 +23,7 @@ The recommended approach. From your terminal: conda create --name kedro-environment python=3.10 -y ``` -The example below uses Python 3.10, and creates a virtual environment called `kedro-environment`. You can opt for a different version of Python (any version >= 3.7 and <3.11) for your project, and you can name it anything you choose. +The example below uses Python 3.10, and creates a virtual environment called `kedro-environment`. You can opt for a different version of Python (any version >= 3.8 and <3.12) for your project, and you can name it anything you choose. The `conda` virtual environment is not dependent on your current working directory and can be activated from any directory: @@ -184,7 +184,7 @@ pip install kedro ## Summary * Kedro can be used on Windows, macOS or Linux. -* Installation prerequisites include a virtual environment manager like `conda`, Python 3.7+, and `git`. +* Installation prerequisites include a virtual environment manager like `conda`, Python 3.8+, and `git`. * You should install Kedro using `pip install kedro`. If you encounter any problems as you set up Kedro, ask for help on Kedro's [Slack organisation](https://slack.kedro.org) or review the [searchable archive of Slack discussions](https://linen-slack.kedro.org/). diff --git a/docs/source/index.rst b/docs/source/index.rst index 5850f15f76..ae1b641064 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -23,9 +23,9 @@ Welcome to Kedro's documentation! :target: https://opensource.org/license/apache2-0-php/ :alt: License is Apache 2.0 -.. image:: https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue.svg +.. image:: https://img.shields.io/badge/3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue.svg :target: https://pypi.org/project/kedro/ - :alt: Python version 3.7, 3.8, 3.9, 3.10, 3.11 + :alt: Python version 3.8, 3.9, 3.10, 3.11 .. image:: https://badge.fury.io/py/kedro.svg :target: https://pypi.org/project/kedro/ diff --git a/docs/source/introduction/introduction.md b/docs/source/introduction/introduction.md index 45fea38bd2..6749a1dc49 100644 --- a/docs/source/introduction/introduction.md +++ b/docs/source/introduction/introduction.md @@ -11,6 +11,6 @@ Use the left-hand table of contents to explore the documentation available for m We have designed the preliminary documentation and the [spaceflights tutorial](../tutorial/spaceflights_tutorial.md) for anyone new to Kedro. The more knowledge of Python you have, the easier you will find the learning curve. ```{note} -There are many excellent online resources for learning Python; you should choose those that reference Python 3, as Kedro is built for Python 3.7+. There are curated lists of online resources, such as the [official Python programming language website](https://www.python.org/) and this list of [free programming books and tutorials](https://github.com/EbookFoundation/free-programming-books/blob/master/books/free-programming-books-langs.md#python). +There are many excellent online resources for learning Python; you should choose those that reference Python 3, as Kedro is built for Python 3.8+. There are curated lists of online resources, such as the [official Python programming language website](https://www.python.org/) and this list of [free programming books and tutorials](https://github.com/EbookFoundation/free-programming-books/blob/master/books/free-programming-books-langs.md#python). ``` diff --git a/features/environment.py b/features/environment.py index ea51cc9a56..d30709b1c6 100644 --- a/features/environment.py +++ b/features/environment.py @@ -103,8 +103,6 @@ def _setup_minimal_env(context): "pip", "install", "-U", - # pip==23.2 breaks pip-tools<7.0, and pip-tools>=7.0 does not support Python 3.7 - "pip>=21.2,<23.2; python_version < '3.8'", "pip>=21.2; python_version >= '3.8'", ], env=context.env, diff --git a/pyproject.toml b/pyproject.toml index d46df4809a..b73ba91c5e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ authors = [ {name = "Kedro"} ] description = "Kedro helps you build production-ready data and analytics pipelines" -requires-python = ">=3.7" +requires-python = ">=3.8" dependencies = [ "anyconfig>=0.10.0", "attrs>=21.3", @@ -21,7 +21,6 @@ dependencies = [ "dynaconf>=3.1.2,<4.0", "fsspec>=2021.4", "gitpython>=3.0", - "importlib_metadata>=3.6,<5.0; python_version < '3.8'", # The "selectable" entry points were introduced in `importlib_metadata` 3.6 and Python 3.10. Bandit on Python 3.7 relies on a library with `importlib_metadata` < 5.0 "importlib-metadata>=3.6,<7.0; python_version >= '3.8'", "importlib_resources>=1.3,<7.0", # The `files()` API was introduced in `importlib_resources` 1.3 and Python 3.9. "jmespath>=0.9.5", @@ -30,7 +29,7 @@ dependencies = [ "omegaconf>=2.1.1", "parse>=1.19.0", "pip-tools>=6.5", - "pluggy>=1.0,<1.3", # TODO: Uncap when dropping Python 3.7 support, see https://github.com/kedro-org/kedro/issues/2979 + "pluggy>=1.0", "PyYAML>=4.2,<7.0", "rich>=12.0,<14.0", "rope>=0.21,<2.0", # subject to LGPLv3 license @@ -48,7 +47,6 @@ keywords = [ license = {text = "Apache Software License (Apache 2.0)"} classifiers = [ "Development Status :: 4 - Beta", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", diff --git a/setup.py b/setup.py index acce3bf513..d97eee22a3 100644 --- a/setup.py +++ b/setup.py @@ -133,7 +133,6 @@ def _collect_requirements(requires): extras_require["all"] = _collect_requirements(extras_require) extras_require["test"] = [ - "adlfs>=2021.7.1, <=2022.2; python_version == '3.7'", "adlfs~=2023.1; python_version >= '3.8'", "bandit>=1.6.2, <2.0", "behave==1.2.6", @@ -147,7 +146,6 @@ def _collect_requirements(requires): "delta-spark~=1.2.1; python_version < '3.11'", "dill~=0.3.1", "filelock>=3.4.0, <4.0", - "gcsfs>=2021.4, <=2023.1; python_version == '3.7'", "gcsfs>=2023.1, <2023.3; python_version >= '3.8'", "geopandas>=0.6.0, <1.0", "hdfs>=2.5.8, <3.0", diff --git a/tests/framework/cli/test_cli_hooks.py b/tests/framework/cli/test_cli_hooks.py index 13b2633cc5..75ecf9a309 100644 --- a/tests/framework/cli/test_cli_hooks.py +++ b/tests/framework/cli/test_cli_hooks.py @@ -74,7 +74,7 @@ def fake_plugin_distribution(mocker): version="0.1", ) mocker.patch( - "pluggy._manager.importlib_metadata.distributions", + "pluggy._manager.importlib.metadata.distributions", return_value=[fake_distribution], ) return fake_distribution