Skip to content

Commit 6702b62

Browse files
committed
Drop support for EOL Python 3.9
1 parent d8a7576 commit 6702b62

File tree

10 files changed

+19
-135
lines changed

10 files changed

+19
-135
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,13 @@ jobs:
3434
# https://blog.jaraco.com/efficient-use-of-ci-resources/
3535
matrix:
3636
python:
37-
- "3.9"
37+
- "3.10"
3838
- "3.13"
3939
platform:
4040
- ubuntu-latest
4141
- macos-latest
4242
- windows-latest
4343
include:
44-
- python: "3.10"
45-
platform: ubuntu-latest
4644
- python: "3.11"
4745
platform: ubuntu-latest
4846
- python: "3.12"

importlib_metadata/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
from ._itertools import always_iterable, bucket, unique_everseen
4040
from ._meta import PackageMetadata, SimplePath
4141
from ._typing import md_none
42-
from .compat import py39, py311
42+
from .compat import py311
4343

4444
__all__ = [
4545
'Distribution',
@@ -340,7 +340,7 @@ def select(self, **params) -> EntryPoints:
340340
Select entry points from self that match the
341341
given parameters (typically group and/or name).
342342
"""
343-
return EntryPoints(ep for ep in self if py39.ep_matches(ep, **params))
343+
return EntryPoints(ep for ep in self if ep.matches(**params))
344344

345345
@property
346346
def names(self) -> set[str]:
@@ -1088,7 +1088,7 @@ def version(distribution_name: str) -> str:
10881088

10891089
_unique = functools.partial(
10901090
unique_everseen,
1091-
key=py39.normalized_name,
1091+
key=operator.attrgetter('_normalized_name'),
10921092
)
10931093
"""
10941094
Wrapper for ``distributions`` to return unique distributions by name.

importlib_metadata/_functools.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import functools
22
import types
3-
from typing import Callable, TypeVar
3+
from collections.abc import Callable
4+
from typing import TypeVar
45

56

67
# from jaraco.functools 3.3

importlib_metadata/compat/py39.py

Lines changed: 0 additions & 42 deletions
This file was deleted.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ classifiers = [
2020
"Programming Language :: Python :: 3",
2121
"Programming Language :: Python :: 3 :: Only",
2222
]
23-
requires-python = ">=3.9"
23+
requires-python = ">=3.10"
2424
license = "Apache-2.0"
2525
dependencies = [
2626
"zipp>=3.20",

tests/compat/py312.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import contextlib
22

3-
from .py39 import import_helper
3+
from jaraco.test.cpython import from_test_support, try_import
4+
5+
import_helper = try_import('import_helper') or from_test_support(
6+
'modules_setup', 'modules_cleanup'
7+
)
48

59

610
@contextlib.contextmanager

tests/compat/py39.py

Lines changed: 0 additions & 8 deletions
This file was deleted.

tests/compat/test_py39_compat.py

Lines changed: 0 additions & 74 deletions
This file was deleted.

tests/fixtures.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,16 @@
88
import textwrap
99
from importlib import resources
1010

11+
from jaraco.test.cpython import from_test_support, try_import
12+
1113
from . import _path
1214
from ._path import FilesSpec
13-
from .compat.py39 import os_helper
1415
from .compat.py312 import import_helper
1516

17+
os_helper = try_import('os_helper') or from_test_support(
18+
'FS_NONASCII', 'skip_unless_symlink', 'temp_dir'
19+
)
20+
1621

1722
@contextlib.contextmanager
1823
def tmp_path():

tests/test_main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
from . import fixtures
2222
from ._path import Symlink
23-
from .compat.py39 import os_helper
23+
from .fixtures import os_helper
2424

2525

2626
class BasicTests(fixtures.DistInfoPkg, unittest.TestCase):

0 commit comments

Comments
 (0)