Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop Python 3.7 supports in Develop #3060

Merged
merged 16 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions .circleci/continue_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,10 @@ jobs:
- win_setup:
python_version: <<parameters.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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't really matter since we are going to remove CCI

# is specific to a Python version and is cached separately for each.
condition:
equal: ["3.7", <<parameters.python_version>>]
equal: [<<parameters.python_version>>]
steps:
- save_cache:
name: Save Python package cache
Expand Down Expand Up @@ -458,7 +458,7 @@ jobs:
publish_kedro:
executor:
name: docker
python_version: "3.7"
python_version: "3.8"
steps:
- setup
- add_ssh_keys
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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-<<matrix.python_version>>
filters:
Expand Down Expand Up @@ -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
6 changes: 3 additions & 3 deletions .github/workflows/all-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-only-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
1 change: 1 addition & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions docs/source/get_started/install.md
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -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:

Expand Down Expand Up @@ -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/).
4 changes: 2 additions & 2 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
2 changes: 1 addition & 1 deletion docs/source/introduction/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

```
2 changes: 0 additions & 2 deletions features/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 2 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This causes nModuleNotFoundError: No module named \'pluggy\'

"pluggy>=1.0",
"PyYAML>=4.2,<7.0",
"rich>=12.0,<14.0",
"rope>=0.21,<2.0", # subject to LGPLv3 license
Expand All @@ -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",
Expand Down
2 changes: 0 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion tests/framework/cli/test_cli_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down