summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2021-01-30 16:16:22 +0100
committerFlorian Bruhin <me@the-compiler.org>2021-01-30 16:17:29 +0100
commit11b6d12186c84c37b1efe1ae07c9cd7666463ef6 (patch)
tree236771b6ef3365fa0943e5e5fd3af9cde220b045
parent88040e539c5e9631f9cde9301d9b31f808a97356 (diff)
downloadqutebrowser-11b6d12186c84c37b1efe1ae07c9cd7666463ef6.tar.gz
qutebrowser-11b6d12186c84c37b1efe1ae07c9cd7666463ef6.zip
earlyinit: Require importlib_resources on Python 3.7/3.8 too
Even if the stdlib importlib.resources is available there, we require the backport (due to the .files API). (cherry picked from commit e0af2a23707b3fc4822fb97fb93383e60476ffe0)
-rw-r--r--qutebrowser/misc/earlyinit.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/qutebrowser/misc/earlyinit.py b/qutebrowser/misc/earlyinit.py
index e063fd605..420f90f9a 100644
--- a/qutebrowser/misc/earlyinit.py
+++ b/qutebrowser/misc/earlyinit.py
@@ -231,9 +231,7 @@ def check_libraries():
'PyQt5.QtSql': _missing_str("PyQt5.QtSql"),
'PyQt5.QtOpenGL': _missing_str("PyQt5.QtOpenGL"),
}
- try:
- import importlib.resources
- except ImportError:
+ if sys.version_info < (3, 9):
# Backport required
modules['importlib_resources'] = _missing_str("importlib_resources")
_check_modules(modules)