Skip to content

Commit e66e226

Browse files
authored
Drop support for EOL Python 3.9 (#530)
2 parents 4b01b30 + 6027933 commit e66e226

File tree

10 files changed

+9
-133
lines changed

10 files changed

+9
-133
lines changed

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/compat/py39.py

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

mypy.ini

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,5 @@ ignore_missing_imports = True
2222
[mypy-zipp.*]
2323
ignore_missing_imports = True
2424

25-
# jaraco/jaraco.test#7
26-
[mypy-jaraco.test.*]
25+
[mypy-test.support.*]
2726
ignore_missing_imports = True

newsfragments/+530.feature.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Removed Python 3.9 compatibility.

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ test = [
3939
"packaging",
4040
"pyfakefs",
4141
"pytest-perf >= 0.9.2",
42-
"jaraco.test >= 5.4",
4342
]
4443

4544
doc = [

tests/compat/py312.py

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

3-
from .py39 import import_helper
3+
from test.support import import_helper
44

55

66
@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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88
import textwrap
99
from importlib import resources
1010

11+
from test.support import os_helper
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

1617

tests/test_main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import unittest
55

66
import pyfakefs.fake_filesystem_unittest as ffs
7+
from test.support import os_helper
78

89
import importlib_metadata
910
from importlib_metadata import (
@@ -20,7 +21,6 @@
2021

2122
from . import fixtures
2223
from ._path import Symlink
23-
from .compat.py39 import os_helper
2424

2525

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

0 commit comments

Comments
 (0)