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

chore: remove python 3.8 support for kedro-docker #876

Merged
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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ repos:
exclude: ^(?!kedro-docker/kedro_docker/).*\.py$
pass_filenames: false
stages: [ manual ]
entry: ruff kedro-docker --fix --exit-non-zero-on-fix
entry: ruff check kedro-docker --fix --exit-non-zero-on-fix

- id: ruff-kedro-telemetry
name: "Ruff on kedro_telemetry/*"
Expand Down
4 changes: 2 additions & 2 deletions kedro-docker/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Kedro-Docker

[![Python Version](https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11%20%7C%203.12-blue.svg)](https://pypi.org/project/kedro-docker/)
[![Python Version](https://img.shields.io/badge/python-3.9%20%7C%203.10%20%7C%203.11%20%7C%203.12-blue.svg)](https://pypi.org/project/kedro-docker/)
[![PyPI version](https://badge.fury.io/py/kedro-docker.svg)](https://pypi.org/project/kedro-docker/)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Code Style: Black](https://img.shields.io/badge/code%20style-black-black.svg)](https://github.com/ambv/black)
Expand Down Expand Up @@ -63,7 +63,7 @@ Behind the scenes Kedro does the following:

> *Note:* By default, `kedro docker build` creates an image without Spark and Hadoop.

> *Note:* By default, when calling `kedro docker build` image is built with `python:VERSION-buster` image, where VERSION is Python (major + minor) version from the current environment. By specifying `--base-image` option, different base image can be used. For example `kedro docker build --base-image="python:3.8-buster"`.
> *Note:* By default, when calling `kedro docker build` image is built with `python:VERSION-buster` image, where VERSION is Python (major + minor) version from the current environment. By specifying `--base-image` option, different base image can be used. For example `kedro docker build --base-image="python:3.9-buster"`.

> *Note:* You can generate the `Dockerfile`, `.dockerignore` or `.dive-ci` files without building the image by running `kedro docker init`. This might be of use in case you would like to modify these files before the first build.

Expand Down
4 changes: 4 additions & 0 deletions kedro-docker/RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Upcoming Release

# Release 0.7.0
## Major features and improvements
* Removed support for python 3.8

# Release 0.6.1
* Unpinned pip version requirement

Expand Down
3 changes: 2 additions & 1 deletion kedro-docker/features/steps/sh_run.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import shlex
import subprocess
from typing import Sequence, Union
from collections.abc import Sequence
from typing import Union

import psutil

Expand Down
6 changes: 3 additions & 3 deletions kedro-docker/features/steps/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from pathlib import Path
from threading import Thread
from time import sleep, time
from typing import Any, Callable, List
from typing import Any, Callable

import docker
from kedro.framework.cli.utils import get_pkg_version
Expand Down Expand Up @@ -130,7 +130,7 @@ def init_docker_client(**kwargs) -> docker.client.DockerClient:
return docker.from_env(**kwargs)


def get_docker_containers(name: str) -> List[docker.models.containers.Container]:
def get_docker_containers(name: str) -> list[docker.models.containers.Container]:
"""
Get list of docker containers which contain `name` in their names.

Expand Down Expand Up @@ -164,7 +164,7 @@ def docker_prune():
client.images.prune()


def get_docker_images(name: str) -> List[docker.models.images.Image]:
def get_docker_images(name: str) -> list[docker.models.images.Image]:
"""
Get docker images with `name` in their names.

Expand Down
2 changes: 1 addition & 1 deletion kedro-docker/kedro_docker/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
import shutil
import socket
import subprocess
from collections.abc import Sequence
from importlib import import_module
from itertools import chain
from pathlib import Path, PurePosixPath
from subprocess import DEVNULL, PIPE
from typing import Sequence

from click import secho
from kedro.framework.cli.utils import KedroCliError
Expand Down
4 changes: 2 additions & 2 deletions kedro-docker/kedro_docker/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import shlex
import subprocess
from collections.abc import Sequence
from pathlib import Path
from sys import version_info
from typing import Dict, Sequence

import click
from kedro import __version__ as kedro_version
Expand Down Expand Up @@ -191,7 +191,7 @@ def docker_build(ctx, uid, gid, spark, base_image, image, docker_args): # noqa:
call(command)


def _mount_info() -> Dict[str, Sequence[str]]:
def _mount_info() -> dict[str, Sequence[str]]:
res = {
"host_root": str(Path.cwd()),
"container_root": "/home/kedro_docker",
Expand Down
2 changes: 1 addition & 1 deletion kedro-docker/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ authors = [
{name = "Kedro"}
]
description = "Kedro-Docker makes it easy to package Kedro projects with Docker."
requires-python = ">=3.8"
requires-python = ">=3.9"
license = {text = "Apache Software License (Apache 2.0)"}
dependencies = [
"anyconfig~=0.10.0", # not directly required, pinned by Snyk to avoid a vulnerability
Expand Down