Skip to content

Commit dce7347

Browse files
authored
Drop Python 3.8 (#591)
* Drop Python 3.8 * Refactor more files * More fixes * More fixes, ruff ignore
1 parent 31eff82 commit dce7347

35 files changed

+284
-627
lines changed

.github/workflows/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
strategy:
1616
matrix:
17-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "pypy-3.10"]
17+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "pypy-3.10"]
1818
fail-fast: false
1919

2020
steps:

HISTORY.md

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Our backwards-compatibility policy can be found [here](https://github.com/python
2121
- Expose {func}`cattrs.cols.mapping_unstructure_factory` through {mod}`cattrs.cols`.
2222
- Python 3.13 is now supported.
2323
([#543](https://github.com/python-attrs/cattrs/pull/543) [#547](https://github.com/python-attrs/cattrs/issues/547))
24+
- Python 3.8 is no longer supported, as it is end-of-life. Use previous versions on this Python version.
2425

2526
## 24.1.2 (2024-09-22)
2627

docs/defaulthooks.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -287,13 +287,11 @@ Sets and frozensets are unstructured into the same class.
287287
{'a': 1}
288288
```
289289

290-
Both [_total_ and _non-total_](https://peps.python.org/pep-0589/#totality) TypedDicts are supported, and inheritance between any combination works (except on 3.8 when `typing.TypedDict` is used, see below).
290+
Both [_total_ and _non-total_](https://peps.python.org/pep-0589/#totality) TypedDicts are supported, and inheritance between any combination works.
291291
Generic TypedDicts work on Python 3.11 and later, since that is the first Python version that supports them in general.
292292

293293
[`typing.Required` and `typing.NotRequired`](https://peps.python.org/pep-0655/) are supported.
294294

295-
On Python 3.8, using `typing_extensions.TypedDict` is recommended since `typing.TypedDict` doesn't support all necessary features so certain combinations of subclassing, totality and `typing.Required` won't work.
296-
297295
[Similar to _attrs_ classes](customizing.md#using-cattrsgen-generators), un/structuring can be customized using {meth}`cattrs.gen.typeddicts.make_dict_structure_fn` and {meth}`cattrs.gen.typeddicts.make_dict_unstructure_fn`.
298296

299297
```{doctest}

pyproject.toml

+3-2
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,14 @@ dependencies = [
4646
"typing-extensions>=4.12.2",
4747
"exceptiongroup>=1.1.1; python_version < '3.11'",
4848
]
49-
requires-python = ">=3.8"
49+
requires-python = ">=3.9"
5050
readme = "README.md"
5151
license = {text = "MIT"}
5252
keywords = ["attrs", "serialization", "dataclasses"]
5353
classifiers = [
5454
"Development Status :: 5 - Production/Stable",
5555
"Intended Audience :: Developers",
5656
"License :: OSI Approved :: MIT License",
57-
"Programming Language :: Python :: 3.8",
5857
"Programming Language :: Python :: 3.9",
5958
"Programming Language :: Python :: 3.10",
6059
"Programming Language :: Python :: 3.11",
@@ -150,6 +149,8 @@ ignore = [
150149
"B006", # mutable argument defaults
151150
"DTZ001", # datetimes in tests
152151
"DTZ006", # datetimes in tests
152+
"UP006", # We support old typing constructs at runtime
153+
"UP035", # We support old typing constructs at runtime
153154
]
154155

155156
[tool.ruff.lint.pyupgrade]

0 commit comments

Comments
 (0)