Skip to content

Commit

Permalink
chore: Update tox to version 4 and repin dependencies (#3283)
Browse files Browse the repository at this point in the history
* chore: Update tox to version 4

* chore: Update dockerfile to remove some tox warnings
  • Loading branch information
hneiva authored Feb 6, 2025
1 parent b593d46 commit d198acc
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 19 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

FROM python:3.11-slim

MAINTAINER jcristau@mozilla.com
LABEL maintainer="releng@mozilla.com"

# uwsgi needs libpcre3 for routing support to be enabled.
# default-libmysqlclient-dev is required to use SQLAlchemy with MySQL, which we do in production.
Expand Down Expand Up @@ -31,7 +31,7 @@ COPY uwsgi/ /app/uwsgi/
COPY scripts/manage-db.py scripts/run-batch-deletes.sh scripts/run.sh scripts/reset-stage-db.sh scripts/get-prod-db-dump.py /app/scripts/
COPY MANIFEST.in pyproject.toml setup.py version.json version.txt /app/

RUN python setup.py install
RUN pip install .

WORKDIR /app

Expand Down
7 changes: 3 additions & 4 deletions Dockerfile.test
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
ARG PYTHON_VERSION

ARG PYTHON_VERSION=3.11
FROM python:${PYTHON_VERSION}-slim

MAINTAINER jcristau@mozilla.com
LABEL maintainer="releng@mozilla.com"

# netcat is needed for health checks
# Some versions of the python:3.8 Docker image remove libpcre3, which uwsgi needs for routing support to be enabled.
Expand Down Expand Up @@ -32,7 +31,7 @@ COPY MANIFEST.in setup.py pyproject.toml tox.ini version.json version.txt /app/
# we need .git to gather information for coverage reports
COPY .git/ /app/.git/

RUN python setup.py develop
RUN pip install -e .

# Using /bin/bash as the entrypoint works around some volume mount issues on Windows
# where volume-mounted files do not have execute bits set.
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
line_length = 160

[tool.pytest.ini_options]
asyncio_mode="auto"
asyncio_default_fixture_loop_scope="function"
2 changes: 1 addition & 1 deletion requirements/docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ referencing==0.36.1 \
# via
# jsonschema
# jsonschema-specifications
repoze.lru==0.7 \
repoze-lru==0.7 \
--hash=sha256:0429a75e19380e4ed50c0694e26ac8819b4ea7851ee1fc7583c8572db80aff77 \
--hash=sha256:f77bf0e1096ea445beadd35f3479c5cff2aa1efe604a133e67150bc8630a62ea
# via -r requirements/docs.in
Expand Down
2 changes: 1 addition & 1 deletion requirements/local.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-r test.in

tox<4
tox
18 changes: 11 additions & 7 deletions requirements/local.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# SHA1:6d644f4db1875fbf663e9b31cb93871f49b9aab9
# SHA1:f88f7cbe68a488d5a461e166640111dd30a94bcb
#
# This file is autogenerated by pip-compile-multi
# To update, run:
#
# pip-compile-multi
#
-r test.txt
colorama==0.4.6 \
--hash=sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44 \
--hash=sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6
# via tox
distlib==0.3.9 \
--hash=sha256:47f8c22fd27c27e25a65601af709b38e4f0a45ea4fc2e710f65755fa8caaaf87 \
--hash=sha256:a60f20dea646b8a33f3e7772f74dc0b2d0772d2837ee1342a00645c81edf9403
Expand All @@ -16,13 +20,13 @@ filelock==3.17.0 \
# via
# tox
# virtualenv
py==1.11.0 \
--hash=sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719 \
--hash=sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378
pyproject-api==1.9.0 \
--hash=sha256:326df9d68dea22d9d98b5243c46e3ca3161b07a1b9b18e213d1e24fd0e605766 \
--hash=sha256:7e8a9854b2dfb49454fae421cb86af43efbb2b2454e5646ffb7623540321ae6e
# via tox
tox==3.28.0 \
--hash=sha256:57b5ab7e8bb3074edc3c0c0b4b192a4f3799d3723b2c5b76f1fa9f2d40316eea \
--hash=sha256:d0d28f3fe6d6d7195c27f8b054c3e99d5451952b54abdae673b71609a581f640
tox==4.24.1 \
--hash=sha256:083a720adbc6166fff0b7d1df9d154f9d00bfccb9403b8abf6bc0ee435d6a62e \
--hash=sha256:57ba7df7d199002c6df8c2db9e6484f3de6ca8f42013c083ea2d4d1e5c6bdc75
# via -r requirements/local.in
virtualenv==20.29.1 \
--hash=sha256:4e4cb403c0b0da39e13b46b1b2476e505cb0046b25f242bee80f62bf990b2779 \
Expand Down
6 changes: 3 additions & 3 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ flake8-black==0.3.6 \
--hash=sha256:0dfbca3274777792a5bcb2af887a4cad72c72d0e86c94e08e3a3de151bb41c34 \
--hash=sha256:fe8ea2eca98d8a504f22040d9117347f6b367458366952862ac3586e7d4eeaca
# via -r requirements/test.in
hypothesis==6.124.2 \
--hash=sha256:c98823fc1323f23399e5f2251982fd1f38259f84cf627aaaea1b3f0a0d4d2b03 \
--hash=sha256:fef7709a404929a9cd3e785f60a6e026089aab986e288b1fdced13091574d474
hypothesis==6.124.3 \
--hash=sha256:8f7a2c995e4d5f110b7a427ddeda323e05277730e2885fafc23da84dcbb0667e \
--hash=sha256:cfb17e98daa572b51a8f26b3e2ea5b0f76cdae750ac746e0f561a426a77828ba
# via -r requirements/test.in
iniconfig==2.0.0 \
--hash=sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3 \
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ deps =
--no-deps
-r {toxinidir}/requirements/test.txt
commands =
{posargs:py.test -n auto --cov-config=tox.ini --cov-append --cov=auslib --cov-report term-missing tests}
{posargs:pytest -n auto --cov=auslib --cov-config=tox.ini --cov-report=term-missing --cov-append tests}
coverage run -a scripts/test-rules.py

[testenv:clean]
Expand Down

0 comments on commit d198acc

Please sign in to comment.