Skip to content

Fix FAKETIME_FMT restoration in nested contexts - #88

Merged
simon-weber merged 1 commit into
simon-weber:masterfrom
azmeuk:restore_fmt
Aug 18, 2026
Merged

Fix FAKETIME_FMT restoration in nested contexts#88
simon-weber merged 1 commit into
simon-weber:masterfrom
azmeuk:restore_fmt

Conversation

@azmeuk

@azmeuk azmeuk commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

fake_time.__exit__ restored _prev_spec into FAKETIME_FMT, so leaving a
nested context left a timestamp where a strptime format was expected.

libfaketime then fails to parse FAKETIME and calls exit(EXIT_FAILURE),
killing the host process. Under pytest-xdist this shows up as random workers
crashing on unrelated tests.

@simon-weber
simon-weber merged commit 6e4524e into simon-weber:master Aug 18, 2026
31 of 41 checks passed
@simon-weber

Copy link
Copy Markdown
Owner

Thanks!

@azmeuk
azmeuk deleted the restore_fmt branch August 18, 2026 17:13
@azmeuk

azmeuk commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

Would you consider releasing 3.0.1 with this bugfix 🙏?

@simon-weber

Copy link
Copy Markdown
Owner

Done.

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