Skip to content

Commit 0d6524f

Browse files
authored
Skip psycopg2 test for Python 3.13 to fix build (#37816)
1 parent 65e4580 commit 0d6524f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sdk/monitor/azure-monitor-opentelemetry/tests/instrumentation/test_psycopg2.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@
77
import sys
88
import unittest
99

10-
if sys.implementation.name != "pypy":
10+
# Skip for Python v3.13 until https://github.com/psycopg/psycopg2/pull/1729 is resolved
11+
if sys.implementation.name != "pypy" and sys.version_info < (3, 13):
1112
from opentelemetry.instrumentation.psycopg2 import (
1213
Psycopg2Instrumentor,
1314
)
1415

1516

1617
class TestPsycopg2Instrumentation(unittest.TestCase):
1718

18-
@pytest.mark.skipif(sys.implementation.name == "pypy", reason="Psycopg2 not supported for pypy3.9")
19+
@pytest.mark.skipif(sys.implementation.name == "pypy" or sys.version_info >= (3, 13), reason="Psycopg2 not supported for pypy3.9 and Py3.13")
1920
def test_instrument(self):
2021
try:
2122
Psycopg2Instrumentor().instrument()

0 commit comments

Comments
 (0)