Skip to content

Commit 98c0f42

Browse files
committed
Remove the of iter_entry_points from pkg_resources.
1 parent cd569b1 commit 98c0f42

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

instrumentation/opentelemetry-instrumentation-aiohttp-server/tests/test_aiohttp_server_integration.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
import aiohttp
1818
from http import HTTPStatus
1919
from .utils import HTTPMethod
20-
from pkg_resources import iter_entry_points
2120
from unittest import mock
2221

2322
from opentelemetry import trace as trace_api
2423
from opentelemetry.test.test_base import TestBase
2524
from opentelemetry.instrumentation.aiohttp_server import AioHttpServerInstrumentor
2625
from opentelemetry.semconv.trace import SpanAttributes
26+
from opentelemetry.util._importlib_metadata import entry_points
2727

2828
from opentelemetry.test.globals_test import (
2929
reset_trace_globals,
@@ -67,11 +67,10 @@ async def server_fixture(tracer, aiohttp_server):
6767

6868

6969
def test_checking_instrumentor_pkg_installed():
70-
entry_points = iter_entry_points(
71-
"opentelemetry_instrumentor", "aiohttp-server"
72-
)
70+
itered_entry_points = iter(entry_points(
71+
"opentelemetry_instrumentor", "aiohttp-server"))
7372

74-
instrumentor = next(entry_points).load()()
73+
instrumentor = next(itered_entry_points).load()()
7574
assert (isinstance(instrumentor, AioHttpServerInstrumentor))
7675

7776

0 commit comments

Comments
 (0)