Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

time.sleep in Python 3.11 not working on macOS #472

Open
maneyko opened this issue May 29, 2024 · 1 comment
Open

time.sleep in Python 3.11 not working on macOS #472

maneyko opened this issue May 29, 2024 · 1 comment

Comments

@maneyko
Copy link

maneyko commented May 29, 2024

There seems to have been a change between Python 3.10 and 3.11 that breaks time.sleep when using libfaketime.

Steps to reproduce:

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
@brianbayer-ic
Copy link

FYI, This is probably the same issue as #430 or at least closely related.

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

No branches or pull requests

2 participants