Skip to content

Commit

Permalink
branch update,
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugene Orlovsky committed Sep 13, 2024
1 parent 3b4fb46 commit 01ffaa3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/lumigo_opentelemetry/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ def init() -> Dict[str, Any]:

try:
python_version = sys.version_info
# Check if the major version is 3 and the minor version is between 8 and 11
if python_version.major != 3 or not (8 <= python_version.minor <= 11):
# Check if the major version is 3 and the minor version is between 8 and 12
if python_version.major != 3 or not (8 <= python_version.minor <= 12):
logger.warning(
f"Unsupported Python version {python_version.major}.{python_version.minor}; "
"only Python 3.8 to 3.11 are supported."
"only Python 3.8 to 3.12 are supported."
)
return {}

Expand Down
8 changes: 4 additions & 4 deletions src/test/unit/test_tracer.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def test_python_version_too_old(self):

self.assertEqual(result, {})
self.assertIn(
"Unsupported Python version 3.7; only Python 3.8 to 3.11 are supported.",
"Unsupported Python version 3.7; only Python 3.8 to 3.12 are supported.",
cm.output[0],
)

Expand All @@ -135,15 +135,15 @@ def test_python_version_supported(self):

@patch("sys.version_info", Mock())
def test_python_version_too_new(self):
# Mock version_info for Python 3.12
# Mock version_info for Python 3.13
sys.version_info.major = 3
sys.version_info.minor = 12
sys.version_info.minor = 13

with self.assertLogs("lumigo-opentelemetry", level="WARNING") as cm:
result = init()

self.assertEqual(result, {})
self.assertIn(
"Unsupported Python version 3.12; only Python 3.8 to 3.11 are supported.",
"Unsupported Python version 3.13; only Python 3.8 to 3.12 are supported.",
cm.output[0],
)

0 comments on commit 01ffaa3

Please sign in to comment.