Skip to content

Commit a651cc6

Browse files
committed
update pin
update pin and circular imports
1 parent f2033b2 commit a651cc6

File tree

13 files changed

+16
-16
lines changed

13 files changed

+16
-16
lines changed

ddtrace/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
from .internal.utils.deprecations import DDTraceDeprecationWarning # noqa: E402
3030
from ddtrace._trace.pin import Pin # noqa: E402
3131
from ddtrace._trace.span import Span # noqa: E402
32-
from ddtrace.trace import Tracer # noqa: E402
32+
from ddtrace._trace.tracer import Tracer # noqa: E402
3333
from ddtrace.vendor import debtcollector
3434
from .version import get_version # noqa: E402
3535

ddtrace/_trace/_span_link.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
Usage
1414
-----
1515
16-
SpanLinks can be set using :meth:`ddtrace._trace.span.Span.link_span(...)` Ex::
16+
SpanLinks can be set using :meth:`ddtrace.Span.link_span(...)` Ex::
1717
1818
from ddtrace.trace import tracer
1919

ddtrace/_trace/trace_handlers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040

4141
if TYPE_CHECKING:
42-
from ddtrace.trace import Span
42+
from ddtrace._trace.span import Span
4343

4444

4545
log = get_logger(__name__)

ddtrace/_trace/utils_botocore/aws_payload_tagging.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from typing import Optional
77

88
from ddtrace import config
9-
from ddtrace.trace import Span
9+
from ddtrace._trace.span import Span
1010
from ddtrace.vendor.jsonpath_ng import parse
1111

1212

ddtrace/_trace/utils_botocore/span_tags.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from typing import Optional
55

66
from ddtrace import config
7+
from ddtrace._trace.span import Span
78
from ddtrace._trace.utils_botocore.aws_payload_tagging import AWSPayloadTagging
89
from ddtrace.constants import _ANALYTICS_SAMPLE_RATE_KEY
910
from ddtrace.constants import _SPAN_MEASURED_KEY
@@ -13,7 +14,6 @@
1314
from ddtrace.ext import http
1415
from ddtrace.internal.constants import COMPONENT
1516
from ddtrace.internal.utils.formats import deep_getattr
16-
from ddtrace.trace import Span
1717

1818

1919
_PAYLOAD_TAGGER = AWSPayloadTagging()

ddtrace/contrib/internal/pymemcache/patch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
from ddtrace._trace.pin import _DD_PIN_NAME
55
from ddtrace._trace.pin import _DD_PIN_PROXY_NAME
6-
from ddtrace._trace.pin import Pin
76
from ddtrace.ext import memcached as memcachedx
87
from ddtrace.internal.schema import schematize_service_name
8+
from ddtrace.trace import Pin
99

1010
from .client import WrappedClient
1111
from .client import WrappedHashClient

ddtrace/internal/ci_visibility/api/_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class TestVisibilitySessionSettings:
7676

7777
def __post_init__(self):
7878
if not isinstance(self.tracer, Tracer):
79-
raise TypeError("tracer must be a ddtrace._trace.tracer.Tracer")
79+
raise TypeError("tracer must be a ddtrace.trace.Tracer")
8080
if not isinstance(self.workspace_path, Path):
8181
raise TypeError("root_dir must be a pathlib.Path")
8282
if not self.workspace_path.is_absolute():

ddtrace/internal/ci_visibility/coverage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def _switch_coverage_context(
131131

132132

133133
def _report_coverage_to_span(
134-
coverage_data: Coverage, span: ddtrace._trace.span.Span, root_dir: str, framework: Optional[TEST_FRAMEWORKS] = None
134+
coverage_data: Coverage, span: ddtrace.trace.Span, root_dir: str, framework: Optional[TEST_FRAMEWORKS] = None
135135
):
136136
# Experimental feature to use internal coverage collection
137137
if USE_DD_COVERAGE:

ddtrace/internal/ci_visibility/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def get_source_lines_for_test_method(
5050

5151

5252
def _add_start_end_source_file_path_data_to_span(
53-
span: ddtrace._trace.span.Span, test_method_object, test_name: str, repo_directory: str
53+
span: ddtrace.trace.Span, test_method_object, test_name: str, repo_directory: str
5454
):
5555
if not test_method_object:
5656
log.debug(
@@ -75,7 +75,7 @@ def _add_start_end_source_file_path_data_to_span(
7575
span.set_tag(test.SOURCE_END, end_line)
7676

7777

78-
def _add_pct_covered_to_span(coverage_data: dict, span: ddtrace._trace.span.Span):
78+
def _add_pct_covered_to_span(coverage_data: dict, span: ddtrace.trace.Span):
7979
if not coverage_data or PCT_COVERED_KEY not in coverage_data:
8080
log.warning("Tried to add total covered percentage to session span but no data was found")
8181
return

ddtrace/internal/opentelemetry/trace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def start_span(
103103
curr_otel_span = get_current_span(context)
104104
if curr_otel_span is INVALID_SPAN:
105105
# There is no active datadog/otel span
106-
dd_active = None # type: Optional[Union[ddtrace.trace.Context, ddtrace._trace.span.Span]]
106+
dd_active = None # type: Optional[Union[ddtrace.trace.Context, ddtrace.trace.Span]]
107107
elif isinstance(curr_otel_span, Span):
108108
# Get underlying ddtrace span from the active otel span
109109
dd_active = curr_otel_span._ddspan

ddtrace/internal/runtime/runtime_metrics.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def __init__(self, interval=_get_interval_or_default(), tracer=ddtrace.tracer, d
7878
self._dogstatsd_client: DogStatsd = get_dogstatsd_client(
7979
self.dogstatsd_url or ddtrace.internal.agent.get_stats_url()
8080
)
81-
self.tracer: Optional[ddtrace._trace.tracer.Tracer] = tracer
81+
self.tracer: Optional[ddtrace.trace.Tracer] = tracer
8282
self._runtime_metrics: RuntimeMetrics = RuntimeMetrics()
8383
self._services: Set[str] = set()
8484

@@ -114,7 +114,7 @@ def _restart(cls):
114114

115115
@classmethod
116116
def enable(cls, flush_interval=None, tracer=None, dogstatsd_url=None):
117-
# type: (Optional[float], Optional[ddtrace._trace.tracer.Tracer], Optional[str]) -> None
117+
# type: (Optional[float], Optional[ddtrace.trace.Tracer], Optional[str]) -> None
118118
with cls._lock:
119119
if cls._instance is not None:
120120
return

ddtrace/internal/runtime/tag_collectors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class RuntimeTagCollector(ValueCollector):
1717

1818

1919
class TracerTagCollector(RuntimeTagCollector):
20-
"""Tag collector for the ddtrace._trace.tracer.Tracer"""
20+
"""Tag collector for the ddtrace Tracer"""
2121

2222
required_modules = ["ddtrace"]
2323

docs/advanced_usage.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ You can also use a Unix Domain Socket to connect to the agent::
2929
Context
3030
-------
3131

32-
The :class:`ddtrace.context.Context` object is used to represent the state of
32+
The :class:`ddtrace.trace.Context` object is used to represent the state of
3333
a trace at a point in time. This state includes the trace id, active span id,
3434
distributed sampling decision and more. It is used to propagate the trace
3535
across execution boundaries like processes
@@ -46,7 +46,7 @@ Tracing Context Management
4646
--------------------------
4747

4848
In ``ddtrace`` "context management" is the management of which
49-
:class:`ddtrace.trace.Span` or :class:`ddtrace.context.Context` is active in an
49+
:class:`ddtrace.trace.Span` or :class:`ddtrace.trace.Context` is active in an
5050
execution (thread, task, etc). There can only be one active span or context
5151
per execution at a time.
5252

0 commit comments

Comments
 (0)