Merge pull request #8593 from qutebrowser/update-dependencies
Update dependencies
This commit is contained in:
commit
f9eb71b4c8
|
|
@ -6,4 +6,4 @@ importlib_metadata==8.7.0
|
|||
packaging==25.0
|
||||
pyproject_hooks==1.2.0
|
||||
tomli==2.2.1
|
||||
zipp==3.21.0
|
||||
zipp==3.22.0
|
||||
|
|
|
|||
|
|
@ -71,4 +71,4 @@ uritemplate==4.1.1
|
|||
# urllib3==2.4.0
|
||||
wcmatch==10.0
|
||||
wcwidth==0.2.13
|
||||
zipp==3.21.0
|
||||
zipp==3.22.0
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
# This file is automatically generated by scripts/dev/recompile_requirements.py
|
||||
|
||||
chardet==5.2.0
|
||||
diff_cover==9.3.1
|
||||
diff_cover==9.3.2
|
||||
Jinja2==3.1.6
|
||||
lxml==5.4.0
|
||||
MarkupSafe==3.0.2
|
||||
mypy==1.15.0
|
||||
mypy==1.16.0
|
||||
mypy_extensions==1.1.0
|
||||
pathspec==0.12.1
|
||||
pluggy==1.6.0
|
||||
Pygments==2.19.1
|
||||
PyQt5-stubs==5.15.6.0
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@ importlib_metadata==8.7.0
|
|||
packaging==25.0
|
||||
pyinstaller==6.13.0
|
||||
pyinstaller-hooks-contrib==2025.4
|
||||
zipp==3.21.0
|
||||
zipp==3.22.0
|
||||
|
|
|
|||
|
|
@ -14,4 +14,4 @@ requests==2.32.3
|
|||
tomli==2.2.1
|
||||
trove-classifiers==2025.5.9.12
|
||||
urllib3==2.4.0
|
||||
zipp==3.21.0
|
||||
zipp==3.22.0
|
||||
|
|
|
|||
|
|
@ -23,4 +23,4 @@ sphinxcontrib-qthelp==2.0.0
|
|||
sphinxcontrib-serializinghtml==2.0.0
|
||||
tomli==2.2.1
|
||||
urllib3==2.4.0
|
||||
zipp==3.21.0
|
||||
zipp==3.22.0
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ filelock==3.18.0
|
|||
Flask==3.1.1
|
||||
gherkin-official==29.0.0
|
||||
hunter==3.7.0
|
||||
hypothesis==6.131.28
|
||||
hypothesis==6.132.0
|
||||
idna==3.10
|
||||
importlib_metadata==8.7.0
|
||||
importlib_resources==6.5.2
|
||||
|
|
@ -45,11 +45,11 @@ pytest-bdd==8.1.0
|
|||
pytest-benchmark==5.1.0
|
||||
pytest-cov==6.1.1
|
||||
pytest-instafail==0.5.0
|
||||
pytest-mock==3.14.0
|
||||
pytest-mock==3.14.1
|
||||
pytest-qt==4.4.0
|
||||
pytest-repeat==0.9.4
|
||||
pytest-rerunfailures==15.1
|
||||
pytest-xdist==3.6.1
|
||||
pytest-xdist==3.7.0
|
||||
pytest-xvfb==3.1.1
|
||||
PyVirtualDisplay==3.0
|
||||
requests==2.32.3
|
||||
|
|
@ -64,4 +64,4 @@ typing_extensions==4.13.2
|
|||
urllib3==2.4.0
|
||||
vulture==2.14
|
||||
Werkzeug==3.1.3
|
||||
zipp==3.21.0
|
||||
zipp==3.22.0
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ pip==25.1.1
|
|||
platformdirs==4.3.8
|
||||
pluggy==1.6.0
|
||||
pyproject-api==1.9.1
|
||||
setuptools==80.8.0
|
||||
setuptools==80.9.0
|
||||
tomli==2.2.1
|
||||
tox==4.26.0 ; python_full_version!="3.14.0b1"
|
||||
typing_extensions==4.13.2
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
"""A model that proxies access to one or more completion categories."""
|
||||
|
||||
from typing import overload, Optional, Any, cast
|
||||
from typing import overload, Optional, Any
|
||||
from collections.abc import MutableSequence
|
||||
|
||||
from qutebrowser.qt import machinery
|
||||
|
|
@ -91,14 +91,14 @@ class CompletionModel(QAbstractItemModel):
|
|||
Return: The item flags, or Qt.ItemFlag.NoItemFlags on error.
|
||||
"""
|
||||
if not index.isValid():
|
||||
return cast(_FlagType, Qt.ItemFlag.NoItemFlags)
|
||||
return qtutils.maybe_cast(_FlagType, machinery.IS_QT5, Qt.ItemFlag.NoItemFlags)
|
||||
if index.parent().isValid():
|
||||
# item
|
||||
return (Qt.ItemFlag.ItemIsEnabled | Qt.ItemFlag.ItemIsSelectable |
|
||||
Qt.ItemFlag.ItemNeverHasChildren)
|
||||
else:
|
||||
# category
|
||||
return cast(_FlagType, Qt.ItemFlag.NoItemFlags)
|
||||
return qtutils.maybe_cast(_FlagType, machinery.IS_QT5, Qt.ItemFlag.NoItemFlags)
|
||||
|
||||
def index(self, row: int, col: int, parent: QModelIndex = QModelIndex()) -> QModelIndex:
|
||||
"""Get an index into the model.
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
This entire file is a giant WORKAROUND for https://bugreports.qt.io/browse/QTBUG-114334.
|
||||
"""
|
||||
|
||||
from typing import Union, cast, Optional
|
||||
from typing import Union, Optional
|
||||
import enum
|
||||
import ctypes
|
||||
import ctypes.util
|
||||
|
|
@ -16,7 +16,7 @@ from qutebrowser.qt import sip, machinery
|
|||
from qutebrowser.qt.core import QAbstractNativeEventFilter, QByteArray, qVersion
|
||||
|
||||
from qutebrowser.misc import objects
|
||||
from qutebrowser.utils import log
|
||||
from qutebrowser.utils import log, qtutils
|
||||
|
||||
|
||||
# Needs to be saved to avoid garbage collection
|
||||
|
|
@ -104,8 +104,8 @@ class NativeEventFilter(QAbstractNativeEventFilter):
|
|||
#
|
||||
# Tuple because PyQt uses the second value as the *result out-pointer, which
|
||||
# according to the Qt documentation is only used on Windows.
|
||||
_PASS_EVENT_RET = (False, cast(_PointerRetType, 0))
|
||||
_FILTER_EVENT_RET = (True, cast(_PointerRetType, 0))
|
||||
_PASS_EVENT_RET = (False, qtutils.maybe_cast(_PointerRetType, machinery.IS_QT6, 0))
|
||||
_FILTER_EVENT_RET = (True, qtutils.maybe_cast(_PointerRetType, machinery.IS_QT6, 0))
|
||||
|
||||
def __init__(self) -> None:
|
||||
super().__init__()
|
||||
|
|
|
|||
|
|
@ -749,3 +749,14 @@ else:
|
|||
return obj
|
||||
|
||||
QT_NONE: None = None
|
||||
|
||||
|
||||
def maybe_cast(to_type: type[_T], do_cast: bool, value: Any) -> _T:
|
||||
"""Cast `value` to `to_type` only if `do_cast` is true."""
|
||||
if do_cast:
|
||||
return cast(
|
||||
to_type, # type: ignore[valid-type]
|
||||
value,
|
||||
)
|
||||
|
||||
return value
|
||||
|
|
|
|||
|
|
@ -487,7 +487,7 @@ def _pdfjs_version() -> str:
|
|||
else:
|
||||
pdfjs_file = pdfjs_file.decode('utf-8')
|
||||
version_re = re.compile(
|
||||
r"""^ *(PDFJS\.version|(var|const) pdfjsVersion) = ['"](?P<version>[^'"]+)['"];$""",
|
||||
r"""^ *(PDFJS\.version|(var|const|\*) pdfjsVersion) = ['"]?(?P<version>[^'"\n]+)['"]?;?$""",
|
||||
re.MULTILINE)
|
||||
|
||||
match = version_re.search(pdfjs_file)
|
||||
|
|
|
|||
Loading…
Reference in New Issue