Skip to content

Commit 781f7d2

Browse files
committed
ref(transport) Refactor class names to reflect previous functionality
Refactored class names such that BaseHttpTransport now has the same functionality as before the hierarchy refactor GH-4568
1 parent 356e905 commit 781f7d2

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

sentry_sdk/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
)
2626
from sentry_sdk.serializer import serialize
2727
from sentry_sdk.tracing import trace
28-
from sentry_sdk.transport import BaseHttpTransport, make_transport
28+
from sentry_sdk.transport import HttpTransportCore, make_transport
2929
from sentry_sdk.consts import (
3030
SPANDATA,
3131
DEFAULT_MAX_VALUE_LENGTH,
@@ -406,7 +406,7 @@ def _capture_envelope(envelope: Envelope) -> None:
406406
self.monitor
407407
or self.log_batcher
408408
or has_profiling_enabled(self.options)
409-
or isinstance(self.transport, BaseHttpTransport)
409+
or isinstance(self.transport, HttpTransportCore)
410410
):
411411
# If we have anything on that could spawn a background thread, we
412412
# need to check if it's safe to use them.

sentry_sdk/transport.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def _parse_rate_limits(
162162
continue
163163

164164

165-
class BaseHttpTransport(Transport):
165+
class HttpTransportCore(Transport):
166166
"""The base HTTP transport."""
167167

168168
TIMEOUT = 30 # seconds
@@ -496,7 +496,7 @@ def kill(self: Self) -> None:
496496
self._worker.kill()
497497

498498

499-
class BaseSyncHttpTransport(BaseHttpTransport):
499+
class BaseHttpTransport(HttpTransportCore):
500500

501501
def _send_envelope(self: Self, envelope: Envelope) -> None:
502502
_prepared_envelope = self._prepare_envelope(envelope)
@@ -562,7 +562,7 @@ def flush(
562562
self._worker.flush(timeout, callback)
563563

564564

565-
class HttpTransport(BaseSyncHttpTransport):
565+
class HttpTransport(BaseHttpTransport):
566566
if TYPE_CHECKING:
567567
_pool: Union[PoolManager, ProxyManager]
568568

@@ -679,7 +679,7 @@ def __init__(self: Self, options: Dict[str, Any]) -> None:
679679

680680
else:
681681

682-
class Http2Transport(BaseSyncHttpTransport): # type: ignore
682+
class Http2Transport(BaseHttpTransport): # type: ignore
683683
"""The HTTP2 transport based on httpcore."""
684684

685685
TIMEOUT = 15

0 commit comments

Comments
 (0)