Skip to content

Commit 3aa4446

Browse files
committed
FIX: Fix use of typing-extensions
1 parent 71aaec2 commit 3aa4446

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 0.68.2 - TBD
4+
5+
#### Bug fixes
6+
- Fix use of `Self` in `GatewayControl.parse()`
7+
38
## 0.68.1 - 2025-12-16
49

510
#### Enhancements

databento/live/gateway.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
from io import BytesIO
66
from operator import attrgetter
77
from typing import SupportsBytes
8+
from typing import TypeVar
89

910
from databento_dbn import Encoding
1011
from databento_dbn import Schema
1112
from databento_dbn import SType
12-
from typing_extensions import Self
1313

1414
from databento.common.publishers import Dataset
1515
from databento.common.system import USER_AGENT
@@ -24,8 +24,10 @@ class GatewayControl(SupportsBytes):
2424
Base class for gateway control messages.
2525
"""
2626

27+
GC = TypeVar("GC", bound="GatewayControl")
28+
2729
@classmethod
28-
def parse(cls: type[Self], line: str | bytes) -> Self:
30+
def parse(cls: type[GC], line: str | bytes) -> GC:
2931
"""
3032
Parse a `GatewayControl` message from a string.
3133

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,3 @@ asyncio_mode = "auto"
8181

8282
[tool.ruff]
8383
extend = "../ruff.toml"
84-
target-version = "py310"

0 commit comments

Comments
 (0)