From 8410979e355b1cd331eaec7c7d73bfe99d65b3f1 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Wed, 6 Sep 2023 18:08:49 +0200 Subject: [PATCH] Maintenance: Update to Python 3.11, and modernize dependencies --- .github/workflows/main.yaml | 6 +++--- CHANGES.rst | 2 ++ Dockerfile | 4 ++-- setup.py | 31 +++++++++++++++++-------------- 4 files changed, 24 insertions(+), 19 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 19635693..23bd7230 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -18,7 +18,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: "3.11" - name: Install dependencies run: | python -m pip install --upgrade pip pre-commit @@ -45,7 +45,7 @@ jobs: uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: "3.11" - name: Install dependencies run: | python -m pip install ".[docs]" @@ -64,7 +64,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: "3.11" - name: Install dependencies run: | python -m pip install --upgrade -e ".[testing]" diff --git a/CHANGES.rst b/CHANGES.rst index d20f2e2a..bc7ef4a7 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,6 +5,8 @@ Changelog Unreleased ---------- +* Maintenance: Update to Python 3.11, and modernize dependencies + 2.39.0 (2024-05-22) ------------------- diff --git a/Dockerfile b/Dockerfile index 28767650..6f5dff58 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build container -FROM python:3.8-slim AS build +FROM python:3.11-slim AS build RUN mkdir -pv /src @@ -14,7 +14,7 @@ RUN python -m pip install -U setuptools==65.5.1 && \ # Run container -FROM python:3.8-slim +FROM python:3.11-slim LABEL license="Apache License 2.0" \ maintainer="Crate.IO GmbH " \ diff --git a/setup.py b/setup.py index c02def95..6b00adbf 100644 --- a/setup.py +++ b/setup.py @@ -49,16 +49,16 @@ def read(path: str) -> str: package_data={"crate.operator": ["data/*"]}, setup_requires=["setuptools>=58", "setuptools_scm>=6.2"], install_requires=[ - "aiopg==1.4.0", - "bitmath==1.3.3.1", - "kopf==1.35.6", + "aiopg<1.5", + "bitmath<1.4", + "kopf<1.37", # Careful with 22+ - it is currently not compatible # and results in various "permission denied" errors. - "kubernetes-asyncio==21.7.1", - "PyYAML<7.0", - "prometheus_client==0.20.0", - "aiohttp==3.9.5", - "wrapt==1.16.0", + "kubernetes-asyncio<22", + "PyYAML<7", + "prometheus_client<0.21", + "aiohttp<3.10", + "wrapt<1.17", ], extras_require={ "docs": [ @@ -70,12 +70,12 @@ def read(path: str) -> str: "alabaster==0.7.13", ], "testing": [ - "faker==18.3.1", - "pytest==8.2.1", - "pytest-aiohttp==1.0.5", - "pytest-asyncio==0.23.6", - "pytest-xdist==3.6.1", # enables parallel testing - "filelock==3.14.0", # used for locks when running in parallel mode + "faker<19", + "pytest<9", + "pytest-aiohttp<2", + "pytest-asyncio<0.24", + "pytest-xdist<3.7", # enables parallel testing + "filelock<3.15", # used for locks when running in parallel mode ], "develop": [ "black==22.3.0", @@ -90,6 +90,9 @@ def read(path: str) -> str: "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", ], use_scm_version=True, )