Ignore warning when importing pkg_resources
On Debian Jessie we get a PendingDeprecationWarning which we now see since the log is init'ed earlier.
This commit is contained in:
parent
64f208486e
commit
40a3e24b05
@ -33,11 +33,17 @@ import sys
|
|||||||
import operator
|
import operator
|
||||||
import contextlib
|
import contextlib
|
||||||
|
|
||||||
import pkg_resources
|
|
||||||
from PyQt5.QtCore import (qVersion, QEventLoop, QDataStream, QByteArray,
|
from PyQt5.QtCore import (qVersion, QEventLoop, QDataStream, QByteArray,
|
||||||
QIODevice, QSaveFile)
|
QIODevice, QSaveFile)
|
||||||
from PyQt5.QtWidgets import QApplication
|
from PyQt5.QtWidgets import QApplication
|
||||||
|
|
||||||
|
from qutebrowser.utils import log
|
||||||
|
|
||||||
|
with log.ignore_py_warnings(category=PendingDeprecationWarning, module='imp'):
|
||||||
|
# This imports 'imp' and gives us a PendingDeprecationWarning on
|
||||||
|
# Debian Jessie.
|
||||||
|
import pkg_resources
|
||||||
|
|
||||||
|
|
||||||
MAXVALS = {
|
MAXVALS = {
|
||||||
'int': 2 ** 31 - 1,
|
'int': 2 ** 31 - 1,
|
||||||
|
Loading…
Reference in New Issue
Block a user