mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2025-07-30 05:32:30 +08:00
Chore: Drop support for Python 3.8 (#3399)
Python 3.8 was EoL @ 2024-10-07, our 6 month promise for support ended on 2024-04-07. Changes: * Updated basline refs to 3.9 * Removed 3.8 sys.version_info checks * Fixed botocore test failure * Applied ruff formatting
This commit is contained in:
@ -132,12 +132,15 @@ class TestMySQLClientIntegration(TestBase):
|
||||
mock_connection = mock.MagicMock()
|
||||
mock_connection.cursor.return_value = mock_cursor
|
||||
|
||||
with mock.patch(
|
||||
"opentelemetry.instrumentation.mysqlclient.MySQLdb",
|
||||
mock_connect_module,
|
||||
), mock.patch(
|
||||
"opentelemetry.instrumentation.dbapi.util_version",
|
||||
return_value="foobar",
|
||||
with (
|
||||
mock.patch(
|
||||
"opentelemetry.instrumentation.mysqlclient.MySQLdb",
|
||||
mock_connect_module,
|
||||
),
|
||||
mock.patch(
|
||||
"opentelemetry.instrumentation.dbapi.util_version",
|
||||
return_value="foobar",
|
||||
),
|
||||
):
|
||||
cnx_proxy = MySQLClientInstrumentor().instrument_connection(
|
||||
mock_connection,
|
||||
@ -172,12 +175,15 @@ class TestMySQLClientIntegration(TestBase):
|
||||
mock_connection = mock.MagicMock()
|
||||
mock_connection.cursor.return_value = mock_cursor
|
||||
|
||||
with mock.patch(
|
||||
"opentelemetry.instrumentation.mysqlclient.MySQLdb",
|
||||
mock_connect_module,
|
||||
), mock.patch(
|
||||
"opentelemetry.instrumentation.dbapi.util_version",
|
||||
return_value="foobar",
|
||||
with (
|
||||
mock.patch(
|
||||
"opentelemetry.instrumentation.mysqlclient.MySQLdb",
|
||||
mock_connect_module,
|
||||
),
|
||||
mock.patch(
|
||||
"opentelemetry.instrumentation.dbapi.util_version",
|
||||
return_value="foobar",
|
||||
),
|
||||
):
|
||||
cnx_proxy = MySQLClientInstrumentor().instrument_connection(
|
||||
mock_connection,
|
||||
@ -213,12 +219,15 @@ class TestMySQLClientIntegration(TestBase):
|
||||
mock_connection = mock.MagicMock()
|
||||
mock_connection.cursor.return_value = mock_cursor
|
||||
|
||||
with mock.patch(
|
||||
"opentelemetry.instrumentation.mysqlclient.MySQLdb",
|
||||
mock_connect_module,
|
||||
), mock.patch(
|
||||
"opentelemetry.instrumentation.dbapi.util_version",
|
||||
return_value="foobar",
|
||||
with (
|
||||
mock.patch(
|
||||
"opentelemetry.instrumentation.mysqlclient.MySQLdb",
|
||||
mock_connect_module,
|
||||
),
|
||||
mock.patch(
|
||||
"opentelemetry.instrumentation.dbapi.util_version",
|
||||
return_value="foobar",
|
||||
),
|
||||
):
|
||||
cnx_proxy = MySQLClientInstrumentor().instrument_connection(
|
||||
mock_connection,
|
||||
@ -258,12 +267,15 @@ class TestMySQLClientIntegration(TestBase):
|
||||
mock_connection = mock.MagicMock()
|
||||
mock_connection.cursor.return_value = mock_cursor
|
||||
|
||||
with mock.patch(
|
||||
"opentelemetry.instrumentation.mysqlclient.MySQLdb",
|
||||
mock_connect_module,
|
||||
), mock.patch(
|
||||
"opentelemetry.instrumentation.dbapi.util_version",
|
||||
return_value="foobar",
|
||||
with (
|
||||
mock.patch(
|
||||
"opentelemetry.instrumentation.mysqlclient.MySQLdb",
|
||||
mock_connect_module,
|
||||
),
|
||||
mock.patch(
|
||||
"opentelemetry.instrumentation.dbapi.util_version",
|
||||
return_value="foobar",
|
||||
),
|
||||
):
|
||||
cnx_proxy = MySQLClientInstrumentor().instrument_connection(
|
||||
mock_connection,
|
||||
@ -312,12 +324,15 @@ class TestMySQLClientIntegration(TestBase):
|
||||
mock_connection = mock.MagicMock()
|
||||
mock_connection.cursor.return_value = mock_cursor
|
||||
|
||||
with mock.patch(
|
||||
"opentelemetry.instrumentation.mysqlclient.MySQLdb",
|
||||
mock_connect_module,
|
||||
), mock.patch(
|
||||
"opentelemetry.instrumentation.dbapi.util_version",
|
||||
return_value="foobar",
|
||||
with (
|
||||
mock.patch(
|
||||
"opentelemetry.instrumentation.mysqlclient.MySQLdb",
|
||||
mock_connect_module,
|
||||
),
|
||||
mock.patch(
|
||||
"opentelemetry.instrumentation.dbapi.util_version",
|
||||
return_value="foobar",
|
||||
),
|
||||
):
|
||||
MySQLClientInstrumentor()._instrument(
|
||||
enable_commenter=True,
|
||||
@ -353,12 +368,15 @@ class TestMySQLClientIntegration(TestBase):
|
||||
mock_connection = mock.MagicMock()
|
||||
mock_connection.cursor.return_value = mock_cursor
|
||||
|
||||
with mock.patch(
|
||||
"opentelemetry.instrumentation.mysqlclient.MySQLdb",
|
||||
mock_connect_module,
|
||||
), mock.patch(
|
||||
"opentelemetry.instrumentation.dbapi.util_version",
|
||||
return_value="foobar",
|
||||
with (
|
||||
mock.patch(
|
||||
"opentelemetry.instrumentation.mysqlclient.MySQLdb",
|
||||
mock_connect_module,
|
||||
),
|
||||
mock.patch(
|
||||
"opentelemetry.instrumentation.dbapi.util_version",
|
||||
return_value="foobar",
|
||||
),
|
||||
):
|
||||
MySQLClientInstrumentor()._instrument(
|
||||
enable_commenter=True,
|
||||
@ -395,12 +413,15 @@ class TestMySQLClientIntegration(TestBase):
|
||||
mock_connection = mock.MagicMock()
|
||||
mock_connection.cursor.return_value = mock_cursor
|
||||
|
||||
with mock.patch(
|
||||
"opentelemetry.instrumentation.mysqlclient.MySQLdb",
|
||||
mock_connect_module,
|
||||
), mock.patch(
|
||||
"opentelemetry.instrumentation.dbapi.util_version",
|
||||
return_value="foobar",
|
||||
with (
|
||||
mock.patch(
|
||||
"opentelemetry.instrumentation.mysqlclient.MySQLdb",
|
||||
mock_connect_module,
|
||||
),
|
||||
mock.patch(
|
||||
"opentelemetry.instrumentation.dbapi.util_version",
|
||||
return_value="foobar",
|
||||
),
|
||||
):
|
||||
MySQLClientInstrumentor()._instrument(
|
||||
enable_commenter=True,
|
||||
@ -441,12 +462,15 @@ class TestMySQLClientIntegration(TestBase):
|
||||
mock_connection = mock.MagicMock()
|
||||
mock_connection.cursor.return_value = mock_cursor
|
||||
|
||||
with mock.patch(
|
||||
"opentelemetry.instrumentation.mysqlclient.MySQLdb",
|
||||
mock_connect_module,
|
||||
), mock.patch(
|
||||
"opentelemetry.instrumentation.dbapi.util_version",
|
||||
return_value="foobar",
|
||||
with (
|
||||
mock.patch(
|
||||
"opentelemetry.instrumentation.mysqlclient.MySQLdb",
|
||||
mock_connect_module,
|
||||
),
|
||||
mock.patch(
|
||||
"opentelemetry.instrumentation.dbapi.util_version",
|
||||
return_value="foobar",
|
||||
),
|
||||
):
|
||||
MySQLClientInstrumentor()._instrument()
|
||||
cnx = mock_connect_module.connect(database="test")
|
||||
|
Reference in New Issue
Block a user