Kaynağa Gözat

chore: bump deps for alpine (#6475)

Without this, we cannot bump alpine to the latest version.
Latest version comes with python which does not ship cgi module
(not present in 3.13 and above).

This module was necessary for htmlmin, listed explicitly
in requirements.txt.

htmlmin was a dependency of older versions of mkdocs-minify-plugin.
This plugin is NOT CONFIGURED in our environment, so we should
remove it.

If we introduced minifying for mkdocs, we will switch to
minify-html and the more modern mkdocs-minify-html-plugin

Since we are unpinning everything, we can remove many
dependencies that were transitively present, allowing us
to clean up the docs build.

At the same time, installation need to use the right wheels.

As the Dockerfile was bumping pip without bumping
wheel and setuptools, I fixed that hidden requirement to
bump the 3 together.

Instead of having the same problem in the future, I added
a new file: requirements.in. This will contain what we should
explicitly have, UNPINNED. This allows us to be very explicit
about why we add a certain requirement. The requirements.txt
stays for dependabot and building purposes, as we need pinned
requirements for stability.

The requirements.txt can be generated with pip-compile from
pip-tools.

This means the PR keeps the best of both worlds:
A pinned requirements.txt for building in a stable way,
and an unpinned list of requirements to mention what we
actually wanted to have in our setup.

Fixes: #6474

Signed-off-by: Jean-Philippe Evrard <jean-philippe.evrard+rochepub@external.roche.com>
Jean-Philippe Evrard 4 gün önce
ebeveyn
işleme
f42c5eaeed

+ 2 - 2
hack/api-docs/Dockerfile

@@ -11,7 +11,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-FROM alpine:3.23@sha256:5b10f432ef3da1b8d4c7eb6c487f2f5a8f096bc91145e68878dd4a5019afde11
+FROM alpine:3.24@sha256:a2d49ea686c2adfe3c992e47dc3b5e7fa6e6b5055609400dc2acaeb241c829f4
 RUN apk add -U --no-cache \
     bash \
     diffutils \
@@ -28,7 +28,7 @@ ENV PATH=$PATH:/.venv/bin
 COPY requirements.txt /
 RUN python3 -m venv .venv && \
     source .venv/bin/activate && \
-    pip3 install --upgrade pip && \
+    pip3 install --upgrade pip wheel setuptools && \
     pip3 install -r /requirements.txt
 
 # Disable the top-level directory owner check

+ 7 - 0
hack/api-docs/requirements.in

@@ -0,0 +1,7 @@
+# NOTE(evrardjp): pip-compile can be installed from pip-tools
+# in your own venv to generate the requirements.txt:
+# pip-compile --output-file=requirements.txt requirements.in
+# mkdocs if fetched as deps of mkdocs-material
+mkdocs-material
+mike @ git+https://github.com/jimporter/mike@300593c338b18f61f604d18457c351e166318020
+mkdocs-macros-plugin

+ 85 - 15
hack/api-docs/requirements.txt

@@ -1,42 +1,112 @@
-Babel==2.18.0
+#
+# This file is autogenerated by pip-compile with Python 3.14
+# by the following command:
+#
+#    pip-compile --output-file=requirements.txt requirements.in
+#
+babel==2.18.0
+    # via mkdocs-material
+backrefs==7.0
+    # via mkdocs-material
 certifi==2026.5.20
+    # via requests
 charset-normalizer==3.4.7
+    # via requests
 click==8.4.1
+    # via mkdocs
 colorama==0.4.6
-csscompressor==0.9.5
+    # via mkdocs-material
 ghp-import==2.1.0
-htmlmin==0.1.12
+    # via mkdocs
+hjson==3.1.0
+    # via
+    #   mkdocs-macros-plugin
+    #   super-collections
 idna==3.18
+    # via requests
 importlib-metadata==9.0.0
+    # via mike
 importlib-resources==7.1.0
-Jinja2==3.1.6
-jsmin==3.0.1
-livereload==2.7.1
-Markdown==3.10.2
-MarkupSafe==3.0.3
+    # via mike
+jinja2==3.1.6
+    # via
+    #   mike
+    #   mkdocs
+    #   mkdocs-macros-plugin
+    #   mkdocs-material
+markdown==3.10.2
+    # via
+    #   mkdocs
+    #   mkdocs-material
+    #   pymdown-extensions
+markupsafe==3.0.3
+    # via
+    #   jinja2
+    #   mkdocs
 mergedeep==1.3.4
+    # via
+    #   mkdocs
+    #   mkdocs-get-deps
 mike @ git+https://github.com/jimporter/mike@300593c338b18f61f604d18457c351e166318020
+    # via -r requirements.in
 mkdocs==1.6.1
+    # via
+    #   mike
+    #   mkdocs-macros-plugin
+    #   mkdocs-material
+mkdocs-get-deps==0.2.2
+    # via mkdocs
 mkdocs-macros-plugin==1.5.0
+    # via -r requirements.in
 mkdocs-material==9.7.6
+    # via -r requirements.in
 mkdocs-material-extensions==1.3.1
-mkdocs-minify-plugin==0.8.0
+    # via mkdocs-material
 packaging==26.2
+    # via
+    #   mkdocs
+    #   mkdocs-macros-plugin
 paginate==0.5.7
+    # via mkdocs-material
 pathspec==1.1.1
-pep562==1.1
+    # via
+    #   mkdocs
+    #   mkdocs-macros-plugin
 platformdirs==4.10.0
-Pygments==2.20.0
+    # via mkdocs-get-deps
+pygments==2.20.0
+    # via mkdocs-material
 pymdown-extensions==10.21.3
+    # via mkdocs-material
 python-dateutil==2.9.0.post0
-PyYAML==6.0.3
-pyyaml_env_tag==1.1
-regex==2026.5.9
+    # via
+    #   ghp-import
+    #   mkdocs-macros-plugin
+pyyaml==6.0.3
+    # via
+    #   mike
+    #   mkdocs
+    #   mkdocs-get-deps
+    #   mkdocs-macros-plugin
+    #   pymdown-extensions
+    #   pyyaml-env-tag
+pyyaml-env-tag==1.1
+    # via mkdocs
 requests==2.34.2
+    # via
+    #   mkdocs-macros-plugin
+    #   mkdocs-material
 six==1.17.0
+    # via python-dateutil
+super-collections==0.6.2
+    # via mkdocs-macros-plugin
 termcolor==3.3.0
-tornado==6.5.7
+    # via mkdocs-macros-plugin
 urllib3==2.7.0
+    # via requests
 verspec==0.1.0
+    # via mike
 watchdog==6.0.0
+    # via mkdocs
 zipp==4.1.0
+    # via importlib-metadata