build: replace deprecated pytest-freezegun with time-machine by Dev9269 · Pull Request #1011 · scanapi/scanapi · GitHub
Skip to content

build: replace deprecated pytest-freezegun with time-machine - #1011

Open
Dev9269 wants to merge 2 commits into
scanapi:mainfrom
Dev9269:fix/replace-pytest-freezegun
Open

Dev9269 wants to merge 2 commits into
scanapi:mainfrom
Dev9269:fix/replace-pytest-freezegun

Conversation

@Dev9269

@Dev9269 Dev9269 commented Jul 16, 2026

Copy link
Copy Markdown

Description

Replaces the unmaintained \pytest-freezegun\ library with \ ime-machine, which is actively maintained and supports modern Python versions (3.10+).

Changes

  • Replace \pytest-freezegun\ with \ ime-machine\ in \pyproject.toml\
  • Replace @mark.freeze_time\ with @time_machine.travel\ in tests
  • Replace \reezegun.api.FakeDatetime\ with \datetime.datetime\
  • Replace \reezer.move_to()\ with \ ime_machine.travel()\ context manager

Related Issue

Closes #957

@Dev9269
Dev9269 requested review from a team as code owners July 16, 2026 21:12

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thank you for supporting ScanAPI, and congratulations on your first contribution! A project committer will shortly review your contribution.

In the mean time, if you haven't had a chance please skim over the First Pull Request Guide which all pull requests must adhere to.

We hope to see you around!

@github-actions github-actions Bot added the First Contribution First contribution to the project. label Jul 16, 2026
@Dev9269 Dev9269 changed the title Replace deprecated pytest-freezegun with time-machine build: replace deprecated pytest-freezegun with time-machine Jul 17, 2026
@Dev9269
Dev9269 force-pushed the fix/replace-pytest-freezegun branch from 79498d8 to 505eaec Compare August 1, 2026 18:58
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

@github-actions github-actions Bot added the Stale label Sep 1, 2026
@Dev9269

Dev9269 commented Sep 11, 2026

Copy link
Copy Markdown
Author

Hi! This PR is ready for review and I'd like to keep it open. pytest-freezegun has been unmaintained for years and breaks on modern Python (collections.Iterable removal breaks freezegun.api imports on 3.10+), which is what motivated this swap to the actively-maintained time-machine. Tests, pyproject and imports are all updated per the original PR description. Happy to rebase against main or adjust anything the maintainers want.

@Dev9269

Dev9269 commented Sep 11, 2026

Copy link
Copy Markdown
Author

@github-actions github-actions Bot removed the Stale label Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

First Contribution First contribution to the project.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace deprecated pytest-freezegun with time-machine

1 participant