Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

importlib_metadata remove deprecated entry point interfaces #1601

Merged
merged 2 commits into from
Oct 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion kombu/utils/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,12 @@ def entrypoints(namespace):
if sys.version_info >= (3,10):
entry_points = importlib_metadata.entry_points(group=namespace)
else:
entry_points = importlib_metadata.entry_points().get(namespace, [])
entry_points = importlib_metadata.entry_points()
try:
entry_points = entry_points.get(namespace, [])
except AttributeError:
entry_points = entry_points.select(group=namespace)
woutdenolf marked this conversation as resolved.
Show resolved Hide resolved

return (
(ep, ep.load())
for ep in entry_points
Expand Down
2 changes: 1 addition & 1 deletion requirements/default.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
importlib-metadata>=0.18; python_version<"3.8"
importlib-metadata>=3.6; python_version<"3.8"
cached_property; python_version<"3.8"
typing_extensions; python_version<"3.10"
amqp>=5.1.1,<6.0.0
Expand Down