Skip to content

Commit 4308f45

Browse files
committed
Fix: Python 3.9 compatibility
- Remove slots=True from dataclasses (Python 3.10+ feature) - Add eval-type-backport dependency for union type annotations on Python 3.9
1 parent deb3468 commit 4308f45

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ dependencies = [
2929
"pydantic>=2.6",
3030
"cryptography>=42.0.0",
3131
"typing-extensions>=4.8",
32+
"eval-type-backport>=0.2.0; python_version < '3.10'",
3233
]
3334

3435
[project.optional-dependencies]

src/foxnose_sdk/auth/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from ..errors import FoxnoseAuthError
77

88

9-
@dataclass(frozen=True, slots=True)
9+
@dataclass(frozen=True)
1010
class RequestData:
1111
"""Immutable view of the outbound request used when applying auth."""
1212

src/foxnose_sdk/auth/jwt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def get_token(self) -> str:
1313
"""Return the latest access token string."""
1414

1515

16-
@dataclass(slots=True)
16+
@dataclass
1717
class StaticTokenProvider:
1818
"""Simple token provider that always returns the same token."""
1919

src/foxnose_sdk/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from typing import Mapping, MutableMapping
55

66

7-
@dataclass(slots=True)
7+
@dataclass
88
class RetryConfig:
99
"""
1010
Controls HTTP retry behavior for idempotent requests.
@@ -34,7 +34,7 @@ def as_dict(self) -> MutableMapping[str, object]:
3434
DEFAULT_USER_AGENT = "foxnose-sdk/0.1.0"
3535

3636

37-
@dataclass(slots=True)
37+
@dataclass
3838
class FoxnoseConfig:
3939
"""
4040
General transport-level configuration shared by all clients.

0 commit comments

Comments
 (0)