Skip to content

Commit

Permalink
Revert "chore: restore module loader after import (#9638)"
Browse files Browse the repository at this point in the history
This reverts commit 83f8e3c.
  • Loading branch information
mabdinur committed Jan 10, 2025
1 parent be9416a commit 7c10320
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions ddtrace/internal/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,16 +186,6 @@ def add_transformer(self, key: t.Any, transformer: TransformerType) -> None:
self.transformers[key] = transformer

def call_back(self, module: ModuleType) -> None:
# Restore the original loader
try:
module.__loader__ = self.loader
except AttributeError:
pass
try:
module.spec.loader = self.loader
except AttributeError:
pass

if module.__name__ == "pkg_resources":
# DEV: pkg_resources support to prevent errors such as
# NotImplementedError: Can't perform this operation for unregistered
Expand Down

0 comments on commit 7c10320

Please sign in to comment.