From 5c1cd3b7c303677560baae893bcd8c314f356949 Mon Sep 17 00:00:00 2001 From: Aleksey Nogin Date: Mon, 12 Feb 2024 13:11:46 -0800 Subject: [PATCH] Use python3.8 in docker images (#416) * Use python3.8 in docker images * Require pytest<8.0 This is needed becase of https://github.com/pytest-dev/pytest/issues/11890 https://github.com/TvoroG/pytest-lazy-fixture/issues/65 * Update changelog * Revert "Update changelog" This reverts commit 500ee9b1c6140848a6ff102bf4a6180a77b85d8e. Making changes before having coffee :( * Add a note on recommending Python 3.8 * `ofrak_core` also needs `pytest<8.0` --- build_image.py | 2 +- docs/environment-setup.md | 2 +- docs/getting-started.md | 2 +- ofrak_core/Dockerstub | 2 +- ofrak_core/requirements-test.txt | 3 ++- ofrak_type/setup.py | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/build_image.py b/build_image.py index a2b021e02..cb2226259 100644 --- a/build_image.py +++ b/build_image.py @@ -195,7 +195,7 @@ def create_dockerfile_base(config: OfrakImageConfig) -> str: dockerfile_base_parts += [f"### {dockerstage_path}", dockerstub] dockerfile_base_parts += [ - "FROM python:3.7-bullseye@sha256:338ead05c1a0aa8bd8fcba8e4dbbe2afd0283b4732fd30cf9b3bfcfcbc4affab", + "FROM python:3.8-bullseye@sha256:e1cd369204123e89646f8c001db830eddfe3e381bd5c837df00141be3bd754cb", "", ] diff --git a/docs/environment-setup.md b/docs/environment-setup.md index 7a00c452f..bb4a66aec 100644 --- a/docs/environment-setup.md +++ b/docs/environment-setup.md @@ -1,7 +1,7 @@ # Environment Setup & Installing OFRAK !!! warning - OFRAK is a Python library supporting Python3.7 and up. First and foremost, make sure your Python and pip installations are for Python3.7+! + OFRAK is a Python library supporting Python3.7 and up. First and foremost, make sure your Python and pip installations are for Python3.7+! Python 3.8 is recommended, as this is the version we primarily test OFRAK with. There are three main ways one can set up an environment to use OFRAK: diff --git a/docs/getting-started.md b/docs/getting-started.md index 7660125b4..8716d56c2 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -3,7 +3,7 @@ ## Quick Start - Unpack a firmware file and display it in the GUI !!! warning - OFRAK is a Python library supporting Python3.7 and up. First and foremost, make sure your Python and pip installations are for Python3.7+! + OFRAK is a Python library supporting Python3.7 and up. First and foremost, make sure your Python and pip installations are for Python3.7+! Python 3.8 is recommended, as this is the version we primarily test OFRAK with. ```bash pip install ofrak diff --git a/ofrak_core/Dockerstub b/ofrak_core/Dockerstub index f4725a6be..b81261935 100644 --- a/ofrak_core/Dockerstub +++ b/ofrak_core/Dockerstub @@ -61,7 +61,7 @@ RUN cd /tmp && \ # Install Jefferson WORKDIR /tmp -RUN wget https://bootstrap.pypa.io/pip/get-pip.py && python3.9 get-pip.py && python3.7 get-pip.py && rm get-pip.py +RUN wget https://bootstrap.pypa.io/pip/get-pip.py && python3.9 get-pip.py && python3.8 get-pip.py && rm get-pip.py RUN python3.9 -m pip install jefferson WORKDIR / diff --git a/ofrak_core/requirements-test.txt b/ofrak_core/requirements-test.txt index 5a863960d..977de5a37 100644 --- a/ofrak_core/requirements-test.txt +++ b/ofrak_core/requirements-test.txt @@ -1,5 +1,6 @@ autoflake==1.4 -pytest +# pytest-lazy-fixture does not work with pytest 8.0.0 - https://github.com/TvoroG/pytest-lazy-fixture/issues/65 +pytest<8.0 hypothesis~=6.39.3 hypothesis-trio trio-asyncio diff --git a/ofrak_type/setup.py b/ofrak_type/setup.py index c74f530b4..54e5a162a 100644 --- a/ofrak_type/setup.py +++ b/ofrak_type/setup.py @@ -32,7 +32,7 @@ def run(self): "fun-coverage==0.2.0", "hypothesis~=6.39.3", "mypy==0.942", - "pytest", + "pytest<8.0", "pytest-cov", ] },