Check libraries before Qt version
Importing qtutils for version_check needs pkg_resources, so we need to check that's available earlier. Also, import pkg_resources also shows warnings on older setuptools versions because of invalid escapes, so we need to import it with warnings suppressed.
This commit is contained in:
parent
db807a1bbc
commit
a17c4767d6
@ -349,9 +349,9 @@ def earlyinit(args):
|
||||
# Now we can be sure QtCore is available, so we can print dialogs on
|
||||
# errors, so people only using the GUI notice them as well.
|
||||
backend = get_backend(args)
|
||||
check_libraries(backend)
|
||||
check_qt_version()
|
||||
remove_inputhook()
|
||||
check_libraries(backend)
|
||||
check_ssl_support(backend)
|
||||
check_optimize_flag()
|
||||
set_backend(backend)
|
||||
|
@ -31,6 +31,7 @@ import io
|
||||
import operator
|
||||
import contextlib
|
||||
|
||||
import pkg_resources
|
||||
from PyQt5.QtCore import (qVersion, QEventLoop, QDataStream, QByteArray,
|
||||
QIODevice, QSaveFile, QT_VERSION_STR)
|
||||
try:
|
||||
@ -38,17 +39,6 @@ try:
|
||||
except ImportError: # pragma: no cover
|
||||
qWebKitVersion = None
|
||||
|
||||
from qutebrowser.utils import log
|
||||
|
||||
with log.ignore_py_warnings(category=PendingDeprecationWarning, module='imp'):
|
||||
with log.ignore_py_warnings(category=ImportWarning):
|
||||
# This imports 'imp' and gives us a PendingDeprecationWarning on
|
||||
# Debian Jessie.
|
||||
#
|
||||
# On Archlinux, we get ImportWarning from
|
||||
# importlib/_bootstrap_external.py for modules with missing __init__.
|
||||
import pkg_resources
|
||||
|
||||
|
||||
MAXVALS = {
|
||||
'int': 2 ** 31 - 1,
|
||||
|
Loading…
Reference in New Issue
Block a user