Skip to content

build(deps-dev): bump time-machine from 2.19.0 to 3.2.0#241

Merged
toby-coleman merged 1 commit into
mainfrom
dependabot/uv/time-machine-3.2.0
Apr 6, 2026
Merged

build(deps-dev): bump time-machine from 2.19.0 to 3.2.0#241
toby-coleman merged 1 commit into
mainfrom
dependabot/uv/time-machine-3.2.0

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot Bot commented on behalf of github Mar 27, 2026

Bumps time-machine from 2.19.0 to 3.2.0.

Changelog

Sourced from time-machine's changelog.

3.2.0 (2025-12-17)

  • Add :attr:time_machine.naive_mode to control how time-machine interprets naive datetimes.

    The default mode is MIXED, which preserves existing behaviour: naive datetime objects and date objects are interpreted as UTC, while naive datetime strings are interpreted as local time.

    Three alternative modes are available:

    • UTC: naive datetimes are always interpreted as UTC.
    • LOCAL: naive datetimes are interpreted as local time, matching Python's default semantics, and freezegun.
    • ERROR: naive datetimes raise a RuntimeError, ensuring your tests are isolated from the current timezone.

    .. note::

    It’s recommended you use LOCAL or ERROR to avoid confusion around naive datetimes.

    PR [#591](https://github.com/adamchainz/time-machine/issues/591) <https://github.com/adamchainz/time-machine/pull/591>__. Thanks to Paolo Melchiorre for review.

    Thanks to PhML, Stefaan Lippens, Matthieu Rigal, Nikita Demir, Steve Mavens, Andy Freeland, and Paul Ganssle for their input on Issue [#257](https://github.com/adamchainz/time-machine/issues/257) <https://github.com/adamchainz/time-machine/issues/257>__.

  • Raise RuntimeError when attempting to start time travelling if freezegun <https://pypi.org/project/freezegun/>__ is active.

    This change should help avoid surprises when migrating complex test suites from freezegun to time-machine.

    PR [#590](https://github.com/adamchainz/time-machine/issues/590) <https://github.com/adamchainz/time-machine/pull/590>__.

3.1.0 (2025-11-21)

  • Optimize patching of uuid module. By avoiding using unittest.mock, this small overhead from starting time_machine.travel() has been reduced about 20x, from ~600ns to ~30ns by one benchmark.

    PR [#585](https://github.com/adamchainz/time-machine/issues/585) <https://github.com/adamchainz/time-machine/pull/585>__.

3.0.0 (2025-11-18)

  • Remove mocking of time.monotonic() and time.monotonic_ns().

    This mocking caused too many issues, such as causing freezes in asyncio event loops (Issue [#387](https://github.com/adamchainz/time-machine/issues/387) <https://github.com/adamchainz/time-machine/issues/387>), preventing pytest-durations from timing tests correctly (Issue [#505](https://github.com/adamchainz/time-machine/issues/505) <https://github.com/adamchainz/time-machine/issues/505>), and triggering timeouts in psycopg (Issue [#509](https://github.com/adamchainz/time-machine/issues/509) <https://github.com/adamchainz/time-machine/issues/509>__). The root cause here is that mocking the monotonic clock breaks its contract, allowing it to move backwards when it’s meant to only move forwards.

    As an alternative, use |unittest.mock|__ to mock the monotonic function for the specific tested modules that need it. That means that your code should import monotonic() or monotonic_ns() directly, so that your tests can mock it in those places only. For example, if your system under test looks like:

    .. |unittest.mock| replace:: unittest.mock __ https://docs.python.org/3/library/unittest.mock.html

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [time-machine](https://github.com/adamchainz/time-machine) from 2.19.0 to 3.2.0.
- [Changelog](https://github.com/adamchainz/time-machine/blob/main/docs/changelog.rst)
- [Commits](adamchainz/time-machine@2.19.0...3.2.0)

---
updated-dependencies:
- dependency-name: time-machine
  dependency-version: 3.2.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python:uv Pull requests that update python:uv code labels Mar 27, 2026
@github-actions
Copy link
Copy Markdown

Benchmark comparison for 8d2f92d3 (base) vs 8bac6d37 (PR)


------------------------------------------------------------------------------------------------------------------ benchmark: 2 tests ------------------------------------------------------------------------------------------------------------------
Name (time in ms)                                                                         Min                 Max                Mean            StdDev              Median                IQR            Outliers     OPS            Rounds  Iterations
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_benchmark_process_run (main/.benchmarks/Linux-CPython-3.12-64bit/0001_base)     437.0852 (1.0)      444.5875 (1.0)      441.9952 (1.0)      3.0703 (1.0)      443.2062 (1.0)       4.1992 (1.0)           1;0  2.2625 (1.0)           5           1
test_benchmark_process_run (pr/.benchmarks/Linux-CPython-3.12-64bit/0001_pr)         448.4068 (1.03)     468.9184 (1.05)     455.7946 (1.03)     9.2752 (3.02)     450.3148 (1.02)     15.0350 (3.58)          1;0  2.1940 (0.97)          5           1
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Legend:
  Outliers: 1 Standard Deviation from Mean; 1.5 IQR (InterQuartile Range) from 1st Quartile and 3rd Quartile.
  OPS: Operations Per Second, computed as 1 / Mean

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@toby-coleman toby-coleman merged commit 021e780 into main Apr 6, 2026
18 checks passed
@toby-coleman toby-coleman deleted the dependabot/uv/time-machine-3.2.0 branch April 6, 2026 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python:uv Pull requests that update python:uv code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant