Open maneyko opened 1 month ago
There seems to have been a change between Python 3.10 and 3.11 that breaks time.sleep when using libfaketime.
time.sleep
libfaketime
Steps to reproduce:
Dockerfile:
Dockerfile
FROM python:3.10-slim-bullseye ENV FAKETIME_TIMESTAMP_FILE="/faketimerc" ENV LD_PRELOAD=/lib/faketime.so RUN apt update && \ apt install -y --no-install-recommends \ libfaketime && \ cp /usr/lib/*/faketime/libfaketimeMT.so.1 /lib/faketime.so && \ echo '+0 x1' > /faketimerc
docker build -t libfaketime-python3.10 . docker run --rm libfaketime-python3.10 python3 -c 'import time; time.sleep(1)'
Compared to Python 3.11.0 (after making the proper substitution in Dockerfile):
docker run --rm libfaketime-python3.11 python3 -c 'import time; time.sleep(1)' Traceback (most recent call last): File "<string>", line 1, in <module> OSError: [Errno 22] Invalid argument
There seems to have been a change between Python 3.10 and 3.11 that breaks
time.sleep
when usinglibfaketime
.Steps to reproduce:
Dockerfile
:Compared to Python 3.11.0 (after making the proper substitution in
Dockerfile
):