Skip to content

Commit e610ce7

Browse files
committed
Dispatch off sys.version_info
1 parent 49d001c commit e610ce7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

jupyter_server/services/kernels/kernelmanager.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import asyncio
1212
import os
1313
import pathlib # noqa: TCH003
14+
import sys
1415
import typing as t
1516
import warnings
1617
from collections import defaultdict
@@ -25,9 +26,9 @@
2526
from jupyter_events import EventLogger
2627
from jupyter_events.schema_registry import SchemaRegistryException
2728

28-
try:
29+
if sys.version_info >= (3, 12):
2930
from typing import override as overrides
30-
except ImportError:
31+
else:
3132
from overrides import overrides
3233
from tornado import web
3334
from tornado.concurrent import Future

0 commit comments

Comments
 (0)