From 96ff6132cba8b7be32b67a4c50c81ea8d164b55a Mon Sep 17 00:00:00 2001 From: qutebrowser bot Date: Mon, 15 Jan 2024 04:21:31 +0000 Subject: [PATCH 01/67] Update dependencies --- misc/requirements/requirements-dev.txt | 2 +- misc/requirements/requirements-mypy.txt | 6 +++--- misc/requirements/requirements-pyroma.txt | 2 +- misc/requirements/requirements-sphinx.txt | 2 +- misc/requirements/requirements-tests.txt | 6 +++--- misc/requirements/requirements-tox.txt | 2 +- requirements.txt | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/misc/requirements/requirements-dev.txt b/misc/requirements/requirements-dev.txt index 5e7f67489..773223a74 100644 --- a/misc/requirements/requirements-dev.txt +++ b/misc/requirements/requirements-dev.txt @@ -18,7 +18,7 @@ keyring==24.3.0 manhole==1.8.0 markdown-it-py==3.0.0 mdurl==0.1.2 -more-itertools==10.1.0 +more-itertools==10.2.0 nh3==0.2.15 packaging==23.2 pkginfo==1.9.6 diff --git a/misc/requirements/requirements-mypy.txt b/misc/requirements/requirements-mypy.txt index b31bb7722..46493d3f9 100644 --- a/misc/requirements/requirements-mypy.txt +++ b/misc/requirements/requirements-mypy.txt @@ -3,8 +3,8 @@ chardet==5.2.0 diff_cover==8.0.2 importlib-resources==6.1.1 -Jinja2==3.1.2 -lxml==5.0.1 +Jinja2==3.1.3 +lxml==5.1.0 MarkupSafe==2.1.3 mypy==1.8.0 mypy-extensions==1.0.0 @@ -16,6 +16,6 @@ types-colorama==0.4.15.20240106 types-docutils==0.20.0.20240106 types-Pygments==2.17.0.20240106 types-PyYAML==6.0.12.12 -types-setuptools==69.0.0.20240106 +types-setuptools==69.0.0.20240115 typing_extensions==4.9.0 zipp==3.17.0 diff --git a/misc/requirements/requirements-pyroma.txt b/misc/requirements/requirements-pyroma.txt index b93fb2be5..141fc8889 100644 --- a/misc/requirements/requirements-pyroma.txt +++ b/misc/requirements/requirements-pyroma.txt @@ -12,6 +12,6 @@ pyproject_hooks==1.0.0 pyroma==4.2 requests==2.31.0 tomli==2.0.1 -trove-classifiers==2023.11.29 +trove-classifiers==2024.1.8 urllib3==2.1.0 zipp==3.17.0 diff --git a/misc/requirements/requirements-sphinx.txt b/misc/requirements/requirements-sphinx.txt index 8d7cc145c..f04793f09 100644 --- a/misc/requirements/requirements-sphinx.txt +++ b/misc/requirements/requirements-sphinx.txt @@ -8,7 +8,7 @@ docutils==0.20.1 idna==3.6 imagesize==1.4.1 importlib-metadata==7.0.1 -Jinja2==3.1.2 +Jinja2==3.1.3 MarkupSafe==2.1.3 packaging==23.2 Pygments==2.17.2 diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt index 744abbcfc..62234d6c3 100644 --- a/misc/requirements/requirements-tests.txt +++ b/misc/requirements/requirements-tests.txt @@ -13,17 +13,17 @@ execnet==2.0.2 filelock==3.13.1 Flask==3.0.0 hunter==3.6.1 -hypothesis==6.92.3 +hypothesis==6.93.0 idna==3.6 importlib-metadata==7.0.1 iniconfig==2.0.0 itsdangerous==2.1.2 jaraco.functools==4.0.0 -# Jinja2==3.1.2 +# Jinja2==3.1.3 Mako==1.3.0 manhole==1.8.0 # MarkupSafe==2.1.3 -more-itertools==10.1.0 +more-itertools==10.2.0 packaging==23.2 parse==1.20.0 parse-type==0.6.2 diff --git a/misc/requirements/requirements-tox.txt b/misc/requirements/requirements-tox.txt index 79f770342..627385f6a 100644 --- a/misc/requirements/requirements-tox.txt +++ b/misc/requirements/requirements-tox.txt @@ -12,6 +12,6 @@ pluggy==1.3.0 pyproject-api==1.6.1 setuptools==69.0.3 tomli==2.0.1 -tox==4.11.4 +tox==4.12.0 virtualenv==20.25.0 wheel==0.42.0 diff --git a/requirements.txt b/requirements.txt index 81e0d0606..b18983216 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ adblock==0.6.0 colorama==0.4.6 importlib-resources==6.1.1 ; python_version=="3.8.*" -Jinja2==3.1.2 +Jinja2==3.1.3 MarkupSafe==2.1.3 Pygments==2.17.2 PyYAML==6.0.1 From fedea101877815e8df5670c52fcca32bfff6c269 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 17 Jan 2024 11:25:23 +0100 Subject: [PATCH 02/67] Fix consistency of 'dark mode' spelling Thanks to absinthium --- doc/help/settings.asciidoc | 4 ++-- qutebrowser/config/configdata.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/help/settings.asciidoc b/doc/help/settings.asciidoc index 9ef0a014d..b69700880 100644 --- a/doc/help/settings.asciidoc +++ b/doc/help/settings.asciidoc @@ -115,7 +115,7 @@ |<>|Background color of tooltips. |<>|Foreground color of tooltips. |<>|Background color for webpages if unset (or empty to use the theme's color). -|<>|Which algorithm to use for modifying how colors are rendered with darkmode. +|<>|Which algorithm to use for modifying how colors are rendered with dark mode. |<>|Contrast for dark mode. |<>|Render all web contents using a dark theme. |<>|Which images to apply dark mode to. @@ -1645,7 +1645,7 @@ Default: +pass:[white]+ [[colors.webpage.darkmode.algorithm]] === colors.webpage.darkmode.algorithm -Which algorithm to use for modifying how colors are rendered with darkmode. +Which algorithm to use for modifying how colors are rendered with dark mode. The `lightness-cielab` value was added with QtWebEngine 5.14 and is treated like `lightness-hsl` with older QtWebEngine versions. This setting requires a restart. diff --git a/qutebrowser/config/configdata.yml b/qutebrowser/config/configdata.yml index e973fca28..de6948150 100644 --- a/qutebrowser/config/configdata.yml +++ b/qutebrowser/config/configdata.yml @@ -3284,7 +3284,7 @@ colors.webpage.darkmode.enabled: colors.webpage.darkmode.algorithm: default: lightness-cielab desc: >- - Which algorithm to use for modifying how colors are rendered with darkmode. + Which algorithm to use for modifying how colors are rendered with dark mode. The `lightness-cielab` value was added with QtWebEngine 5.14 and is treated like `lightness-hsl` with older QtWebEngine versions. From 0563dc0edad8ef71352a36972161514a05b5ee6f Mon Sep 17 00:00:00 2001 From: qutebrowser bot Date: Mon, 22 Jan 2024 04:20:11 +0000 Subject: [PATCH 03/67] Update dependencies --- misc/requirements/requirements-flake8.txt | 2 +- misc/requirements/requirements-mypy.txt | 4 ++-- misc/requirements/requirements-pyinstaller.txt | 2 +- misc/requirements/requirements-sphinx.txt | 2 +- misc/requirements/requirements-tests.txt | 11 +++++------ misc/requirements/requirements-tox.txt | 2 +- misc/requirements/requirements-vulture.txt | 4 ++-- requirements.txt | 2 +- 8 files changed, 14 insertions(+), 15 deletions(-) diff --git a/misc/requirements/requirements-flake8.txt b/misc/requirements/requirements-flake8.txt index 41b9e6c3e..35efd201d 100644 --- a/misc/requirements/requirements-flake8.txt +++ b/misc/requirements/requirements-flake8.txt @@ -2,7 +2,7 @@ attrs==23.2.0 flake8==7.0.0 -flake8-bugbear==23.12.2 +flake8-bugbear==24.1.17 flake8-builtins==2.2.0 flake8-comprehensions==3.14.0 flake8-debugger==4.1.2 diff --git a/misc/requirements/requirements-mypy.txt b/misc/requirements/requirements-mypy.txt index 46493d3f9..c91d19a9b 100644 --- a/misc/requirements/requirements-mypy.txt +++ b/misc/requirements/requirements-mypy.txt @@ -1,11 +1,11 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py chardet==5.2.0 -diff_cover==8.0.2 +diff_cover==8.0.3 importlib-resources==6.1.1 Jinja2==3.1.3 lxml==5.1.0 -MarkupSafe==2.1.3 +MarkupSafe==2.1.4 mypy==1.8.0 mypy-extensions==1.0.0 pluggy==1.3.0 diff --git a/misc/requirements/requirements-pyinstaller.txt b/misc/requirements/requirements-pyinstaller.txt index af7a329fd..25c814810 100644 --- a/misc/requirements/requirements-pyinstaller.txt +++ b/misc/requirements/requirements-pyinstaller.txt @@ -4,5 +4,5 @@ altgraph==0.17.4 importlib-metadata==7.0.1 packaging==23.2 pyinstaller==6.3.0 -pyinstaller-hooks-contrib==2023.12 +pyinstaller-hooks-contrib==2024.0 zipp==3.17.0 diff --git a/misc/requirements/requirements-sphinx.txt b/misc/requirements/requirements-sphinx.txt index f04793f09..4406a0335 100644 --- a/misc/requirements/requirements-sphinx.txt +++ b/misc/requirements/requirements-sphinx.txt @@ -9,7 +9,7 @@ idna==3.6 imagesize==1.4.1 importlib-metadata==7.0.1 Jinja2==3.1.3 -MarkupSafe==2.1.3 +MarkupSafe==2.1.4 packaging==23.2 Pygments==2.17.2 pytz==2023.3.post1 diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt index 62234d6c3..7aecb1867 100644 --- a/misc/requirements/requirements-tests.txt +++ b/misc/requirements/requirements-tests.txt @@ -1,7 +1,7 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py attrs==23.2.0 -beautifulsoup4==4.12.2 +beautifulsoup4==4.12.3 blinker==1.7.0 certifi==2023.11.17 charset-normalizer==3.3.2 @@ -11,9 +11,9 @@ coverage==7.4.0 exceptiongroup==1.2.0 execnet==2.0.2 filelock==3.13.1 -Flask==3.0.0 +Flask==3.0.1 hunter==3.6.1 -hypothesis==6.93.0 +hypothesis==6.96.2 idna==3.6 importlib-metadata==7.0.1 iniconfig==2.0.0 @@ -22,7 +22,7 @@ jaraco.functools==4.0.0 # Jinja2==3.1.3 Mako==1.3.0 manhole==1.8.0 -# MarkupSafe==2.1.3 +# MarkupSafe==2.1.4 more-itertools==10.2.0 packaging==23.2 parse==1.20.0 @@ -48,10 +48,9 @@ six==1.16.0 sortedcontainers==2.4.0 soupsieve==2.5 tldextract==5.1.1 -toml==0.10.2 tomli==2.0.1 typing_extensions==4.9.0 urllib3==2.1.0 -vulture==2.10 +vulture==2.11 Werkzeug==3.0.1 zipp==3.17.0 diff --git a/misc/requirements/requirements-tox.txt b/misc/requirements/requirements-tox.txt index 627385f6a..f63a591d0 100644 --- a/misc/requirements/requirements-tox.txt +++ b/misc/requirements/requirements-tox.txt @@ -12,6 +12,6 @@ pluggy==1.3.0 pyproject-api==1.6.1 setuptools==69.0.3 tomli==2.0.1 -tox==4.12.0 +tox==4.12.1 virtualenv==20.25.0 wheel==0.42.0 diff --git a/misc/requirements/requirements-vulture.txt b/misc/requirements/requirements-vulture.txt index 9bceeb7b1..a7d37e73a 100644 --- a/misc/requirements/requirements-vulture.txt +++ b/misc/requirements/requirements-vulture.txt @@ -1,4 +1,4 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py -toml==0.10.2 -vulture==2.10 +tomli==2.0.1 +vulture==2.11 diff --git a/requirements.txt b/requirements.txt index b18983216..82b483f70 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ adblock==0.6.0 colorama==0.4.6 importlib-resources==6.1.1 ; python_version=="3.8.*" Jinja2==3.1.3 -MarkupSafe==2.1.3 +MarkupSafe==2.1.4 Pygments==2.17.2 PyYAML==6.0.1 zipp==3.17.0 From 8afe1535640ad53bc1ea80f22a14d0ef66656f76 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 20 Nov 2023 11:54:20 +0100 Subject: [PATCH 04/67] Update changelog URL --- scripts/dev/changelog_urls.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/dev/changelog_urls.json b/scripts/dev/changelog_urls.json index 48158d339..5b3bd33cd 100644 --- a/scripts/dev/changelog_urls.json +++ b/scripts/dev/changelog_urls.json @@ -45,12 +45,12 @@ "flake8": "https://github.com/PyCQA/flake8/tree/main/docs/source/release-notes", "flake8-docstrings": "https://github.com/PyCQA/flake8-docstrings/blob/main/HISTORY.rst", "flake8-debugger": "https://github.com/JBKahn/flake8-debugger/", - "flake8-builtins": "https://github.com/gforcada/flake8-builtins/blob/master/CHANGES.rst", + "flake8-builtins": "https://github.com/gforcada/flake8-builtins/blob/main/CHANGES.rst", "flake8-bugbear": "https://github.com/PyCQA/flake8-bugbear#change-log", "flake8-tidy-imports": "https://github.com/adamchainz/flake8-tidy-imports/blob/main/CHANGELOG.rst", "flake8-tuple": "https://github.com/ar4s/flake8_tuple/blob/master/HISTORY.rst", "flake8-comprehensions": "https://github.com/adamchainz/flake8-comprehensions/blob/main/CHANGELOG.rst", - "flake8-deprecated": "https://github.com/gforcada/flake8-deprecated/blob/master/CHANGES.rst", + "flake8-deprecated": "https://github.com/gforcada/flake8-deprecated/blob/main/CHANGES.rst", "flake8-future-import": "https://github.com/xZise/flake8-future-import#changes", "flake8-string-format": "https://github.com/xZise/flake8-string-format#changes", "flake8-plugin-utils": "https://github.com/afonasev/flake8-plugin-utils#change-log", From 5456a4153a62d470718f45ab665e319f0bbb2383 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 22 Jan 2024 09:53:55 +0100 Subject: [PATCH 05/67] Update flake8 ignores --- qutebrowser/utils/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qutebrowser/utils/utils.py b/qutebrowser/utils/utils.py index f83f838fe..a9de4bc00 100644 --- a/qutebrowser/utils/utils.py +++ b/qutebrowser/utils/utils.py @@ -341,7 +341,7 @@ class prevent_exceptions: # noqa: N801,N806 pylint: disable=invalid-name """Call the original function.""" try: return func(*args, **kwargs) - except BaseException: + except BaseException: # noqa: B036 log.misc.exception("Error in {}".format(qualname(func))) return retval From 3494614fcb6d11a1d6eead1808da4546be4884cb Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 22 Jan 2024 09:54:09 +0100 Subject: [PATCH 06/67] Update changelog URLs --- scripts/dev/changelog_urls.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/dev/changelog_urls.json b/scripts/dev/changelog_urls.json index 5b3bd33cd..a2f0b7612 100644 --- a/scripts/dev/changelog_urls.json +++ b/scripts/dev/changelog_urls.json @@ -93,7 +93,6 @@ "urllib3": "https://github.com/urllib3/urllib3/blob/main/CHANGES.rst", "lxml": "https://github.com/lxml/lxml/blob/master/CHANGES.txt", "cryptography": "https://cryptography.io/en/latest/changelog.html", - "toml": "https://github.com/uiri/toml/releases", "tomli": "https://github.com/hukkin/tomli/blob/master/CHANGELOG.md", "PyQt5": "https://www.riverbankcomputing.com/news", "PyQt5-Qt5": "https://www.riverbankcomputing.com/news", @@ -120,7 +119,7 @@ "tldextract": "https://github.com/john-kurkowski/tldextract/blob/master/CHANGELOG.md", "typing_extensions": "https://github.com/python/typing_extensions/blob/main/CHANGELOG.md", "diff_cover": "https://github.com/Bachmann1234/diff_cover/blob/main/CHANGELOG", - "beautifulsoup4": "https://bazaar.launchpad.net/~leonardr/beautifulsoup/bs4/view/head:/CHANGELOG", + "beautifulsoup4": "https://git.launchpad.net/beautifulsoup/tree/CHANGELOG", "check-manifest": "https://github.com/mgedmin/check-manifest/blob/master/CHANGES.rst", "yamllint": "https://github.com/adrienverge/yamllint/blob/master/CHANGELOG.rst", "pathspec": "https://github.com/cpburnz/python-path-specification/blob/master/CHANGES.rst", From 238c97f71ef0d76c677b3dafea6e8f94893d0018 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jan 2024 18:56:48 +0000 Subject: [PATCH 07/67] build(deps): bump actions/cache from 3 to 4 Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fe1bbefe7..732ce4b07 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,7 @@ jobs: - uses: actions/checkout@v4 with: persist-credentials: false - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | .mypy_cache @@ -184,7 +184,7 @@ jobs: - uses: actions/checkout@v4 with: persist-credentials: false - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | .mypy_cache From a0437782f11f73a6614e075ed32f23a18d1b9c10 Mon Sep 17 00:00:00 2001 From: qutebrowser bot Date: Mon, 29 Jan 2024 04:19:53 +0000 Subject: [PATCH 08/67] Update dependencies --- misc/requirements/requirements-dev.txt | 4 ++-- misc/requirements/requirements-mypy.txt | 6 +++--- misc/requirements/requirements-pylint.txt | 4 ++-- misc/requirements/requirements-sphinx.txt | 2 +- misc/requirements/requirements-tests.txt | 10 +++++----- misc/requirements/requirements-tox.txt | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/misc/requirements/requirements-dev.txt b/misc/requirements/requirements-dev.txt index 773223a74..7c0db5de3 100644 --- a/misc/requirements/requirements-dev.txt +++ b/misc/requirements/requirements-dev.txt @@ -5,7 +5,7 @@ bump2version==1.0.1 certifi==2023.11.17 cffi==1.16.0 charset-normalizer==3.3.2 -cryptography==41.0.7 +cryptography==42.0.1 docutils==0.20.1 github3.py==4.0.1 hunter==3.6.1 @@ -35,7 +35,7 @@ requests-toolbelt==1.0.0 rfc3986==2.0.0 rich==13.7.0 SecretStorage==3.3.3 -sip==6.8.1 +sip==6.8.2 six==1.16.0 tomli==2.0.1 twine==4.0.2 diff --git a/misc/requirements/requirements-mypy.txt b/misc/requirements/requirements-mypy.txt index c91d19a9b..fca88169c 100644 --- a/misc/requirements/requirements-mypy.txt +++ b/misc/requirements/requirements-mypy.txt @@ -8,14 +8,14 @@ lxml==5.1.0 MarkupSafe==2.1.4 mypy==1.8.0 mypy-extensions==1.0.0 -pluggy==1.3.0 +pluggy==1.4.0 Pygments==2.17.2 PyQt5-stubs==5.15.6.0 tomli==2.0.1 types-colorama==0.4.15.20240106 -types-docutils==0.20.0.20240106 +types-docutils==0.20.0.20240126 types-Pygments==2.17.0.20240106 types-PyYAML==6.0.12.12 -types-setuptools==69.0.0.20240115 +types-setuptools==69.0.0.20240125 typing_extensions==4.9.0 zipp==3.17.0 diff --git a/misc/requirements/requirements-pylint.txt b/misc/requirements/requirements-pylint.txt index b3a5198b4..0e2f8f543 100644 --- a/misc/requirements/requirements-pylint.txt +++ b/misc/requirements/requirements-pylint.txt @@ -4,8 +4,8 @@ astroid==3.0.2 certifi==2023.11.17 cffi==1.16.0 charset-normalizer==3.3.2 -cryptography==41.0.7 -dill==0.3.7 +cryptography==42.0.1 +dill==0.3.8 github3.py==4.0.1 idna==3.6 isort==5.13.2 diff --git a/misc/requirements/requirements-sphinx.txt b/misc/requirements/requirements-sphinx.txt index 4406a0335..4ebdf63ab 100644 --- a/misc/requirements/requirements-sphinx.txt +++ b/misc/requirements/requirements-sphinx.txt @@ -12,7 +12,7 @@ Jinja2==3.1.3 MarkupSafe==2.1.4 packaging==23.2 Pygments==2.17.2 -pytz==2023.3.post1 +pytz==2023.4 requests==2.31.0 snowballstemmer==2.2.0 Sphinx==7.1.2 diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt index 7aecb1867..f1162d003 100644 --- a/misc/requirements/requirements-tests.txt +++ b/misc/requirements/requirements-tests.txt @@ -7,13 +7,13 @@ certifi==2023.11.17 charset-normalizer==3.3.2 cheroot==10.0.0 click==8.1.7 -coverage==7.4.0 +coverage==7.4.1 exceptiongroup==1.2.0 execnet==2.0.2 filelock==3.13.1 Flask==3.0.1 hunter==3.6.1 -hypothesis==6.96.2 +hypothesis==6.97.1 idna==3.6 importlib-metadata==7.0.1 iniconfig==2.0.0 @@ -25,12 +25,12 @@ manhole==1.8.0 # MarkupSafe==2.1.4 more-itertools==10.2.0 packaging==23.2 -parse==1.20.0 +parse==1.20.1 parse-type==0.6.2 -pluggy==1.3.0 +pluggy==1.4.0 py-cpuinfo==9.0.0 Pygments==2.17.2 -pytest==7.4.4 +pytest==8.0.0 pytest-bdd==7.0.1 pytest-benchmark==4.0.0 pytest-cov==4.1.0 diff --git a/misc/requirements/requirements-tox.txt b/misc/requirements/requirements-tox.txt index f63a591d0..b116629e6 100644 --- a/misc/requirements/requirements-tox.txt +++ b/misc/requirements/requirements-tox.txt @@ -8,7 +8,7 @@ filelock==3.13.1 packaging==23.2 pip==23.3.2 platformdirs==4.1.0 -pluggy==1.3.0 +pluggy==1.4.0 pyproject-api==1.6.1 setuptools==69.0.3 tomli==2.0.1 From cd25d8096d379fde815e9fe57a11b6eaf213982b Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 30 Jan 2024 20:22:16 +0100 Subject: [PATCH 09/67] tox: Stop pinning virtualenv for Python 3.12 Reverts 0b0401f8bb23fa57bac13e14b522c9755cba05f7 Fixed in virtualenv 20.23.0 which ships pip 23.1.2 which ships setuptools 67.7.2. Archlinux upgraded finally in August: https://gitlab.archlinux.org/archlinux/packaging/packages/python-virtualenv/-/commits/main --- tox.ini | 2 -- 1 file changed, 2 deletions(-) diff --git a/tox.ini b/tox.ini index 238c532f3..5c27a0faa 100644 --- a/tox.ini +++ b/tox.ini @@ -16,8 +16,6 @@ setenv = pyqt{515,5152}: PYTEST_QT_API=pyqt5 pyqt{515,5152}: QUTE_QT_WRAPPER=PyQt5 cov: PYTEST_ADDOPTS=--cov --cov-report xml --cov-report=html --cov-report= - py312: VIRTUALENV_PIP=23.2 - py312: PIP_REQUIRE_VIRTUALENV=0 passenv = PYTHON DISPLAY From c12340802d1a5e9a08464a55cf5a6f7c1bb587c1 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 2 Feb 2024 11:06:04 +0100 Subject: [PATCH 10/67] ci: Remove weird sed usage Broke on Windows nightly builds for some reason --- .github/workflows/nightly.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 764bcae31..046e5d411 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -59,7 +59,7 @@ jobs: - name: Patch qutebrowser for debugging if: "contains(matrix.args, '--debug')" run: | - sed -i '' '/.-d., .--debug.,/s/$/ default=True,/' qutebrowser/qutebrowser.py + sed -i '/.-d., .--debug.,/s/$/ default=True,/' qutebrowser/qutebrowser.py - name: Run tox run: "tox -e ${{ matrix.toxenv }} -- --gh-token ${{ secrets.GITHUB_TOKEN }} ${{ matrix.args }}" - name: Gather info From 4af52180b545723f61e935d60ca0a09e013a58bf Mon Sep 17 00:00:00 2001 From: qutebrowser bot Date: Mon, 5 Feb 2024 04:20:36 +0000 Subject: [PATCH 11/67] Update dependencies --- misc/requirements/requirements-dev.txt | 6 +++--- misc/requirements/requirements-mypy.txt | 6 +++--- misc/requirements/requirements-pylint.txt | 10 +++++----- misc/requirements/requirements-pyroma.txt | 6 +++--- misc/requirements/requirements-sphinx.txt | 8 ++++---- misc/requirements/requirements-tests.txt | 14 +++++++------- misc/requirements/requirements-tox.txt | 4 ++-- requirements.txt | 2 +- 8 files changed, 28 insertions(+), 28 deletions(-) diff --git a/misc/requirements/requirements-dev.txt b/misc/requirements/requirements-dev.txt index 7c0db5de3..69be753d3 100644 --- a/misc/requirements/requirements-dev.txt +++ b/misc/requirements/requirements-dev.txt @@ -2,10 +2,10 @@ build==1.0.3 bump2version==1.0.1 -certifi==2023.11.17 +certifi==2024.2.2 cffi==1.16.0 charset-normalizer==3.3.2 -cryptography==42.0.1 +cryptography==42.0.2 docutils==0.20.1 github3.py==4.0.1 hunter==3.6.1 @@ -41,5 +41,5 @@ tomli==2.0.1 twine==4.0.2 typing_extensions==4.9.0 uritemplate==4.1.1 -# urllib3==2.1.0 +# urllib3==2.2.0 zipp==3.17.0 diff --git a/misc/requirements/requirements-mypy.txt b/misc/requirements/requirements-mypy.txt index fca88169c..e59e66d5f 100644 --- a/misc/requirements/requirements-mypy.txt +++ b/misc/requirements/requirements-mypy.txt @@ -5,15 +5,15 @@ diff_cover==8.0.3 importlib-resources==6.1.1 Jinja2==3.1.3 lxml==5.1.0 -MarkupSafe==2.1.4 +MarkupSafe==2.1.5 mypy==1.8.0 mypy-extensions==1.0.0 pluggy==1.4.0 Pygments==2.17.2 PyQt5-stubs==5.15.6.0 tomli==2.0.1 -types-colorama==0.4.15.20240106 -types-docutils==0.20.0.20240126 +types-colorama==0.4.15.20240205 +types-docutils==0.20.0.20240201 types-Pygments==2.17.0.20240106 types-PyYAML==6.0.12.12 types-setuptools==69.0.0.20240125 diff --git a/misc/requirements/requirements-pylint.txt b/misc/requirements/requirements-pylint.txt index 0e2f8f543..6a95cd18f 100644 --- a/misc/requirements/requirements-pylint.txt +++ b/misc/requirements/requirements-pylint.txt @@ -1,17 +1,17 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py -astroid==3.0.2 -certifi==2023.11.17 +astroid==3.0.3 +certifi==2024.2.2 cffi==1.16.0 charset-normalizer==3.3.2 -cryptography==42.0.1 +cryptography==42.0.2 dill==0.3.8 github3.py==4.0.1 idna==3.6 isort==5.13.2 mccabe==0.7.0 pefile==2023.2.7 -platformdirs==4.1.0 +platformdirs==4.2.0 pycparser==2.21 PyJWT==2.8.0 pylint==3.0.3 @@ -23,4 +23,4 @@ tomli==2.0.1 tomlkit==0.12.3 typing_extensions==4.9.0 uritemplate==4.1.1 -# urllib3==2.1.0 +# urllib3==2.2.0 diff --git a/misc/requirements/requirements-pyroma.txt b/misc/requirements/requirements-pyroma.txt index 141fc8889..c32d44998 100644 --- a/misc/requirements/requirements-pyroma.txt +++ b/misc/requirements/requirements-pyroma.txt @@ -1,7 +1,7 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py build==1.0.3 -certifi==2023.11.17 +certifi==2024.2.2 charset-normalizer==3.3.2 docutils==0.20.1 idna==3.6 @@ -12,6 +12,6 @@ pyproject_hooks==1.0.0 pyroma==4.2 requests==2.31.0 tomli==2.0.1 -trove-classifiers==2024.1.8 -urllib3==2.1.0 +trove-classifiers==2024.1.31 +urllib3==2.2.0 zipp==3.17.0 diff --git a/misc/requirements/requirements-sphinx.txt b/misc/requirements/requirements-sphinx.txt index 4ebdf63ab..8ff60386d 100644 --- a/misc/requirements/requirements-sphinx.txt +++ b/misc/requirements/requirements-sphinx.txt @@ -2,17 +2,17 @@ alabaster==0.7.13 Babel==2.14.0 -certifi==2023.11.17 +certifi==2024.2.2 charset-normalizer==3.3.2 docutils==0.20.1 idna==3.6 imagesize==1.4.1 importlib-metadata==7.0.1 Jinja2==3.1.3 -MarkupSafe==2.1.4 +MarkupSafe==2.1.5 packaging==23.2 Pygments==2.17.2 -pytz==2023.4 +pytz==2024.1 requests==2.31.0 snowballstemmer==2.2.0 Sphinx==7.1.2 @@ -22,5 +22,5 @@ sphinxcontrib-htmlhelp==2.0.1 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 -urllib3==2.1.0 +urllib3==2.2.0 zipp==3.17.0 diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt index f1162d003..090bf337d 100644 --- a/misc/requirements/requirements-tests.txt +++ b/misc/requirements/requirements-tests.txt @@ -3,7 +3,7 @@ attrs==23.2.0 beautifulsoup4==4.12.3 blinker==1.7.0 -certifi==2023.11.17 +certifi==2024.2.2 charset-normalizer==3.3.2 cheroot==10.0.0 click==8.1.7 @@ -11,18 +11,18 @@ coverage==7.4.1 exceptiongroup==1.2.0 execnet==2.0.2 filelock==3.13.1 -Flask==3.0.1 +Flask==3.0.2 hunter==3.6.1 -hypothesis==6.97.1 +hypothesis==6.98.1 idna==3.6 importlib-metadata==7.0.1 iniconfig==2.0.0 itsdangerous==2.1.2 jaraco.functools==4.0.0 # Jinja2==3.1.3 -Mako==1.3.0 +Mako==1.3.2 manhole==1.8.0 -# MarkupSafe==2.1.4 +# MarkupSafe==2.1.5 more-itertools==10.2.0 packaging==23.2 parse==1.20.1 @@ -43,14 +43,14 @@ pytest-xdist==3.5.0 pytest-xvfb==3.0.0 PyVirtualDisplay==3.0 requests==2.31.0 -requests-file==1.5.1 +requests-file==2.0.0 six==1.16.0 sortedcontainers==2.4.0 soupsieve==2.5 tldextract==5.1.1 tomli==2.0.1 typing_extensions==4.9.0 -urllib3==2.1.0 +urllib3==2.2.0 vulture==2.11 Werkzeug==3.0.1 zipp==3.17.0 diff --git a/misc/requirements/requirements-tox.txt b/misc/requirements/requirements-tox.txt index b116629e6..ab562883d 100644 --- a/misc/requirements/requirements-tox.txt +++ b/misc/requirements/requirements-tox.txt @@ -6,8 +6,8 @@ colorama==0.4.6 distlib==0.3.8 filelock==3.13.1 packaging==23.2 -pip==23.3.2 -platformdirs==4.1.0 +pip==24.0 +platformdirs==4.2.0 pluggy==1.4.0 pyproject-api==1.6.1 setuptools==69.0.3 diff --git a/requirements.txt b/requirements.txt index 82b483f70..95fe6e80a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ adblock==0.6.0 colorama==0.4.6 importlib-resources==6.1.1 ; python_version=="3.8.*" Jinja2==3.1.3 -MarkupSafe==2.1.4 +MarkupSafe==2.1.5 Pygments==2.17.2 PyYAML==6.0.1 zipp==3.17.0 From 5f8423f9d39dceab487bd914b859da58da2a0b16 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 18:47:44 +0000 Subject: [PATCH 12/67] build(deps): bump peter-evans/create-pull-request from 5 to 6 Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 5 to 6. - [Release notes](https://github.com/peter-evans/create-pull-request/releases) - [Commits](https://github.com/peter-evans/create-pull-request/compare/v5...v6) --- updated-dependencies: - dependency-name: peter-evans/create-pull-request dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/recompile-requirements.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/recompile-requirements.yml b/.github/workflows/recompile-requirements.yml index 1e5637a10..6d42c3137 100644 --- a/.github/workflows/recompile-requirements.yml +++ b/.github/workflows/recompile-requirements.yml @@ -41,7 +41,7 @@ jobs: - name: Run qutebrowser smoke test run: "xvfb-run .venv/bin/python3 -m qutebrowser --no-err-windows --nowindow --temp-basedir about:blank ':later 500 quit'" - name: Create pull request - uses: peter-evans/create-pull-request@v5 + uses: peter-evans/create-pull-request@v6 with: committer: qutebrowser bot author: qutebrowser bot From 5615d0e59b5b382f12f48cb44973bcabf73d9861 Mon Sep 17 00:00:00 2001 From: qutebrowser bot Date: Mon, 12 Feb 2024 04:20:45 +0000 Subject: [PATCH 13/67] Update dependencies --- misc/requirements/requirements-dev.txt | 6 +++--- misc/requirements/requirements-flake8.txt | 2 +- misc/requirements/requirements-pyinstaller.txt | 4 ++-- misc/requirements/requirements-tests.txt | 4 ++-- misc/requirements/requirements-tox.txt | 2 +- misc/requirements/requirements-yamllint.txt | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/misc/requirements/requirements-dev.txt b/misc/requirements/requirements-dev.txt index 69be753d3..26f8b1cd1 100644 --- a/misc/requirements/requirements-dev.txt +++ b/misc/requirements/requirements-dev.txt @@ -12,7 +12,7 @@ hunter==3.6.1 idna==3.6 importlib-metadata==7.0.1 importlib-resources==6.1.1 -jaraco.classes==3.3.0 +jaraco.classes==3.3.1 jeepney==0.8.0 keyring==24.3.0 manhole==1.8.0 @@ -35,10 +35,10 @@ requests-toolbelt==1.0.0 rfc3986==2.0.0 rich==13.7.0 SecretStorage==3.3.3 -sip==6.8.2 +sip==6.8.3 six==1.16.0 tomli==2.0.1 -twine==4.0.2 +twine==5.0.0 typing_extensions==4.9.0 uritemplate==4.1.1 # urllib3==2.2.0 diff --git a/misc/requirements/requirements-flake8.txt b/misc/requirements/requirements-flake8.txt index 35efd201d..4f9f7fb39 100644 --- a/misc/requirements/requirements-flake8.txt +++ b/misc/requirements/requirements-flake8.txt @@ -2,7 +2,7 @@ attrs==23.2.0 flake8==7.0.0 -flake8-bugbear==24.1.17 +flake8-bugbear==24.2.6 flake8-builtins==2.2.0 flake8-comprehensions==3.14.0 flake8-debugger==4.1.2 diff --git a/misc/requirements/requirements-pyinstaller.txt b/misc/requirements/requirements-pyinstaller.txt index 25c814810..0b64a76b3 100644 --- a/misc/requirements/requirements-pyinstaller.txt +++ b/misc/requirements/requirements-pyinstaller.txt @@ -3,6 +3,6 @@ altgraph==0.17.4 importlib-metadata==7.0.1 packaging==23.2 -pyinstaller==6.3.0 -pyinstaller-hooks-contrib==2024.0 +pyinstaller==6.4.0 +pyinstaller-hooks-contrib==2024.1 zipp==3.17.0 diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt index 090bf337d..b5ec9b8f5 100644 --- a/misc/requirements/requirements-tests.txt +++ b/misc/requirements/requirements-tests.txt @@ -13,7 +13,7 @@ execnet==2.0.2 filelock==3.13.1 Flask==3.0.2 hunter==3.6.1 -hypothesis==6.98.1 +hypothesis==6.98.3 idna==3.6 importlib-metadata==7.0.1 iniconfig==2.0.0 @@ -36,7 +36,7 @@ pytest-benchmark==4.0.0 pytest-cov==4.1.0 pytest-instafail==0.5.0 pytest-mock==3.12.0 -pytest-qt==4.3.1 +pytest-qt==4.4.0 pytest-repeat==0.9.3 pytest-rerunfailures==13.0 pytest-xdist==3.5.0 diff --git a/misc/requirements/requirements-tox.txt b/misc/requirements/requirements-tox.txt index ab562883d..5fb63ee17 100644 --- a/misc/requirements/requirements-tox.txt +++ b/misc/requirements/requirements-tox.txt @@ -10,7 +10,7 @@ pip==24.0 platformdirs==4.2.0 pluggy==1.4.0 pyproject-api==1.6.1 -setuptools==69.0.3 +setuptools==69.1.0 tomli==2.0.1 tox==4.12.1 virtualenv==20.25.0 diff --git a/misc/requirements/requirements-yamllint.txt b/misc/requirements/requirements-yamllint.txt index 8ecdcd508..b9436eed8 100644 --- a/misc/requirements/requirements-yamllint.txt +++ b/misc/requirements/requirements-yamllint.txt @@ -2,4 +2,4 @@ pathspec==0.12.1 PyYAML==6.0.1 -yamllint==1.33.0 +yamllint==1.34.0 From da2c7ee7cda78567fd7955302a5bba6f2d055492 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 13 Feb 2024 16:43:16 +0100 Subject: [PATCH 14/67] ci: Try more sed cross-platform madness --- .github/workflows/nightly.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 046e5d411..400d65559 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -59,7 +59,7 @@ jobs: - name: Patch qutebrowser for debugging if: "contains(matrix.args, '--debug')" run: | - sed -i '/.-d., .--debug.,/s/$/ default=True,/' qutebrowser/qutebrowser.py + sed -i'' '/.-d., .--debug.,/s/$/ default=True,/' qutebrowser/qutebrowser.py - name: Run tox run: "tox -e ${{ matrix.toxenv }} -- --gh-token ${{ secrets.GITHUB_TOKEN }} ${{ matrix.args }}" - name: Gather info From 569716bef5c3d508a496ded126cd912387d6b8f3 Mon Sep 17 00:00:00 2001 From: qutebrowser bot Date: Mon, 19 Feb 2024 04:20:46 +0000 Subject: [PATCH 15/67] Update dependencies --- misc/requirements/requirements-dev.txt | 4 ++-- misc/requirements/requirements-mypy.txt | 2 +- misc/requirements/requirements-pylint.txt | 4 ++-- misc/requirements/requirements-pyqt-6.6.txt | 4 ++-- misc/requirements/requirements-pyqt-6.txt | 4 ++-- misc/requirements/requirements-pyqt.txt | 4 ++-- misc/requirements/requirements-pyroma.txt | 2 +- misc/requirements/requirements-sphinx.txt | 2 +- misc/requirements/requirements-tests.txt | 6 +++--- misc/requirements/requirements-tox.txt | 2 +- misc/requirements/requirements-yamllint.txt | 2 +- 11 files changed, 18 insertions(+), 18 deletions(-) diff --git a/misc/requirements/requirements-dev.txt b/misc/requirements/requirements-dev.txt index 26f8b1cd1..746e2519d 100644 --- a/misc/requirements/requirements-dev.txt +++ b/misc/requirements/requirements-dev.txt @@ -5,7 +5,7 @@ bump2version==1.0.1 certifi==2024.2.2 cffi==1.16.0 charset-normalizer==3.3.2 -cryptography==42.0.2 +cryptography==42.0.3 docutils==0.20.1 github3.py==4.0.1 hunter==3.6.1 @@ -41,5 +41,5 @@ tomli==2.0.1 twine==5.0.0 typing_extensions==4.9.0 uritemplate==4.1.1 -# urllib3==2.2.0 +# urllib3==2.2.1 zipp==3.17.0 diff --git a/misc/requirements/requirements-mypy.txt b/misc/requirements/requirements-mypy.txt index e59e66d5f..570788ffc 100644 --- a/misc/requirements/requirements-mypy.txt +++ b/misc/requirements/requirements-mypy.txt @@ -16,6 +16,6 @@ types-colorama==0.4.15.20240205 types-docutils==0.20.0.20240201 types-Pygments==2.17.0.20240106 types-PyYAML==6.0.12.12 -types-setuptools==69.0.0.20240125 +types-setuptools==69.1.0.20240217 typing_extensions==4.9.0 zipp==3.17.0 diff --git a/misc/requirements/requirements-pylint.txt b/misc/requirements/requirements-pylint.txt index 6a95cd18f..d3689a449 100644 --- a/misc/requirements/requirements-pylint.txt +++ b/misc/requirements/requirements-pylint.txt @@ -4,7 +4,7 @@ astroid==3.0.3 certifi==2024.2.2 cffi==1.16.0 charset-normalizer==3.3.2 -cryptography==42.0.2 +cryptography==42.0.3 dill==0.3.8 github3.py==4.0.1 idna==3.6 @@ -23,4 +23,4 @@ tomli==2.0.1 tomlkit==0.12.3 typing_extensions==4.9.0 uritemplate==4.1.1 -# urllib3==2.2.0 +# urllib3==2.2.1 diff --git a/misc/requirements/requirements-pyqt-6.6.txt b/misc/requirements/requirements-pyqt-6.6.txt index 914422a38..9b9a11190 100644 --- a/misc/requirements/requirements-pyqt-6.6.txt +++ b/misc/requirements/requirements-pyqt-6.6.txt @@ -1,7 +1,7 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py PyQt6==6.6.1 -PyQt6-Qt6==6.6.1 +PyQt6-Qt6==6.6.2 PyQt6-sip==13.6.0 PyQt6-WebEngine==6.6.0 -PyQt6-WebEngine-Qt6==6.6.1 +PyQt6-WebEngine-Qt6==6.6.2 diff --git a/misc/requirements/requirements-pyqt-6.txt b/misc/requirements/requirements-pyqt-6.txt index 914422a38..9b9a11190 100644 --- a/misc/requirements/requirements-pyqt-6.txt +++ b/misc/requirements/requirements-pyqt-6.txt @@ -1,7 +1,7 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py PyQt6==6.6.1 -PyQt6-Qt6==6.6.1 +PyQt6-Qt6==6.6.2 PyQt6-sip==13.6.0 PyQt6-WebEngine==6.6.0 -PyQt6-WebEngine-Qt6==6.6.1 +PyQt6-WebEngine-Qt6==6.6.2 diff --git a/misc/requirements/requirements-pyqt.txt b/misc/requirements/requirements-pyqt.txt index 914422a38..9b9a11190 100644 --- a/misc/requirements/requirements-pyqt.txt +++ b/misc/requirements/requirements-pyqt.txt @@ -1,7 +1,7 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py PyQt6==6.6.1 -PyQt6-Qt6==6.6.1 +PyQt6-Qt6==6.6.2 PyQt6-sip==13.6.0 PyQt6-WebEngine==6.6.0 -PyQt6-WebEngine-Qt6==6.6.1 +PyQt6-WebEngine-Qt6==6.6.2 diff --git a/misc/requirements/requirements-pyroma.txt b/misc/requirements/requirements-pyroma.txt index c32d44998..592bfe4fa 100644 --- a/misc/requirements/requirements-pyroma.txt +++ b/misc/requirements/requirements-pyroma.txt @@ -13,5 +13,5 @@ pyroma==4.2 requests==2.31.0 tomli==2.0.1 trove-classifiers==2024.1.31 -urllib3==2.2.0 +urllib3==2.2.1 zipp==3.17.0 diff --git a/misc/requirements/requirements-sphinx.txt b/misc/requirements/requirements-sphinx.txt index 8ff60386d..7a09b7815 100644 --- a/misc/requirements/requirements-sphinx.txt +++ b/misc/requirements/requirements-sphinx.txt @@ -22,5 +22,5 @@ sphinxcontrib-htmlhelp==2.0.1 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 -urllib3==2.2.0 +urllib3==2.2.1 zipp==3.17.0 diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt index b5ec9b8f5..0fa0f33e8 100644 --- a/misc/requirements/requirements-tests.txt +++ b/misc/requirements/requirements-tests.txt @@ -13,7 +13,7 @@ execnet==2.0.2 filelock==3.13.1 Flask==3.0.2 hunter==3.6.1 -hypothesis==6.98.3 +hypothesis==6.98.8 idna==3.6 importlib-metadata==7.0.1 iniconfig==2.0.0 @@ -30,7 +30,7 @@ parse-type==0.6.2 pluggy==1.4.0 py-cpuinfo==9.0.0 Pygments==2.17.2 -pytest==8.0.0 +pytest==8.0.1 pytest-bdd==7.0.1 pytest-benchmark==4.0.0 pytest-cov==4.1.0 @@ -50,7 +50,7 @@ soupsieve==2.5 tldextract==5.1.1 tomli==2.0.1 typing_extensions==4.9.0 -urllib3==2.2.0 +urllib3==2.2.1 vulture==2.11 Werkzeug==3.0.1 zipp==3.17.0 diff --git a/misc/requirements/requirements-tox.txt b/misc/requirements/requirements-tox.txt index 5fb63ee17..fde6675dd 100644 --- a/misc/requirements/requirements-tox.txt +++ b/misc/requirements/requirements-tox.txt @@ -12,6 +12,6 @@ pluggy==1.4.0 pyproject-api==1.6.1 setuptools==69.1.0 tomli==2.0.1 -tox==4.12.1 +tox==4.13.0 virtualenv==20.25.0 wheel==0.42.0 diff --git a/misc/requirements/requirements-yamllint.txt b/misc/requirements/requirements-yamllint.txt index b9436eed8..4fb649ec4 100644 --- a/misc/requirements/requirements-yamllint.txt +++ b/misc/requirements/requirements-yamllint.txt @@ -2,4 +2,4 @@ pathspec==0.12.1 PyYAML==6.0.1 -yamllint==1.34.0 +yamllint==1.35.1 From e6a0d2bf2f5b84aa130309bd78e6fd56cd25840d Mon Sep 17 00:00:00 2001 From: toofar Date: Tue, 20 Feb 2024 18:45:33 +1300 Subject: [PATCH 16/67] Ignore new 6.6.2 notifications related error messages The seem to be non-fatal considering the test scenarios they are coming from are still passing. --- pytest.ini | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pytest.ini b/pytest.ini index f2f746284..5c4c2095a 100644 --- a/pytest.ini +++ b/pytest.ini @@ -61,6 +61,9 @@ qt_log_ignore = ^QBackingStore::endPaint\(\) called with active painter; did you forget to destroy it or call QPainter::end\(\) on it\?$ # Qt 6.5 after system update, from qt-qt.accessibility.atspi Error in contacting registry: "org\.freedesktop\.DBus\.Error\.Disconnected" "Not connected to D-Bus server" + # Seen in Qt 6.6.2 on CI, https://github.com/qutebrowser/qutebrowser/pull/8106#issuecomment-1952320663 + ^QDBusConnection: couldn't handle call to Notify, no slot matched + ^QDBusConnection: couldn't handle call to CloseNotification, no slot matched xfail_strict = true filterwarnings = error From 566c07c78955c2940fac7cc71051b6114c6e8676 Mon Sep 17 00:00:00 2001 From: tarneo Date: Wed, 21 Feb 2024 21:15:10 +0100 Subject: [PATCH 17/67] Allow reloading config on SIGHUP Before this commit qutebrowser would just exit when receiving a SIGHUP. Now it will reload the config using the bare config_source function, just like the :config-source command does. Closes #8108. --- qutebrowser/misc/crashsignal.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/qutebrowser/misc/crashsignal.py b/qutebrowser/misc/crashsignal.py index c69dcbe29..79dbe6bcc 100644 --- a/qutebrowser/misc/crashsignal.py +++ b/qutebrowser/misc/crashsignal.py @@ -335,6 +335,8 @@ class SignalHandler(QObject): signal.SIGINT, self.interrupt) self._orig_handlers[signal.SIGTERM] = signal.signal( signal.SIGTERM, self.interrupt) + self._orig_handlers[signal.SIGHUP] = signal.signal( + signal.SIGHUP, self.reload_config) if utils.is_posix and hasattr(signal, 'set_wakeup_fd'): # pylint: disable=import-error,no-member,useless-suppression @@ -430,6 +432,15 @@ class SignalHandler(QObject): print("WHY ARE YOU DOING THIS TO ME? :(") sys.exit(128 + signum) + def reload_config(self, _signum, _frame): + """Reload the config.""" + log.signals.info("SIGHUP received, reloading config.") + config_commands = objreg.get('config-commands', from_command=True) + try: + config_commands.config_source() + except cmdutils.CommandError as e: + log.signals.error("Error while reloading config:", exc_info=e) + def init(q_app: QApplication, args: argparse.Namespace, From d5926756aec477bc2c56a620b3d84ea494245e34 Mon Sep 17 00:00:00 2001 From: tarneo Date: Thu, 22 Feb 2024 11:21:20 +0100 Subject: [PATCH 18/67] Replicate config_source in SIGHUP handler --- qutebrowser/misc/crashsignal.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/qutebrowser/misc/crashsignal.py b/qutebrowser/misc/crashsignal.py index 79dbe6bcc..be69ace6e 100644 --- a/qutebrowser/misc/crashsignal.py +++ b/qutebrowser/misc/crashsignal.py @@ -21,6 +21,8 @@ from qutebrowser.qt.core import (pyqtSlot, qInstallMessageHandler, QObject, QSocketNotifier, QTimer, QUrl) from qutebrowser.qt.widgets import QApplication +from qutebrowser.config import configfiles, configexc + from qutebrowser.api import cmdutils from qutebrowser.misc import earlyinit, crashdialog, ipc, objects from qutebrowser.utils import usertypes, standarddir, log, objreg, debug, utils @@ -435,11 +437,11 @@ class SignalHandler(QObject): def reload_config(self, _signum, _frame): """Reload the config.""" log.signals.info("SIGHUP received, reloading config.") - config_commands = objreg.get('config-commands', from_command=True) + filename = standarddir.config_py() try: - config_commands.config_source() - except cmdutils.CommandError as e: - log.signals.error("Error while reloading config:", exc_info=e) + configfiles.read_config_py(filename) + except configexc.ConfigFileErrors as e: + raise cmdutils.CommandError(e) def init(q_app: QApplication, From aafb44cbaaabd8a1e99af27108573dbf592724fd Mon Sep 17 00:00:00 2001 From: tarneo Date: Thu, 22 Feb 2024 11:26:22 +0100 Subject: [PATCH 19/67] Run message.error() on SIGHUP config errors --- qutebrowser/misc/crashsignal.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qutebrowser/misc/crashsignal.py b/qutebrowser/misc/crashsignal.py index be69ace6e..277ae53bf 100644 --- a/qutebrowser/misc/crashsignal.py +++ b/qutebrowser/misc/crashsignal.py @@ -25,7 +25,7 @@ from qutebrowser.config import configfiles, configexc from qutebrowser.api import cmdutils from qutebrowser.misc import earlyinit, crashdialog, ipc, objects -from qutebrowser.utils import usertypes, standarddir, log, objreg, debug, utils +from qutebrowser.utils import usertypes, standarddir, log, objreg, debug, utils, message from qutebrowser.qt import sip if TYPE_CHECKING: from qutebrowser.misc import quitter @@ -441,7 +441,7 @@ class SignalHandler(QObject): try: configfiles.read_config_py(filename) except configexc.ConfigFileErrors as e: - raise cmdutils.CommandError(e) + message.error(str(e)) def init(q_app: QApplication, From f6c0e4ebc81b1ef1afb1fb71d103a42f39d62779 Mon Sep 17 00:00:00 2001 From: toofar Date: Sat, 24 Feb 2024 21:50:38 +1300 Subject: [PATCH 20/67] Add some basic tests for SignalHandler It doesn't look like this class has any unit tests currently. And since we are adding a new signal handler to it I took the opportunity to add a few tests to it to establish a bit of a framework so that next time we touch it it will be easier to add more. I didn't go for full coverage here. It's an improvement over what was there previously and it should make merging more palatable. I don't think handling SIGHUP is a very risky feature. I chose to use mocker.patch over monkeypatch.setattr because I think it provides a more friendly and powerful API due to being more tightly integrated with magic mocks. And with `mocker.patch.object` you can even use actual object names instead of strings, the same as monkeypatch allows. One thing I'm less confident with here is mocking all multiple things in a couple of fixtures. Writing one fixture for each little thing I mock doesn't feel appealing to me right now, but for mocks that tests need to access there isn't really any idiomatic way to let the tests access them. I previously just had the one fixture but pulled out the read config one for that purpose. It's a pattern I'll have to think on a bit I think. Probably having to have developers thing about the balance of boilerplate vs accessibility is cognitive load that we want to avoid. Hmm. Anyway, here are the options I was looking at to let test code access mocks that where all shoved away into the one fixture: 1. group the tests into a class and put the mocks in class variables: could work fine but I don't think it's very idiomatic for pytest? 2. return some kind of meta object from the fixture that has the object under test as one attribute and the mocks as other ones: hmm, returning multiple values from a method always seemed a bit smelly to me 3. make one fixture for each of the mocks, have the main fixture depend on them all, tests that need to modify them can depend on them too: writing all those fixtures seems tedious and I don't think it would be a clear win in terms of readability. *sigh*, I suppose I should pull the ones I'm modifying out at least so other people don't copy my lazyness in the future 4. have the test code access the mocks from the real code, eg `configfiles.sys.exit.side_effect = ...`: this works fine but I feel like it's relying on an implementation detail and probably shouldn't be encouraged? Not sure In case anyone is struggling with git blame and wondering what the QSocketNotifier stuff is about, this commit should explain it: https://github.com/qutebrowser/qutebrowser/commit/210ce8ca7cb16e1d0ce859baa64ce56a5e1894cf --- qutebrowser/misc/crashsignal.py | 17 ++--- tests/unit/misc/test_crashsignal.py | 102 ++++++++++++++++++++++++++++ 2 files changed, 111 insertions(+), 8 deletions(-) create mode 100644 tests/unit/misc/test_crashsignal.py diff --git a/qutebrowser/misc/crashsignal.py b/qutebrowser/misc/crashsignal.py index 277ae53bf..daffa6341 100644 --- a/qutebrowser/misc/crashsignal.py +++ b/qutebrowser/misc/crashsignal.py @@ -21,9 +21,8 @@ from qutebrowser.qt.core import (pyqtSlot, qInstallMessageHandler, QObject, QSocketNotifier, QTimer, QUrl) from qutebrowser.qt.widgets import QApplication -from qutebrowser.config import configfiles, configexc - from qutebrowser.api import cmdutils +from qutebrowser.config import configfiles, configexc from qutebrowser.misc import earlyinit, crashdialog, ipc, objects from qutebrowser.utils import usertypes, standarddir, log, objreg, debug, utils, message from qutebrowser.qt import sip @@ -324,6 +323,12 @@ class SignalHandler(QObject): self._activated = False self._orig_wakeup_fd: Optional[int] = None + self._handlers = { + signal.SIGINT: self.interrupt, + signal.SIGTERM: self.interrupt, + signal.SIGHUP: self.reload_config, + } + def activate(self): """Set up signal handlers. @@ -333,12 +338,8 @@ class SignalHandler(QObject): On Unix, it uses a QSocketNotifier with os.set_wakeup_fd to get notified. """ - self._orig_handlers[signal.SIGINT] = signal.signal( - signal.SIGINT, self.interrupt) - self._orig_handlers[signal.SIGTERM] = signal.signal( - signal.SIGTERM, self.interrupt) - self._orig_handlers[signal.SIGHUP] = signal.signal( - signal.SIGHUP, self.reload_config) + for sig, handler in self._handlers.items(): + self._orig_handlers[sig] = signal.signal(sig, handler) if utils.is_posix and hasattr(signal, 'set_wakeup_fd'): # pylint: disable=import-error,no-member,useless-suppression diff --git a/tests/unit/misc/test_crashsignal.py b/tests/unit/misc/test_crashsignal.py new file mode 100644 index 000000000..e4570420e --- /dev/null +++ b/tests/unit/misc/test_crashsignal.py @@ -0,0 +1,102 @@ +# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) +# +# SPDX-License-Identifier: GPL-3.0-or-later + +"""Tests for qutebrowser.misc.crashsignal.""" + +import signal + +import pytest + +from qutebrowser.config import configexc +from qutebrowser.qt.widgets import QApplication +from qutebrowser.misc import crashsignal, quitter + + +@pytest.fixture +def read_config_mock(mocker): + # covers reload_config + mocker.patch.object( + crashsignal.standarddir, + "config_py", + return_value="config.py-unittest", + ) + return mocker.patch.object( + crashsignal.configfiles, + "read_config_py", + autospec=True, + ) + + +@pytest.fixture +def signal_handler(qtbot, mocker, read_config_mock): + """Signal handler instance with all external methods mocked out.""" + # covers init + mocker.patch.object(crashsignal.sys, "exit", autospec=True) + signal_handler = crashsignal.SignalHandler( + app=mocker.Mock(spec=QApplication), + quitter=mocker.Mock(spec=quitter.Quitter), + ) + + return signal_handler + + +def test_handlers_registered(signal_handler): + signal_handler.activate() + + for sig, handler in signal_handler._handlers.items(): + registered = signal.signal(sig, signal.SIG_DFL) + assert registered == handler + + +def test_handlers_deregistered(signal_handler): + known_handler = lambda *_args: None + for sig in signal_handler._handlers: + signal.signal(sig, known_handler) + + signal_handler.activate() + signal_handler.deactivate() + + for sig in signal_handler._handlers: + registered = signal.signal(sig, signal.SIG_DFL) + assert registered == known_handler + + +def test_interrupt_repeatedly(signal_handler): + signal_handler.activate() + test_signal = signal.SIGINT + + expected_handlers = [ + signal_handler.interrupt, + signal_handler.interrupt_forcefully, + signal_handler.interrupt_really_forcefully, + ] + + # Call the SIGINT handler multiple times and make sure it calls the + # expected sequence of functions. + for expected in expected_handlers: + registered = signal.signal(test_signal, signal.SIG_DFL) + assert registered == expected + expected(test_signal, None) + + +def test_reload_config_call_on_hup(signal_handler, read_config_mock): + signal_handler._handlers[signal.SIGHUP](None, None) + + read_config_mock.assert_called_once_with("config.py-unittest") + + +def test_reload_config_displays_errors(signal_handler, read_config_mock, mocker): + read_config_mock.side_effect = configexc.ConfigFileErrors( + "config.py", + [ + configexc.ConfigErrorDesc("no config.py", ValueError("asdf")) + ] + ) + message_mock = mocker.patch.object(crashsignal.message, "error") + + signal_handler._handlers[signal.SIGHUP](None, None) + + message_mock.assert_called_once_with( + "Errors occurred while reading config.py:\n no config.py: asdf" + ) From 6050017809a2980934e626a6da5418b07838478a Mon Sep 17 00:00:00 2001 From: toofar Date: Sat, 24 Feb 2024 22:32:46 +1300 Subject: [PATCH 21/67] update changelog for SIGHUP handling --- doc/changelog.asciidoc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc index 91b02b0da..89e33679e 100644 --- a/doc/changelog.asciidoc +++ b/doc/changelog.asciidoc @@ -19,6 +19,12 @@ breaking changes (such as renamed commands) can happen in minor releases. v3.2.0 (unreleased) ------------------- +Added +~~~~~ + +- When qutebrowser receives a SIGHUP it will now reload any config.py file + in use (same as the `:config-source` command does). (#8108) + Changed ~~~~~~~ From 145bfe4de0802e7eb21ef902e8e53544e996d3a4 Mon Sep 17 00:00:00 2001 From: toofar Date: Sun, 25 Feb 2024 15:38:10 +1300 Subject: [PATCH 22/67] windows doesn't support SIGHUP It gives an AttributeError for both signal.SIGHUP and signal.Signals.SIGHUP. The Signals Enum is set up so you can use the strings to key into it though, so that's nice. I was tempted to use a walrus operator here but I think that's python 310 and I don't remember what our minimum supported version is. --- qutebrowser/misc/crashsignal.py | 7 ++++++- tests/unit/misc/test_crashsignal.py | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/qutebrowser/misc/crashsignal.py b/qutebrowser/misc/crashsignal.py index daffa6341..05e5806df 100644 --- a/qutebrowser/misc/crashsignal.py +++ b/qutebrowser/misc/crashsignal.py @@ -326,8 +326,13 @@ class SignalHandler(QObject): self._handlers = { signal.SIGINT: self.interrupt, signal.SIGTERM: self.interrupt, - signal.SIGHUP: self.reload_config, } + platform_dependant_handlers = { + "SIGHUP": self.reload_config, + } + for sig_str, handler in platform_dependant_handlers.items(): + if hasattr(signal.Signals, sig_str): + self._handlers[signal.Signals[sig_str]] = handler def activate(self): """Set up signal handlers. diff --git a/tests/unit/misc/test_crashsignal.py b/tests/unit/misc/test_crashsignal.py index e4570420e..7019118e5 100644 --- a/tests/unit/misc/test_crashsignal.py +++ b/tests/unit/misc/test_crashsignal.py @@ -80,12 +80,14 @@ def test_interrupt_repeatedly(signal_handler): expected(test_signal, None) +@pytest.mark.posix def test_reload_config_call_on_hup(signal_handler, read_config_mock): signal_handler._handlers[signal.SIGHUP](None, None) read_config_mock.assert_called_once_with("config.py-unittest") +@pytest.mark.posix def test_reload_config_displays_errors(signal_handler, read_config_mock, mocker): read_config_mock.side_effect = configexc.ConfigFileErrors( "config.py", From 5687177d4dd70284cce7591aa26c44898ddb4ff4 Mon Sep 17 00:00:00 2001 From: toofar Date: Sun, 25 Feb 2024 15:18:25 +1300 Subject: [PATCH 23/67] ci: fix --debug patching on all platforms (for real?) It seems `sed -i` is not very portable. Initially we were using this command: sed -i '' '/.-d., .--debug.,/s/$/ default=True,/' qutebrowser/qutebrowser.py and then that started breaking on windows, I'm not sure why, with "can't read /.-d., .--debug.,/s/$/ default=True,/: No such file or directory". Then we changed to: sed -i '/.-d., .--debug.,/s/$/ default=True,/' qutebrowser/qutebrowser.py so without the extension argument, but that broke on mac with "1: "qutebrowser/qutebrowser.py": extra characters at the end of q command" then we tried: sed -i'' '/.-d., .--debug.,/s/$/ default=True,/' qutebrowser/qutebrowser.py and that also broke on mac with the same error. On the recommendation of stackoverflow I just changed it no not use in-place editing and do a good old fashioned move afterwards. https://unix.stackexchange.com/questions/92895/how-can-i-achieve-portability-with-sed-i-in-place-editing ... record scratch ... Apparently these GHA steps are being run in powershell in windows where `mv` is implemented by `Move-Item` where you have to use -Force to overwrite destination files. But that's not portable. cp does happily overwrite without any additional instruction though. So I'm doing cp instead of mv and then removing the temp file. Probably if this drags out anymore we should download something off of pypi which is platform independent to handle it. --- .github/workflows/nightly.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 400d65559..b326c2ad6 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -59,7 +59,9 @@ jobs: - name: Patch qutebrowser for debugging if: "contains(matrix.args, '--debug')" run: | - sed -i'' '/.-d., .--debug.,/s/$/ default=True,/' qutebrowser/qutebrowser.py + sed '/.-d., .--debug.,/s/$/ default=True,/' qutebrowser/qutebrowser.py > qutebrowser/qutebrowser.py.tmp + cp qutebrowser/qutebrowser.py.tmp qutebrowser/qutebrowser.py + rm qutebrowser/qutebrowser.py.tmp - name: Run tox run: "tox -e ${{ matrix.toxenv }} -- --gh-token ${{ secrets.GITHUB_TOKEN }} ${{ matrix.args }}" - name: Gather info From 42cf53ae7cc71ef107db026aada1428b73327d1a Mon Sep 17 00:00:00 2001 From: toofar Date: Sun, 25 Feb 2024 16:39:56 +1300 Subject: [PATCH 24/67] ci: don't fail all docker builds if one fails Currently the unstable docker images are failing to build (undefined symbol: _ZN5QFont11tagToStringEj, version Qt_6. Looks like Qt has upgraded to 6.7 but pyqt6 hasn't been patched to remove some symbols that are gone now). But we might as well let the stable ones rebuild right? --- .github/workflows/docker.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 3762e6f48..9dc925e29 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -10,6 +10,7 @@ jobs: if: "github.repository == 'qutebrowser/qutebrowser'" runs-on: ubuntu-20.04 strategy: + fail-fast: false matrix: image: - archlinux-webkit From 52f5147666fa0111d971ac8b239a9b390d846514 Mon Sep 17 00:00:00 2001 From: qutebrowser bot Date: Mon, 26 Feb 2024 04:20:13 +0000 Subject: [PATCH 25/67] Update dependencies --- misc/requirements/requirements-dev.txt | 6 +++--- misc/requirements/requirements-mypy.txt | 6 +++--- misc/requirements/requirements-pylint.txt | 8 ++++---- misc/requirements/requirements-pyroma.txt | 2 +- misc/requirements/requirements-tests.txt | 8 ++++---- misc/requirements/requirements-tox.txt | 4 ++-- requirements.txt | 2 +- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/misc/requirements/requirements-dev.txt b/misc/requirements/requirements-dev.txt index 746e2519d..8c1730f21 100644 --- a/misc/requirements/requirements-dev.txt +++ b/misc/requirements/requirements-dev.txt @@ -5,13 +5,13 @@ bump2version==1.0.1 certifi==2024.2.2 cffi==1.16.0 charset-normalizer==3.3.2 -cryptography==42.0.3 +cryptography==42.0.5 docutils==0.20.1 github3.py==4.0.1 hunter==3.6.1 idna==3.6 importlib-metadata==7.0.1 -importlib-resources==6.1.1 +importlib_resources==6.1.2 jaraco.classes==3.3.1 jeepney==0.8.0 keyring==24.3.0 @@ -39,7 +39,7 @@ sip==6.8.3 six==1.16.0 tomli==2.0.1 twine==5.0.0 -typing_extensions==4.9.0 +typing_extensions==4.10.0 uritemplate==4.1.1 # urllib3==2.2.1 zipp==3.17.0 diff --git a/misc/requirements/requirements-mypy.txt b/misc/requirements/requirements-mypy.txt index 570788ffc..53e032b86 100644 --- a/misc/requirements/requirements-mypy.txt +++ b/misc/requirements/requirements-mypy.txt @@ -2,7 +2,7 @@ chardet==5.2.0 diff_cover==8.0.3 -importlib-resources==6.1.1 +importlib_resources==6.1.2 Jinja2==3.1.3 lxml==5.1.0 MarkupSafe==2.1.5 @@ -16,6 +16,6 @@ types-colorama==0.4.15.20240205 types-docutils==0.20.0.20240201 types-Pygments==2.17.0.20240106 types-PyYAML==6.0.12.12 -types-setuptools==69.1.0.20240217 -typing_extensions==4.9.0 +types-setuptools==69.1.0.20240223 +typing_extensions==4.10.0 zipp==3.17.0 diff --git a/misc/requirements/requirements-pylint.txt b/misc/requirements/requirements-pylint.txt index d3689a449..d596cc5c2 100644 --- a/misc/requirements/requirements-pylint.txt +++ b/misc/requirements/requirements-pylint.txt @@ -1,10 +1,10 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py -astroid==3.0.3 +astroid==3.1.0 certifi==2024.2.2 cffi==1.16.0 charset-normalizer==3.3.2 -cryptography==42.0.3 +cryptography==42.0.5 dill==0.3.8 github3.py==4.0.1 idna==3.6 @@ -14,13 +14,13 @@ pefile==2023.2.7 platformdirs==4.2.0 pycparser==2.21 PyJWT==2.8.0 -pylint==3.0.3 +pylint==3.1.0 python-dateutil==2.8.2 ./scripts/dev/pylint_checkers requests==2.31.0 six==1.16.0 tomli==2.0.1 tomlkit==0.12.3 -typing_extensions==4.9.0 +typing_extensions==4.10.0 uritemplate==4.1.1 # urllib3==2.2.1 diff --git a/misc/requirements/requirements-pyroma.txt b/misc/requirements/requirements-pyroma.txt index 592bfe4fa..2a6cdeb93 100644 --- a/misc/requirements/requirements-pyroma.txt +++ b/misc/requirements/requirements-pyroma.txt @@ -12,6 +12,6 @@ pyproject_hooks==1.0.0 pyroma==4.2 requests==2.31.0 tomli==2.0.1 -trove-classifiers==2024.1.31 +trove-classifiers==2024.2.23 urllib3==2.2.1 zipp==3.17.0 diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt index 0fa0f33e8..c8fe157a4 100644 --- a/misc/requirements/requirements-tests.txt +++ b/misc/requirements/requirements-tests.txt @@ -7,13 +7,13 @@ certifi==2024.2.2 charset-normalizer==3.3.2 cheroot==10.0.0 click==8.1.7 -coverage==7.4.1 +coverage==7.4.3 exceptiongroup==1.2.0 execnet==2.0.2 filelock==3.13.1 Flask==3.0.2 hunter==3.6.1 -hypothesis==6.98.8 +hypothesis==6.98.12 idna==3.6 importlib-metadata==7.0.1 iniconfig==2.0.0 @@ -30,7 +30,7 @@ parse-type==0.6.2 pluggy==1.4.0 py-cpuinfo==9.0.0 Pygments==2.17.2 -pytest==8.0.1 +pytest==8.0.2 pytest-bdd==7.0.1 pytest-benchmark==4.0.0 pytest-cov==4.1.0 @@ -49,7 +49,7 @@ sortedcontainers==2.4.0 soupsieve==2.5 tldextract==5.1.1 tomli==2.0.1 -typing_extensions==4.9.0 +typing_extensions==4.10.0 urllib3==2.2.1 vulture==2.11 Werkzeug==3.0.1 diff --git a/misc/requirements/requirements-tox.txt b/misc/requirements/requirements-tox.txt index fde6675dd..3c27d668f 100644 --- a/misc/requirements/requirements-tox.txt +++ b/misc/requirements/requirements-tox.txt @@ -10,8 +10,8 @@ pip==24.0 platformdirs==4.2.0 pluggy==1.4.0 pyproject-api==1.6.1 -setuptools==69.1.0 +setuptools==69.1.1 tomli==2.0.1 tox==4.13.0 -virtualenv==20.25.0 +virtualenv==20.25.1 wheel==0.42.0 diff --git a/requirements.txt b/requirements.txt index 95fe6e80a..87f000da6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ adblock==0.6.0 colorama==0.4.6 -importlib-resources==6.1.1 ; python_version=="3.8.*" +importlib_resources==6.1.2 Jinja2==3.1.3 MarkupSafe==2.1.5 Pygments==2.17.2 From 2f3d0161f3b4c2aabbf3f970f8ec25fbac7f7b4d Mon Sep 17 00:00:00 2001 From: toofar Date: Mon, 26 Feb 2024 19:22:27 +1300 Subject: [PATCH 26/67] Update lint etc for dependencies The lint ones are: linters (pylint): qutebrowser/completion/completionwidget.py#L440 Consider using 'height = min(height, contents_height)' instead of unnecessary if block linters (pylint): qutebrowser/browser/webengine/webview.py#L241 Useless suppression of 'no-member' The no-member one might be due to this change: https://github.com/pylint-dev/pylint/issues/9246 For the importlib-resources one, I'm not sure why it's changed to be underscore instead of a dash now. But at least it's consistent across all the requirements files now! I feel like I've seem this in a previous dependancy update too (for a different package?) but I can't find that now. --- misc/requirements/requirements-qutebrowser.txt-raw | 4 ++-- qutebrowser/browser/webengine/webview.py | 4 +--- qutebrowser/completion/completionwidget.py | 3 +-- scripts/dev/changelog_urls.json | 2 +- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/misc/requirements/requirements-qutebrowser.txt-raw b/misc/requirements/requirements-qutebrowser.txt-raw index bd33e26e4..ca4081d1d 100644 --- a/misc/requirements/requirements-qutebrowser.txt-raw +++ b/misc/requirements/requirements-qutebrowser.txt-raw @@ -13,11 +13,11 @@ PyYAML #@ add: pyobjc-framework-Cocoa ; sys_platform=="darwin" ## stdlib backports -importlib-resources +importlib_resources ## Optional dependencies Pygments # For :view-source --pygments or on QtWebKit colorama # Colored log output on Windows adblock # Improved adblocking -#@ markers: importlib-resources python_version=="3.8.*" +#@ markers: importlib_resources python_version=="3.8.*" diff --git a/qutebrowser/browser/webengine/webview.py b/qutebrowser/browser/webengine/webview.py index a6f2ae113..96c0c97e5 100644 --- a/qutebrowser/browser/webengine/webview.py +++ b/qutebrowser/browser/webengine/webview.py @@ -238,9 +238,7 @@ class WebEnginePage(QWebEnginePage): self._set_bg_color() config.instance.changed.connect(self._set_bg_color) if machinery.IS_QT6: - self.certificateError.connect( # pylint: disable=no-member - self._handle_certificate_error - ) + self.certificateError.connect(self._handle_certificate_error) # Qt 5: Overridden method instead of signal @config.change_filter('colors.webpage.bg') diff --git a/qutebrowser/completion/completionwidget.py b/qutebrowser/completion/completionwidget.py index f042be0a1..0f5dc0de9 100644 --- a/qutebrowser/completion/completionwidget.py +++ b/qutebrowser/completion/completionwidget.py @@ -437,8 +437,7 @@ class CompletionView(QTreeView): contents_height = ( self.viewportSizeHint().height() + bar.sizeHint().height()) - if contents_height <= height: - height = contents_height + height = min(height, contents_height) # The width isn't really relevant as we're expanding anyways. return QSize(-1, height) diff --git a/scripts/dev/changelog_urls.json b/scripts/dev/changelog_urls.json index a2f0b7612..e3644f417 100644 --- a/scripts/dev/changelog_urls.json +++ b/scripts/dev/changelog_urls.json @@ -133,7 +133,7 @@ "mypy-extensions": "https://github.com/python/mypy_extensions/commits/master", "pyroma": "https://github.com/regebro/pyroma/blob/master/CHANGES.txt", "adblock": "https://github.com/ArniDagur/python-adblock/blob/master/CHANGELOG.md", - "importlib-resources": "https://importlib-resources.readthedocs.io/en/latest/history.html", + "importlib_resources": "https://importlib-resources.readthedocs.io/en/latest/history.html", "importlib-metadata": "https://github.com/python/importlib_metadata/blob/main/NEWS.rst", "zipp": "https://github.com/jaraco/zipp/blob/main/NEWS.rst", "pip": "https://pip.pypa.io/en/stable/news/", From e02e709d7c6dc5d109f669fc7fb25017aae239ed Mon Sep 17 00:00:00 2001 From: qutebrowser bot Date: Mon, 4 Mar 2024 19:16:02 +0000 Subject: [PATCH 27/67] Update dependencies --- misc/requirements/requirements-check-manifest.txt | 2 +- misc/requirements/requirements-dev.txt | 12 ++++++------ misc/requirements/requirements-mypy.txt | 4 ++-- misc/requirements/requirements-pyinstaller.txt | 2 +- misc/requirements/requirements-pylint.txt | 4 ++-- misc/requirements/requirements-pyroma.txt | 4 ++-- misc/requirements/requirements-tests.txt | 4 ++-- misc/requirements/requirements-tox.txt | 2 +- requirements.txt | 2 +- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/misc/requirements/requirements-check-manifest.txt b/misc/requirements/requirements-check-manifest.txt index 0d250cf3c..08e332919 100644 --- a/misc/requirements/requirements-check-manifest.txt +++ b/misc/requirements/requirements-check-manifest.txt @@ -1,6 +1,6 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py -build==1.0.3 +build==1.1.1 check-manifest==0.49 importlib-metadata==7.0.1 packaging==23.2 diff --git a/misc/requirements/requirements-dev.txt b/misc/requirements/requirements-dev.txt index 8c1730f21..f1ea191ba 100644 --- a/misc/requirements/requirements-dev.txt +++ b/misc/requirements/requirements-dev.txt @@ -1,6 +1,6 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py -build==1.0.3 +build==1.1.1 bump2version==1.0.1 certifi==2024.2.2 cffi==1.16.0 @@ -14,26 +14,26 @@ importlib-metadata==7.0.1 importlib_resources==6.1.2 jaraco.classes==3.3.1 jeepney==0.8.0 -keyring==24.3.0 +keyring==24.3.1 manhole==1.8.0 markdown-it-py==3.0.0 mdurl==0.1.2 more-itertools==10.2.0 nh3==0.2.15 packaging==23.2 -pkginfo==1.9.6 +pkginfo==1.10.0 pycparser==2.21 Pygments==2.17.2 PyJWT==2.8.0 Pympler==1.0.1 pyproject_hooks==1.0.0 PyQt-builder==1.15.4 -python-dateutil==2.8.2 -readme-renderer==42.0 +python-dateutil==2.9.0.post0 +readme_renderer==43.0 requests==2.31.0 requests-toolbelt==1.0.0 rfc3986==2.0.0 -rich==13.7.0 +rich==13.7.1 SecretStorage==3.3.3 sip==6.8.3 six==1.16.0 diff --git a/misc/requirements/requirements-mypy.txt b/misc/requirements/requirements-mypy.txt index 53e032b86..cf2ffb667 100644 --- a/misc/requirements/requirements-mypy.txt +++ b/misc/requirements/requirements-mypy.txt @@ -13,9 +13,9 @@ Pygments==2.17.2 PyQt5-stubs==5.15.6.0 tomli==2.0.1 types-colorama==0.4.15.20240205 -types-docutils==0.20.0.20240201 +types-docutils==0.20.0.20240304 types-Pygments==2.17.0.20240106 types-PyYAML==6.0.12.12 -types-setuptools==69.1.0.20240223 +types-setuptools==69.1.0.20240302 typing_extensions==4.10.0 zipp==3.17.0 diff --git a/misc/requirements/requirements-pyinstaller.txt b/misc/requirements/requirements-pyinstaller.txt index 0b64a76b3..fe0166b15 100644 --- a/misc/requirements/requirements-pyinstaller.txt +++ b/misc/requirements/requirements-pyinstaller.txt @@ -4,5 +4,5 @@ altgraph==0.17.4 importlib-metadata==7.0.1 packaging==23.2 pyinstaller==6.4.0 -pyinstaller-hooks-contrib==2024.1 +pyinstaller-hooks-contrib==2024.2 zipp==3.17.0 diff --git a/misc/requirements/requirements-pylint.txt b/misc/requirements/requirements-pylint.txt index d596cc5c2..2e86f9e30 100644 --- a/misc/requirements/requirements-pylint.txt +++ b/misc/requirements/requirements-pylint.txt @@ -15,12 +15,12 @@ platformdirs==4.2.0 pycparser==2.21 PyJWT==2.8.0 pylint==3.1.0 -python-dateutil==2.8.2 +python-dateutil==2.9.0.post0 ./scripts/dev/pylint_checkers requests==2.31.0 six==1.16.0 tomli==2.0.1 -tomlkit==0.12.3 +tomlkit==0.12.4 typing_extensions==4.10.0 uritemplate==4.1.1 # urllib3==2.2.1 diff --git a/misc/requirements/requirements-pyroma.txt b/misc/requirements/requirements-pyroma.txt index 2a6cdeb93..b5a1f35b7 100644 --- a/misc/requirements/requirements-pyroma.txt +++ b/misc/requirements/requirements-pyroma.txt @@ -1,6 +1,6 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py -build==1.0.3 +build==1.1.1 certifi==2024.2.2 charset-normalizer==3.3.2 docutils==0.20.1 @@ -12,6 +12,6 @@ pyproject_hooks==1.0.0 pyroma==4.2 requests==2.31.0 tomli==2.0.1 -trove-classifiers==2024.2.23 +trove-classifiers==2024.3.3 urllib3==2.2.1 zipp==3.17.0 diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt index c8fe157a4..e02bba064 100644 --- a/misc/requirements/requirements-tests.txt +++ b/misc/requirements/requirements-tests.txt @@ -13,7 +13,7 @@ execnet==2.0.2 filelock==3.13.1 Flask==3.0.2 hunter==3.6.1 -hypothesis==6.98.12 +hypothesis==6.98.17 idna==3.6 importlib-metadata==7.0.1 iniconfig==2.0.0 @@ -31,7 +31,7 @@ pluggy==1.4.0 py-cpuinfo==9.0.0 Pygments==2.17.2 pytest==8.0.2 -pytest-bdd==7.0.1 +pytest-bdd==7.1.1 pytest-benchmark==4.0.0 pytest-cov==4.1.0 pytest-instafail==0.5.0 diff --git a/misc/requirements/requirements-tox.txt b/misc/requirements/requirements-tox.txt index 3c27d668f..f5dba2920 100644 --- a/misc/requirements/requirements-tox.txt +++ b/misc/requirements/requirements-tox.txt @@ -1,6 +1,6 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py -cachetools==5.3.2 +cachetools==5.3.3 chardet==5.2.0 colorama==0.4.6 distlib==0.3.8 diff --git a/requirements.txt b/requirements.txt index 87f000da6..e4b19d98b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ adblock==0.6.0 colorama==0.4.6 -importlib_resources==6.1.2 +importlib_resources==6.1.2 ; python_version=="3.8.*" Jinja2==3.1.3 MarkupSafe==2.1.5 Pygments==2.17.2 From c073412b49002ff75bf67fac1c3e59560135a51b Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 4 Mar 2024 21:28:47 +0100 Subject: [PATCH 28/67] Rename readme_renderer in changelog URLs --- scripts/dev/changelog_urls.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/dev/changelog_urls.json b/scripts/dev/changelog_urls.json index e3644f417..161e0a1cd 100644 --- a/scripts/dev/changelog_urls.json +++ b/scripts/dev/changelog_urls.json @@ -145,7 +145,7 @@ "keyring": "https://github.com/jaraco/keyring/blob/main/NEWS.rst", "jaraco.classes": "https://github.com/jaraco/jaraco.classes/blob/main/NEWS.rst", "pkginfo": "https://bazaar.launchpad.net/~tseaver/pkginfo/trunk/view/head:/CHANGES.txt", - "readme-renderer": "https://github.com/pypa/readme_renderer/blob/main/CHANGES.rst", + "readme_renderer": "https://github.com/pypa/readme_renderer/blob/main/CHANGES.rst", "requests-toolbelt": "https://github.com/requests/toolbelt/blob/master/HISTORY.rst", "rfc3986": "https://rfc3986.readthedocs.io/en/latest/release-notes/index.html", "twine": "https://twine.readthedocs.io/en/stable/changelog.html", From 201a533b4d2523acad8cddd56a85a99dfa5aef70 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 18:29:51 +0000 Subject: [PATCH 29/67] build(deps): bump softprops/action-gh-release from 1 to 2 Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 1 to 2. - [Release notes](https://github.com/softprops/action-gh-release/releases) - [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md) - [Commits](https://github.com/softprops/action-gh-release/compare/v1...v2) --- updated-dependencies: - dependency-name: softprops/action-gh-release dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9a751591f..aa8b3b2ef 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -117,7 +117,7 @@ jobs: git push --set-upstream origin v${{ steps.bump.outputs.version_x }} - name: Create GitHub draft release id: create-release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 with: tag_name: v${{ steps.bump.outputs.version }} draft: true From ab9e575ab90b44c5a8a932b92274756c60d106c5 Mon Sep 17 00:00:00 2001 From: qutebrowser bot Date: Mon, 18 Mar 2024 04:21:00 +0000 Subject: [PATCH 30/67] Update dependencies --- .../requirements/requirements-check-manifest.txt | 6 +++--- misc/requirements/requirements-dev.txt | 8 ++++---- misc/requirements/requirements-mypy.txt | 16 ++++++++-------- misc/requirements/requirements-pyinstaller.txt | 10 +++++----- misc/requirements/requirements-pyroma.txt | 6 +++--- misc/requirements/requirements-sphinx.txt | 6 +++--- misc/requirements/requirements-tests.txt | 16 ++++++++-------- misc/requirements/requirements-tox.txt | 8 ++++---- requirements.txt | 4 ++-- 9 files changed, 40 insertions(+), 40 deletions(-) diff --git a/misc/requirements/requirements-check-manifest.txt b/misc/requirements/requirements-check-manifest.txt index 08e332919..d4c5c2516 100644 --- a/misc/requirements/requirements-check-manifest.txt +++ b/misc/requirements/requirements-check-manifest.txt @@ -2,8 +2,8 @@ build==1.1.1 check-manifest==0.49 -importlib-metadata==7.0.1 -packaging==23.2 +importlib_metadata==7.0.2 +packaging==24.0 pyproject_hooks==1.0.0 tomli==2.0.1 -zipp==3.17.0 +zipp==3.18.1 diff --git a/misc/requirements/requirements-dev.txt b/misc/requirements/requirements-dev.txt index f1ea191ba..59a2b3b6c 100644 --- a/misc/requirements/requirements-dev.txt +++ b/misc/requirements/requirements-dev.txt @@ -10,8 +10,8 @@ docutils==0.20.1 github3.py==4.0.1 hunter==3.6.1 idna==3.6 -importlib-metadata==7.0.1 -importlib_resources==6.1.2 +importlib_metadata==7.0.2 +importlib_resources==6.3.1 jaraco.classes==3.3.1 jeepney==0.8.0 keyring==24.3.1 @@ -20,7 +20,7 @@ markdown-it-py==3.0.0 mdurl==0.1.2 more-itertools==10.2.0 nh3==0.2.15 -packaging==23.2 +packaging==24.0 pkginfo==1.10.0 pycparser==2.21 Pygments==2.17.2 @@ -42,4 +42,4 @@ twine==5.0.0 typing_extensions==4.10.0 uritemplate==4.1.1 # urllib3==2.2.1 -zipp==3.17.0 +zipp==3.18.1 diff --git a/misc/requirements/requirements-mypy.txt b/misc/requirements/requirements-mypy.txt index cf2ffb667..9cf8d26e3 100644 --- a/misc/requirements/requirements-mypy.txt +++ b/misc/requirements/requirements-mypy.txt @@ -2,20 +2,20 @@ chardet==5.2.0 diff_cover==8.0.3 -importlib_resources==6.1.2 +importlib_resources==6.3.1 Jinja2==3.1.3 lxml==5.1.0 MarkupSafe==2.1.5 -mypy==1.8.0 +mypy==1.9.0 mypy-extensions==1.0.0 pluggy==1.4.0 Pygments==2.17.2 PyQt5-stubs==5.15.6.0 tomli==2.0.1 -types-colorama==0.4.15.20240205 -types-docutils==0.20.0.20240304 -types-Pygments==2.17.0.20240106 -types-PyYAML==6.0.12.12 -types-setuptools==69.1.0.20240302 +types-colorama==0.4.15.20240311 +types-docutils==0.20.0.20240317 +types-Pygments==2.17.0.20240310 +types-PyYAML==6.0.12.20240311 +types-setuptools==69.2.0.20240317 typing_extensions==4.10.0 -zipp==3.17.0 +zipp==3.18.1 diff --git a/misc/requirements/requirements-pyinstaller.txt b/misc/requirements/requirements-pyinstaller.txt index fe0166b15..4948c2719 100644 --- a/misc/requirements/requirements-pyinstaller.txt +++ b/misc/requirements/requirements-pyinstaller.txt @@ -1,8 +1,8 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py altgraph==0.17.4 -importlib-metadata==7.0.1 -packaging==23.2 -pyinstaller==6.4.0 -pyinstaller-hooks-contrib==2024.2 -zipp==3.17.0 +importlib_metadata==7.0.2 +packaging==24.0 +pyinstaller==6.5.0 +pyinstaller-hooks-contrib==2024.3 +zipp==3.18.1 diff --git a/misc/requirements/requirements-pyroma.txt b/misc/requirements/requirements-pyroma.txt index b5a1f35b7..dd6f9236a 100644 --- a/misc/requirements/requirements-pyroma.txt +++ b/misc/requirements/requirements-pyroma.txt @@ -5,8 +5,8 @@ certifi==2024.2.2 charset-normalizer==3.3.2 docutils==0.20.1 idna==3.6 -importlib-metadata==7.0.1 -packaging==23.2 +importlib_metadata==7.0.2 +packaging==24.0 Pygments==2.17.2 pyproject_hooks==1.0.0 pyroma==4.2 @@ -14,4 +14,4 @@ requests==2.31.0 tomli==2.0.1 trove-classifiers==2024.3.3 urllib3==2.2.1 -zipp==3.17.0 +zipp==3.18.1 diff --git a/misc/requirements/requirements-sphinx.txt b/misc/requirements/requirements-sphinx.txt index 7a09b7815..df6d526fb 100644 --- a/misc/requirements/requirements-sphinx.txt +++ b/misc/requirements/requirements-sphinx.txt @@ -7,10 +7,10 @@ charset-normalizer==3.3.2 docutils==0.20.1 idna==3.6 imagesize==1.4.1 -importlib-metadata==7.0.1 +importlib_metadata==7.0.2 Jinja2==3.1.3 MarkupSafe==2.1.5 -packaging==23.2 +packaging==24.0 Pygments==2.17.2 pytz==2024.1 requests==2.31.0 @@ -23,4 +23,4 @@ sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 urllib3==2.2.1 -zipp==3.17.0 +zipp==3.18.1 diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt index e02bba064..761257bec 100644 --- a/misc/requirements/requirements-tests.txt +++ b/misc/requirements/requirements-tests.txt @@ -7,15 +7,15 @@ certifi==2024.2.2 charset-normalizer==3.3.2 cheroot==10.0.0 click==8.1.7 -coverage==7.4.3 +coverage==7.4.4 exceptiongroup==1.2.0 execnet==2.0.2 filelock==3.13.1 Flask==3.0.2 hunter==3.6.1 -hypothesis==6.98.17 +hypothesis==6.99.7 idna==3.6 -importlib-metadata==7.0.1 +importlib_metadata==7.0.2 iniconfig==2.0.0 itsdangerous==2.1.2 jaraco.functools==4.0.0 @@ -24,21 +24,21 @@ Mako==1.3.2 manhole==1.8.0 # MarkupSafe==2.1.5 more-itertools==10.2.0 -packaging==23.2 +packaging==24.0 parse==1.20.1 parse-type==0.6.2 pluggy==1.4.0 py-cpuinfo==9.0.0 Pygments==2.17.2 -pytest==8.0.2 -pytest-bdd==7.1.1 +pytest==8.1.1 +pytest-bdd==7.1.2 pytest-benchmark==4.0.0 pytest-cov==4.1.0 pytest-instafail==0.5.0 pytest-mock==3.12.0 pytest-qt==4.4.0 pytest-repeat==0.9.3 -pytest-rerunfailures==13.0 +pytest-rerunfailures==14.0 pytest-xdist==3.5.0 pytest-xvfb==3.0.0 PyVirtualDisplay==3.0 @@ -53,4 +53,4 @@ typing_extensions==4.10.0 urllib3==2.2.1 vulture==2.11 Werkzeug==3.0.1 -zipp==3.17.0 +zipp==3.18.1 diff --git a/misc/requirements/requirements-tox.txt b/misc/requirements/requirements-tox.txt index f5dba2920..a4456237d 100644 --- a/misc/requirements/requirements-tox.txt +++ b/misc/requirements/requirements-tox.txt @@ -5,13 +5,13 @@ chardet==5.2.0 colorama==0.4.6 distlib==0.3.8 filelock==3.13.1 -packaging==23.2 +packaging==24.0 pip==24.0 platformdirs==4.2.0 pluggy==1.4.0 pyproject-api==1.6.1 -setuptools==69.1.1 +setuptools==69.2.0 tomli==2.0.1 -tox==4.13.0 +tox==4.14.1 virtualenv==20.25.1 -wheel==0.42.0 +wheel==0.43.0 diff --git a/requirements.txt b/requirements.txt index e4b19d98b..a1689649d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,12 +2,12 @@ adblock==0.6.0 colorama==0.4.6 -importlib_resources==6.1.2 ; python_version=="3.8.*" +importlib_resources==6.3.1 ; python_version=="3.8.*" Jinja2==3.1.3 MarkupSafe==2.1.5 Pygments==2.17.2 PyYAML==6.0.1 -zipp==3.17.0 +zipp==3.18.1 # Unpinned due to recompile_requirements.py limitations pyobjc-core ; sys_platform=="darwin" pyobjc-framework-Cocoa ; sys_platform=="darwin" From 93b8438ebc418d880fb3f0d4eb5ae86df08488dc Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 22 Mar 2024 16:03:06 +0100 Subject: [PATCH 31/67] Update doc heading for Windows See #8136 --- doc/install.asciidoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/install.asciidoc b/doc/install.asciidoc index ec53e2fb5..98cc6fb05 100644 --- a/doc/install.asciidoc +++ b/doc/install.asciidoc @@ -280,14 +280,14 @@ track down issues. NOTE: Due to GitHub limitations, you need to be signed in with a GitHub account to download the files. -https://chocolatey.org/packages/qutebrowser[Chocolatey package] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Package managers +~~~~~~~~~~~~~~~~ * PackageManagement PowerShell module ---- PS C:\> Install-Package qutebrowser ---- -* Chocolatey's client +* https://chocolatey.org/packages/qutebrowser[Chocolatey package] with `choco`: ---- C:\> choco install qutebrowser ---- From 52106c383b41ea7629399f75059bbcba9abb1ba6 Mon Sep 17 00:00:00 2001 From: toofar Date: Sat, 23 Mar 2024 11:14:53 +1300 Subject: [PATCH 32/67] Show chromium security patch version in :version Webengine added a getter for their chromium patch level back in Qt 6.3, since they backport security fixes from chromium in the periods between doing major chromium feature upgrades. It's pulled from a hardcoded string in the webengine source `src/core/web_engine_context.cpp` that's manually updated when they backport something. The "(plus any distribution patches)" bit in there is because it was pointed out that some distributions backport their own security patches or even use webengine from a branch when the hardcoded string only gets updated at release time, despite patches being backported in the meantime. Closes: https://github.com/qutebrowser/qutebrowser/issues/7187 --- doc/changelog.asciidoc | 4 ++++ qutebrowser/utils/version.py | 20 +++++++++++++++++++- tests/unit/utils/test_version.py | 25 +++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc index 89e33679e..fce509dd7 100644 --- a/doc/changelog.asciidoc +++ b/doc/changelog.asciidoc @@ -24,6 +24,10 @@ Added - When qutebrowser receives a SIGHUP it will now reload any config.py file in use (same as the `:config-source` command does). (#8108) +- The Chromium security patch version is now shown in the backend string in + --version and :version. This reflects the latest Chromium version that + security fixes have been backported to the base QtWebEngine version from. + (#7187) Changed ~~~~~~~ diff --git a/qutebrowser/utils/version.py b/qutebrowser/utils/version.py index 59da5b5f0..30aeedd20 100644 --- a/qutebrowser/utils/version.py +++ b/qutebrowser/utils/version.py @@ -535,6 +535,7 @@ class WebEngineVersions: webengine: utils.VersionNumber chromium: Optional[str] source: str + chromium_security: Optional[str] = None chromium_major: Optional[int] = dataclasses.field(init=False) _CHROMIUM_VERSIONS: ClassVar[Dict[utils.VersionNumber, str]] = { @@ -629,6 +630,8 @@ class WebEngineVersions: s = f'QtWebEngine {self.webengine}' if self.chromium is not None: s += f', based on Chromium {self.chromium}' + if self.chromium_security is not None: + s += f', with security patches up to {self.chromium_security} (plus any distribution patches)' if self.source != 'UA': s += f' (from {self.source})' return s @@ -686,7 +689,12 @@ class WebEngineVersions: return cls._CHROMIUM_VERSIONS.get(minor_version) @classmethod - def from_api(cls, qtwe_version: str, chromium_version: Optional[str]) -> 'WebEngineVersions': + def from_api( + cls, + qtwe_version: str, + chromium_version: Optional[str], + chromium_security: Optional[str] = None, + ) -> 'WebEngineVersions': """Get the versions based on the exact versions. This is called if we have proper APIs to get the versions easily @@ -696,6 +704,7 @@ class WebEngineVersions: return cls( webengine=parsed, chromium=chromium_version, + chromium_security=chromium_security, source='api', ) @@ -796,11 +805,20 @@ def qtwebengine_versions(*, avoid_init: bool = False) -> WebEngineVersions: except ImportError: pass # Needs QtWebEngine 6.2+ with PyQtWebEngine 6.3.1+ else: + try: + from qutebrowser.qt.webenginecore import ( + qWebEngineChromiumSecurityPatchVersion, + ) + chromium_security = qWebEngineChromiumSecurityPatchVersion() + except ImportError: + chromium_security = None # Needs QtWebEngine 6.3+ + qtwe_version = qWebEngineVersion() assert qtwe_version is not None return WebEngineVersions.from_api( qtwe_version=qtwe_version, chromium_version=qWebEngineChromiumVersion(), + chromium_security=chromium_security, ) from qutebrowser.browser.webengine import webenginesettings diff --git a/tests/unit/utils/test_version.py b/tests/unit/utils/test_version.py index 38134b40e..f24bf2a7a 100644 --- a/tests/unit/utils/test_version.py +++ b/tests/unit/utils/test_version.py @@ -915,6 +915,17 @@ class TestWebEngineVersions: source='faked'), "QtWebEngine 5.15.2, based on Chromium 87.0.4280.144 (from faked)", ), + ( + version.WebEngineVersions( + webengine=utils.VersionNumber(5, 15, 2), + chromium='87.0.4280.144', + chromium_security='9000.1', + source='faked'), + ( + "QtWebEngine 5.15.2, based on Chromium 87.0.4280.144, with security " + "patches up to 9000.1 (plus any distribution patches) (from faked)" + ), + ), ]) def test_str(self, version, expected): assert str(version) == expected @@ -1024,6 +1035,20 @@ class TestWebEngineVersions: assert inferred == real + def test_real_chromium_security_version(self, qapp): + """Check the API for reading the chromium security patch version.""" + try: + from qutebrowser.qt.webenginecore import ( + qWebEngineChromiumVersion, + qWebEngineChromiumSecurityPatchVersion, + ) + except ImportError: + pytest.skip("Requires QtWebEngine 6.3+") + + base = utils.VersionNumber.parse(qWebEngineChromiumVersion()) + security = utils.VersionNumber.parse(qWebEngineChromiumSecurityPatchVersion()) + assert security >= base + class FakeQSslSocket: From 75c991b9986655871e9ea8a2680aa3c395863e94 Mon Sep 17 00:00:00 2001 From: toofar Date: Mon, 25 Mar 2024 11:49:20 +1300 Subject: [PATCH 33/67] update importlib metadata changelog URL See 2f3d0161f3b4c for the corresponding importlib_resources one. Also this I guess? I don't really understand it, everything seems happy. https://github.com/python/importlib_metadata/issues/459 --- scripts/dev/changelog_urls.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/dev/changelog_urls.json b/scripts/dev/changelog_urls.json index 161e0a1cd..220dd19eb 100644 --- a/scripts/dev/changelog_urls.json +++ b/scripts/dev/changelog_urls.json @@ -134,7 +134,7 @@ "pyroma": "https://github.com/regebro/pyroma/blob/master/CHANGES.txt", "adblock": "https://github.com/ArniDagur/python-adblock/blob/master/CHANGELOG.md", "importlib_resources": "https://importlib-resources.readthedocs.io/en/latest/history.html", - "importlib-metadata": "https://github.com/python/importlib_metadata/blob/main/NEWS.rst", + "importlib_metadata": "https://github.com/python/importlib_metadata/blob/main/NEWS.rst", "zipp": "https://github.com/jaraco/zipp/blob/main/NEWS.rst", "pip": "https://pip.pypa.io/en/stable/news/", "wheel": "https://wheel.readthedocs.io/en/stable/news.html", From d0eac8367692839dedb66aa4ac1b5eeb391456b5 Mon Sep 17 00:00:00 2001 From: qutebrowser bot Date: Mon, 25 Mar 2024 04:21:29 +0000 Subject: [PATCH 34/67] Update dependencies --- misc/requirements/requirements-check-manifest.txt | 2 +- misc/requirements/requirements-dev.txt | 8 +++++--- misc/requirements/requirements-mypy.txt | 2 +- misc/requirements/requirements-pyinstaller.txt | 2 +- misc/requirements/requirements-pyroma.txt | 2 +- misc/requirements/requirements-sphinx.txt | 2 +- misc/requirements/requirements-tests.txt | 10 +++++----- misc/requirements/requirements-tox.txt | 2 +- requirements.txt | 2 +- 9 files changed, 17 insertions(+), 15 deletions(-) diff --git a/misc/requirements/requirements-check-manifest.txt b/misc/requirements/requirements-check-manifest.txt index d4c5c2516..430abbb0c 100644 --- a/misc/requirements/requirements-check-manifest.txt +++ b/misc/requirements/requirements-check-manifest.txt @@ -2,7 +2,7 @@ build==1.1.1 check-manifest==0.49 -importlib_metadata==7.0.2 +importlib_metadata==7.1.0 packaging==24.0 pyproject_hooks==1.0.0 tomli==2.0.1 diff --git a/misc/requirements/requirements-dev.txt b/misc/requirements/requirements-dev.txt index 59a2b3b6c..89e12d073 100644 --- a/misc/requirements/requirements-dev.txt +++ b/misc/requirements/requirements-dev.txt @@ -10,11 +10,13 @@ docutils==0.20.1 github3.py==4.0.1 hunter==3.6.1 idna==3.6 -importlib_metadata==7.0.2 -importlib_resources==6.3.1 +importlib_metadata==7.1.0 +importlib_resources==6.4.0 jaraco.classes==3.3.1 +jaraco.context==4.3.0 +jaraco.functools==4.0.0 jeepney==0.8.0 -keyring==24.3.1 +keyring==25.0.0 manhole==1.8.0 markdown-it-py==3.0.0 mdurl==0.1.2 diff --git a/misc/requirements/requirements-mypy.txt b/misc/requirements/requirements-mypy.txt index 9cf8d26e3..944c2bca1 100644 --- a/misc/requirements/requirements-mypy.txt +++ b/misc/requirements/requirements-mypy.txt @@ -2,7 +2,7 @@ chardet==5.2.0 diff_cover==8.0.3 -importlib_resources==6.3.1 +importlib_resources==6.4.0 Jinja2==3.1.3 lxml==5.1.0 MarkupSafe==2.1.5 diff --git a/misc/requirements/requirements-pyinstaller.txt b/misc/requirements/requirements-pyinstaller.txt index 4948c2719..d8dc96e1c 100644 --- a/misc/requirements/requirements-pyinstaller.txt +++ b/misc/requirements/requirements-pyinstaller.txt @@ -1,7 +1,7 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py altgraph==0.17.4 -importlib_metadata==7.0.2 +importlib_metadata==7.1.0 packaging==24.0 pyinstaller==6.5.0 pyinstaller-hooks-contrib==2024.3 diff --git a/misc/requirements/requirements-pyroma.txt b/misc/requirements/requirements-pyroma.txt index dd6f9236a..00eff9141 100644 --- a/misc/requirements/requirements-pyroma.txt +++ b/misc/requirements/requirements-pyroma.txt @@ -5,7 +5,7 @@ certifi==2024.2.2 charset-normalizer==3.3.2 docutils==0.20.1 idna==3.6 -importlib_metadata==7.0.2 +importlib_metadata==7.1.0 packaging==24.0 Pygments==2.17.2 pyproject_hooks==1.0.0 diff --git a/misc/requirements/requirements-sphinx.txt b/misc/requirements/requirements-sphinx.txt index df6d526fb..ac0d905ae 100644 --- a/misc/requirements/requirements-sphinx.txt +++ b/misc/requirements/requirements-sphinx.txt @@ -7,7 +7,7 @@ charset-normalizer==3.3.2 docutils==0.20.1 idna==3.6 imagesize==1.4.1 -importlib_metadata==7.0.2 +importlib_metadata==7.1.0 Jinja2==3.1.3 MarkupSafe==2.1.5 packaging==24.0 diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt index 761257bec..5343a90da 100644 --- a/misc/requirements/requirements-tests.txt +++ b/misc/requirements/requirements-tests.txt @@ -13,9 +13,9 @@ execnet==2.0.2 filelock==3.13.1 Flask==3.0.2 hunter==3.6.1 -hypothesis==6.99.7 +hypothesis==6.99.13 idna==3.6 -importlib_metadata==7.0.2 +importlib_metadata==7.1.0 iniconfig==2.0.0 itsdangerous==2.1.2 jaraco.functools==4.0.0 @@ -33,9 +33,9 @@ Pygments==2.17.2 pytest==8.1.1 pytest-bdd==7.1.2 pytest-benchmark==4.0.0 -pytest-cov==4.1.0 +pytest-cov==5.0.0 pytest-instafail==0.5.0 -pytest-mock==3.12.0 +pytest-mock==3.14.0 pytest-qt==4.4.0 pytest-repeat==0.9.3 pytest-rerunfailures==14.0 @@ -47,7 +47,7 @@ requests-file==2.0.0 six==1.16.0 sortedcontainers==2.4.0 soupsieve==2.5 -tldextract==5.1.1 +tldextract==5.1.2 tomli==2.0.1 typing_extensions==4.10.0 urllib3==2.2.1 diff --git a/misc/requirements/requirements-tox.txt b/misc/requirements/requirements-tox.txt index a4456237d..ee8289b22 100644 --- a/misc/requirements/requirements-tox.txt +++ b/misc/requirements/requirements-tox.txt @@ -12,6 +12,6 @@ pluggy==1.4.0 pyproject-api==1.6.1 setuptools==69.2.0 tomli==2.0.1 -tox==4.14.1 +tox==4.14.2 virtualenv==20.25.1 wheel==0.43.0 diff --git a/requirements.txt b/requirements.txt index a1689649d..229f9e9c8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ adblock==0.6.0 colorama==0.4.6 -importlib_resources==6.3.1 ; python_version=="3.8.*" +importlib_resources==6.4.0 ; python_version=="3.8.*" Jinja2==3.1.3 MarkupSafe==2.1.5 Pygments==2.17.2 From 17ddde3f727f8425ef607c12ab6fbc046457840d Mon Sep 17 00:00:00 2001 From: toofar Date: Mon, 25 Mar 2024 18:36:50 +1300 Subject: [PATCH 35/67] Add changelog URLs jaraco added some utility libraries they maintain to the keyring package that they also maintain. Also update changelog URLs to be consistent since they have a "skeleton" project which lays everything out and publishes all their projects the same. Should we be preferring GH or RTD links? idk --- scripts/dev/changelog_urls.json | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/dev/changelog_urls.json b/scripts/dev/changelog_urls.json index 220dd19eb..1401e516c 100644 --- a/scripts/dev/changelog_urls.json +++ b/scripts/dev/changelog_urls.json @@ -78,7 +78,6 @@ "sphinxcontrib-jsmath": "https://www.sphinx-doc.org/en/master/changes.html", "sphinxcontrib-qthelp": "https://www.sphinx-doc.org/en/master/changes.html", "sphinxcontrib-serializinghtml": "https://www.sphinx-doc.org/en/master/changes.html", - "jaraco.functools": "https://jaracofunctools.readthedocs.io/en/latest/history.html", "parse": "https://github.com/r1chardj0n3s/parse#potential-gotchas", "Pympler": "https://github.com/pympler/pympler/blob/master/CHANGELOG.md", "pytest-mock": "https://github.com/pytest-dev/pytest-mock/blob/main/CHANGELOG.rst", @@ -135,15 +134,17 @@ "adblock": "https://github.com/ArniDagur/python-adblock/blob/master/CHANGELOG.md", "importlib_resources": "https://importlib-resources.readthedocs.io/en/latest/history.html", "importlib_metadata": "https://github.com/python/importlib_metadata/blob/main/NEWS.rst", - "zipp": "https://github.com/jaraco/zipp/blob/main/NEWS.rst", + "zipp": "https://zipp.readthedocs.io/en/latest/history.html", "pip": "https://pip.pypa.io/en/stable/news/", "wheel": "https://wheel.readthedocs.io/en/stable/news.html", "setuptools": "https://setuptools.readthedocs.io/en/latest/history.html", "pefile": "https://github.com/erocarrera/pefile/commits/master", "SecretStorage": "https://github.com/mitya57/secretstorage/blob/master/changelog", "jeepney": "https://gitlab.com/takluyver/jeepney/-/blob/master/docs/release-notes.rst", - "keyring": "https://github.com/jaraco/keyring/blob/main/NEWS.rst", - "jaraco.classes": "https://github.com/jaraco/jaraco.classes/blob/main/NEWS.rst", + "keyring": "https://keyring.readthedocs.io/en/latest/history.html", + "jaraco.classes": "https://jaracoclasses.readthedocs.io/en/latest/history.html", + "jaraco.context": "https://jaracocontext.readthedocs.io/en/latest/history.html", + "jaraco.functools": "https://jaracofunctools.readthedocs.io/en/latest/history.html", "pkginfo": "https://bazaar.launchpad.net/~tseaver/pkginfo/trunk/view/head:/CHANGES.txt", "readme_renderer": "https://github.com/pypa/readme_renderer/blob/main/CHANGES.rst", "requests-toolbelt": "https://github.com/requests/toolbelt/blob/master/HISTORY.rst", From 01f4807eaf8d20dcc3802cd2febf9432568f3935 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 25 Mar 2024 12:15:03 +0100 Subject: [PATCH 36/67] mypy: Set local_partial_types = True This is going to be default behavior in mypy 2.0, see: - #8123 - https://mypy-lang.blogspot.com/2024/03/mypy-19-released.html - https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-local-partial-types --- .mypy.ini | 3 +++ qutebrowser/browser/network/proxy.py | 4 +++- qutebrowser/browser/qutescheme.py | 4 ++-- qutebrowser/browser/webengine/webenginesettings.py | 2 +- qutebrowser/commands/runners.py | 4 ++-- qutebrowser/config/config.py | 2 +- qutebrowser/config/configinit.py | 3 ++- qutebrowser/config/websettings.py | 2 +- qutebrowser/extensions/loader.py | 2 +- qutebrowser/keyinput/keyutils.py | 2 +- qutebrowser/misc/consolewidget.py | 4 ++-- qutebrowser/misc/ipc.py | 2 +- qutebrowser/misc/nativeeventfilter.py | 2 +- qutebrowser/qt/machinery.py | 4 ++-- qutebrowser/utils/log.py | 4 ++-- qutebrowser/utils/qtlog.py | 2 +- qutebrowser/utils/qtutils.py | 2 +- qutebrowser/utils/resources.py | 4 ++-- qutebrowser/utils/standarddir.py | 4 ++-- qutebrowser/utils/utils.py | 2 +- qutebrowser/utils/version.py | 2 +- 21 files changed, 33 insertions(+), 27 deletions(-) diff --git a/.mypy.ini b/.mypy.ini index ef34dbada..e987da336 100644 --- a/.mypy.ini +++ b/.mypy.ini @@ -29,6 +29,9 @@ pretty = True ### FIXME:v4 get rid of this no_implicit_optional = False +### Future default behavior +local_partial_types = True + [mypy-hunter] # https://github.com/ionelmc/python-hunter/issues/43 ignore_missing_imports = True diff --git a/qutebrowser/browser/network/proxy.py b/qutebrowser/browser/network/proxy.py index f0c511853..62872d68e 100644 --- a/qutebrowser/browser/network/proxy.py +++ b/qutebrowser/browser/network/proxy.py @@ -4,6 +4,8 @@ """Handling of proxies.""" +from typing import Optional + from qutebrowser.qt.core import QUrl, pyqtSlot from qutebrowser.qt.network import QNetworkProxy, QNetworkProxyFactory @@ -13,7 +15,7 @@ from qutebrowser.misc import objects from qutebrowser.browser.network import pac -application_factory = None +application_factory: Optional["ProxyFactory"] = None def init(): diff --git a/qutebrowser/browser/qutescheme.py b/qutebrowser/browser/qutescheme.py index f325ff9e3..508d510d7 100644 --- a/qutebrowser/browser/qutescheme.py +++ b/qutebrowser/browser/qutescheme.py @@ -32,10 +32,10 @@ from qutebrowser.qt import sip pyeval_output = ":pyeval was never called" -csrf_token = None +csrf_token: Optional[str] = None -_HANDLERS = {} +_HANDLERS: Dict[str, "_HandlerCallable"] = {} class Error(Exception): diff --git a/qutebrowser/browser/webengine/webenginesettings.py b/qutebrowser/browser/webengine/webenginesettings.py index 2b375a7b0..78a4946ad 100644 --- a/qutebrowser/browser/webengine/webenginesettings.py +++ b/qutebrowser/browser/webengine/webenginesettings.py @@ -37,7 +37,7 @@ private_profile: Optional[QWebEngineProfile] = None # The global WebEngineSettings object _global_settings = cast('WebEngineSettings', None) -parsed_user_agent = None +parsed_user_agent: Optional[websettings.UserAgent] = None _qute_scheme_handler = cast(webenginequtescheme.QuteSchemeHandler, None) _req_interceptor = cast('interceptor.RequestInterceptor', None) diff --git a/qutebrowser/commands/runners.py b/qutebrowser/commands/runners.py index 1ad563c5d..0d63d0021 100644 --- a/qutebrowser/commands/runners.py +++ b/qutebrowser/commands/runners.py @@ -7,7 +7,7 @@ import traceback import re import contextlib -from typing import TYPE_CHECKING, Callable, Dict, Iterator, Mapping, MutableMapping +from typing import TYPE_CHECKING, Callable, Dict, Tuple, Iterator, Mapping, MutableMapping from qutebrowser.qt.core import pyqtSlot, QUrl, QObject @@ -21,7 +21,7 @@ if TYPE_CHECKING: _ReplacementFunction = Callable[['tabbedbrowser.TabbedBrowser'], str] -last_command = {} +last_command: Dict[usertypes.KeyMode, Tuple[str, int]] = {} def _url(tabbed_browser): diff --git a/qutebrowser/config/config.py b/qutebrowser/config/config.py index 573f25fa1..cb7fe77b3 100644 --- a/qutebrowser/config/config.py +++ b/qutebrowser/config/config.py @@ -29,7 +29,7 @@ key_instance = cast('KeyConfig', None) cache = cast('configcache.ConfigCache', None) # Keeping track of all change filters to validate them later. -change_filters = [] +change_filters: List["change_filter"] = [] # Sentinel UNSET = object() diff --git a/qutebrowser/config/configinit.py b/qutebrowser/config/configinit.py index 5d000c3ec..a08ddb619 100644 --- a/qutebrowser/config/configinit.py +++ b/qutebrowser/config/configinit.py @@ -7,6 +7,7 @@ import argparse import os.path import sys +from typing import Optional from qutebrowser.qt.widgets import QMessageBox @@ -19,7 +20,7 @@ from qutebrowser.misc import msgbox, objects, savemanager # Error which happened during init, so we can show a message box. -_init_errors = None +_init_errors: Optional[configexc.ConfigFileErrors] = None def early_init(args: argparse.Namespace) -> None: diff --git a/qutebrowser/config/websettings.py b/qutebrowser/config/websettings.py index 9f5bf92d0..7824ae258 100644 --- a/qutebrowser/config/websettings.py +++ b/qutebrowser/config/websettings.py @@ -246,7 +246,7 @@ def clear_private_data() -> None: elif objects.backend == usertypes.Backend.QtWebKit: from qutebrowser.browser.webkit import cookies assert cookies.ram_cookie_jar is not None - cookies.ram_cookie_jar.setAllCookies([]) # type: ignore[unreachable] + cookies.ram_cookie_jar.setAllCookies([]) else: raise utils.Unreachable(objects.backend) diff --git a/qutebrowser/extensions/loader.py b/qutebrowser/extensions/loader.py index b5b232c5a..ff9974d9d 100644 --- a/qutebrowser/extensions/loader.py +++ b/qutebrowser/extensions/loader.py @@ -21,7 +21,7 @@ from qutebrowser.misc import objects # ModuleInfo objects for all loaded plugins -_module_infos = [] +_module_infos: List["ModuleInfo"] = [] InitHookType = Callable[['InitContext'], None] ConfigChangedHookType = Callable[[], None] diff --git a/qutebrowser/keyinput/keyutils.py b/qutebrowser/keyinput/keyutils.py index af19bb61c..54b6e88b1 100644 --- a/qutebrowser/keyinput/keyutils.py +++ b/qutebrowser/keyinput/keyutils.py @@ -26,7 +26,7 @@ from qutebrowser.qt.gui import QKeySequence, QKeyEvent if machinery.IS_QT6: from qutebrowser.qt.core import QKeyCombination else: - QKeyCombination = None # QKeyCombination was added in Qt 6 + QKeyCombination: None = None # QKeyCombination was added in Qt 6 from qutebrowser.utils import utils, qtutils, debug diff --git a/qutebrowser/misc/consolewidget.py b/qutebrowser/misc/consolewidget.py index b489aaf36..08f5dc5ff 100644 --- a/qutebrowser/misc/consolewidget.py +++ b/qutebrowser/misc/consolewidget.py @@ -6,7 +6,7 @@ import sys import code -from typing import MutableSequence +from typing import MutableSequence, Optional from qutebrowser.qt.core import pyqtSignal, pyqtSlot, Qt from qutebrowser.qt.widgets import QTextEdit, QWidget, QVBoxLayout, QApplication @@ -17,7 +17,7 @@ from qutebrowser.misc import cmdhistory, miscwidgets from qutebrowser.utils import utils, objreg -console_widget = None +console_widget: Optional["ConsoleWidget"] = None class ConsoleLineEdit(miscwidgets.CommandLineEdit): diff --git a/qutebrowser/misc/ipc.py b/qutebrowser/misc/ipc.py index 2dc34c886..21a3352d6 100644 --- a/qutebrowser/misc/ipc.py +++ b/qutebrowser/misc/ipc.py @@ -28,7 +28,7 @@ PROTOCOL_VERSION = 1 # The ipc server instance -server = None +server: Optional["IPCServer"] = None def _get_socketname_windows(basedir): diff --git a/qutebrowser/misc/nativeeventfilter.py b/qutebrowser/misc/nativeeventfilter.py index 9b1bbb97c..06533bd42 100644 --- a/qutebrowser/misc/nativeeventfilter.py +++ b/qutebrowser/misc/nativeeventfilter.py @@ -20,7 +20,7 @@ from qutebrowser.utils import log # Needs to be saved to avoid garbage collection -_instance = None +_instance: Optional["NativeEventFilter"] = None # Using C-style naming for C structures in this file # pylint: disable=invalid-name diff --git a/qutebrowser/qt/machinery.py b/qutebrowser/qt/machinery.py index 616c7ccfc..f9e3721f8 100644 --- a/qutebrowser/qt/machinery.py +++ b/qutebrowser/qt/machinery.py @@ -34,7 +34,7 @@ from qutebrowser.utils import log # sed -i 's/_WRAPPER_OVERRIDE = .*/_WRAPPER_OVERRIDE = "PyQt6"/' qutebrowser/qt/machinery.py # # Users: Set the QUTE_QT_WRAPPER environment variable to change the default wrapper. -_WRAPPER_OVERRIDE = None +_WRAPPER_OVERRIDE = None # type: ignore[var-annotated] WRAPPERS = [ "PyQt6", @@ -190,7 +190,7 @@ def _select_wrapper(args: Optional[argparse.Namespace]) -> SelectionInfo: return SelectionInfo(wrapper=env_wrapper, reason=SelectionReason.env) if _WRAPPER_OVERRIDE is not None: - assert _WRAPPER_OVERRIDE in WRAPPERS # type: ignore[unreachable] + assert _WRAPPER_OVERRIDE in WRAPPERS return SelectionInfo(wrapper=_WRAPPER_OVERRIDE, reason=SelectionReason.override) return _autoselect_wrapper() diff --git a/qutebrowser/utils/log.py b/qutebrowser/utils/log.py index 3e3b407b0..9695ec5a2 100644 --- a/qutebrowser/utils/log.py +++ b/qutebrowser/utils/log.py @@ -31,7 +31,7 @@ if TYPE_CHECKING: from qutebrowser.config import config as configmodule _log_inited = False -_args = None +_args: Optional[argparse.Namespace] = None COLORS = ['black', 'red', 'green', 'yellow', 'blue', 'purple', 'cyan', 'white'] COLOR_ESCAPES = {color: '\033[{}m'.format(i) @@ -146,7 +146,7 @@ LOGGER_NAMES = [ ram_handler: Optional['RAMHandler'] = None console_handler: Optional[logging.Handler] = None -console_filter = None +console_filter: Optional["LogFilter"] = None def stub(suffix: str = '') -> None: diff --git a/qutebrowser/utils/qtlog.py b/qutebrowser/utils/qtlog.py index 1de9181cf..78b48ebee 100644 --- a/qutebrowser/utils/qtlog.py +++ b/qutebrowser/utils/qtlog.py @@ -15,7 +15,7 @@ from typing import Iterator, Optional from qutebrowser.qt import core as qtcore from qutebrowser.utils import log -_args = None +_args: Optional[argparse.Namespace] = None def init(args: argparse.Namespace) -> None: diff --git a/qutebrowser/utils/qtutils.py b/qutebrowser/utils/qtutils.py index 89175ca4e..12c98cc1d 100644 --- a/qutebrowser/utils/qtutils.py +++ b/qutebrowser/utils/qtutils.py @@ -736,4 +736,4 @@ else: def add_optional(obj: Optional[_T]) -> Optional[_T]: return obj - QT_NONE = None + QT_NONE: None = None diff --git a/qutebrowser/utils/resources.py b/qutebrowser/utils/resources.py index 60d90fd31..a40f9d2bd 100644 --- a/qutebrowser/utils/resources.py +++ b/qutebrowser/utils/resources.py @@ -9,7 +9,7 @@ import sys import contextlib import posixpath import pathlib -from typing import Iterator, Iterable, Union +from typing import Iterator, Iterable, Union, Dict # We cannot use the stdlib version on 3.8 because we need the files() API. @@ -25,7 +25,7 @@ else: # pragma: no cover from importlib_resources.abc import Traversable import qutebrowser -_cache = {} +_cache: Dict[str, str] = {} _ResourceType = Union[Traversable, pathlib.Path] diff --git a/qutebrowser/utils/standarddir.py b/qutebrowser/utils/standarddir.py index 2d2ae53f9..026376dc2 100644 --- a/qutebrowser/utils/standarddir.py +++ b/qutebrowser/utils/standarddir.py @@ -10,7 +10,7 @@ import sys import contextlib import enum import argparse -from typing import Iterator, Optional +from typing import Iterator, Optional, Dict from qutebrowser.qt.core import QStandardPaths from qutebrowser.qt.widgets import QApplication @@ -18,7 +18,7 @@ from qutebrowser.qt.widgets import QApplication from qutebrowser.utils import log, debug, utils, version, qtutils # The cached locations -_locations = {} +_locations: Dict["_Location", str] = {} class _Location(enum.Enum): diff --git a/qutebrowser/utils/utils.py b/qutebrowser/utils/utils.py index a9de4bc00..11c160c9e 100644 --- a/qutebrowser/utils/utils.py +++ b/qutebrowser/utils/utils.py @@ -38,7 +38,7 @@ except ImportError: # pragma: no cover from qutebrowser.utils import log -fake_clipboard = None +fake_clipboard: Optional[str] = None log_clipboard = False is_mac = sys.platform.startswith('darwin') diff --git a/qutebrowser/utils/version.py b/qutebrowser/utils/version.py index 59da5b5f0..58772b3db 100644 --- a/qutebrowser/utils/version.py +++ b/qutebrowser/utils/version.py @@ -78,7 +78,7 @@ class DistributionInfo: pretty: str -pastebin_url = None +pastebin_url: Optional[str] = None class Distribution(enum.Enum): From ad3ba9fe84166d0c8fe5de59be5f0fc27a251a35 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 25 Mar 2024 17:25:32 +0100 Subject: [PATCH 37/67] tests: Avoid accessing Qt statics at import time With a Qt 6.7 developer build, the tests fail with: ASSERT failure in QtGlobalStatic::ApplicationHolder::PlainType* QtGlobalStatic::ApplicationHolder::pointer() [with QAS = {anonymous}::Q_QAS_qtlsbLoader; PlainType = QFactoryLoader]: "The application static was used without a QCoreApplication instance", file .../qtbase/src/corelib/kernel/qapplicationstatic.h, line 54 Fatal Python error: Aborted [...] Current thread 0x00007c18bb3f3740 (most recent call first): File ".../tests/unit/browser/webkit/test_certificateerror.py", line 23 in See https://codereview.qt-project.org/c/qt/qtbase/+/495239 --- .../browser/webkit/test_certificateerror.py | 17 ++++++++-------- tests/unit/config/test_configtypes.py | 20 +++++++++---------- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/tests/unit/browser/webkit/test_certificateerror.py b/tests/unit/browser/webkit/test_certificateerror.py index 2feb7dcf1..7f5cce9c6 100644 --- a/tests/unit/browser/webkit/test_certificateerror.py +++ b/tests/unit/browser/webkit/test_certificateerror.py @@ -18,15 +18,15 @@ class FakeError: return self.msg -@pytest.mark.parametrize('errors, expected', [ +@pytest.mark.parametrize('error_factories, expected', [ ( - [QSslError(QSslError.SslError.UnableToGetIssuerCertificate)], + [lambda: QSslError(QSslError.SslError.UnableToGetIssuerCertificate)], ['

The issuer certificate could not be found

'], ), ( [ - QSslError(QSslError.SslError.UnableToGetIssuerCertificate), - QSslError(QSslError.SslError.UnableToDecryptCertificateSignature), + lambda: QSslError(QSslError.SslError.UnableToGetIssuerCertificate), + lambda: QSslError(QSslError.SslError.UnableToDecryptCertificateSignature), ], [ '
    ', @@ -37,13 +37,13 @@ class FakeError: ), ( - [FakeError('Escaping test: <>')], + [lambda: FakeError('Escaping test: <>')], ['

    Escaping test: <>

    '], ), ( [ - FakeError('Escaping test 1: <>'), - FakeError('Escaping test 2: <>'), + lambda: FakeError('Escaping test 1: <>'), + lambda: FakeError('Escaping test 2: <>'), ], [ '
      ', @@ -53,8 +53,9 @@ class FakeError: ], ), ]) -def test_html(stubs, errors, expected): +def test_html(stubs, error_factories, expected): reply = stubs.FakeNetworkReply(url=QUrl("https://example.com")) + errors = [factory() for factory in error_factories] wrapper = certificateerror.CertificateErrorWrapper(reply=reply, errors=errors) lines = [line.strip() for line in wrapper.html().splitlines() if line.strip()] assert lines == expected diff --git a/tests/unit/config/test_configtypes.py b/tests/unit/config/test_configtypes.py index d908e3ac6..bcd257ed7 100644 --- a/tests/unit/config/test_configtypes.py +++ b/tests/unit/config/test_configtypes.py @@ -1874,24 +1874,24 @@ class TestProxy: def klass(self): return configtypes.Proxy - @pytest.mark.parametrize('val, expected', [ - ('system', configtypes.SYSTEM_PROXY), - ('none', QNetworkProxy(QNetworkProxy.ProxyType.NoProxy)), + @pytest.mark.parametrize('val, expected_factory', [ + ('system', lambda: configtypes.SYSTEM_PROXY), + ('none', lambda: QNetworkProxy(QNetworkProxy.ProxyType.NoProxy)), ('socks://example.com/', - QNetworkProxy(QNetworkProxy.ProxyType.Socks5Proxy, 'example.com')), + lambda: QNetworkProxy(QNetworkProxy.ProxyType.Socks5Proxy, 'example.com')), ('socks5://foo:bar@example.com:2323', - QNetworkProxy(QNetworkProxy.ProxyType.Socks5Proxy, 'example.com', 2323, - 'foo', 'bar')), + lambda: QNetworkProxy( + QNetworkProxy.ProxyType.Socks5Proxy, 'example.com', 2323, 'foo', 'bar')), ('pac+http://example.com/proxy.pac', - pac.PACFetcher(QUrl('pac+http://example.com/proxy.pac'))), + lambda: pac.PACFetcher(QUrl('pac+http://example.com/proxy.pac'))), ('pac+file:///tmp/proxy.pac', - pac.PACFetcher(QUrl('pac+file:///tmp/proxy.pac'))), + lambda: pac.PACFetcher(QUrl('pac+file:///tmp/proxy.pac'))), ]) - def test_to_py_valid(self, klass, val, expected): + def test_to_py_valid(self, klass, val, expected_factory): actual = klass().to_py(val) if isinstance(actual, QNetworkProxy): actual = QNetworkProxy(actual) - assert actual == expected + assert actual == expected_factory() @pytest.mark.parametrize('val', [ 'blah', From a45cfb89cb49f906cc72032c7a737b0b255c3bcb Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 25 Mar 2024 22:39:35 +0100 Subject: [PATCH 38/67] tests: Add new ignored error messages --- pytest.ini | 2 ++ tests/end2end/fixtures/quteprocess.py | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/pytest.ini b/pytest.ini index 5c4c2095a..883e6d936 100644 --- a/pytest.ini +++ b/pytest.ini @@ -64,6 +64,8 @@ qt_log_ignore = # Seen in Qt 6.6.2 on CI, https://github.com/qutebrowser/qutebrowser/pull/8106#issuecomment-1952320663 ^QDBusConnection: couldn't handle call to Notify, no slot matched ^QDBusConnection: couldn't handle call to CloseNotification, no slot matched + # Qt 6.7 + ^Path override failed for key base::DIR_APP_DICTIONARIES and path '.*/qtwebengine_dictionaries' xfail_strict = true filterwarnings = error diff --git a/tests/end2end/fixtures/quteprocess.py b/tests/end2end/fixtures/quteprocess.py index 98f7eff4d..a74445507 100644 --- a/tests/end2end/fixtures/quteprocess.py +++ b/tests/end2end/fixtures/quteprocess.py @@ -213,6 +213,16 @@ def is_ignored_chromium_message(line): # [9895:9983:0904/043039.500565:ERROR:gpu_memory_buffer_support_x11.cc(49)] # dri3 extension not supported. "dri3 extension not supported.", + + # Qt 6.7 debug build + # [44513:44717:0325/173456.146759:WARNING:render_message_filter.cc(144)] + # Could not find tid + "Could not find tid", + + # [127693:127748:0325/230155.835421:WARNING:discardable_shared_memory_manager.cc(438)] + # Some MojoDiscardableSharedMemoryManagerImpls are still alive. They + # will be leaked. + "Some MojoDiscardableSharedMemoryManagerImpls are still alive. They will be leaked.", ] return any(testutils.pattern_match(pattern=pattern, value=message) for pattern in ignored_messages) From 1ee138b681a590ee500954361eed2cf923b1d8a0 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 25 Mar 2024 23:19:37 +0100 Subject: [PATCH 39/67] qtutils: Handle QDataStream.Status.SizeLimitExceeded --- qutebrowser/utils/qtutils.py | 9 ++++++++ tests/unit/utils/test_qtutils.py | 35 ++++++++++++++++++++++++++++---- 2 files changed, 40 insertions(+), 4 deletions(-) diff --git a/qutebrowser/utils/qtutils.py b/qutebrowser/utils/qtutils.py index 12c98cc1d..21f3b8478 100644 --- a/qutebrowser/utils/qtutils.py +++ b/qutebrowser/utils/qtutils.py @@ -193,6 +193,15 @@ def check_qdatastream(stream: QDataStream) -> None: QDataStream.Status.WriteFailed: ("The data stream cannot write to the " "underlying device."), } + try: + status_to_str[QDataStream.Status.SizeLimitExceeded] = ( # type: ignore[attr-defined] + "The data stream cannot read or write the data because its size is larger " + "than supported by the current platform." + ) + except AttributeError: + # Added in Qt 6.7 + pass + if stream.status() != QDataStream.Status.Ok: raise OSError(status_to_str[stream.status()]) diff --git a/tests/unit/utils/test_qtutils.py b/tests/unit/utils/test_qtutils.py index 3aceca668..c7af3162c 100644 --- a/tests/unit/utils/test_qtutils.py +++ b/tests/unit/utils/test_qtutils.py @@ -208,6 +208,18 @@ def test_ensure_valid(obj, raising, exc_reason, exc_str): "The data stream has read corrupt data."), (QDataStream.Status.WriteFailed, True, "The data stream cannot write to the underlying device."), + pytest.param( + getattr(QDataStream.Status, "SizeLimitExceeded", None), + True, + ( + "The data stream cannot read or write the data because its size is larger " + "than supported by the current platform." + ), + marks=pytest.mark.skipif( + not hasattr(QDataStream.Status, "SizeLimitExceeded"), + reason="Added in Qt 6.7" + ) + ), ]) def test_check_qdatastream(status, raising, message): """Test check_qdatastream. @@ -226,10 +238,25 @@ def test_check_qdatastream(status, raising, message): qtutils.check_qdatastream(stream) -def test_qdatastream_status_count(): - """Make sure no new members are added to QDataStream.Status.""" - status_vals = testutils.enum_members(QDataStream, QDataStream.Status) - assert len(status_vals) == 4 +def test_qdatastream_status_members(): + """Make sure no new members are added to QDataStream.Status. + + If this fails, qtutils.check_qdatastream will need to be updated with the + respective error documentation. + """ + status_vals = set(testutils.enum_members(QDataStream, QDataStream.Status).values()) + expected = { + QDataStream.Status.Ok, + QDataStream.Status.ReadPastEnd, + QDataStream.Status.ReadCorruptData, + QDataStream.Status.WriteFailed, + } + try: + expected.add(QDataStream.Status.SizeLimitExceeded) + except AttributeError: + # Added in Qt 6.7 + pass + assert status_vals == expected @pytest.mark.parametrize('color, expected', [ From d37f5b7be0d8ece8d29e020b22b3eec12b2150fa Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 26 Mar 2024 13:57:07 +0100 Subject: [PATCH 40/67] Ignore already imported Qt module with PyInstaller Starting with PyInstaller 6.5.0, it imports Qt bindings early, due to this change: https://github.com/pyinstaller/pyinstaller/pull/8315 We warn about this in order to avoid unintentional early Qt imports in qutebrowser. However, in the case of using PyInstaller, we just suppress the warning now, as it's not us to blame. See https://github.com/qutebrowser/qutebrowser/pull/8123 --- qutebrowser/qt/machinery.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qutebrowser/qt/machinery.py b/qutebrowser/qt/machinery.py index f9e3721f8..9f45dd6ce 100644 --- a/qutebrowser/qt/machinery.py +++ b/qutebrowser/qt/machinery.py @@ -168,9 +168,9 @@ def _select_wrapper(args: Optional[argparse.Namespace]) -> SelectionInfo: - Otherwise, try the wrappers in WRAPPER in order (PyQt6 -> PyQt5) """ # If any Qt wrapper has been imported before this, something strange might - # be happening. + # be happening. With PyInstaller, it imports the Qt bindings early. for name in WRAPPERS: - if name in sys.modules: + if name in sys.modules and not hasattr(sys, "frozen"): warnings.warn(f"{name} already imported", stacklevel=1) if args is not None and args.qt_wrapper is not None: From 0a5d92119e27c8923fd2140e6fb407acd3c04f90 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 26 Mar 2024 14:09:09 +0100 Subject: [PATCH 41/67] importer: Stop using deprecated bs4 findAll Fails bleeding edge CI due to warnings --- scripts/importer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/importer.py b/scripts/importer.py index 1914e6976..cf084d178 100755 --- a/scripts/importer.py +++ b/scripts/importer.py @@ -209,7 +209,7 @@ def import_html_bookmarks(bookmarks_file, bookmark_types, output_format): } bookmarks = [] for typ in bookmark_types: - tags = soup.findAll(bookmark_query[typ]) + tags = soup.find_all(bookmark_query[typ]) for tag in tags: if typ == 'search': tag['href'] = search_escape(tag['href']).replace('%s', '{}') From 6ee7a23c7ecc60a9ddac756945105de72d0b6b71 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 26 Mar 2024 14:15:09 +0100 Subject: [PATCH 42/67] tests: Ignore new SSL error message Seems to break in bleeding edge tests --- tests/end2end/fixtures/webserver.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/tests/end2end/fixtures/webserver.py b/tests/end2end/fixtures/webserver.py index 5051efa85..eca8ed1bb 100644 --- a/tests/end2end/fixtures/webserver.py +++ b/tests/end2end/fixtures/webserver.py @@ -9,6 +9,7 @@ import sys import json import pathlib import socket +import fnmatch import dataclasses from http import HTTPStatus @@ -111,6 +112,17 @@ class ExpectedRequest: return NotImplemented +def is_ignored_webserver_message(line: str) -> bool: + return fnmatch.fnmatchcase( + line, + ( + "Client ('127.0.0.1', *) lost — peer dropped the TLS connection suddenly, " + "during handshake: (1, '[SSL: SSLV3_ALERT_CERTIFICATE_UNKNOWN] ssl/tls " + "alert certificate unknown (_ssl.c:*)')" + ) + ) + + class WebserverProcess(testprocess.Process): """Abstraction over a running Flask server process. @@ -151,7 +163,13 @@ class WebserverProcess(testprocess.Process): if started_re.fullmatch(line): self.ready.emit() return None - return Request(line) + + try: + return Request(line) + except testprocess.InvalidLine: + if is_ignored_webserver_message(line): + return None + raise def _executable_args(self): if hasattr(sys, 'frozen'): From f671e997cc9d77d34808f705a02f66c5ee4dff6c Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 26 Mar 2024 14:23:05 +0100 Subject: [PATCH 43/67] tox: Avoid installing PyQt from source for bleeding envs Right now, the Riverbank PyPI server has a PyQt5 sdist but no wheels. --- tox.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 5c27a0faa..31e06e396 100644 --- a/tox.ini +++ b/tox.ini @@ -69,8 +69,8 @@ setenv = pip_pre = true deps = -r{toxinidir}/misc/requirements/requirements-tests-bleeding.txt commands_pre = - qt5: pip install --extra-index-url https://www.riverbankcomputing.com/pypi/simple/ --pre --upgrade PyQt5 PyQtWebEngine PyQt5-Qt5 PyQtWebEngine-Qt5 PyQt5-sip - !qt5: pip install --extra-index-url https://www.riverbankcomputing.com/pypi/simple/ --pre --upgrade PyQt6 PyQt6-WebEngine PyQt6-Qt6 PyQt6-WebEngine-Qt6 PyQt6-sip + qt5: pip install --extra-index-url https://www.riverbankcomputing.com/pypi/simple/ --pre --upgrade --only-binary PyQt5,PyQtWebEngine PyQt5 PyQtWebEngine PyQt5-Qt5 PyQtWebEngine-Qt5 PyQt5-sip + !qt5: pip install --extra-index-url https://www.riverbankcomputing.com/pypi/simple/ --pre --upgrade --only-binary PyQt6,PyQt6-WebEngine PyQt6 PyQt6-WebEngine PyQt6-Qt6 PyQt6-WebEngine-Qt6 PyQt6-sip commands = {envpython} -bb -m pytest {posargs:tests} # other envs From 0b220117e2c26dd3ca7639a7bda78a44c8959fbf Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 26 Mar 2024 14:30:20 +0100 Subject: [PATCH 44/67] tests: Fix glob matching --- tests/end2end/fixtures/webserver.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/end2end/fixtures/webserver.py b/tests/end2end/fixtures/webserver.py index eca8ed1bb..924cb520b 100644 --- a/tests/end2end/fixtures/webserver.py +++ b/tests/end2end/fixtures/webserver.py @@ -9,7 +9,6 @@ import sys import json import pathlib import socket -import fnmatch import dataclasses from http import HTTPStatus @@ -17,6 +16,7 @@ import pytest from qutebrowser.qt.core import pyqtSignal, QUrl from end2end.fixtures import testprocess +from helpers import testutils class Request(testprocess.Line): @@ -113,13 +113,13 @@ class ExpectedRequest: def is_ignored_webserver_message(line: str) -> bool: - return fnmatch.fnmatchcase( - line, - ( + return testutils.pattern_match( + pattern=( "Client ('127.0.0.1', *) lost — peer dropped the TLS connection suddenly, " "during handshake: (1, '[SSL: SSLV3_ALERT_CERTIFICATE_UNKNOWN] ssl/tls " "alert certificate unknown (_ssl.c:*)')" - ) + ), + value=line, ) From 982b8bdcecfba6fc1687a6a4942b9e3ab3221eb7 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 27 Mar 2024 12:34:30 +0100 Subject: [PATCH 45/67] Fix input.insert_mode.auto_load race / test_auto_load flakiness Fixes #8145, see #5390. As long as we don't have a solution to get notified about focus happening (#2471 possibly?), it looks like there is no better way to get notified about this, so a delay will need to do for now. --- doc/changelog.asciidoc | 6 ++++++ qutebrowser/browser/browsertab.py | 10 ++++++++-- .../data/insert_mode_settings/html/autofocus.html | 3 +++ tests/end2end/test_insert_mode.py | 1 - 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc index 89e33679e..53bb75a2f 100644 --- a/doc/changelog.asciidoc +++ b/doc/changelog.asciidoc @@ -32,6 +32,12 @@ Changed `:quickmark-*`, `:bookmark-*`, `:tab-take` and `:tab-select` (for the quick and bookmark categories). (#7955) +Fixed +~~~~~ + +- `input.insert_mode.auto_load` sometimes not triggering due to a race + condition. + [[v3.1.1]] v3.1.1 (unreleased) ------------------- diff --git a/qutebrowser/browser/browsertab.py b/qutebrowser/browser/browsertab.py index 4d14c9cd7..625046a9c 100644 --- a/qutebrowser/browser/browsertab.py +++ b/qutebrowser/browser/browsertab.py @@ -14,7 +14,7 @@ from typing import (cast, TYPE_CHECKING, Any, Callable, Iterable, List, Optional from qutebrowser.qt import machinery from qutebrowser.qt.core import (pyqtSignal, pyqtSlot, QUrl, QObject, QSizeF, Qt, - QEvent, QPoint, QRect) + QEvent, QPoint, QRect, QTimer) from qutebrowser.qt.gui import QKeyEvent, QIcon, QPixmap from qutebrowser.qt.widgets import QApplication, QWidget from qutebrowser.qt.printsupport import QPrintDialog, QPrinter @@ -902,7 +902,13 @@ class AbstractTabPrivate: modeman.enter(self._tab.win_id, usertypes.KeyMode.insert, 'load finished', only_if_normal=True) - self._tab.elements.find_focused(_auto_insert_mode_cb) + # There seems to be a race between loadFinished being called, + # and the autoload attribute on websites actually focusing anything. + # Thus, we delay this by a bit. Locally, a delay of 13ms caused no races + # with 5000 test reruns (even with simultaneous CPU stress testing), + # so 65ms should be a safe bet and still not be too noticeable. + QTimer.singleShot( + 65, lambda: self._tab.elements.find_focused(_auto_insert_mode_cb)) def clear_ssl_errors(self) -> None: raise NotImplementedError diff --git a/tests/end2end/data/insert_mode_settings/html/autofocus.html b/tests/end2end/data/insert_mode_settings/html/autofocus.html index 366f436f6..ca189b016 100644 --- a/tests/end2end/data/insert_mode_settings/html/autofocus.html +++ b/tests/end2end/data/insert_mode_settings/html/autofocus.html @@ -10,6 +10,9 @@ elem.addEventListener('input', function() { console.log("contents: " + elem.value); }); + elem.addEventListener('focus', function() { + console.log("autofocus element focused"); + }); } diff --git a/tests/end2end/test_insert_mode.py b/tests/end2end/test_insert_mode.py index abf32dbde..95757591d 100644 --- a/tests/end2end/test_insert_mode.py +++ b/tests/end2end/test_insert_mode.py @@ -43,7 +43,6 @@ def test_insert_mode(file_name, elem_id, source, input_text, zoom, (True, False, True), # enabled and foreground tab (True, True, False), # background tab ]) -@pytest.mark.flaky def test_auto_load(quteproc, auto_load, background, insert_mode): quteproc.set_setting('input.insert_mode.auto_load', str(auto_load)) url_path = 'data/insert_mode_settings/html/autofocus.html' From 481542844db79ee58740e8324ecc1090e3738c35 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 27 Mar 2024 13:03:39 +0100 Subject: [PATCH 46/67] tests: Avoid using autofocus for click_element tests Similarly to the last commit (982b8bdcecfba6fc1687a6a4942b9e3ab3221eb7), we run into a race between autofocus triggering and the test trying to click the focused element. This also affects the "when there is none" test, which loses the focus before it has been set, thus ending up with a focused element but expecting none. We fix both in one go by manually focusing things with a tab keypress instead of using autofocus. See #8145 and #5390. --- tests/end2end/data/click_element.html | 2 +- tests/end2end/features/misc.feature | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/end2end/data/click_element.html b/tests/end2end/data/click_element.html index b2a691e08..7fac2a381 100644 --- a/tests/end2end/data/click_element.html +++ b/tests/end2end/data/click_element.html @@ -7,7 +7,7 @@ "Don't", he shouted Duplicate Duplicate -
      +
      link ID with dot + And I wait for the javascript message "qute-input focused" And I run :click-element focused Then "Entering mode KeyMode.insert (reason: clicking input)" should be logged From 7a969a2d54633f334f7ba2002515471eec472c59 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 27 Mar 2024 16:55:18 +0100 Subject: [PATCH 47/67] Add caret browsing debug logging --- qutebrowser/browser/webengine/webenginetab.py | 2 ++ qutebrowser/javascript/caret.js | 19 +++++++++++++++++++ qutebrowser/qutebrowser.py | 3 ++- tests/end2end/fixtures/quteprocess.py | 8 +++++--- 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/qutebrowser/browser/webengine/webenginetab.py b/qutebrowser/browser/webengine/webenginetab.py index 1c712db5e..02d912a50 100644 --- a/qutebrowser/browser/webengine/webenginetab.py +++ b/qutebrowser/browser/webengine/webenginetab.py @@ -292,6 +292,8 @@ class WebEngineCaret(browsertab.AbstractCaret): flags = set() if utils.is_windows: flags.add('windows') + if 'caret' in objects.debug_flags: + flags.add('debug') return list(flags) @pyqtSlot(usertypes.KeyMode) diff --git a/qutebrowser/javascript/caret.js b/qutebrowser/javascript/caret.js index b16a15348..4aeefcdb9 100644 --- a/qutebrowser/javascript/caret.js +++ b/qutebrowser/javascript/caret.js @@ -739,6 +739,12 @@ window._qutebrowser.caret = (function() { */ CaretBrowsing.isWindows = null; + /** + * Whether we should log debug outputs. + * @type {boolean} + */ + CaretBrowsing.isDebug = null; + /** * The id returned by window.setInterval for our stopAnimation function, so * we can cancel it when we call stopAnimation again. @@ -1150,6 +1156,8 @@ window._qutebrowser.caret = (function() { action = "extend"; } + CaretBrowsing.debug(`(move) ${action} ${count} ${granularity} ${direction}, selection ${CaretBrowsing.selectionState}`); + for (let i = 0; i < count; i++) { if (CaretBrowsing.selectionState === CaretBrowsing.SelectionState.LINE) { CaretBrowsing.updateLineSelection(direction, granularity); @@ -1180,6 +1188,8 @@ window._qutebrowser.caret = (function() { if (CaretBrowsing.selectionState !== CaretBrowsing.SelectionState.NONE) { action = "extend"; } + CaretBrowsing.debug(`(moveToBlock) ${action} paragraph ${paragraph}, boundary ${boundary}, count ${count}, selection ${CaretBrowsing.selectionState}`); + for (let i = 0; i < count; i++) { window. getSelection(). @@ -1196,6 +1206,7 @@ window._qutebrowser.caret = (function() { }; CaretBrowsing.toggle = function(value) { + CaretBrowsing.debug(`(toggle) enabled ${CaretBrowsing.isEnabled}, force ${CaretBrowsing.forceEnabled}`); if (CaretBrowsing.forceEnabled) { CaretBrowsing.recreateCaretElement(); return; @@ -1231,6 +1242,7 @@ window._qutebrowser.caret = (function() { * is enabled and whether this window / iframe has focus. */ CaretBrowsing.updateIsCaretVisible = function() { + CaretBrowsing.debug(`(updateIsCaretVisible) isEnabled ${CaretBrowsing.isEnabled}, isWindowFocused ${CaretBrowsing.isWindowFocused}, isCaretVisible ${CaretBrowsing.isCaretVisible}, caretElement ${CaretBrowsing.caretElement}`); CaretBrowsing.isCaretVisible = (CaretBrowsing.isEnabled && CaretBrowsing.isWindowFocused); if (CaretBrowsing.isCaretVisible && !CaretBrowsing.caretElement) { @@ -1274,6 +1286,12 @@ window._qutebrowser.caret = (function() { } }; + CaretBrowsing.debug = (text) => { + if (CaretBrowsing.isDebug) { + console.debug(`caret: ${text}`); + } + } + CaretBrowsing.init = function() { CaretBrowsing.isWindowFocused = document.hasFocus(); @@ -1313,6 +1331,7 @@ window._qutebrowser.caret = (function() { funcs.setFlags = (flags) => { CaretBrowsing.isWindows = flags.includes("windows"); + CaretBrowsing.isDebug = flags.includes("debug"); }; funcs.disableCaret = () => { diff --git a/qutebrowser/qutebrowser.py b/qutebrowser/qutebrowser.py index c3a0a60be..e68156759 100644 --- a/qutebrowser/qutebrowser.py +++ b/qutebrowser/qutebrowser.py @@ -171,12 +171,13 @@ def debug_flag_error(flag): avoid-chromium-init: Enable `--version` without initializing Chromium. werror: Turn Python warnings into errors. test-notification-service: Use the testing libnotify service. + caret: Enable debug logging for caret.js. """ valid_flags = ['debug-exit', 'pdb-postmortem', 'no-sql-history', 'no-scroll-filtering', 'log-requests', 'log-cookies', 'log-scroll-pos', 'log-sensitive-keys', 'stack', 'chromium', 'wait-renderer-process', 'avoid-chromium-init', 'werror', - 'test-notification-service', 'log-qt-events'] + 'test-notification-service', 'log-qt-events', 'caret'] if flag in valid_flags: return flag diff --git a/tests/end2end/fixtures/quteprocess.py b/tests/end2end/fixtures/quteprocess.py index a74445507..a6ad157f8 100644 --- a/tests/end2end/fixtures/quteprocess.py +++ b/tests/end2end/fixtures/quteprocess.py @@ -405,9 +405,11 @@ class QuteProc(testprocess.Process): backend = 'webengine' if self.request.config.webengine else 'webkit' args = ['--debug', '--no-err-windows', '--temp-basedir', '--json-logging', '--loglevel', 'vdebug', - '--backend', backend, '--debug-flag', 'no-sql-history', - '--debug-flag', 'werror', '--debug-flag', - 'test-notification-service', + '--backend', backend, + '--debug-flag', 'no-sql-history', + '--debug-flag', 'werror', + '--debug-flag', 'test-notification-service', + '--debug-flag', 'caret', '--qt-flag', 'disable-features=PaintHoldingCrossOrigin'] if self.request.config.webengine and testutils.disable_seccomp_bpf_sandbox(): From 713a4e5ec27e9dd5e131cead6adc0438a9b3971f Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 27 Mar 2024 19:49:09 +0100 Subject: [PATCH 48/67] Fix caret tests on Qt 6 and Windows --- tests/end2end/features/caret.feature | 4 ++-- tests/unit/browser/test_caret.py | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/end2end/features/caret.feature b/tests/end2end/features/caret.feature index 1302a1e6d..d6e65440c 100644 --- a/tests/end2end/features/caret.feature +++ b/tests/end2end/features/caret.feature @@ -34,11 +34,11 @@ Feature: Caret mode Scenario: :yank selection with --keep When I run :selection-toggle - And I run :move-to-end-of-word + And I run :move-to-next-word And I run :yank selection --keep And I run :move-to-end-of-word And I run :yank selection --keep - Then the message "3 chars yanked to clipboard" should be shown + Then the message "4 chars yanked to clipboard" should be shown And the message "7 chars yanked to clipboard" should be shown And the clipboard should contain "one two" diff --git a/tests/unit/browser/test_caret.py b/tests/unit/browser/test_caret.py index ba1da4145..d51cc69ff 100644 --- a/tests/unit/browser/test_caret.py +++ b/tests/unit/browser/test_caret.py @@ -9,7 +9,8 @@ import textwrap import pytest from qutebrowser.qt.core import QUrl -from qutebrowser.utils import usertypes +from qutebrowser.qt import machinery +from qutebrowser.utils import utils, usertypes from qutebrowser.browser import browsertab @@ -241,6 +242,13 @@ class TestWord: caret.move_to_end_of_word() selection.check("one") + @pytest.mark.xfail( + machinery.IS_QT6 and utils.is_windows, + reason=( + "move-to-end-of-word is broken with Qt 6 and Windows: " + "https://github.com/qutebrowser/qutebrowser/issues/8146" + ) + ) def test_moving_to_end_and_selecting_a_word(self, caret, selection): caret.move_to_end_of_word() selection.toggle() From 53e37cbf4139a09a8099372395de7c0506465611 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 27 Mar 2024 20:15:15 +0100 Subject: [PATCH 49/67] Update chromium versions --- qutebrowser/utils/version.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/qutebrowser/utils/version.py b/qutebrowser/utils/version.py index 58772b3db..71489c285 100644 --- a/qutebrowser/utils/version.py +++ b/qutebrowser/utils/version.py @@ -610,13 +610,21 @@ class WebEngineVersions: # 6.5.0: Security fixes up to 110.0.5481.104 (2023-02-16) # 6.5.1: Security fixes up to 112.0.5615.138 (2023-04-18) # 6.5.2: Security fixes up to 114.0.5735.133 (2023-06-13) + # 6.5.3: Security fixes up to 117.0.5938.63 (2023-09-12) utils.VersionNumber(6, 5): '108.0.5359.220', # Qt 6.6: Chromium 112 # 112.0.5615.213 (~2023-04-18) - # 6.6.0: Security fixes up to 116.0.5845.110 (?) (2023-08-22) + # 6.6.0: Security fixes up to 117.0.5938.63 (2023-09-12) + # 6.6.1: Security fixes up to 119.0.6045.123 (2023-11-07) + # 6.6.2: Security fixes up to 121.0.6167.160 (2024-02-06) + # 6.6.3: Security fixes up to 122.0.6261.128 (2024-03-12) utils.VersionNumber(6, 6): '112.0.5615.213', - } + + # Qt 6.7: Chromium 118 + # 118.0.5993.220 + # 6.6.0: Security fixes up to 122.0.6261.128 (?) (2024-03-12) + utils.VersionNumber(6, 7): '118.0.5993.220', def __post_init__(self) -> None: """Set the major Chromium version.""" From 60ce2e6705e1914bac72149ea87a72df06595d88 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 27 Mar 2024 20:18:54 +0100 Subject: [PATCH 50/67] Add missing date to comment --- qutebrowser/utils/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qutebrowser/utils/version.py b/qutebrowser/utils/version.py index 71489c285..a4e1a0d27 100644 --- a/qutebrowser/utils/version.py +++ b/qutebrowser/utils/version.py @@ -622,7 +622,7 @@ class WebEngineVersions: utils.VersionNumber(6, 6): '112.0.5615.213', # Qt 6.7: Chromium 118 - # 118.0.5993.220 + # 118.0.5993.220 (~2023-10-24) # 6.6.0: Security fixes up to 122.0.6261.128 (?) (2024-03-12) utils.VersionNumber(6, 7): '118.0.5993.220', From 9560d7355fc9d46b1bb3dd33878a365763c89677 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 27 Mar 2024 20:25:10 +0100 Subject: [PATCH 51/67] Fix derp --- qutebrowser/utils/version.py | 1 + 1 file changed, 1 insertion(+) diff --git a/qutebrowser/utils/version.py b/qutebrowser/utils/version.py index a4e1a0d27..a4bb893f6 100644 --- a/qutebrowser/utils/version.py +++ b/qutebrowser/utils/version.py @@ -625,6 +625,7 @@ class WebEngineVersions: # 118.0.5993.220 (~2023-10-24) # 6.6.0: Security fixes up to 122.0.6261.128 (?) (2024-03-12) utils.VersionNumber(6, 7): '118.0.5993.220', + } def __post_init__(self) -> None: """Set the major Chromium version.""" From 3d86d7876abddea68fd04bd72ce3a7f8c9f297ad Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 27 Mar 2024 23:58:36 +0100 Subject: [PATCH 52/67] Add role="switch" to default hints.selectors See https://www.reddit.com/r/qutebrowser/comments/1bomb3h/closing_popups_within_a_webpage_and_toggling/ --- doc/changelog.asciidoc | 2 ++ doc/help/settings.asciidoc | 1 + qutebrowser/config/configdata.yml | 1 + 3 files changed, 4 insertions(+) diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc index 53bb75a2f..f5395c750 100644 --- a/doc/changelog.asciidoc +++ b/doc/changelog.asciidoc @@ -31,6 +31,8 @@ Changed - A few more completions will now match search terms in any order: `:quickmark-*`, `:bookmark-*`, `:tab-take` and `:tab-select` (for the quick and bookmark categories). (#7955) +- Elements with an ARIA `role="switch"` now get hints (toggle switches like + e.g. on cookie banners). Fixed ~~~~~ diff --git a/doc/help/settings.asciidoc b/doc/help/settings.asciidoc index b69700880..af76527c9 100644 --- a/doc/help/settings.asciidoc +++ b/doc/help/settings.asciidoc @@ -3476,6 +3476,7 @@ Default: * +pass:[[role="button"\]]+ * +pass:[[role="tab"\]]+ * +pass:[[role="checkbox"\]]+ +* +pass:[[role="switch"\]]+ * +pass:[[role="menuitem"\]]+ * +pass:[[role="menuitemcheckbox"\]]+ * +pass:[[role="menuitemradio"\]]+ diff --git a/qutebrowser/config/configdata.yml b/qutebrowser/config/configdata.yml index de6948150..ca92f96c1 100644 --- a/qutebrowser/config/configdata.yml +++ b/qutebrowser/config/configdata.yml @@ -1784,6 +1784,7 @@ hints.selectors: - '[role="button"]' - '[role="tab"]' - '[role="checkbox"]' + - '[role="switch"]' - '[role="menuitem"]' - '[role="menuitemcheckbox"]' - '[role="menuitemradio"]' From b812ec2628cc90ea6b9f088de920a9fdad14231b Mon Sep 17 00:00:00 2001 From: toofar Date: Sat, 6 Apr 2024 11:25:14 +1300 Subject: [PATCH 53/67] Ignore more 6.7 DIR_APP_DICTIONARIOES log messages In the bleeding edge CI tests I'm seeing: IGNORED: Path override failed for key base::DIR_APP_DICTIONARIES and path '/__w/qutebrowser/qutebrowser/.tox/bleeding/lib/python3.11/sitePath override failed for key base::DIR_APP_DICTIONARIES and path '/__w/qutebrowser/qutebrowser/.tox/bleeding/lib/python3.11/site-packages/PyQt6/Qt6/libexec/qtwebengine_dictionaries' INVALID: -packages/PyQt6/Qt6/libexec/qtwebengine_dictionaries' Where the second line looks like maybe spill over from the first one that is for some reason being printed twice and interleaved! Maybe different processes or threads? I did a regex for "line ending with this and with no spaces in it" which is hopefully safe enough to not pick up a wrong line accidentally. --- pytest.ini | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pytest.ini b/pytest.ini index 883e6d936..2de880eae 100644 --- a/pytest.ini +++ b/pytest.ini @@ -66,6 +66,10 @@ qt_log_ignore = ^QDBusConnection: couldn't handle call to CloseNotification, no slot matched # Qt 6.7 ^Path override failed for key base::DIR_APP_DICTIONARIES and path '.*/qtwebengine_dictionaries' + # Sometime the above message gets printed twice at the same time and the messages get interleaved. + # The last part of the outer message gets bumped down to a line on its own, so hopefully this + # catches that. And we don't see any other weird permutations of this. + ^[^ ]*qtwebengine_dictionaries'$ xfail_strict = true filterwarnings = error From 26dcc4a7a9d39f0bdac8828867845cfafdb1c5dd Mon Sep 17 00:00:00 2001 From: toofar Date: Sat, 6 Apr 2024 12:05:31 +1300 Subject: [PATCH 54/67] Add a :window-only for some qt5 end2end tests A couple of tests seem to be failing because there is two windows open and they don't expect it. I haven't fixed the root cause, I looked through the logs and couldn't see why a second window was open. But if this makes the tests pass, I guess we can address that if someone reports it. Also changed `_get_scroll_values()` to handle multiple tabs/windows being open too while I was there. Example logs: https://github.com/qutebrowser/qutebrowser/actions/runs/8548730512/job/23422922448 Sessions file from the test logs: Current session data: windows: - geometry: !!binary | AdnQywADAAAAAAAyAAAAMgAAA1EAAAKJAAAAMgAAADIAAANRAAACiQAAAAAAAAAAAyAAAAAyAAAA MgAAA1EAAAKJ tabs: - active: true history: - active: true last_visited: '2024-04-04T03:21:00' pinned: false scroll-pos: x: 0 y: 0 title: about:blank url: about:blank zoom: 1.0 - active: true geometry: !!binary | AdnQywADAAAAAAAyAAAAMgAAA1EAAAKJAAAAMgAAADIAAANRAAACiQAAAAAAAAAAAyAAAAAyAAAA MgAAA1EAAAKJ tabs: - active: true history: - active: true last_visited: '2024-04-04T03:21:03' pinned: false scroll-pos: x: 0 y: 40 title: Scrolling url: http://localhost:39235/data/scroll/simple.html zoom: 1.0 --- tests/end2end/features/conftest.py | 11 +++++++++-- tests/end2end/features/utilcmds.feature | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/end2end/features/conftest.py b/tests/end2end/features/conftest.py index 089f0c42c..082b999b1 100644 --- a/tests/end2end/features/conftest.py +++ b/tests/end2end/features/conftest.py @@ -684,8 +684,15 @@ def should_quit(qtbot, quteproc): def _get_scroll_values(quteproc): data = quteproc.get_session() - pos = data['windows'][0]['tabs'][0]['history'][-1]['scroll-pos'] - return (pos['x'], pos['y']) + + def get_active(things): + return next(thing for thing in things if thing.get("active")) + + active_window = get_active(data["windows"]) + active_tab = get_active(active_window["tabs"]) + current_entry = get_active(active_tab["history"]) + pos = current_entry["scroll-pos"] + return (pos["x"], pos["y"]) @bdd.then(bdd.parsers.re(r"the page should be scrolled " diff --git a/tests/end2end/features/utilcmds.feature b/tests/end2end/features/utilcmds.feature index 1b5306adb..ebacea890 100644 --- a/tests/end2end/features/utilcmds.feature +++ b/tests/end2end/features/utilcmds.feature @@ -3,6 +3,7 @@ Feature: Miscellaneous utility commands exposed to the user. Background: Given I open data/scroll/simple.html And I run :tab-only + And I run :window-only ## :cmd-later From 0a541983c3c699aa846e04720a36729ad704d0d4 Mon Sep 17 00:00:00 2001 From: toofar Date: Sat, 6 Apr 2024 18:27:29 +1300 Subject: [PATCH 55/67] Pin eslint for now until we support v9+ See https://github.com/qutebrowser/qutebrowser/issues/8159 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 732ce4b07..599ba3b1b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,7 +56,7 @@ jobs: run: "python scripts/dev/ci/problemmatchers.py ${{ matrix.testenv }} ${{ runner.temp }}" - name: Install dependencies run: | - [[ ${{ matrix.testenv }} == eslint ]] && npm install -g eslint + [[ ${{ matrix.testenv }} == eslint ]] && npm install -g 'eslint@<9.0.0' [[ ${{ matrix.testenv }} == docs ]] && sudo apt-get update && sudo apt-get install --no-install-recommends asciidoc libegl1-mesa [[ ${{ matrix.testenv }} == vulture || ${{ matrix.testenv }} == pylint ]] && sudo apt-get update && sudo apt-get install --no-install-recommends libegl1-mesa if [[ ${{ matrix.testenv }} == shellcheck ]]; then From 4a12ae78049abb94703215982fc0a05424d39cbb Mon Sep 17 00:00:00 2001 From: qutebrowser bot Date: Mon, 8 Apr 2024 04:22:53 +0000 Subject: [PATCH 56/67] Update dependencies --- .../requirements-check-manifest.txt | 2 +- misc/requirements/requirements-dev.txt | 17 +++++++++-------- misc/requirements/requirements-flake8.txt | 4 ++-- misc/requirements/requirements-mypy.txt | 6 +++--- misc/requirements/requirements-pylint.txt | 4 ++-- misc/requirements/requirements-pyqt-6.6.txt | 4 ++-- misc/requirements/requirements-pyqt-6.txt | 4 ++-- misc/requirements/requirements-pyqt.txt | 4 ++-- misc/requirements/requirements-pyroma.txt | 4 ++-- misc/requirements/requirements-tests.txt | 12 ++++++------ misc/requirements/requirements-tox.txt | 2 +- 11 files changed, 32 insertions(+), 31 deletions(-) diff --git a/misc/requirements/requirements-check-manifest.txt b/misc/requirements/requirements-check-manifest.txt index 430abbb0c..b0993ea58 100644 --- a/misc/requirements/requirements-check-manifest.txt +++ b/misc/requirements/requirements-check-manifest.txt @@ -1,6 +1,6 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py -build==1.1.1 +build==1.2.1 check-manifest==0.49 importlib_metadata==7.1.0 packaging==24.0 diff --git a/misc/requirements/requirements-dev.txt b/misc/requirements/requirements-dev.txt index 89e12d073..810c6da1b 100644 --- a/misc/requirements/requirements-dev.txt +++ b/misc/requirements/requirements-dev.txt @@ -1,6 +1,7 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py -build==1.1.1 +backports.tarfile==1.0.0 +build==1.2.1 bump2version==1.0.1 certifi==2024.2.2 cffi==1.16.0 @@ -12,24 +13,24 @@ hunter==3.6.1 idna==3.6 importlib_metadata==7.1.0 importlib_resources==6.4.0 -jaraco.classes==3.3.1 -jaraco.context==4.3.0 +jaraco.classes==3.4.0 +jaraco.context==5.3.0 jaraco.functools==4.0.0 jeepney==0.8.0 -keyring==25.0.0 +keyring==25.1.0 manhole==1.8.0 markdown-it-py==3.0.0 mdurl==0.1.2 more-itertools==10.2.0 -nh3==0.2.15 +nh3==0.2.17 packaging==24.0 pkginfo==1.10.0 -pycparser==2.21 +pycparser==2.22 Pygments==2.17.2 PyJWT==2.8.0 Pympler==1.0.1 pyproject_hooks==1.0.0 -PyQt-builder==1.15.4 +PyQt-builder==1.16.0 python-dateutil==2.9.0.post0 readme_renderer==43.0 requests==2.31.0 @@ -41,7 +42,7 @@ sip==6.8.3 six==1.16.0 tomli==2.0.1 twine==5.0.0 -typing_extensions==4.10.0 +typing_extensions==4.11.0 uritemplate==4.1.1 # urllib3==2.2.1 zipp==3.18.1 diff --git a/misc/requirements/requirements-flake8.txt b/misc/requirements/requirements-flake8.txt index 4f9f7fb39..3f2d52014 100644 --- a/misc/requirements/requirements-flake8.txt +++ b/misc/requirements/requirements-flake8.txt @@ -3,14 +3,14 @@ attrs==23.2.0 flake8==7.0.0 flake8-bugbear==24.2.6 -flake8-builtins==2.2.0 +flake8-builtins==2.4.0 flake8-comprehensions==3.14.0 flake8-debugger==4.1.2 flake8-deprecated==2.2.1 flake8-docstrings==1.7.0 flake8-future-import==0.4.7 flake8-plugin-utils==1.3.3 -flake8-pytest-style==1.7.2 +flake8-pytest-style==2.0.0 flake8-string-format==0.3.0 flake8-tidy-imports==4.10.0 flake8-tuple==0.4.1 diff --git a/misc/requirements/requirements-mypy.txt b/misc/requirements/requirements-mypy.txt index 944c2bca1..8f6f90f6c 100644 --- a/misc/requirements/requirements-mypy.txt +++ b/misc/requirements/requirements-mypy.txt @@ -4,7 +4,7 @@ chardet==5.2.0 diff_cover==8.0.3 importlib_resources==6.4.0 Jinja2==3.1.3 -lxml==5.1.0 +lxml==5.2.1 MarkupSafe==2.1.5 mypy==1.9.0 mypy-extensions==1.0.0 @@ -13,9 +13,9 @@ Pygments==2.17.2 PyQt5-stubs==5.15.6.0 tomli==2.0.1 types-colorama==0.4.15.20240311 -types-docutils==0.20.0.20240317 +types-docutils==0.20.0.20240406 types-Pygments==2.17.0.20240310 types-PyYAML==6.0.12.20240311 types-setuptools==69.2.0.20240317 -typing_extensions==4.10.0 +typing_extensions==4.11.0 zipp==3.18.1 diff --git a/misc/requirements/requirements-pylint.txt b/misc/requirements/requirements-pylint.txt index 2e86f9e30..ab2cfafc6 100644 --- a/misc/requirements/requirements-pylint.txt +++ b/misc/requirements/requirements-pylint.txt @@ -12,7 +12,7 @@ isort==5.13.2 mccabe==0.7.0 pefile==2023.2.7 platformdirs==4.2.0 -pycparser==2.21 +pycparser==2.22 PyJWT==2.8.0 pylint==3.1.0 python-dateutil==2.9.0.post0 @@ -21,6 +21,6 @@ requests==2.31.0 six==1.16.0 tomli==2.0.1 tomlkit==0.12.4 -typing_extensions==4.10.0 +typing_extensions==4.11.0 uritemplate==4.1.1 # urllib3==2.2.1 diff --git a/misc/requirements/requirements-pyqt-6.6.txt b/misc/requirements/requirements-pyqt-6.6.txt index 9b9a11190..02f1a325f 100644 --- a/misc/requirements/requirements-pyqt-6.6.txt +++ b/misc/requirements/requirements-pyqt-6.6.txt @@ -1,7 +1,7 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py PyQt6==6.6.1 -PyQt6-Qt6==6.6.2 +PyQt6-Qt6==6.6.3 PyQt6-sip==13.6.0 PyQt6-WebEngine==6.6.0 -PyQt6-WebEngine-Qt6==6.6.2 +PyQt6-WebEngine-Qt6==6.6.3 diff --git a/misc/requirements/requirements-pyqt-6.txt b/misc/requirements/requirements-pyqt-6.txt index 9b9a11190..02f1a325f 100644 --- a/misc/requirements/requirements-pyqt-6.txt +++ b/misc/requirements/requirements-pyqt-6.txt @@ -1,7 +1,7 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py PyQt6==6.6.1 -PyQt6-Qt6==6.6.2 +PyQt6-Qt6==6.6.3 PyQt6-sip==13.6.0 PyQt6-WebEngine==6.6.0 -PyQt6-WebEngine-Qt6==6.6.2 +PyQt6-WebEngine-Qt6==6.6.3 diff --git a/misc/requirements/requirements-pyqt.txt b/misc/requirements/requirements-pyqt.txt index 9b9a11190..02f1a325f 100644 --- a/misc/requirements/requirements-pyqt.txt +++ b/misc/requirements/requirements-pyqt.txt @@ -1,7 +1,7 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py PyQt6==6.6.1 -PyQt6-Qt6==6.6.2 +PyQt6-Qt6==6.6.3 PyQt6-sip==13.6.0 PyQt6-WebEngine==6.6.0 -PyQt6-WebEngine-Qt6==6.6.2 +PyQt6-WebEngine-Qt6==6.6.3 diff --git a/misc/requirements/requirements-pyroma.txt b/misc/requirements/requirements-pyroma.txt index 00eff9141..f3926d842 100644 --- a/misc/requirements/requirements-pyroma.txt +++ b/misc/requirements/requirements-pyroma.txt @@ -1,6 +1,6 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py -build==1.1.1 +build==1.2.1 certifi==2024.2.2 charset-normalizer==3.3.2 docutils==0.20.1 @@ -12,6 +12,6 @@ pyproject_hooks==1.0.0 pyroma==4.2 requests==2.31.0 tomli==2.0.1 -trove-classifiers==2024.3.3 +trove-classifiers==2024.3.25 urllib3==2.2.1 zipp==3.18.1 diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt index 5343a90da..5179a467d 100644 --- a/misc/requirements/requirements-tests.txt +++ b/misc/requirements/requirements-tests.txt @@ -9,11 +9,11 @@ cheroot==10.0.0 click==8.1.7 coverage==7.4.4 exceptiongroup==1.2.0 -execnet==2.0.2 -filelock==3.13.1 -Flask==3.0.2 +execnet==2.1.0 +filelock==3.13.3 +Flask==3.0.3 hunter==3.6.1 -hypothesis==6.99.13 +hypothesis==6.100.0 idna==3.6 importlib_metadata==7.1.0 iniconfig==2.0.0 @@ -49,8 +49,8 @@ sortedcontainers==2.4.0 soupsieve==2.5 tldextract==5.1.2 tomli==2.0.1 -typing_extensions==4.10.0 +typing_extensions==4.11.0 urllib3==2.2.1 vulture==2.11 -Werkzeug==3.0.1 +Werkzeug==3.0.2 zipp==3.18.1 diff --git a/misc/requirements/requirements-tox.txt b/misc/requirements/requirements-tox.txt index ee8289b22..9acc07370 100644 --- a/misc/requirements/requirements-tox.txt +++ b/misc/requirements/requirements-tox.txt @@ -4,7 +4,7 @@ cachetools==5.3.3 chardet==5.2.0 colorama==0.4.6 distlib==0.3.8 -filelock==3.13.1 +filelock==3.13.3 packaging==24.0 pip==24.0 platformdirs==4.2.0 From 98421e3c3519cca40704e293168289a7aa4ddade Mon Sep 17 00:00:00 2001 From: toofar Date: Tue, 9 Apr 2024 08:09:31 +1200 Subject: [PATCH 57/67] Move webkit.http to webkit.httpheaders flake8 got a new warning about a module name shadowing a builtin module: https://github.com/gforcada/flake8-builtins/pull/121 Probably would have been safe enough to ignore it. But I don't think moving it is that hard anyway. Hopefully I didn't miss anything! --- qutebrowser/browser/qtnetworkdownloads.py | 4 ++-- .../webkit/{http.py => httpheaders.py} | 0 qutebrowser/browser/webkit/webpage.py | 6 +++--- scripts/dev/check_coverage.py | 4 ++-- .../webkit/http/test_content_disposition.py | 10 +++++----- .../{test_http.py => test_httpheaders.py} | 20 +++++++++---------- 6 files changed, 22 insertions(+), 22 deletions(-) rename qutebrowser/browser/webkit/{http.py => httpheaders.py} (100%) rename tests/unit/browser/webkit/http/{test_http.py => test_httpheaders.py} (83%) diff --git a/qutebrowser/browser/qtnetworkdownloads.py b/qutebrowser/browser/qtnetworkdownloads.py index 9dd507ab5..0360eed66 100644 --- a/qutebrowser/browser/qtnetworkdownloads.py +++ b/qutebrowser/browser/qtnetworkdownloads.py @@ -19,7 +19,7 @@ from qutebrowser.config import config, websettings from qutebrowser.utils import message, usertypes, log, urlutils, utils, debug, objreg, qtlog from qutebrowser.misc import quitter from qutebrowser.browser import downloads -from qutebrowser.browser.webkit import http +from qutebrowser.browser.webkit import httpheaders from qutebrowser.browser.webkit.network import networkmanager @@ -533,7 +533,7 @@ class DownloadManager(downloads.AbstractDownloadManager): try: suggested_filename = target.suggested_filename() except downloads.NoFilenameError: - _, suggested_filename = http.parse_content_disposition(reply) + _, suggested_filename = httpheaders.parse_content_disposition(reply) log.downloads.debug("fetch: {} -> {}".format(reply.url(), suggested_filename)) download = DownloadItem(reply, manager=self) diff --git a/qutebrowser/browser/webkit/http.py b/qutebrowser/browser/webkit/httpheaders.py similarity index 100% rename from qutebrowser/browser/webkit/http.py rename to qutebrowser/browser/webkit/httpheaders.py diff --git a/qutebrowser/browser/webkit/webpage.py b/qutebrowser/browser/webkit/webpage.py index ea19174ec..595432dc9 100644 --- a/qutebrowser/browser/webkit/webpage.py +++ b/qutebrowser/browser/webkit/webpage.py @@ -18,7 +18,7 @@ from qutebrowser.qt.webkitwidgets import QWebPage, QWebFrame from qutebrowser.config import websettings, config from qutebrowser.browser import pdfjs, shared, downloads, greasemonkey -from qutebrowser.browser.webkit import http +from qutebrowser.browser.webkit import httpheaders from qutebrowser.browser.webkit.network import networkmanager from qutebrowser.utils import message, usertypes, log, jinja, objreg from qutebrowser.qt import sip @@ -263,14 +263,14 @@ class BrowserPage(QWebPage): At some point we might want to implement the MIME Sniffing standard here: https://mimesniff.spec.whatwg.org/ """ - inline, suggested_filename = http.parse_content_disposition(reply) + inline, suggested_filename = httpheaders.parse_content_disposition(reply) download_manager = objreg.get('qtnetwork-download-manager') if not inline: # Content-Disposition: attachment -> force download download_manager.fetch(reply, suggested_filename=suggested_filename) return - mimetype, _rest = http.parse_content_type(reply) + mimetype, _rest = httpheaders.parse_content_type(reply) if mimetype == 'image/jpg': # Some servers (e.g. the LinkedIn CDN) send a non-standard # image/jpg (instead of image/jpeg, defined in RFC 1341 section diff --git a/scripts/dev/check_coverage.py b/scripts/dev/check_coverage.py index 38a8f6ca1..e1d0d8642 100644 --- a/scripts/dev/check_coverage.py +++ b/scripts/dev/check_coverage.py @@ -73,8 +73,8 @@ PERFECT_FILES = [ 'qutebrowser/browser/history.py'), ('tests/unit/browser/test_pdfjs.py', 'qutebrowser/browser/pdfjs.py'), - ('tests/unit/browser/webkit/http/test_http.py', - 'qutebrowser/browser/webkit/http.py'), + ('tests/unit/browser/webkit/http/test_httpheaders.py', + 'qutebrowser/browser/webkit/httpheaders.py'), # ('tests/unit/browser/webkit/test_webkitelem.py', # 'qutebrowser/browser/webkit/webkitelem.py'), # ('tests/unit/browser/webkit/test_webkitelem.py', diff --git a/tests/unit/browser/webkit/http/test_content_disposition.py b/tests/unit/browser/webkit/http/test_content_disposition.py index 7cf80e3fd..4f3ef13c7 100644 --- a/tests/unit/browser/webkit/http/test_content_disposition.py +++ b/tests/unit/browser/webkit/http/test_content_disposition.py @@ -6,7 +6,7 @@ import logging import pytest -from qutebrowser.browser.webkit import http +from qutebrowser.browser.webkit import httpheaders DEFAULT_NAME = 'qutebrowser-download' @@ -30,7 +30,7 @@ class HeaderChecker: """Check if the passed header has the given filename.""" reply = self.stubs.FakeNetworkReply( headers={'Content-Disposition': header}) - cd_inline, cd_filename = http.parse_content_disposition(reply) + cd_inline, cd_filename = httpheaders.parse_content_disposition(reply) assert cd_filename is not None assert cd_filename == filename assert cd_inline == expected_inline @@ -40,7 +40,7 @@ class HeaderChecker: reply = self.stubs.FakeNetworkReply( headers={'Content-Disposition': header}) with self.caplog.at_level(logging.ERROR, 'network'): - cd_inline, cd_filename = http.parse_content_disposition(reply) + cd_inline, cd_filename = httpheaders.parse_content_disposition(reply) assert cd_filename == DEFAULT_NAME assert cd_inline @@ -48,7 +48,7 @@ class HeaderChecker: """Check if the passed header results in an unnamed attachment.""" reply = self.stubs.FakeNetworkReply( headers={'Content-Disposition': header}) - cd_inline, cd_filename = http.parse_content_disposition(reply) + cd_inline, cd_filename = httpheaders.parse_content_disposition(reply) assert cd_filename == DEFAULT_NAME assert not cd_inline @@ -164,7 +164,7 @@ class TestAttachment: """ reply = stubs.FakeNetworkReply( headers={'Content-Disposition': 'attachment'}) - cd_inline, cd_filename = http.parse_content_disposition(reply) + cd_inline, cd_filename = httpheaders.parse_content_disposition(reply) assert not cd_inline assert cd_filename == DEFAULT_NAME diff --git a/tests/unit/browser/webkit/http/test_http.py b/tests/unit/browser/webkit/http/test_httpheaders.py similarity index 83% rename from tests/unit/browser/webkit/http/test_http.py rename to tests/unit/browser/webkit/http/test_httpheaders.py index 210d79486..7368575e8 100644 --- a/tests/unit/browser/webkit/http/test_http.py +++ b/tests/unit/browser/webkit/http/test_httpheaders.py @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: GPL-3.0-or-later -"""Tests for qutebrowser.browser.webkit.http.""" +"""Tests for qutebrowser.browser.webkit.httpheaders.""" import logging @@ -11,7 +11,7 @@ import hypothesis from hypothesis import strategies from qutebrowser.qt.core import QUrl -from qutebrowser.browser.webkit import http +from qutebrowser.browser.webkit import httpheaders @pytest.mark.parametrize('url, expected', [ @@ -24,7 +24,7 @@ from qutebrowser.browser.webkit import http ]) def test_no_content_disposition(stubs, url, expected): reply = stubs.FakeNetworkReply(url=QUrl(url)) - inline, filename = http.parse_content_disposition(reply) + inline, filename = httpheaders.parse_content_disposition(reply) assert inline assert filename == expected @@ -40,8 +40,8 @@ def test_no_content_disposition(stubs, url, expected): # dropping QtWebKit. ]) def test_parse_content_disposition_invalid(value): - with pytest.raises(http.ContentDispositionError): - http.ContentDisposition.parse(value) + with pytest.raises(httpheaders.ContentDispositionError): + httpheaders.ContentDisposition.parse(value) @pytest.mark.parametrize('template', [ @@ -58,16 +58,16 @@ def test_parse_content_disposition_hypothesis(caplog, template, stubs, s): header = template.format(s) reply = stubs.FakeNetworkReply(headers={'Content-Disposition': header}) with caplog.at_level(logging.ERROR, 'network'): - http.parse_content_disposition(reply) + httpheaders.parse_content_disposition(reply) @hypothesis.given(strategies.binary()) def test_content_disposition_directly_hypothesis(s): """Test rfc6266 parsing directly with binary data.""" try: - cd = http.ContentDisposition.parse(s) + cd = httpheaders.ContentDisposition.parse(s) cd.filename() - except http.ContentDispositionError: + except httpheaders.ContentDispositionError: pass @@ -83,7 +83,7 @@ def test_parse_content_type(stubs, content_type, expected_mimetype, reply = stubs.FakeNetworkReply() else: reply = stubs.FakeNetworkReply(headers={'Content-Type': content_type}) - mimetype, rest = http.parse_content_type(reply) + mimetype, rest = httpheaders.parse_content_type(reply) assert mimetype == expected_mimetype assert rest == expected_rest @@ -91,4 +91,4 @@ def test_parse_content_type(stubs, content_type, expected_mimetype, @hypothesis.given(strategies.text()) def test_parse_content_type_hypothesis(stubs, s): reply = stubs.FakeNetworkReply(headers={'Content-Type': s}) - http.parse_content_type(reply) + httpheaders.parse_content_type(reply) From 642d63344cd6e5da1df654243f438784d80b3a3e Mon Sep 17 00:00:00 2001 From: toofar Date: Tue, 9 Apr 2024 08:19:16 +1200 Subject: [PATCH 58/67] Add backports.tarfile changelog link It's a new externalised dependency of jaraco.context, doesn't seem to have a RTD site yet. ref: https://github.com/jaraco/jaraco.context/commit/e13fc7f2b379683c326153a3d6f4d2800f812fd0 --- scripts/dev/changelog_urls.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/dev/changelog_urls.json b/scripts/dev/changelog_urls.json index 1401e516c..11f890d3b 100644 --- a/scripts/dev/changelog_urls.json +++ b/scripts/dev/changelog_urls.json @@ -125,7 +125,7 @@ "filelock": "https://github.com/tox-dev/py-filelock/releases", "github3.py": "https://github3.readthedocs.io/en/latest/release-notes/index.html", "manhole": "https://github.com/ionelmc/python-manhole/blob/master/CHANGELOG.rst", - "pycparser": "https://github.com/eliben/pycparser/blob/master/CHANGES", + "pycparser": "https://github.com/eliben/pycparser/blob/main/CHANGES", "python-dateutil": "https://dateutil.readthedocs.io/en/stable/changelog.html", "platformdirs": "https://github.com/platformdirs/platformdirs/releases", "pluggy": "https://github.com/pytest-dev/pluggy/blob/main/CHANGELOG.rst", @@ -145,6 +145,7 @@ "jaraco.classes": "https://jaracoclasses.readthedocs.io/en/latest/history.html", "jaraco.context": "https://jaracocontext.readthedocs.io/en/latest/history.html", "jaraco.functools": "https://jaracofunctools.readthedocs.io/en/latest/history.html", + "backports.tarfile": "https://github.com/jaraco/backports.tarfile/blob/main/NEWS.rst", "pkginfo": "https://bazaar.launchpad.net/~tseaver/pkginfo/trunk/view/head:/CHANGES.txt", "readme_renderer": "https://github.com/pypa/readme_renderer/blob/main/CHANGES.rst", "requests-toolbelt": "https://github.com/requests/toolbelt/blob/master/HISTORY.rst", From 7c2116751f0a3578ddea49c17b08edad5a64ce00 Mon Sep 17 00:00:00 2001 From: toofar Date: Tue, 9 Apr 2024 08:23:27 +1200 Subject: [PATCH 59/67] Ignore new mesa "error" log This only shows up on the webkit CI job. Probably something to do with the fact that we are using webkit builds from the distant archives. I'm sure it'll break for real one of these days. --- tests/end2end/fixtures/quteprocess.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/end2end/fixtures/quteprocess.py b/tests/end2end/fixtures/quteprocess.py index a6ad157f8..b1e4bbaab 100644 --- a/tests/end2end/fixtures/quteprocess.py +++ b/tests/end2end/fixtures/quteprocess.py @@ -75,6 +75,8 @@ def is_ignored_lowlevel_message(message): 'glx: failed to create drisw screen', 'failed to load driver: zink', 'DRI3 not available', + # Webkit on arch with a newer mesa + 'MESA: error: ZINK: failed to load libvulkan.so.1', ] return any(testutils.pattern_match(pattern=pattern, value=message) for pattern in ignored_messages) From f6b752ffb043d4b6ae02e7c8ea888dfa3458c5b7 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 9 Apr 2024 19:13:27 +0200 Subject: [PATCH 60/67] mypy: Remove show_error_codes Default since 0.991: https://mypy-lang.blogspot.com/2022/11/mypy-0990-released.html --- .mypy.ini | 1 - 1 file changed, 1 deletion(-) diff --git a/.mypy.ini b/.mypy.ini index e987da336..81f69a09e 100644 --- a/.mypy.ini +++ b/.mypy.ini @@ -22,7 +22,6 @@ disallow_any_unimported = True enable_error_code = ignore-without-code ### Output -show_error_codes = True show_error_context = True pretty = True From 031aff11bc357b19efd9daad6be9a338c86ab58f Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 9 Apr 2024 19:16:17 +0200 Subject: [PATCH 61/67] flake8: Remove redundant pytest style options Default since flake8-pytest-style 2.0.0: https://github.com/m-burst/flake8-pytest-style#change-log --- .flake8 | 2 -- 1 file changed, 2 deletions(-) diff --git a/.flake8 b/.flake8 index 01c259784..6c4dd923e 100644 --- a/.flake8 +++ b/.flake8 @@ -70,6 +70,4 @@ per-file-ignores = copyright-check = True copyright-regexp = # Copyright [\d-]+ .* copyright-min-file-size = 110 -pytest-fixture-no-parentheses = True -pytest-mark-no-parentheses = True pytest-parametrize-names-type = csv From 90ee0ea7103b656864f2f599240384d50d47d974 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 9 Apr 2024 19:22:22 +0200 Subject: [PATCH 62/67] Adjust changelog URLs --- scripts/dev/changelog_urls.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/dev/changelog_urls.json b/scripts/dev/changelog_urls.json index 11f890d3b..645bb6385 100644 --- a/scripts/dev/changelog_urls.json +++ b/scripts/dev/changelog_urls.json @@ -97,7 +97,7 @@ "PyQt5-Qt5": "https://www.riverbankcomputing.com/news", "PyQtWebEngine": "https://www.riverbankcomputing.com/news", "PyQtWebEngine-Qt5": "https://www.riverbankcomputing.com/news", - "PyQt-builder": "https://www.riverbankcomputing.com/news", + "PyQt-builder": "https://pyqt-builder.readthedocs.io/en/stable/releases.html", "PyQt5-sip": "https://www.riverbankcomputing.com/news", "PyQt5-stubs": "https://github.com/python-qt-tools/PyQt5-stubs/blob/master/CHANGELOG.md", "sip": "https://www.riverbankcomputing.com/news", @@ -125,7 +125,7 @@ "filelock": "https://github.com/tox-dev/py-filelock/releases", "github3.py": "https://github3.readthedocs.io/en/latest/release-notes/index.html", "manhole": "https://github.com/ionelmc/python-manhole/blob/master/CHANGELOG.rst", - "pycparser": "https://github.com/eliben/pycparser/blob/main/CHANGES", + "pycparser": "https://github.com/eliben/pycparser/releases", "python-dateutil": "https://dateutil.readthedocs.io/en/stable/changelog.html", "platformdirs": "https://github.com/platformdirs/platformdirs/releases", "pluggy": "https://github.com/pytest-dev/pluggy/blob/main/CHANGELOG.rst", From 295943060c1d4ddbb79109df8c09b2a599d8a956 Mon Sep 17 00:00:00 2001 From: Vanessa Frank Date: Thu, 11 Apr 2024 17:41:42 -0600 Subject: [PATCH 63/67] Changed line 35 of tor_identity userscript to stop it throwing an error when '--control-port' is passed --- misc/userscripts/tor_identity | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/userscripts/tor_identity b/misc/userscripts/tor_identity index 6b3828ed4..a6d7c9250 100755 --- a/misc/userscripts/tor_identity +++ b/misc/userscripts/tor_identity @@ -32,7 +32,7 @@ except ImportError: if __name__ == '__main__': parser = ArgumentParser(prog='tor_identity') - parser.add_argument('-c', '--control-port', default=9051, + parser.add_argument('-c', '--control-port', type=int, default=9051, help='Tor control port (default 9051).') parser.add_argument('-p', '--password', type=str, default=None, help='Tor control port password.') From 4e38b3e8df0bc08082c19d8659d08f15927abacd Mon Sep 17 00:00:00 2001 From: toofar Date: Sat, 13 Apr 2024 15:48:52 +1200 Subject: [PATCH 64/67] Ignore DIR_APP_DICTIONARIES message in release smoke test too We've already ignored this in the tests, it started showing up in the nightly builds a few days ago, only on macos for some reason. --- scripts/dev/build_release.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/dev/build_release.py b/scripts/dev/build_release.py index 65eef720c..40cedc2e8 100755 --- a/scripts/dev/build_release.py +++ b/scripts/dev/build_release.py @@ -171,6 +171,9 @@ def smoke_test(executable: pathlib.Path, debug: bool, qt5: bool) -> None: r'[0-9:]* WARNING: Qt WebEngine resources not found at .*', (r'[0-9:]* WARNING: Installed Qt WebEngine locales directory not found at ' r'location /qtwebengine_locales\. Trying application directory\.\.\.'), + # Qt 6.7, only seen on macos for some reason + (r'.*Path override failed for key base::DIR_APP_DICTIONARIES ' + r"and path '.*/qtwebengine_dictionaries'"), ]) elif IS_WINDOWS: stderr_whitelist.extend([ From afe6d4a5f19273b05796a256a626f35714f1bbee Mon Sep 17 00:00:00 2001 From: toofar Date: Sat, 13 Apr 2024 16:43:37 +1200 Subject: [PATCH 65/67] update changelog for #8162 --- doc/changelog.asciidoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc index f5395c750..098c4e929 100644 --- a/doc/changelog.asciidoc +++ b/doc/changelog.asciidoc @@ -33,6 +33,8 @@ Changed and bookmark categories). (#7955) - Elements with an ARIA `role="switch"` now get hints (toggle switches like e.g. on cookie banners). +- The `tor_identity` userscript now validates that the -c|--control-port + argument value is an int. (#8162) Fixed ~~~~~ From 6cb75b568a3a3241479527025c7c673cb05f454d Mon Sep 17 00:00:00 2001 From: qutebrowser bot Date: Mon, 15 Apr 2024 04:31:03 +0000 Subject: [PATCH 66/67] Update dependencies --- misc/requirements/requirements-dev.txt | 2 +- misc/requirements/requirements-flake8.txt | 2 +- misc/requirements/requirements-mypy.txt | 4 ++-- misc/requirements/requirements-pyinstaller.txt | 4 ++-- misc/requirements/requirements-pylint.txt | 2 +- misc/requirements/requirements-pyroma.txt | 4 ++-- misc/requirements/requirements-sphinx.txt | 2 +- misc/requirements/requirements-tests.txt | 10 +++++----- misc/requirements/requirements-tox.txt | 4 ++-- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/misc/requirements/requirements-dev.txt b/misc/requirements/requirements-dev.txt index 810c6da1b..59a1f8a03 100644 --- a/misc/requirements/requirements-dev.txt +++ b/misc/requirements/requirements-dev.txt @@ -10,7 +10,7 @@ cryptography==42.0.5 docutils==0.20.1 github3.py==4.0.1 hunter==3.6.1 -idna==3.6 +idna==3.7 importlib_metadata==7.1.0 importlib_resources==6.4.0 jaraco.classes==3.4.0 diff --git a/misc/requirements/requirements-flake8.txt b/misc/requirements/requirements-flake8.txt index 3f2d52014..fa541e4a8 100644 --- a/misc/requirements/requirements-flake8.txt +++ b/misc/requirements/requirements-flake8.txt @@ -3,7 +3,7 @@ attrs==23.2.0 flake8==7.0.0 flake8-bugbear==24.2.6 -flake8-builtins==2.4.0 +flake8-builtins==2.5.0 flake8-comprehensions==3.14.0 flake8-debugger==4.1.2 flake8-deprecated==2.2.1 diff --git a/misc/requirements/requirements-mypy.txt b/misc/requirements/requirements-mypy.txt index 8f6f90f6c..9bb872d13 100644 --- a/misc/requirements/requirements-mypy.txt +++ b/misc/requirements/requirements-mypy.txt @@ -1,7 +1,7 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py chardet==5.2.0 -diff_cover==8.0.3 +diff_cover==9.0.0 importlib_resources==6.4.0 Jinja2==3.1.3 lxml==5.2.1 @@ -16,6 +16,6 @@ types-colorama==0.4.15.20240311 types-docutils==0.20.0.20240406 types-Pygments==2.17.0.20240310 types-PyYAML==6.0.12.20240311 -types-setuptools==69.2.0.20240317 +types-setuptools==69.5.0.20240415 typing_extensions==4.11.0 zipp==3.18.1 diff --git a/misc/requirements/requirements-pyinstaller.txt b/misc/requirements/requirements-pyinstaller.txt index d8dc96e1c..6c4b1d43b 100644 --- a/misc/requirements/requirements-pyinstaller.txt +++ b/misc/requirements/requirements-pyinstaller.txt @@ -3,6 +3,6 @@ altgraph==0.17.4 importlib_metadata==7.1.0 packaging==24.0 -pyinstaller==6.5.0 -pyinstaller-hooks-contrib==2024.3 +pyinstaller==6.6.0 +pyinstaller-hooks-contrib==2024.4 zipp==3.18.1 diff --git a/misc/requirements/requirements-pylint.txt b/misc/requirements/requirements-pylint.txt index ab2cfafc6..94aac82a0 100644 --- a/misc/requirements/requirements-pylint.txt +++ b/misc/requirements/requirements-pylint.txt @@ -7,7 +7,7 @@ charset-normalizer==3.3.2 cryptography==42.0.5 dill==0.3.8 github3.py==4.0.1 -idna==3.6 +idna==3.7 isort==5.13.2 mccabe==0.7.0 pefile==2023.2.7 diff --git a/misc/requirements/requirements-pyroma.txt b/misc/requirements/requirements-pyroma.txt index f3926d842..141faf1cb 100644 --- a/misc/requirements/requirements-pyroma.txt +++ b/misc/requirements/requirements-pyroma.txt @@ -4,7 +4,7 @@ build==1.2.1 certifi==2024.2.2 charset-normalizer==3.3.2 docutils==0.20.1 -idna==3.6 +idna==3.7 importlib_metadata==7.1.0 packaging==24.0 Pygments==2.17.2 @@ -12,6 +12,6 @@ pyproject_hooks==1.0.0 pyroma==4.2 requests==2.31.0 tomli==2.0.1 -trove-classifiers==2024.3.25 +trove-classifiers==2024.4.10 urllib3==2.2.1 zipp==3.18.1 diff --git a/misc/requirements/requirements-sphinx.txt b/misc/requirements/requirements-sphinx.txt index ac0d905ae..7bb66c6a0 100644 --- a/misc/requirements/requirements-sphinx.txt +++ b/misc/requirements/requirements-sphinx.txt @@ -5,7 +5,7 @@ Babel==2.14.0 certifi==2024.2.2 charset-normalizer==3.3.2 docutils==0.20.1 -idna==3.6 +idna==3.7 imagesize==1.4.1 importlib_metadata==7.1.0 Jinja2==3.1.3 diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt index 5179a467d..0d8aa9bc4 100644 --- a/misc/requirements/requirements-tests.txt +++ b/misc/requirements/requirements-tests.txt @@ -9,18 +9,18 @@ cheroot==10.0.0 click==8.1.7 coverage==7.4.4 exceptiongroup==1.2.0 -execnet==2.1.0 -filelock==3.13.3 +execnet==2.1.1 +filelock==3.13.4 Flask==3.0.3 hunter==3.6.1 -hypothesis==6.100.0 -idna==3.6 +hypothesis==6.100.1 +idna==3.7 importlib_metadata==7.1.0 iniconfig==2.0.0 itsdangerous==2.1.2 jaraco.functools==4.0.0 # Jinja2==3.1.3 -Mako==1.3.2 +Mako==1.3.3 manhole==1.8.0 # MarkupSafe==2.1.5 more-itertools==10.2.0 diff --git a/misc/requirements/requirements-tox.txt b/misc/requirements/requirements-tox.txt index 9acc07370..afea097d0 100644 --- a/misc/requirements/requirements-tox.txt +++ b/misc/requirements/requirements-tox.txt @@ -4,13 +4,13 @@ cachetools==5.3.3 chardet==5.2.0 colorama==0.4.6 distlib==0.3.8 -filelock==3.13.3 +filelock==3.13.4 packaging==24.0 pip==24.0 platformdirs==4.2.0 pluggy==1.4.0 pyproject-api==1.6.1 -setuptools==69.2.0 +setuptools==69.5.1 tomli==2.0.1 tox==4.14.2 virtualenv==20.25.1 From 91be21aede589a8cb15a5288eedd74ca56f11e7b Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 16 Apr 2024 11:10:16 +0200 Subject: [PATCH 67/67] Avoid quitting when closing KDE file dialog See https://bugreports.qt.io/browse/QTBUG-124386 Fixes #8143 --- doc/changelog.asciidoc | 2 ++ qutebrowser/app.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc index 098c4e929..a33c537db 100644 --- a/doc/changelog.asciidoc +++ b/doc/changelog.asciidoc @@ -41,6 +41,8 @@ Fixed - `input.insert_mode.auto_load` sometimes not triggering due to a race condition. +- Worked around qutebrowser quitting when closing a KDE file dialog due to a Qt + bug. [[v3.1.1]] v3.1.1 (unreleased) diff --git a/qutebrowser/app.py b/qutebrowser/app.py index 015715eef..51603a2b9 100644 --- a/qutebrowser/app.py +++ b/qutebrowser/app.py @@ -132,6 +132,9 @@ def init(*, args: argparse.Namespace) -> None: crashsignal.crash_handler.init_faulthandler() objects.qapp.setQuitOnLastWindowClosed(False) + # WORKAROUND for KDE file dialogs / QEventLoopLocker quitting: + # https://bugreports.qt.io/browse/QTBUG-124386 + objects.qapp.setQuitLockEnabled(False) quitter.instance.shutting_down.connect(QApplication.closeAllWindows) _init_icon()