Skip to content

Conversation

@cedricrupb
Copy link

Hey!

When trying to reproduce some bugs, I noticed that some bugs could not be reproduced under Python 3.12. (or even Python 3.9) and required the specific Python version to be installed. This problem is also well documented here.

I think it would be nice to have a Docker environment that automatically "compiles" the code with the right Python version. Therefore, I started to prepare the pull request.

I mark this as a draft because I did not completely tested it on all bugs by now, but please let me know if you have any concerns with this change.

Best,
Cedric

@BaumiCoder
Copy link

How the different python versions should be handled within in the container, is described here by the author of the docker file: #92 (comment)

@cedricrupb
Copy link
Author

cedricrupb commented Nov 8, 2025

Thanks! I tried this at first, but uv does not support Python 3.6 any longer which multiple bugs/projects depend on. Therefore, I switched to Micromamba. It also seems that you still have to manually pick the correct version per bug, right? I am trying to automate this by reading the bug info file.

Copy link

@BaumiCoder BaumiCoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're a right, uv has no 3.6. I tried it in the container:

root@0dfedf7f77dd:/home# uv python install 3.6
error: No download found for request: cpython-3.6-linux-x86_64-gnu

Yes, the python version for a bug have to be still picked manually, as far as I know. Your patch in the bugsinpy-compile looks nice. Should that also work outside the container, if I have the required python version installed (e.g., if I have python3.6 in my search path)?

RUN apt-get update && apt-get install -y --no-install-recommends curl ca-certificates git dos2unix vim bzip2

# Download the latest installer
ADD https://astral.sh/uv/install.sh /uv-installer.sh

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If uv is not used for installing the different python versions, as it does not support version 3.6, I would suggest removing it from the image (Line 7 to 13 including). Or does micromamba needs it?

@@ -1,16 +1,42 @@
FROM python:3.12-slim-trixie
FROM python:3.9-slim-trixie

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The version of the image self was chosen based on the uv documentation (see #92 (comment)). Maybe now the image from the micromamba documentation is suitable for this Dockerfile? If not, a Debian slim image (without a python) would be enough, if micromamba does not need a Python version itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants