Skip to content

Commit bc17cea

Browse files
[ISV-4941] Upgrade to Fedora 40 and Python 3.12
1 parent 1ea9417 commit bc17cea

File tree

7 files changed

+230
-225
lines changed

7 files changed

+230
-225
lines changed

.github/workflows/validation.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Set up PDM
2020
uses: pdm-project/setup-pdm@v4
2121
with:
22-
python-version: "3.11"
22+
python-version: "3.12"
2323

2424
- name: Install non-python dependencies
2525
run: |

docs/developer-guide.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ Choose the preparation process according to your Linux version.
315315
```bash
316316
sudo dnf -y install hadolint
317317
python3 -m pip install pdm
318-
pdm venv create 3.11
318+
pdm venv create 3.12
319319
pdm install
320320
source .venv/bin/activate
321321
python3 -m pip install ansible-lint
@@ -328,7 +328,7 @@ Before starting, make sure you have installed the [Brew][2] package manager.
328328
```bash
329329
brew install hadolint
330330
python3 -m pip install pdm
331-
pdm venv create 3.11
331+
pdm venv create 3.12
332332
pdm install
333333
source .venv/bin/activate
334334
python3 -m pip install ansible-lint
@@ -347,7 +347,7 @@ tox
347347
Setup python virtual environment using pdm.
348348

349349
```shell
350-
pdm venv create 3.11
350+
pdm venv create 3.12
351351
pdm install
352352
source .venv/bin/activate
353353
```

operator-pipeline-images/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM registry.fedoraproject.org/fedora:38
1+
FROM registry.fedoraproject.org/fedora:40
22

33
LABEL description="Cli tools for operator certification pipeline"
44
LABEL summary="This image contains tools required for operator bundle certification pipeline."
@@ -10,10 +10,10 @@ ARG ARCH=amd64
1010

1111
USER root
1212

13+
1314
# setup certificates
1415
COPY operator-pipeline-images/certs/* /etc/pki/ca-trust/source/anchors/
1516
RUN /usr/bin/update-ca-trust
16-
1717
# This is just a temporary workaround until we figure out how to
1818
# override CA bundle in OCP
1919
RUN cp /etc/pki/tls/certs/ca-bundle.crt /etc/pki/tls/certs/custom-ca-bundle.crt
@@ -70,7 +70,7 @@ COPY ./operator-pipeline-images ./operator-pipeline-images
7070
RUN pip3 install --no-cache-dir pdm
7171
# install dependencies in virtual environment
7272
COPY ./pdm.lock ./pyproject.toml ./README.md ./
73-
RUN pdm venv create 3.11 && pdm install --no-lock --no-editable \
73+
RUN pdm venv create 3.12 && pdm install --no-lock --no-editable \
7474
--group operatorcert-dev
7575

7676
ENV VIRTUAL_ENV=/home/user/.venv

operator-pipeline-images/tests/test_utils.py

+5
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from operatorcert import utils
1010
from operatorcert.utils import store_results
1111
from requests import HTTPError, Session
12+
from requests.adapters import HTTPAdapter
1213

1314

1415
def test_find_file(tmp_path: Path) -> None:
@@ -78,6 +79,10 @@ def test_add_session_retries() -> None:
7879
backoff_factor=backoff_factor,
7980
status_forcelist=status_forcelist,
8081
)
82+
# Check adapter types for HTTPAdapter to pass mypy
83+
assert isinstance(session.adapters["http://"], HTTPAdapter) and isinstance(
84+
session.adapters["https://"], HTTPAdapter
85+
)
8186
assert session.adapters["http://"].max_retries.total == total
8287
assert session.adapters["http://"].max_retries.backoff_factor == backoff_factor
8388
assert session.adapters["http://"].max_retries.status_forcelist == status_forcelist

pdm.lock

+216-216
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tool.black]
2-
target_version = ['py311']
2+
target_version = ['py312']
33

44
[tool.pdm.build]
55
package-dir = "./operator-pipeline-images"

tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ commands = pylint {[vars]OPERATOR_MODULE} \
4949
-d fixme
5050

5151
[testenv:yamllint]
52-
basepython = python3.11
52+
basepython = python3.12
5353
groups = operatorcert-dev
5454
files =
5555
.

0 commit comments

Comments
 (0)