diff --git a/aiozipkin/aiohttp_helpers.py b/aiozipkin/aiohttp_helpers.py index 8b25969a..b36ff8d3 100644 --- a/aiozipkin/aiohttp_helpers.py +++ b/aiozipkin/aiohttp_helpers.py @@ -317,7 +317,6 @@ async def on_request_exception( context: SimpleNamespace, params: TraceRequestExceptionParams, ) -> None: - span_context = self._get_span_context(context) if span_context is None: return diff --git a/aiozipkin/context_managers.py b/aiozipkin/context_managers.py index d9f28326..6ec111ab 100644 --- a/aiozipkin/context_managers.py +++ b/aiozipkin/context_managers.py @@ -28,7 +28,6 @@ class _Base(Generic[T], AsyncContextManager, AbcAwaitable): class _ContextManager(_Base[T]): - __slots__ = ("_coro", "_obj") def __init__(self, coro: Awaitable[T]) -> None: diff --git a/aiozipkin/transport.py b/aiozipkin/transport.py index 671b43fc..80eeab2e 100644 --- a/aiozipkin/transport.py +++ b/aiozipkin/transport.py @@ -14,7 +14,7 @@ DEFAULT_TIMEOUT = aiohttp.ClientTimeout(total=5 * 60) -BATCHES_MAX_COUNT = 10 ** 4 +BATCHES_MAX_COUNT = 10**4 DataList = List[Dict[str, Any]] SndBatches = Deque[Tuple[int, DataList]] @@ -157,7 +157,6 @@ def send(self, record: Record) -> None: async def _send_data(self, data: DataList) -> bool: try: - async with self._session.post(self._address, json=data) as resp: body = await resp.text() if resp.status >= 300: diff --git a/examples/microservices/service_a.py b/examples/microservices/service_a.py index 5de16fb6..1ecc19ac 100644 --- a/examples/microservices/service_a.py +++ b/examples/microservices/service_a.py @@ -38,7 +38,6 @@ async def handler(request): async def make_app(): - app = web.Application() app.router.add_get("/api/v1/data", handler) app.router.add_get("/", handler) diff --git a/setup.py b/setup.py index 4aebb3aa..636b3abe 100644 --- a/setup.py +++ b/setup.py @@ -5,10 +5,6 @@ from setuptools import find_packages, setup # type: ignore -if sys.version_info < (3, 6, 0): - raise RuntimeError("aiozipkin does not support Python earlier than 3.6.0") - - def read(f: str) -> str: return open(os.path.join(os.path.dirname(__file__), f)).read().strip() diff --git a/tests/test_tracer.py b/tests/test_tracer.py index a7617891..221998cc 100644 --- a/tests/test_tracer.py +++ b/tests/test_tracer.py @@ -91,7 +91,6 @@ def test_noop_span_methods(tracer: Tracer) -> Any: def test_trace_join_span(tracer: Tracer, context: Any) -> None: - with tracer.join_span(context) as span: span.name("name") @@ -107,7 +106,6 @@ def test_trace_join_span(tracer: Tracer, context: Any) -> None: def test_trace_new_child(tracer: Tracer, context: Any) -> None: - with tracer.new_child(context) as span: span.name("name") @@ -117,7 +115,6 @@ def test_trace_new_child(tracer: Tracer, context: Any) -> None: def test_span_new_child(tracer: Tracer, context: Any, fake_transport: Any) -> None: - with tracer.new_child(context) as span: span.name("name") with span.new_child("child", "CLIENT") as child_span1: diff --git a/tests/test_zipkin.py b/tests/test_zipkin.py index 2cc94b7c..8ce23b13 100644 --- a/tests/test_zipkin.py +++ b/tests/test_zipkin.py @@ -133,7 +133,6 @@ async def test_zipkin_error( async def test_leak_in_transport( zipkin_url: str, client: aiohttp.ClientSession, loop: asyncio.AbstractEventLoop ) -> None: - tracemalloc.start() endpoint = az.create_endpoint("simple_service")