Skip to content

fix(freezegun): remove freezegun integration #14037

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,6 @@ tests/coverage @DataDog/apm-core-python @
tests/tracer/test_ci.py @DataDog/ci-app-libraries
ddtrace/ext/git.py @DataDog/ci-app-libraries @DataDog/apm-core-python
scripts/ci_visibility/* @DataDog/ci-app-libraries
# Test Visibility owns the freezegun integration because it's the team most affected by it
ddtrace/contrib/freezegun @DataDog/ci-app-libraries
ddtrace/contrib/internal/freezegun @DataDog/ci-app-libraries
tests/contrib/freezegun @DataDog/ci-app-libraries
# Test Visibility: Selenium integration
ddtrace/contrib/selenium @DataDog/ci-app-libraries
ddtrace/internal/selenium @DataDog/ci-app-libraries
Expand Down
26 changes: 0 additions & 26 deletions .riot/requirements/14676df.txt

This file was deleted.

23 changes: 0 additions & 23 deletions .riot/requirements/15de642.txt

This file was deleted.

26 changes: 0 additions & 26 deletions .riot/requirements/1d1dbc1.txt

This file was deleted.

23 changes: 0 additions & 23 deletions .riot/requirements/2bcce4e.txt

This file was deleted.

1 change: 0 additions & 1 deletion ddtrace/_monkey.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
"elasticsearch": True,
"algoliasearch": True,
"futures": True,
"freezegun": True,
"google_generativeai": True,
"google_genai": True,
"gevent": True,
Expand Down
14 changes: 0 additions & 14 deletions ddtrace/contrib/_freezegun.py

This file was deleted.

10 changes: 0 additions & 10 deletions ddtrace/contrib/integration_registry/registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -369,16 +369,6 @@ integrations:
min: 1.10.1
max: 2.3.0

- integration_name: freezegun
is_external_package: true
is_tested: true
dependency_names:
- freezegun
tested_versions_by_dependency:
freezegun:
min: 1.3.1
max: 1.5.2

- integration_name: futures
is_external_package: false
is_tested: true
Expand Down
74 changes: 0 additions & 74 deletions ddtrace/contrib/internal/freezegun/patch.py

This file was deleted.

5 changes: 0 additions & 5 deletions ddtrace/contrib/internal/pytest/_plugin_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,6 @@ def _pytest_load_initial_conftests_pre_yield(early_config, parser, args):

try:
take_over_logger_stream_handler()
if not asbool(os.getenv("_DD_PYTEST_FREEZEGUN_SKIP_PATCH")):
from ddtrace._monkey import patch

# Freezegun is proactively patched to avoid it interfering with internal timing
patch(freezegun=True)
dd_config.test_visibility.itr_skipping_level = ITR_SKIPPING_LEVEL.SUITE
enable_test_visibility(config=dd_config.pytest)
if InternalTestSession.should_collect_coverage():
Expand Down
1 change: 0 additions & 1 deletion ddtrace/settings/_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@
"protobuf",
"aiohttp_jinja2",
"pymongo",
"freezegun",
"vertica",
"rq_worker",
"elasticsearch",
Expand Down
2 changes: 0 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ contacting support.
+--------------------------------------------------+---------------+----------------+
| :ref:`flask_cache` | >= 0.13 | No |
+--------------------------------------------------+---------------+----------------+
| :ref:`freezegun` | \* | Yes |
+--------------------------------------------------+---------------+----------------+
| :ref:`futures` | \* | Yes |
+--------------------------------------------------+---------------+----------------+
| :ref:`gevent` (greenlet>=1.0) | >= 20.12 | Yes |
Expand Down
7 changes: 0 additions & 7 deletions docs/integrations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,6 @@ Flask Cache
.. automodule:: ddtrace.contrib.flask_cache


.. _freezegun:

FreezeGun
^^^^^^^^^
.. automodule:: ddtrace.contrib._freezegun


.. _futures:

futures
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
fixes:
- |
CI Visibility: This fix resolves an issue where ``freezegun`` would not work with tests defined in ``unittest``
classes. The ``freezegun`` integration was removed, as it is not necessary anymore for the correct reporting of test
durations and timestamps.
15 changes: 0 additions & 15 deletions riotfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3366,21 +3366,6 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT
),
],
),
Venv(
name="freezegun",
command="pytest tests/contrib/freezegun {cmdargs}",
pkgs={
"pytest-randomly": latest,
},
venvs=[
Venv(
pys=["3.10", "3.12"],
pkgs={
"freezegun": ["~=1.3.0", "~=1.5.0"],
},
),
],
),
Venv(
name="appsec_integrations_flask",
command="pytest -vvv {cmdargs} tests/appsec/integrations/flask_tests/",
Expand Down
6 changes: 0 additions & 6 deletions tests/ci_visibility/suitespec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ components:
unittest:
- ddtrace/contrib/_unittest.py
- ddtrace/contrib/internal/unittest/*
freezegun:
- ddtrace/contrib/internal/freezegun/*
suites:
ci_visibility:
parallelism: 4
Expand All @@ -33,7 +31,6 @@ suites:
- '@pytest'
- '@codeowners'
- '@unittest'
- '@freezegun'
- tests/ci_visibility/*
runner: riot
snapshot: true
Expand All @@ -58,7 +55,6 @@ suites:
- '@ci_visibility'
- '@coverage'
- '@codeowners'
- '@freezegun'
- tests/contrib/pytest/*
- tests/contrib/pytest_benchmark/*
- tests/contrib/pytest_bdd/*
Expand All @@ -77,7 +73,6 @@ suites:
- '@ci_visibility'
- '@coverage'
- '@codeowners'
- '@freezegun'
- tests/contrib/pytest/*
- tests/contrib/pytest_benchmark/*
- tests/contrib/pytest_bdd/*
Expand Down Expand Up @@ -107,7 +102,6 @@ suites:
- '@unittest'
- '@ci_visibility'
- '@coverage'
- '@freezegun'
- tests/contrib/unittest/*
- tests/snapshots/tests.contrib.unittest.*
runner: riot
Expand Down
Loading
Loading