Skip to content

Commit

Permalink
Merge pull request #1020 from projectsyn/deprecate-py38-39
Browse files Browse the repository at this point in the history
Update minimum required Python to 3.10
  • Loading branch information
simu authored Sep 3, 2024
2 parents d4db223 + adf2a32 commit 5554398
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 112 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/build-virtualenv-caches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.11'
- uses: Gr1N/setup-poetry@v9
- name: Install tox
run: |
Expand All @@ -42,8 +42,6 @@ jobs:
strategy:
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
steps:
Expand Down Expand Up @@ -90,8 +88,6 @@ jobs:
strategy:
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
steps:
Expand Down Expand Up @@ -120,13 +116,13 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.11'
- uses: Gr1N/setup-poetry@v9
- uses: actions/cache@v4
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
- name: Install Poetry and setup Poetry virtualenv
run: |
poetry env use python3.9
poetry env use python3.11
poetry install
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.11'
- uses: Gr1N/setup-poetry@v9
- uses: actions/cache@v4
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
- name: Install Poetry and setup Poetry virtualenv
run: |
poetry env use python3.9
poetry env use python3.11
poetry install
- name: Install jsonnet-bundler
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.11'
- uses: Gr1N/setup-poetry@v9
- uses: actions/cache@v4
with:
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.11'
- uses: Gr1N/setup-poetry@v9
- name: Install tox
run: |
Expand All @@ -44,8 +44,6 @@ jobs:
strategy:
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
steps:
Expand Down Expand Up @@ -105,8 +103,6 @@ jobs:
strategy:
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
steps:
Expand Down Expand Up @@ -143,15 +139,15 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.11'
- uses: Gr1N/setup-poetry@v9
- uses: actions/cache@v4
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
- name: Install Poetry, setup Poetry virtualenv, and build Kapitan helm bindings
run: |
poetry env use python3.9
poetry env use python3.11
poetry install
- name: Install jsonnet-bundler
run: |
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Commodore also supports additional processing on the output of Kapitan, such as

## System Requirements

* Python 3.8 - 3.11 with `python3-dev` and `python3-venv` updated
* Python 3.10 - 3.11 with `python3-dev` and `python3-venv` updated
* [jsonnet-bundler](https://github.com/jsonnet-bundler/jsonnet-bundler)
* Our fork [projectsyn/jsonnet-bundler](https://github.com/projectsyn/jsonnet-bundler) is currently recommended.
It parallelizes fetching of dependencies, which speeds up Commodore significantly, and has fixes to make the dependency fetching more deterministic.
Expand Down
4 changes: 2 additions & 2 deletions docs/modules/ROOT/pages/explanation/running-commodore.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ We recommend that you use the Commodore Python package provided on PyPI to make

=== Prerequisites

* A Python version between 3.8 and 3.11 as `python3` and the Python `venv` module.
* A Python version between 3.10 and 3.11 as `python3` and the Python `venv` module.
We recommend that you install Python and the `venv` module with your preferred package manager.
* Additionally, a few of the Commodore Python package dependencies require a working C compiler, the Python 3 development package, and the FFI development package.
On Linux distributions you'll want packages `python3-dev` or `python3-devel` and `libffi-dev` or `libffi-devel` respectively.
Expand Down Expand Up @@ -51,7 +51,7 @@ This command should report something like
+
[source]
----
Python 3.8.10
Python 3.11.9
----

. Create a virtualenv in `~/.local/commodore-venv`
Expand Down
64 changes: 3 additions & 61 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ include = [
]

[tool.poetry.dependencies]
python = ">=3.8, <3.12"
python = ">=3.10, <3.12"
# NOTE: We restrict boto3/botocore versions to reduce complexity of Poetry's
# dependency resolution significantly, cf.
# https://github.com/orgs/python-poetry/discussions/8165#discussioncomment-6387378
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ envlist =
bandit
mypy
black
py3{8,9,10,11}{,-bench}
py3{10,11}{,-bench}
py311-reclass-rs

[testenv]
Expand Down
33 changes: 4 additions & 29 deletions tox.mk
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,7 @@ lintenv_mypy:
lintenv_black:
$(TOX_COMMAND) -e black --notest

.PHONY: test_py3.8 test_py3.9 test_py3.10 test_py3.11 test_py3.11_reclass_rs

test_py3.8:
$(TOX_COMMAND) -e py38

test_py3.9:
$(TOX_COMMAND) -e py39
.PHONY: test_py3.10 test_py3.11 test_py3.11_reclass_rs

test_py3.10:
$(TOX_COMMAND) -e py310
Expand All @@ -56,14 +50,7 @@ test_py3.11:
test_py3.11_reclass_rs:
$(TOX_COMMAND) -e py311-reclass-rs

.PHONY: testenv_py3.8 testenv_py3.9 testenv_py3.10 testenv_py3.11 testenv_py3.11_reclass_rs


testenv_py3.8:
$(TOX_COMMAND) -e py38 --notest

testenv_py3.9:
$(TOX_COMMAND) -e py39 --notest
.PHONY: testenv_py3.10 testenv_py3.11 testenv_py3.11_reclass_rs

testenv_py3.10:
$(TOX_COMMAND) -e py310 --notest
Expand All @@ -74,27 +61,15 @@ testenv_py3.11:
testenv_py3.11_reclass_rs:
$(TOX_COMMAND) -e py311 --notest

.PHONY: bench_py3.8 bench_py3.9 bench_py3.10 bench_py3.11

bench_py3.8:
$(TOX_COMMAND) -e py38-bench

bench_py3.9:
$(TOX_COMMAND) -e py39-bench
.PHONY: bench_py3.10 bench_py3.11

bench_py3.10:
$(TOX_COMMAND) -e py310-bench

bench_py3.11:
$(TOX_COMMAND) -e py311-bench

.PHONY: benchenv_py3.8 benchenv_py3.9 benchenv_py3.10 benchenv_py3.11

benchenv_py3.8:
$(TOX_COMMAND) -e py38-bench --notest

benchenv_py3.9:
$(TOX_COMMAND) -e py39-bench --notest
.PHONY: benchenv_py3.10 benchenv_py3.11

benchenv_py3.10:
$(TOX_COMMAND) -e py310-bench --notest
Expand Down

0 comments on commit 5554398

Please sign in to comment.