-
Notifications
You must be signed in to change notification settings - Fork 364
Open
Description
We noticed a strange behavior regarding a python Deprecation warning in docutils 0.17 when using faketime
Long story short, it looks like python almost always recomputes the pyc files starting from #507
The issue may not be only python specific, since the stat changes any hash based on the file write date would change too.
git checkout ffdb51b
make && sudo make install
/usr/local/bin/faketime "2050-01-01 00:00 UTC" python3 ../tests/test.py
stat ../tests/__pycache__/imported.cpython-312.pyc ...
Access: 2026-02-19 14:35:28.211059503 +0100
Modify: 2026-02-19 14:35:28.211059503 +0100
Change: 2026-02-19 14:35:28.211059503 +0100
Birth: 2026-02-19 14:35:28.211059503 +0100
/usr/local/bin/faketime "2050-01-01 00:00 UTC" python3 ../tests/test.py
stat ../tests/__pycache__/imported.cpython-312.pyc ...
Access: 2026-02-19 14:35:30.668987212 +0100
Modify: 2026-02-19 14:35:30.668987212 +0100
Change: 2026-02-19 14:35:30.669987183 +0100
Birth: 2026-02-19 14:35:30.668987212 +0100
Modify and Birth date changed
Tested with the parent commit, the file stats do not change
git checkout HEAD^
Previous HEAD position was ffdb51b Merge pull request #507 from bjornfor/add-stat64
HEAD is now at 3aa2028 Merge pull request #509 from lisanet/mastermake > /dev/null
sudo make install
/usr/local/bin/faketime "2050-01-01 00:00 UTC" python3 ../tests/test.py
stat ../tests/__pycache__/imported.cpython-312.pyc
...
Access: 2026-02-19 14:35:56.575246250 +0100
Modify: 2026-02-19 14:35:56.575246250 +0100
Change: 2026-02-19 14:35:56.575246250 +0100
Birth: 2026-02-19 14:35:56.575246250 +0100
/usr/local/bin/faketime "2050-01-01 00:00 UTC" python3 ../tests/test.py
stat ../tests/__pycache__/imported.cpython-312.pyc ...
Access: 2026-02-19 14:36:01.301115129 +0100
Modify: 2026-02-19 14:35:56.575246250 +0100
Change: 2026-02-19 14:35:56.575246250 +0100
Birth: 2026-02-19 14:35:56.575246250 +0100
Modify and Birth date unchanged
Note that it only occurs if the two subsequent execution are not to close (more than one second)
cc @bjornfor
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels