From 2476dbd73973926fe47a0ef18847c00c6280c736 Mon Sep 17 00:00:00 2001 From: "sentry-junior[bot]" <264270552+sentry-junior[bot]@users.noreply.github.com> Date: Thu, 29 Oct 2026 11:40:40 +0000 Subject: [PATCH] ref(compat): Remove unused with_metaclass helper Co-Authored-By: Ivana Kellyer --- sentry_sdk/_compat.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/sentry_sdk/_compat.py b/sentry_sdk/_compat.py index 6a016c22d5..9640415603 100644 --- a/sentry_sdk/_compat.py +++ b/sentry_sdk/_compat.py @@ -1,11 +1,4 @@ import sys -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from typing import Any, TypeVar - - T = TypeVar("T") - PY37 = sys.version_info[0] == 3 and sys.version_info[1] >= 7 PY38 = sys.version_info[0] == 3 and sys.version_info[1] >= 8 @@ -13,14 +6,6 @@ PY311 = sys.version_info[0] == 3 and sys.version_info[1] >= 11 -def with_metaclass(meta: "Any", *bases: "Any") -> "Any": - class MetaClass(type): - def __new__(metacls: "Any", name: "Any", this_bases: "Any", d: "Any") -> "Any": - return meta(name, bases, d) - - return type.__new__(MetaClass, "temporary_class", (), {}) - - def check_uwsgi_thread_support() -> bool: # We check two things here: #