Skip to content

Commit 5cbe1e4

Browse files
hugovkpradyunsg
andauthored
Add support for Python 3.13 and drop EOL 3.7 (#783)
Co-authored-by: Pradyun Gedam <[email protected]>
1 parent cb8fd38 commit 5cbe1e4

File tree

9 files changed

+23
-26
lines changed

9 files changed

+23
-26
lines changed

.github/workflows/docs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ concurrency:
1414
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
1515
cancel-in-progress: true
1616

17+
env:
18+
FORCE_COLOR: 1
19+
1720
jobs:
1821
docs:
1922
name: nox -s docs

.github/workflows/lint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ concurrency:
1616
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
1717
cancel-in-progress: true
1818

19+
env:
20+
FORCE_COLOR: 1
21+
1922
jobs:
2023
lint:
2124
name: nox -s lint

.github/workflows/test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ concurrency:
1414
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
1515
cancel-in-progress: true
1616

17+
env:
18+
FORCE_COLOR: 1
19+
1720
jobs:
1821
test:
1922
name: ${{ matrix.os }} / ${{ matrix.python_version }}
@@ -23,7 +26,7 @@ jobs:
2326
matrix:
2427
os: [Ubuntu, Windows, macOS]
2528
python_version:
26-
["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.8", "pypy3.9", "pypy3.10"]
29+
["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.8", "pypy3.9", "pypy3.10"]
2730

2831
steps:
2932
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0

docs/development/getting-started.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,15 @@ each supported Python version and run the tests. For example:
3030
$ nox -s tests
3131
...
3232
nox > Ran multiple sessions:
33-
nox > * tests-3.7: success
3433
nox > * tests-3.8: success
3534
nox > * tests-3.9: success
3635
nox > * tests-3.10: success
37-
nox > * tests-pypy3: skipped
36+
nox > * tests-3.11: success
37+
nox > * tests-3.12: success
38+
nox > * tests-3.13: success
39+
nox > * tests-pypy3.8: skipped
40+
nox > * tests-pypy3.9: skipped
41+
nox > * tests-pypy3.10: skipped
3842
3943
You may not have all the required Python versions installed, in which case you
4044
will see one or more ``InterpreterNotFound`` errors.

noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323

2424
@nox.session(
2525
python=[
26-
"3.7",
2726
"3.8",
2827
"3.9",
2928
"3.10",
3029
"3.11",
3130
"3.12",
31+
"3.13",
3232
"pypy3.8",
3333
"pypy3.9",
3434
"pypy3.10",

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ name = "packaging"
88
description = "Core utilities for Python packages"
99
dynamic = ["version"]
1010
readme = "README.rst"
11-
requires-python = ">=3.7"
11+
requires-python = ">=3.8"
1212
authors = [{name = "Donald Stufft", email = "[email protected]"}]
1313
classifiers = [
1414
"Development Status :: 5 - Production/Stable",
@@ -18,12 +18,12 @@ classifiers = [
1818
"Programming Language :: Python",
1919
"Programming Language :: Python :: 3",
2020
"Programming Language :: Python :: 3 :: Only",
21-
"Programming Language :: Python :: 3.7",
2221
"Programming Language :: Python :: 3.8",
2322
"Programming Language :: Python :: 3.9",
2423
"Programming Language :: Python :: 3.10",
2524
"Programming Language :: Python :: 3.11",
2625
"Programming Language :: Python :: 3.12",
26+
"Programming Language :: Python :: 3.13",
2727
"Programming Language :: Python :: Implementation :: CPython",
2828
"Programming Language :: Python :: Implementation :: PyPy",
2929
"Typing :: Typed",

src/packaging/_manylinux.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def _parse_glibc_version(version_str: str) -> Tuple[int, int]:
167167
return int(m.group("major")), int(m.group("minor"))
168168

169169

170-
@functools.lru_cache()
170+
@functools.lru_cache
171171
def _get_glibc_version() -> Tuple[int, int]:
172172
version_str = _glibc_version_string()
173173
if version_str is None:

src/packaging/_musllinux.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def _parse_musl_version(output: str) -> Optional[_MuslVersion]:
2828
return _MuslVersion(major=int(m.group(1)), minor=int(m.group(2)))
2929

3030

31-
@functools.lru_cache()
31+
@functools.lru_cache
3232
def _get_musl_version(executable: str) -> Optional[_MuslVersion]:
3333
"""Detect currently-running musl runtime version.
3434

src/packaging/metadata.py

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@
33
import email.message
44
import email.parser
55
import email.policy
6-
import sys
76
import typing
87
from typing import (
98
Any,
109
Callable,
1110
Dict,
1211
Generic,
1312
List,
13+
Literal,
1414
Optional,
1515
Tuple,
1616
Type,
17+
TypedDict,
1718
Union,
1819
cast,
1920
)
@@ -22,23 +23,6 @@
2223
from . import version as version_module
2324

2425
T = typing.TypeVar("T")
25-
if sys.version_info[:2] >= (3, 8): # pragma: no cover
26-
from typing import Literal, TypedDict
27-
else: # pragma: no cover
28-
if typing.TYPE_CHECKING:
29-
from typing_extensions import Literal, TypedDict
30-
else:
31-
try:
32-
from typing_extensions import Literal, TypedDict
33-
except ImportError:
34-
35-
class Literal:
36-
def __init_subclass__(*_args, **_kwargs):
37-
pass
38-
39-
class TypedDict:
40-
def __init_subclass__(*_args, **_kwargs):
41-
pass
4226

4327

4428
try:

0 commit comments

Comments
 (0)