Adam Johnson
Read post

Python: time-machine 3.3.0 lets your tests time-travel even faster

time-machine 3.3.0, a Python library for mocking date and time in tests, ships several notable improvements. Python 3.15 support is included, requiring a direct mock of datetime.date.today() due to a new CPython fast path that bypassed the existing patch. Core patched functions were rewritten from Python to C, yielding a ~30% speedup for calls like time.time(). Subinterpreter support is fixed so each interpreter can run independent time travel, potentially enabling parallel test execution. The migration CLI from freezegun gained four improvements: handling tick arguments, rewriting async function decorators, splitting from-imports, and fixing a bug with relative imports. Wheel distribution drops 32-bit Linux/Windows and free-threaded Python 3.13, and now builds with frame pointers enabled.

    #python#testing
Jul 31•7m read time•From adamj.eu
Post cover image
Table of contents
Python 3.15 supportFaster patched functionsSubinterpreter supportMigration CLIWheelsFin
189 Impressions
Adam Johnson's image
Adam Johnson

AdamJ's platform covers topics related to software development, technology trends, and coding tutor...

54 Followers

•

444 Upvotes

Would you recommend this post?

Copy link
WhatsApp
Facebook
X
New Squad
  • © 2026 Daily Dev Ltd.
  • Guidelines
  • Explore
  • Tags
  • Sources
  • Squads
  • Leaderboard