Skip to content

Commit 595c82f

Browse files
authored
Switch reference python version to 3.11 (#501)
While we still require python 3.10, the lock files are created only for 3.11 in order to be able use newest ansible-core version.
1 parent 6c14643 commit 595c82f

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

.config/constraints.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# tox run deps
33
ansible-builder==3.1.0
44
ansible-compat==24.10.0
5+
ansible-core==2.18.1
56
ansible-creator==24.12.0
67
ansible-dev-environment==24.12.0
78
ansible-lint==24.12.2
@@ -42,7 +43,6 @@ django-stubs-ext==5.1.1
4243
dnspython==2.7.0
4344
docstring-parser-fork==0.0.9
4445
enrich==1.2.7
45-
exceptiongroup==1.2.2
4646
execnet==2.1.1
4747
filelock==3.16.1
4848
ghp-import==2.1.0
@@ -144,7 +144,6 @@ termcolor==2.5.0
144144
text-unidecode==1.3
145145
tinycss2==1.4.0
146146
toml-sort==0.24.2
147-
tomli==2.2.1
148147
tomlkit==0.13.2
149148
tox==4.23.2
150149
tox-ansible==24.12.0
@@ -162,7 +161,6 @@ yamllint==1.35.1
162161
zipp==3.21.0
163162

164163
# The following packages were excluded from the output:
165-
# ansible-core
166164
# pip
167165
# resolvelib
168166
# typing-extensions

.config/requirements-lock.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# tox run deps
33
ansible-builder==3.1.0
44
ansible-compat==24.10.0
5+
ansible-core==2.18.1
56
ansible-creator==24.12.0
67
ansible-dev-environment==24.12.0
78
ansible-lint==24.12.2
@@ -22,7 +23,6 @@ cryptography==44.0.0
2223
distlib==0.3.9
2324
distro==1.9.0
2425
enrich==1.2.7
25-
exceptiongroup==1.2.2
2626
execnet==2.1.1
2727
filelock==3.16.1
2828
importlib-metadata==8.5.0
@@ -60,7 +60,6 @@ rpds-py==0.22.3
6060
ruamel-yaml==0.18.6
6161
ruamel-yaml-clib==0.2.12
6262
subprocess-tee==0.4.2
63-
tomli==2.2.1
6463
tox==4.23.2
6564
tox-ansible==24.12.0
6665
tzdata==2024.2
@@ -70,7 +69,5 @@ yamllint==1.35.1
7069
zipp==3.21.0
7170

7271
# The following packages were excluded from the output:
73-
# ansible-core
7472
# resolvelib
75-
# typing-extensions
7673
# setuptools

.github/workflows/tox.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
with:
3333
run_pre: ./tools/test-setup.sh
3434
max_python: "3.13"
35-
default_python: "3.10" # min version, for 'lint' in particular
35+
default_python: "3.11" # min version, for 'lint' in particular
3636
jobs_producing_coverage: 8
3737
other_names_also: |
3838
devspaces
@@ -127,10 +127,10 @@ jobs:
127127
TOXENV: pkg
128128
TOX_EXTRA_BINDEP: 0
129129
steps:
130-
- name: Switch to using Python 3.10 by default
130+
- name: Switch to using Python 3.11 by default
131131
uses: actions/setup-python@v5
132132
with:
133-
python-version: "3.10"
133+
python-version: "3.11"
134134

135135
- name: Install tox
136136
run: python3 -m pip install --user "tox>=4.0.0"

.pre-commit-config.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ ci:
1212
default_language_version:
1313
# minimal version we support officially as this will impact mypy, pylint and
1414
# pip-tools in undesirable ways.
15-
python: "3.10"
15+
# minimal version determined by minimal version required by ansible-core, but
16+
# we might keep a backwards compatibility version for older ones, but the
17+
# lock extra will not be usable those.
18+
python: "3.11"
1619
repos:
1720
# - repo: https://github.com/rhysd/actionlint
1821
# rev: v1.7.3
@@ -93,7 +96,7 @@ repos:
9396
name: Spell check with cspell
9497

9598
- repo: https://github.com/jsh9/pydoclint
96-
rev: "0.5.9"
99+
rev: "0.5.12"
97100
hooks:
98101
- id: pydoclint
99102
# This allows automatic reduction of the baseline file when needed.
@@ -142,7 +145,7 @@ repos:
142145
name: Upgrade constraints files and requirements
143146
# files: ^(pyproject\.toml|requirements\.txt)$
144147
language: python
145-
language_version: "3.10" # minimal we support officially
148+
language_version: "3.11" # minimal required by latest ansible-core
146149
entry: python3 -m uv pip compile -q --all-extras --output-file=.config/constraints.txt pyproject.toml --upgrade
147150
pass_filenames: false
148151
stages:
@@ -153,7 +156,7 @@ repos:
153156
name: Check constraints files and requirements
154157
# files: ^(pyproject\.toml|requirements\.txt)$
155158
language: python
156-
language_version: "3.10" # minimal we support officially
159+
language_version: "3.11" # minimal required by latest ansible-core
157160
entry: python3 -m uv pip compile -q --all-extras --output-file=.config/constraints.txt pyproject.toml
158161
pass_filenames: false
159162
additional_dependencies:
@@ -165,7 +168,7 @@ repos:
165168
entry: python3 -m uv pip compile -q --upgrade --constraint=.config/constraints.txt --output-file=.config/requirements-lock.txt pyproject.toml --strip-extras
166169
files: ^.config\/.*requirements.*$
167170
language: python
168-
language_version: "3.10" # minimal we support officially
171+
language_version: "3.11" # minimal required by latest ansible-core
169172
pass_filenames: false
170173
stages: [manual]
171174
additional_dependencies:

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,8 @@ convention = "google"
370370
[tool.setuptools.dynamic]
371371
dependencies = {file = [".config/requirements.in"]}
372372
optional-dependencies.docs = {file = [".config/requirements-docs.in"]}
373+
# 'lock' will work only if you use a python version supported by the latest
374+
# release of ansible-core, otherwise installation will fail
373375
optional-dependencies.lock = {file = [".config/requirements-lock.txt"]}
374376
optional-dependencies.server = {file = [".config/requirements-server.in"]}
375377
optional-dependencies.test = {file = [".config/requirements-test.in"]}
@@ -401,4 +403,4 @@ environments = ["platform_system != 'Windows'"]
401403
# annotation-style = "line"
402404
custom-compile-command = "tox run deps"
403405
no-annotate = true
404-
no-emit-package = ["ansible-core", "pip", "resolvelib", "typing_extensions", "uv", "pip", "distribute", "setuptools"]
406+
no-emit-package = ["pip", "resolvelib", "typing_extensions", "uv", "pip", "distribute", "setuptools"]

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ allowlist_externals =
5353

5454
[testenv:deps]
5555
description = Bump all dependencies
56-
base_python = python3.10
56+
base_python = python3.11
5757
skip_install = true
5858
deps =
5959
{[testenv:lint]deps}

0 commit comments

Comments
 (0)