From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
Date: Sat, 27 Jul 2024 15:27:31 +0200
Subject: [PATCH] Simplify deps for Python 3.11+

---
 hotdoc/extensions/gi/utils.py | 2 +-
 hotdoc/utils/utils.py         | 8 ++------
 setup.py                      | 2 --
 3 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/hotdoc/extensions/gi/utils.py b/hotdoc/extensions/gi/utils.py
index 159c2b65d886..5007bf23bf45 100644
--- a/hotdoc/extensions/gi/utils.py
+++ b/hotdoc/extensions/gi/utils.py
@@ -3,7 +3,7 @@ from collections import namedtuple
 import pathlib
 import traceback
 
-from backports.entry_points_selectable import entry_points
+from importlib.metadata import entry_points
 
 from hotdoc.core.links import Link
 from hotdoc.utils.loggable import info, debug
diff --git a/hotdoc/utils/utils.py b/hotdoc/utils/utils.py
index 518d308646fa..12f67f2f4fff 100644
--- a/hotdoc/utils/utils.py
+++ b/hotdoc/utils/utils.py
@@ -35,11 +35,7 @@ import importlib.util
 from urllib.request import urlretrieve
 from pathlib import Path
 
-from backports.entry_points_selectable import entry_points
-try:
-    import importlib.metadata as meta
-except ImportError:
-    import importlib_metadata as meta
+import importlib.metadata as meta
 
 from toposort import toposort_flatten
 
@@ -226,7 +222,7 @@ def get_extension_classes(sort: bool,
     all_classes = {}
     deps_map = {}
 
-    for entry_point in entry_points(
+    for entry_point in meta.entry_points(
             group='hotdoc.extensions', name='get_extension_classes'):
         if getattr(entry_point, 'module', '') == 'hotdoc_c_extension.extensions':
             continue
diff --git a/setup.py b/setup.py
index 5d7f131e4425..7dd5c37bf342 100644
--- a/setup.py
+++ b/setup.py
@@ -299,8 +299,6 @@ INSTALL_REQUIRES = [
     'appdirs',
     'wheezy.template',
     'toposort>=1.4',
-    'importlib_metadata; python_version<"3.10"',
-    'backports.entry_points_selectable',
 ]
 
 # dbus-deviation requires sphinx, which requires python 3.5
