Skip to content

chore(deps-dev): bump time-machine from 2.15.0 to 3.2.0#2933

Merged
vpetersson merged 1 commit into
masterfrom
dependabot/pip/time-machine-3.2.0
May 21, 2026
Merged

chore(deps-dev): bump time-machine from 2.15.0 to 3.2.0#2933
vpetersson merged 1 commit into
masterfrom
dependabot/pip/time-machine-3.2.0

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot Bot commented on behalf of github May 21, 2026

Bumps time-machine from 2.15.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.15.0 to 3.2.0.
- [Changelog](https://github.com/adamchainz/time-machine/blob/main/docs/changelog.rst)
- [Commits](adamchainz/time-machine@2.15.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 Pull requests that update Python code labels May 21, 2026
@dependabot dependabot Bot requested a review from a team as a code owner May 21, 2026 05:51
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels May 21, 2026
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

@vpetersson vpetersson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving Dependabot dev-dep bump.

@vpetersson vpetersson merged commit 2284c6a into master May 21, 2026
10 checks passed
@vpetersson vpetersson deleted the dependabot/pip/time-machine-3.2.0 branch May 21, 2026 05:55
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 Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant