Skip to content

fix: keep freeze_time across Process on Python 3.14#600

Open
l46983284-cpu wants to merge 1 commit into
spulec:masterfrom
l46983284-cpu:fix/multiprocess-freeze-py314
Open

fix: keep freeze_time across Process on Python 3.14#600
l46983284-cpu wants to merge 1 commit into
spulec:masterfrom
l46983284-cpu:fix/multiprocess-freeze-py314

Conversation

@l46983284-cpu

Copy link
Copy Markdown

Summary

On Python 3.14 Linux, multiprocessing no longer defaults to a start method that inherits freezegun patches into Process children (issue #593).

While time is frozen, prefer fork on Unix and re-apply freezegun patches in os.register_at_fork(after_in_child=...).

Test plan

  • Reproduced on Python 3.14.4 Daytona sandbox (child saw wall clock)
  • pytest tests/test_multiprocess_freeze.py PASS on 3.14.4 after patch

Fixes #593

Python 3.14's Linux default start method no longer inherits freezegun
patches into child processes (issue spulec#593). Prefer fork on Unix while
frozen and re-apply patches after_in_child as a belt-and-suspenders.

Signed-off-by: Alex Chen <l46983284@gmail.com>
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.

Frozen time is not transfered to multiprocess.Process since Python 3.14

1 participant