Skip to content

Commit

Permalink
Use python3.8 in docker images (#416)
Browse files Browse the repository at this point in the history
* Use python3.8 in docker images

* Require pytest<8.0

This is needed becase of pytest-dev/pytest#11890
TvoroG/pytest-lazy-fixture#65

* Update changelog

* Revert "Update changelog"

This reverts commit 500ee9b.

Making changes before having coffee :(

* Add a note on recommending Python 3.8

* `ofrak_core` also needs `pytest<8.0`
  • Loading branch information
ANogin authored Feb 12, 2024
1 parent 6052e9b commit 5c1cd3b
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
"",
]

Expand Down
2 changes: 1 addition & 1 deletion docs/environment-setup.md
Original file line number Diff line number Diff line change
@@ -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:

Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ofrak_core/Dockerstub
Original file line number Diff line number Diff line change
Expand Up @@ -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 /

Expand Down
3 changes: 2 additions & 1 deletion ofrak_core/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion ofrak_type/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
},
Expand Down

0 comments on commit 5c1cd3b

Please sign in to comment.