Skip to content

Commit 15a4c48

Browse files
authored
Drop 3.9 (#800)
* Drop 3.9 * Annotate type aliases as such * better-exceptions crashes on 3.14 but only on Linux?? * Explain why not actually latest
1 parent 41b008f commit 15a4c48

File tree

14 files changed

+42
-40
lines changed

14 files changed

+42
-40
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ You can find our backwards-compatibility policy [here](https://github.com/hynek/
1717

1818
### Removed
1919

20-
- Python 3.8 support.
20+
- Python 3.8 and 3.9 support.
21+
2122

2223
### Changed
2324

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,13 @@ dynamic = ["readme", "version"]
1010
name = "structlog"
1111
description = "Structured Logging for Python"
1212
authors = [{ name = "Hynek Schlawack", email = "hs@ox.cx" }]
13-
requires-python = ">=3.9"
13+
requires-python = ">=3.10"
1414
license = "MIT OR Apache-2.0"
1515
keywords = ["logging", "structured", "structure", "log"]
1616
classifiers = [
1717
"Development Status :: 5 - Production/Stable",
1818
"License :: OSI Approved :: Apache Software License",
1919
"License :: OSI Approved :: MIT License",
20-
"Programming Language :: Python :: 3.9",
2120
"Programming Language :: Python :: 3.10",
2221
"Programming Language :: Python :: 3.11",
2322
"Programming Language :: Python :: 3.12",

src/structlog/_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
import sys
1414
import warnings
1515

16-
from collections.abc import Iterable, Sequence
17-
from typing import Any, Callable, cast
16+
from collections.abc import Callable, Iterable, Sequence
17+
from typing import Any, cast
1818

1919
from ._native import make_filtering_bound_logger
2020
from ._output import PrintLoggerFactory

src/structlog/_frames.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
import sys
99
import traceback
1010

11+
from collections.abc import Callable
1112
from io import StringIO
1213
from types import FrameType
13-
from typing import Callable
1414

1515
from .contextvars import _ASYNC_CALLING_STACK
1616
from .typing import ExcInfo

src/structlog/_native.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
import contextvars
1515
import sys
1616

17-
from typing import Any, Callable
17+
from collections.abc import Callable
18+
from typing import Any
1819

1920
from ._base import BoundLoggerBase
2021
from ._log_levels import (

src/structlog/dev.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,12 @@
1414
import sys
1515
import warnings
1616

17-
from collections.abc import Sequence
17+
from collections.abc import Callable, Sequence
1818
from dataclasses import dataclass
1919
from io import StringIO
2020
from types import ModuleType
2121
from typing import (
2222
Any,
23-
Callable,
2423
Literal,
2524
Protocol,
2625
TextIO,

src/structlog/processors.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,10 @@
1919
import threading
2020
import time
2121

22-
from collections.abc import Collection, Sequence
22+
from collections.abc import Callable, Collection, Sequence
2323
from types import FrameType, TracebackType
2424
from typing import (
2525
Any,
26-
Callable,
2726
ClassVar,
2827
NamedTuple,
2928
TextIO,

src/structlog/stdlib.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
import sys
1919
import warnings
2020

21-
from collections.abc import Collection, Iterable, Sequence
21+
from collections.abc import Callable, Collection, Iterable, Sequence
2222
from functools import partial
23-
from typing import Any, Callable, cast
23+
from typing import Any, cast
2424

2525

2626
if sys.version_info >= (3, 11):

src/structlog/tracebacks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from dataclasses import asdict, dataclass, field
2323
from traceback import walk_tb
2424
from types import ModuleType, TracebackType
25-
from typing import Any, Union
25+
from typing import Any, TypeAlias
2626

2727

2828
try:
@@ -51,7 +51,7 @@
5151
LOCALS_MAX_STRING = 80
5252
MAX_FRAMES = 50
5353

54-
OptExcInfo = Union[ExcInfo, tuple[None, None, None]]
54+
OptExcInfo: TypeAlias = ExcInfo | tuple[None, None, None]
5555

5656

5757
@dataclass

src/structlog/twisted.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
import json
1616
import sys
1717

18-
from collections.abc import Sequence
19-
from typing import Any, Callable, TextIO
18+
from collections.abc import Callable, Sequence
19+
from typing import Any, TextIO
2020

2121
from twisted.python import log
2222
from twisted.python.failure import Failure

0 commit comments

Comments
 (0)