diff options
69 files changed, 325 insertions, 265 deletions
diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 63edf6812..af19f0185 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 2.5.2 +current_version = 2.5.4 commit = True message = Release v{new_version} tag = True @@ -4,6 +4,7 @@ exclude = .*,__pycache__,resources.py # B008: Do not perform calls in argument defaults. (fine with some Qt stuff) # B011: Do not call assert False since python -O removes these calls. Instead # callers should raise AssertionError(). +# B028: Missing stacklevel= for warnings # B305: .next() (false-positives) # E128: continuation line under-indented for visual indent # E226: missing whitespace around arithmetic operator @@ -61,7 +62,7 @@ min-version = 3.7.0 max-complexity = 12 per-file-ignores = qutebrowser/api/hook.py : N801 - tests/* : B011,D100,D101 + tests/* : B011,B028,D100,D101 tests/unit/browser/test_history.py : D100,D101,N806 tests/helpers/fixtures.py : D100,D101,N806 tests/unit/browser/webkit/http/test_content_disposition.py : D100,D101,D400 diff --git a/.github/SECURITY.md b/.github/SECURITY.md index 7df41b38e..a523b9bdb 100644 --- a/.github/SECURITY.md +++ b/.github/SECURITY.md @@ -1 +1,4 @@ Please report security bugs to [security@qutebrowser.org](mailto:security@qutebrowser.org). +(or if GPG encryption is desired, contact me@the-compiler.org with GPG ID [0x916EB0C8FD55A072](https://www.the-compiler.org/pubkey.asc)). + +Alternatively, [report a vulnerability](https://github.com/qutebrowser/qutebrowser/security/advisories/new) via GitHub's [private reporting feature](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability). diff --git a/.github/workflows/bleeding.yml b/.github/workflows/bleeding.yml index 586b3b79e..59da1dfad 100644 --- a/.github/workflows/bleeding.yml +++ b/.github/workflows/bleeding.yml @@ -11,7 +11,7 @@ jobs: tests: if: "github.repository == 'qutebrowser/qutebrowser'" runs-on: ubuntu-20.04 - timeout-minutes: 30 + timeout-minutes: 45 container: image: "qutebrowser/ci:archlinux-webengine-unstable" env: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b4fbf502b..d463df3f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,7 +84,7 @@ jobs: tests-docker: if: "!contains(github.event.head_commit.message, '[ci skip]')" - timeout-minutes: 30 + timeout-minutes: 45 runs-on: ubuntu-20.04 strategy: fail-fast: false @@ -207,7 +207,7 @@ jobs: if: "!contains(github.event.head_commit.message, '[ci skip]')" permissions: security-events: write - timeout-minutes: 30 + timeout-minutes: 45 runs-on: ubuntu-20.04 steps: - name: Checkout repository diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 8dba7e8b1..63bd607ff 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -18,6 +18,9 @@ jobs: - archlinux-webengine-qt6 steps: - uses: actions/checkout@v3 + with: + # FIXME:qt6 remove again once merged + ref: ${{ matrix.image == 'archlinux-webengine-qt6' && 'qt6-v2' || '' }} - uses: actions/setup-python@v4 with: python-version: '3.x' @@ -30,7 +33,7 @@ jobs: with: username: qutebrowser password: ${{ secrets.DOCKER_TOKEN }} - - uses: docker/build-push-action@v3 + - uses: docker/build-push-action@v4 with: file: scripts/dev/ci/docker/Dockerfile context: . diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 3d046615d..b9897943b 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -65,7 +65,7 @@ jobs: toxenv: build-release-qt6 name: qt6-windows-64bit-debug runs-on: "${{ matrix.os }}" - timeout-minutes: 30 + timeout-minutes: 45 steps: - uses: actions/checkout@v3 with: @@ -90,6 +90,7 @@ jobs: run: | echo "date=$(date +'%Y-%m-%d')" >> "$GITHUB_OUTPUT" echo "sha_short=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT" + shell: bash - name: Upload artifacts uses: actions/upload-artifact@v3 with: @@ -16,6 +16,8 @@ load-plugins=qute_pylint.config, pylint.extensions.typing, pylint.extensions.docparams, pylint.extensions.private_import, + pylint.extensions.dict_init_mutate, + pylint.extensions.dunder persistent=n py-version=3.7 diff --git a/README.asciidoc b/README.asciidoc index 97048dedb..4335a871c 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -24,9 +24,11 @@ It was inspired by other browsers/addons like dwb and Vimperator/Pentadactyl. **qutebrowser's primary maintainer, The-Compiler, is currently working part-time on qutebrowser, funded by donations.** To sustain this for a long time, your help is needed! See the -https://github.com/sponsors/The-Compiler/[GitHub Sponsors page] for more -information. Depending on your sign-up date and how long you keep a certain -level, you can get qutebrowser t-shirts, stickers and more! +https://github.com/sponsors/The-Compiler/[GitHub Sponsors page] or +https://github.com/qutebrowser/qutebrowser/blob/master/README.asciidoc#donating[alternative donation methods] +for more information. Depending on your sign-up date and how +long you keep a certain level, you can get qutebrowser t-shirts, stickers and +more! // QUTE_WEB_HIDE_END Screenshots @@ -66,8 +68,14 @@ ways: https://listi.jpberlin.de/mailman/listinfo/qutebrowser[mailinglist] at mailto:qutebrowser@lists.qutebrowser.org[]. -For security bugs, please contact me directly at mail@qutebrowser.org, GPG ID -https://www.the-compiler.org/pubkey.asc[0x916eb0c8fd55a072]. +Please report security bugs to security@qutebrowser.org +(or if GPG encryption is desired, contact me@the-compiler.org with GPG ID +https://www.the-compiler.org/pubkey.asc[0x916EB0C8FD55A072]). + +Alternatively, +https://github.com/qutebrowser/qutebrowser/security/advisories/new[report a vulnerability] +via GitHub's +https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability[private reporting feature]. Requirements ------------ @@ -141,6 +149,9 @@ Alternatively, the following donation methods are available -- note that eligibility for swag (shirts/stickers/etc.) is handled on a case-by-case basis for those, please mailto:mail@qutebrowser.org[get in touch] for details. +* https://liberapay.com/The-Compiler[Liberapay], which can handle payments + via Credit Card, SEPA bank transfers, or Paypal. Payment fees are paid by me, + but they are https://liberapay.com/about/faq#fees[relatively low]. * SEPA bank transfer inside Europe (**no fees**): - Account holder: Florian Bruhin - Country: Switzerland @@ -148,13 +159,16 @@ for those, please mailto:mail@qutebrowser.org[get in touch] for details. - IBAN (other): CH80 0900 0000 8711 8587 3 - Bank: PostFinance AG, Mingerstrasse 20, 3030 Bern, Switzerland (BIC: POFICHBEXXX) - If you need any other information: Contact me at mail@qutebrowser.org. + - If possible, **please consider yearly or semi-yearly donations**, because + of the additional overhead from many individual transactions for + bookkeeping/tax purposes. * PayPal: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=me%40the-compiler.org&item_name=qutebrowser¤cy_code=CHF&source=url[CHF], https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=me%40the-compiler.org&item_name=qutebrowser¤cy_code=EUR&source=url[EUR], https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=me%40the-compiler.org&item_name=qutebrowser¤cy_code=USD&source=url[USD]. **Note: Fees can be very high (around 5-40%, depending on the donated amounts)** - consider - using GitHub Sponsors (accepts credit cards or PayPal!) or SEPA bank transfers - instead. + using GitHub Sponsors (credit card), Liberapay (credit cards, PayPal, or bank + transfer) or SEPA bank transfers instead. * Cryptocurrencies: - Bitcoin: link:bitcoin:bc1q3ptyw8hxrcfz6ucfgmglphfvhqpy8xr6k25p00[bc1q3ptyw8hxrcfz6ucfgmglphfvhqpy8xr6k25p00] - Bitcoin Cash: link:bitcoincash:1BnxUbnJ5MrEPeh5nuUMx83tbiRAvqJV3N[1BnxUbnJ5MrEPeh5nuUMx83tbiRAvqJV3N] diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc index c4fb2d106..209042184 100644 --- a/doc/changelog.asciidoc +++ b/doc/changelog.asciidoc @@ -123,8 +123,18 @@ Fixed choose to remove them. Previously they would appear again on navigation. - Rare crash when running userscripts with crashed renderer processes. +[[v2.5.4]] +v2.5.4 (2023-03-13) +------------------- + +Fixed +~~~~~ + +- Support SQLite with DQS (double quoted string) compile time option turned + off. + [[v2.5.3]] -v2.5.3 (unreleased) +v2.5.3 (2023-02-17) ------------------- Added @@ -151,6 +161,7 @@ Fixed - The `readability` userscript now correctly passes the source URL to Breadability, to make relative links work. - Update `dictcli.py` to use the `main` branch, fixing a 404 error. +- Crash with some notification servers when the server did quit. - Minor documentation fixes [[v2.5.2]] diff --git a/doc/help/configuring.asciidoc b/doc/help/configuring.asciidoc index cab3df59a..9dba112d0 100644 --- a/doc/help/configuring.asciidoc +++ b/doc/help/configuring.asciidoc @@ -413,6 +413,8 @@ Pre-built colorschemes - https://gitlab.com/lovetocode999/selenized-qutebrowser[Selenized] - https://github.com/The-Compiler/dotfiles/blob/master/qutebrowser/gruvbox.py[gruvbox] - https://www.opencode.net/wakellor957/qb-breath/-/blob/main/qb-breath.py[Manjaro Breath-like] +- https://github.com/gicrisf/qute-city-lights[City Lights (matte dark)] +- https://github.com/catppuccin/qutebrowser[Catppuccin] Avoiding flake8 errors ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/doc/install.asciidoc b/doc/install.asciidoc index da211d850..c8be798df 100644 --- a/doc/install.asciidoc +++ b/doc/install.asciidoc @@ -388,21 +388,10 @@ qutebrowser from source. ==== Homebrew ---- -$ brew install qt -(build PyQt and PyQtWebEngine from source) +$ brew install pyqt@5 $ pip3 install qutebrowser ---- -NOTE: Homebrew does not package PyQtWebEngine (Python wrappers for -QtWebEngine), so you will need to build that from sources manually. - -Since the v1.0 release, qutebrowser uses QtWebEngine by default. - -Homebrew's builds of Qt and PyQt don't come with QtWebKit (and `--with-qtwebkit` -uses an old version of QtWebKit which qutebrowser doesn't support anymore). If -you want QtWebKit support, you'll need to build an up-to-date QtWebKit -https://github.com/annulen/webkit/wiki/Building-QtWebKit-on-OS-X[manually]. - Packagers --------- diff --git a/doc/quickstart.asciidoc b/doc/quickstart.asciidoc index b3e552aa5..1b513a371 100644 --- a/doc/quickstart.asciidoc +++ b/doc/quickstart.asciidoc @@ -62,9 +62,11 @@ qutebrowser's primary maintainer, The-Compiler, is currently working part-time o qutebrowser, funded by donations. To sustain this for a long time, your help is needed! Check the -https://github.com/sponsors/The-Compiler/[GitHub Sponsors page] for more information. -Depending on your sign-up date and how long you keep a certain level, you can get -qutebrowser t-shirts, stickers and more! +https://github.com/sponsors/The-Compiler/[GitHub Sponsors page] or +https://github.com/qutebrowser/qutebrowser/blob/master/README.asciidoc#donating[alternative +donation methods] for more information. Depending on your sign-up date and how +long you keep a certain level, you can get qutebrowser t-shirts, stickers and +more! Alternatively, there are also various options available for one-time donations, see the https://github.com/qutebrowser/qutebrowser/blob/master/README.asciidoc#donating[donation section] diff --git a/doc/qutebrowser.1.asciidoc b/doc/qutebrowser.1.asciidoc index 377cb512f..9dc921acd 100644 --- a/doc/qutebrowser.1.asciidoc +++ b/doc/qutebrowser.1.asciidoc @@ -133,8 +133,14 @@ If you prefer, you can also write to the https://listi.jpberlin.de/mailman/listinfo/qutebrowser[mailinglist] at mailto:qutebrowser@lists.qutebrowser.org[] instead. -For security bugs, please contact me directly at me@the-compiler.org, GPG ID -https://www.the-compiler.org/pubkey.asc[0xFD55A072]. +For security bugs, please contact security@qutebrowser.org (or if GPG +encryption is desired, contact me@the-compiler.org with GPG ID +https://www.the-compiler.org/pubkey.asc[0x916EB0C8FD55A072]). + +Alternatively, +https://github.com/qutebrowser/qutebrowser/security/advisories/new[report a vulnerability] +via GitHub's +https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability[private reporting feature]. == COPYRIGHT This program is free software: you can redistribute it and/or modify it under diff --git a/misc/org.qutebrowser.qutebrowser.appdata.xml b/misc/org.qutebrowser.qutebrowser.appdata.xml index 4f2880dc1..e75709d0c 100644 --- a/misc/org.qutebrowser.qutebrowser.appdata.xml +++ b/misc/org.qutebrowser.qutebrowser.appdata.xml @@ -44,6 +44,8 @@ </content_rating> <releases> <!-- Add new releases here --> +<release version="2.5.4" date="2023-03-13"/> +<release version="2.5.3" date="2023-02-17"/> <release version="2.5.2" date="2022-06-22"/> <release version="2.5.1" date="2022-05-26"/> <release version="2.5.0" date="2022-04-01"/> diff --git a/misc/requirements/requirements-check-manifest.txt b/misc/requirements/requirements-check-manifest.txt index f35ba3f3f..ebe2d377b 100644 --- a/misc/requirements/requirements-check-manifest.txt +++ b/misc/requirements/requirements-check-manifest.txt @@ -1,7 +1,7 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py -build==0.9.0 +build==0.10.0 check-manifest==0.49 -packaging==22.0 -pep517==0.13.0 +packaging==23.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 7eca59878..7c991e3d5 100644 --- a/misc/requirements/requirements-dev.txt +++ b/misc/requirements/requirements-dev.txt @@ -1,46 +1,48 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py -bleach==5.0.1 -build==0.9.0 +bleach==6.0.0 +build==0.10.0 bump2version==1.0.1 certifi==2022.12.7 cffi==1.15.1 -charset-normalizer==2.1.1 -commonmark==0.9.1 -cryptography==38.0.4 +charset-normalizer==3.0.1 +cryptography==39.0.2 docutils==0.19 github3.py==3.2.0 hunter==3.5.1 idna==3.4 -importlib-metadata==5.1.0 +importlib-metadata==6.0.0 +importlib-resources==5.12.0 jaraco.classes==3.2.3 jeepney==0.8.0 -keyring==23.11.0 +keyring==23.13.1 manhole==1.8.0 -more-itertools==9.0.0 -packaging==22.0 -pep517==0.13.0 -pkginfo==1.9.2 +markdown-it-py==2.2.0 +mdurl==0.1.2 +more-itertools==9.1.0 +packaging==23.0 +pkginfo==1.9.6 ply==3.11 pycparser==2.21 -Pygments==2.13.0 +Pygments==2.14.0 PyJWT==2.6.0 Pympler==1.0.1 -PyQt-builder==1.14.0 +pyproject_hooks==1.0.0 +PyQt-builder==1.14.1 python-dateutil==2.8.2 readme-renderer==37.3 -requests==2.28.1 +requests==2.28.2 requests-toolbelt==0.10.1 rfc3986==2.0.0 -rich==12.6.0 +rich==13.3.2 SecretStorage==3.3.3 -sip==6.7.5 +sip==6.7.7 six==1.16.0 toml==0.10.2 tomli==2.0.1 twine==4.0.2 -typing_extensions==4.4.0 +typing_extensions==4.5.0 uritemplate==4.1.1 -# urllib3==1.26.13 +# urllib3==1.26.14 webencodings==0.5.1 -zipp==3.11.0 +zipp==3.15.0 diff --git a/misc/requirements/requirements-flake8.txt b/misc/requirements/requirements-flake8.txt index e67ce883d..c34ed362b 100644 --- a/misc/requirements/requirements-flake8.txt +++ b/misc/requirements/requirements-flake8.txt @@ -1,23 +1,23 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py -attrs==22.1.0 +attrs==22.2.0 flake8==6.0.0 -flake8-bugbear==22.12.6 -flake8-builtins==2.0.1 +flake8-bugbear==23.2.13 +flake8-builtins==2.1.0 flake8-comprehensions==3.10.1 flake8-debugger==4.1.2 flake8-deprecated==2.0.1 -flake8-docstrings==1.6.0 +flake8-docstrings==1.7.0 flake8-future-import==0.4.7 flake8-plugin-utils==1.3.2 -flake8-pytest-style==1.6.0 +flake8-pytest-style==1.7.2 flake8-string-format==0.3.0 flake8-tidy-imports==4.8.0 flake8-tuple==0.4.1 mccabe==0.7.0 -pep8-naming==0.13.2 +pep8-naming==0.13.3 pycodestyle==2.10.0 -pydocstyle==6.1.1 +pydocstyle==6.3.0 pyflakes==3.0.1 six==1.16.0 snowballstemmer==2.2.0 diff --git a/misc/requirements/requirements-mypy.txt b/misc/requirements/requirements-mypy.txt index dbd21d0b4..71e0acde1 100644 --- a/misc/requirements/requirements-mypy.txt +++ b/misc/requirements/requirements-mypy.txt @@ -1,18 +1,18 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py chardet==5.1.0 -diff-cover==7.3.0 -importlib-metadata==5.1.0 -importlib-resources==5.10.1 +diff-cover==7.5.0 +importlib-metadata==6.0.0 +importlib-resources==5.12.0 Jinja2==3.1.2 -lxml==4.9.1 -MarkupSafe==2.1.1 -mypy==0.991 -mypy-extensions==0.4.3 +lxml==4.9.2 +MarkupSafe==2.1.2 +mypy==1.0.1 +mypy-extensions==1.0.0 pluggy==1.0.0 -Pygments==2.13.0 +Pygments==2.14.0 PyQt5-stubs==5.15.6.0 tomli==2.0.1 -types-PyYAML==6.0.12.2 -typing_extensions==4.4.0 -zipp==3.11.0 +types-PyYAML==6.0.12.8 +typing_extensions==4.5.0 +zipp==3.15.0 diff --git a/misc/requirements/requirements-pyinstaller.txt b/misc/requirements/requirements-pyinstaller.txt index 6c4cb4a77..3f1ec3249 100644 --- a/misc/requirements/requirements-pyinstaller.txt +++ b/misc/requirements/requirements-pyinstaller.txt @@ -1,5 +1,5 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py altgraph==0.17.3 -pyinstaller==5.7.0 -pyinstaller-hooks-contrib==2022.14 +pyinstaller==5.8.0 +pyinstaller-hooks-contrib==2023.0 diff --git a/misc/requirements/requirements-pylint.txt b/misc/requirements/requirements-pylint.txt index 12457a850..657c8ba80 100644 --- a/misc/requirements/requirements-pylint.txt +++ b/misc/requirements/requirements-pylint.txt @@ -1,30 +1,29 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py -astroid==2.12.13 +astroid==2.15.0 certifi==2022.12.7 cffi==1.15.1 -charset-normalizer==2.1.1 -cryptography==38.0.4 +charset-normalizer==3.0.1 +cryptography==39.0.2 dill==0.3.6 -future==0.18.2 github3.py==3.2.0 idna==3.4 -isort==5.10.1 -lazy-object-proxy==1.8.0 +isort==5.11.5 +lazy-object-proxy==1.9.0 mccabe==0.7.0 -pefile==2022.5.30 -platformdirs==2.6.0 +pefile==2023.2.7 +platformdirs==3.1.0 pycparser==2.21 PyJWT==2.6.0 -pylint==2.15.8 +pylint==2.16.3 python-dateutil==2.8.2 ./scripts/dev/pylint_checkers -requests==2.28.1 +requests==2.28.2 six==1.16.0 tomli==2.0.1 tomlkit==0.11.6 typed-ast==1.5.4 ; python_version<"3.8" -typing_extensions==4.4.0 +typing_extensions==4.5.0 uritemplate==4.1.1 -# urllib3==1.26.13 -wrapt==1.14.1 +# urllib3==1.26.14 +wrapt==1.15.0 diff --git a/misc/requirements/requirements-pylint.txt-raw b/misc/requirements/requirements-pylint.txt-raw index 54e12a02a..0873be8d5 100644 --- a/misc/requirements/requirements-pylint.txt-raw +++ b/misc/requirements/requirements-pylint.txt-raw @@ -1,4 +1,5 @@ pylint +astroid ./scripts/dev/pylint_checkers requests github3.py diff --git a/misc/requirements/requirements-pyqt-5.15.txt b/misc/requirements/requirements-pyqt-5.15.txt index 29836f343..90c31f0a2 100644 --- a/misc/requirements/requirements-pyqt-5.15.txt +++ b/misc/requirements/requirements-pyqt-5.15.txt @@ -1,7 +1,7 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py -PyQt5==5.15.7 # rq.filter: < 5.16 +PyQt5==5.15.9 # rq.filter: < 5.16 PyQt5-Qt5==5.15.2 -PyQt5-sip==12.11.0 +PyQt5-sip==12.11.1 PyQtWebEngine==5.15.6 # rq.filter: < 5.16 PyQtWebEngine-Qt5==5.15.2 diff --git a/misc/requirements/requirements-pyqt.txt b/misc/requirements/requirements-pyqt.txt index f200c1737..38b25477b 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 -PyQt5==5.15.7 +PyQt5==5.15.9 PyQt5-Qt5==5.15.2 -PyQt5-sip==12.11.0 +PyQt5-sip==12.11.1 PyQtWebEngine==5.15.6 PyQtWebEngine-Qt5==5.15.2 diff --git a/misc/requirements/requirements-pyroma.txt b/misc/requirements/requirements-pyroma.txt index 5702eafe8..116090665 100644 --- a/misc/requirements/requirements-pyroma.txt +++ b/misc/requirements/requirements-pyroma.txt @@ -1,15 +1,15 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py -build==0.9.0 +build==0.10.0 certifi==2022.12.7 -charset-normalizer==2.1.1 +charset-normalizer==3.0.1 docutils==0.19 idna==3.4 -packaging==22.0 -pep517==0.13.0 -Pygments==2.13.0 -pyroma==4.1 -requests==2.28.1 +packaging==23.0 +Pygments==2.14.0 +pyproject_hooks==1.0.0 +pyroma==4.2 +requests==2.28.2 tomli==2.0.1 -trove-classifiers==2022.12.1 -urllib3==1.26.13 +trove-classifiers==2023.2.20 +urllib3==1.26.14 diff --git a/misc/requirements/requirements-sphinx.txt b/misc/requirements/requirements-sphinx.txt index 98d43093f..fe1d3d001 100644 --- a/misc/requirements/requirements-sphinx.txt +++ b/misc/requirements/requirements-sphinx.txt @@ -1,26 +1,26 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py -alabaster==0.7.12 -Babel==2.11.0 +alabaster==0.7.13 +Babel==2.12.1 certifi==2022.12.7 -charset-normalizer==2.1.1 +charset-normalizer==3.0.1 docutils==0.19 idna==3.4 imagesize==1.4.1 -importlib-metadata==5.1.0 +importlib-metadata==6.0.0 Jinja2==3.1.2 -MarkupSafe==2.1.1 -packaging==22.0 -Pygments==2.13.0 -pytz==2022.6 -requests==2.28.1 +MarkupSafe==2.1.2 +packaging==23.0 +Pygments==2.14.0 +pytz==2022.7.1 +requests==2.28.2 snowballstemmer==2.2.0 -Sphinx==5.3.0 -sphinxcontrib-applehelp==1.0.2 +Sphinx==6.1.3 +sphinxcontrib-applehelp==1.0.4 sphinxcontrib-devhelp==1.0.2 -sphinxcontrib-htmlhelp==2.0.0 +sphinxcontrib-htmlhelp==2.0.1 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 -urllib3==1.26.13 -zipp==3.11.0 +urllib3==1.26.14 +zipp==3.15.0 diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt index bd944c934..1a93db3fa 100644 --- a/misc/requirements/requirements-tests.txt +++ b/misc/requirements/requirements-tests.txt @@ -1,35 +1,35 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py -attrs==22.1.0 -beautifulsoup4==4.11.1 +attrs==22.2.0 +beautifulsoup4==4.11.2 certifi==2022.12.7 -charset-normalizer==2.1.1 +charset-normalizer==3.0.1 cheroot==9.0.0 click==8.1.3 -coverage==6.5.0 -exceptiongroup==1.0.4 +coverage==7.2.1 +exceptiongroup==1.1.0 execnet==1.9.0 -filelock==3.8.2 -Flask==2.2.2 +filelock==3.9.0 +Flask==2.2.3 hunter==3.5.1 -hypothesis==6.61.0 +hypothesis==6.68.2 idna==3.4 -importlib-metadata==5.1.0 -iniconfig==1.1.1 +importlib-metadata==6.0.0 +iniconfig==2.0.0 itsdangerous==2.1.2 -jaraco.functools==3.5.2 +jaraco.functools==3.6.0 # Jinja2==3.1.2 Mako==1.2.4 manhole==1.8.0 -# MarkupSafe==2.1.1 -more-itertools==9.0.0 -packaging==22.0 +# MarkupSafe==2.1.2 +more-itertools==9.1.0 +packaging==23.0 parse==1.19.0 parse-type==0.6.0 pluggy==1.0.0 py-cpuinfo==9.0.0 -Pygments==2.13.0 -pytest==7.2.0 +Pygments==2.14.0 +pytest==7.2.2 pytest-bdd==6.1.1 pytest-benchmark==4.0.0 pytest-cov==4.0.0 @@ -37,20 +37,20 @@ pytest-instafail==0.4.2 pytest-mock==3.10.0 pytest-qt==4.2.0 pytest-repeat==0.9.1 -pytest-rerunfailures==10.3 -pytest-xdist==3.1.0 +pytest-rerunfailures==11.1.1 +pytest-xdist==3.2.0 pytest-xvfb==2.0.0 PyVirtualDisplay==3.0 -requests==2.28.1 +requests==2.28.2 requests-file==1.5.1 six==1.16.0 sortedcontainers==2.4.0 -soupsieve==2.3.2.post1 +soupsieve==2.4 tldextract==3.4.0 toml==0.10.2 tomli==2.0.1 -typing_extensions==4.4.0 -urllib3==1.26.13 -vulture==2.6 -Werkzeug==2.2.2 -zipp==3.11.0 +typing_extensions==4.5.0 +urllib3==1.26.14 +vulture==2.7 +Werkzeug==2.2.3 +zipp==3.15.0 diff --git a/misc/requirements/requirements-tox.txt b/misc/requirements/requirements-tox.txt index 814faeae4..ae958a44c 100644 --- a/misc/requirements/requirements-tox.txt +++ b/misc/requirements/requirements-tox.txt @@ -1,17 +1,17 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py -cachetools==5.2.0 +cachetools==5.3.0 chardet==5.1.0 colorama==0.4.6 distlib==0.3.6 -filelock==3.8.2 -packaging==22.0 -pip==22.3.1 -platformdirs==2.6.0 +filelock==3.9.0 +packaging==23.0 +pip==23.0.1 +platformdirs==3.1.0 pluggy==1.0.0 -pyproject_api==1.2.1 -setuptools==65.6.3 +pyproject_api==1.5.0 +setuptools==67.5.0 tomli==2.0.1 -tox==4.0.8 -virtualenv==20.17.1 +tox==4.4.6 +virtualenv==20.20.0 wheel==0.38.4 diff --git a/misc/requirements/requirements-vulture.txt b/misc/requirements/requirements-vulture.txt index 7d0ef20d3..f72d24a67 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.6 +vulture==2.7 diff --git a/misc/requirements/requirements-yamllint.txt b/misc/requirements/requirements-yamllint.txt index f825718e9..9ffdfc511 100644 --- a/misc/requirements/requirements-yamllint.txt +++ b/misc/requirements/requirements-yamllint.txt @@ -1,5 +1,5 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py -pathspec==0.10.3 +pathspec==0.11.0 PyYAML==6.0 -yamllint==1.28.0 +yamllint==1.29.0 diff --git a/misc/userscripts/tor_identity b/misc/userscripts/tor_identity index a08f4f006..a6cd73db9 100755 --- a/misc/userscripts/tor_identity +++ b/misc/userscripts/tor_identity @@ -21,7 +21,7 @@ # Change your tor identity. # # Set a hotkey to launch this script, then: -# :bind ti spawn --userscript tor_identity PASSWORD +# :bind ti spawn --userscript tor_identity -p PASSWORD # # Use the hotkey to change your tor identity, press 'ti' to change it. # https://stem.torproject.org/faq.html#how-do-i-request-a-new-identity-from-tor diff --git a/qutebrowser/__init__.py b/qutebrowser/__init__.py index df320f996..ad65ac371 100644 --- a/qutebrowser/__init__.py +++ b/qutebrowser/__init__.py @@ -26,7 +26,7 @@ __copyright__ = "Copyright 2014-2021 Florian Bruhin (The Compiler)" __license__ = "GPL" __maintainer__ = __author__ __email__ = "mail@qutebrowser.org" -__version__ = "2.5.2" +__version__ = "2.5.4" __version_info__ = tuple(int(part) for part in __version__.split('.')) __description__ = "A keyboard-driven, vim-like browser based on Python and Qt." diff --git a/qutebrowser/browser/browsertab.py b/qutebrowser/browser/browsertab.py index 3104c15b3..95851b7f0 100644 --- a/qutebrowser/browser/browsertab.py +++ b/qutebrowser/browser/browsertab.py @@ -495,7 +495,7 @@ class AbstractZoom(QObject): raise ValueError("Can't zoom to factor {}!".format(factor)) default_zoom_factor = float(config.val.zoom.default) / 100 - self._default_zoom_changed = (factor != default_zoom_factor) + self._default_zoom_changed = factor != default_zoom_factor self._zoom_factor = factor self._set_factor_internal(factor) diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index 4fbfe9e08..84f217a38 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -1306,9 +1306,8 @@ class CommandDispatcher: was_added = bookmark_manager.add(url, title, toggle=toggle) except urlmarks.Error as e: raise cmdutils.CommandError(str(e)) - else: - msg = "Bookmarked {}" if was_added else "Removed bookmark {}" - message.info(msg.format(url.toDisplayString())) + msg = "Bookmarked {}" if was_added else "Removed bookmark {}" + message.info(msg.format(url.toDisplayString())) @cmdutils.register(instance='command-dispatcher', scope='window', maxsplit=0) diff --git a/qutebrowser/browser/history.py b/qutebrowser/browser/history.py index 312edfc13..fa0e3e173 100644 --- a/qutebrowser/browser/history.py +++ b/qutebrowser/browser/history.py @@ -217,19 +217,19 @@ class WebHistory(sql.SqlTable): self.create_index('HistoryIndex', 'url') self.create_index('HistoryAtimeIndex', 'atime') self._contains_query = self.contains_query('url') - self._between_query = self.database.query('SELECT * FROM History ' - 'where not redirect ' - 'and not url like "qute://%" ' - 'and atime > :earliest ' - 'and atime <= :latest ' - 'ORDER BY atime desc') - - self._before_query = self.database.query('SELECT * FROM History ' - 'where not redirect ' - 'and not url like "qute://%" ' - 'and atime <= :latest ' - 'ORDER BY atime desc ' - 'limit :limit offset :offset') + self._between_query = self.database.query("SELECT * FROM History " + "where not redirect " + "and not url like 'qute://%' " + "and atime > :earliest " + "and atime <= :latest " + "ORDER BY atime desc") + + self._before_query = self.database.query("SELECT * FROM History " + "where not redirect " + "and not url like 'qute://%' " + "and atime <= :latest " + "ORDER BY atime desc " + "limit :limit offset :offset") def __repr__(self): return utils.get_repr(self, length=len(self)) diff --git a/qutebrowser/browser/network/pac.py b/qutebrowser/browser/network/pac.py index be25a2a41..c372c6eea 100644 --- a/qutebrowser/browser/network/pac.py +++ b/qutebrowser/browser/network/pac.py @@ -287,6 +287,8 @@ class PACFetcher(QObject): error = "Invalid encoding of a PAC file: {}" self._error_message = error.format(e) log.network.exception(self._error_message) + return + try: self._pac = PACResolver(pacscript) log.network.debug("Successfully evaluated PAC file.") @@ -294,6 +296,7 @@ class PACFetcher(QObject): error = "Error in PAC evaluation: {}" self._error_message = error.format(e) log.network.exception(self._error_message) + self._manager = None self._reply = None self.finished.emit() diff --git a/qutebrowser/browser/qutescheme.py b/qutebrowser/browser/qutescheme.py index 322066c3f..77be4ffda 100644 --- a/qutebrowser/browser/qutescheme.py +++ b/qutebrowser/browser/qutescheme.py @@ -566,9 +566,8 @@ def qute_pdfjs(url: QUrl) -> _HandlerRet: log.misc.warning( "pdfjs resource requested but not found: {}".format(e.path)) raise NotFoundError("Can't find pdfjs resource '{}'".format(e.path)) - else: - mimetype = utils.guess_mimetype(url.fileName(), fallback=True) - return mimetype, data + mimetype = utils.guess_mimetype(url.fileName(), fallback=True) + return mimetype, data @add_handler('warning') diff --git a/qutebrowser/browser/webengine/notification.py b/qutebrowser/browser/webengine/notification.py index 57f8586e3..8b67570a4 100644 --- a/qutebrowser/browser/webengine/notification.py +++ b/qutebrowser/browser/webengine/notification.py @@ -125,6 +125,10 @@ class DBusError(Error): # https://crashes.qutebrowser.org/view/8889d0b5 # Could not activate remote peer. "org.freedesktop.DBus.Error.NameHasNoOwner", + + # https://crashes.qutebrowser.org/view/de62220a + # after "Notification daemon did quit!" + "org.freedesktop.DBus.Error.UnknownObject", } def __init__(self, msg: QDBusMessage) -> None: diff --git a/qutebrowser/browser/webkit/http.py b/qutebrowser/browser/webkit/http.py index 104abf2d3..580c667c2 100644 --- a/qutebrowser/browser/webkit/http.py +++ b/qutebrowser/browser/webkit/http.py @@ -102,7 +102,7 @@ class ContentDisposition: if parsed.defects: defects = list(parsed.defects) - if defects != [cls._IGNORED_DEFECT]: # type: ignore[comparison-overlap] + if defects != [cls._IGNORED_DEFECT]: raise ContentDispositionError(defects) # https://github.com/python/mypy/issues/12314 diff --git a/qutebrowser/components/misccommands.py b/qutebrowser/components/misccommands.py index f1f6ccfc1..0b3a918d1 100644 --- a/qutebrowser/components/misccommands.py +++ b/qutebrowser/components/misccommands.py @@ -405,6 +405,7 @@ def debug_crash(typ: str = 'exception') -> None: Args: typ: either 'exception' or 'segfault'. """ + # pylint: disable=broad-exception-raised if typ == 'segfault': os.kill(os.getpid(), signal.SIGSEGV) raise Exception("Segfault failed (wat.)") diff --git a/qutebrowser/config/configdata.yml b/qutebrowser/config/configdata.yml index 4ceeea08f..a7a8cf005 100644 --- a/qutebrowser/config/configdata.yml +++ b/qutebrowser/config/configdata.yml @@ -721,14 +721,14 @@ content.headers.user_agent: # Vim-protip: Place your cursor below this comment and run # :r!python scripts/dev/ua_fetch.py - - "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, - like Gecko) Chrome/97.0.4692.99 Safari/537.36" - - Chrome 97 Win10 + like Gecko) Chrome/110.0.0.0 Safari/537.36" + - Chrome 110 Win10 - - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 - (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36" - - Chrome 97 macOS + (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36" + - Chrome 110 macOS - - "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like - Gecko) Chrome/97.0.4692.99 Safari/537.36" - - Chrome 97 Linux + Gecko) Chrome/110.0.0.0 Safari/537.36" + - Chrome 110 Linux supports_pattern: true desc: | User agent to send. diff --git a/qutebrowser/config/configtypes.py b/qutebrowser/config/configtypes.py index 17952e55a..2b2b572ab 100644 --- a/qutebrowser/config/configtypes.py +++ b/qutebrowser/config/configtypes.py @@ -1106,7 +1106,7 @@ class QtColor(BaseType): mult = 359.0 if kind == 'h' else 255.0 if val.endswith('%'): val = val[:-1] - mult = mult / 100 + mult /= 100 try: return int(float(val) * mult) diff --git a/qutebrowser/misc/sessions.py b/qutebrowser/misc/sessions.py index 53f7bf3d3..b96764d81 100644 --- a/qutebrowser/misc/sessions.py +++ b/qutebrowser/misc/sessions.py @@ -560,19 +560,17 @@ def session_load(name: str, *, except SessionError as e: raise cmdutils.CommandError("Error while loading session: {}" .format(e)) - else: - if clear: - for win in old_windows: - win.close() - if delete: - try: - session_manager.delete(name) - except SessionError as e: - log.sessions.exception("Error while deleting session!") - raise cmdutils.CommandError("Error while deleting session: {}" - .format(e)) - else: - log.sessions.debug("Loaded & deleted session {}.".format(name)) + if clear: + for win in old_windows: + win.close() + if delete: + try: + session_manager.delete(name) + except SessionError as e: + log.sessions.exception("Error while deleting session!") + raise cmdutils.CommandError("Error while deleting session: {}" + .format(e)) + log.sessions.debug("Loaded & deleted session {}.".format(name)) @cmdutils.register() @@ -618,11 +616,10 @@ def session_save(name: ArgType = default, *, with_history=not no_history) except SessionError as e: raise cmdutils.CommandError("Error while saving session: {}".format(e)) + if quiet: + log.sessions.debug("Saved session {}.".format(name)) else: - if quiet: - log.sessions.debug("Saved session {}.".format(name)) - else: - message.info("Saved session {}.".format(name)) + message.info("Saved session {}.".format(name)) @cmdutils.register() @@ -645,8 +642,7 @@ def session_delete(name: str, *, force: bool = False) -> None: log.sessions.exception("Error while deleting session!") raise cmdutils.CommandError("Error while deleting session: {}" .format(e)) - else: - log.sessions.debug("Deleted session {}.".format(name)) + log.sessions.debug("Deleted session {}.".format(name)) def load_default(name): diff --git a/qutebrowser/utils/standarddir.py b/qutebrowser/utils/standarddir.py index e63b43548..b54e28d17 100644 --- a/qutebrowser/utils/standarddir.py +++ b/qutebrowser/utils/standarddir.py @@ -330,8 +330,10 @@ def _create(path: str) -> None: for k, v in os.environ.items(): if k == 'HOME' or k.startswith('XDG_'): log.init.debug(f"{k} = {v}") - raise Exception("Trying to create directory inside /home during " - "tests, this should not happen.") + raise AssertionError( + "Trying to create directory inside /home during " + "tests, this should not happen." + ) os.makedirs(path, 0o700, exist_ok=True) diff --git a/qutebrowser/utils/version.py b/qutebrowser/utils/version.py index 9a2fe80f3..d1bb7d495 100644 --- a/qutebrowser/utils/version.py +++ b/qutebrowser/utils/version.py @@ -528,7 +528,7 @@ def _get_pyqt_webengine_qt_version() -> Optional[str]: import importlib.metadata as importlib_metadata # type: ignore[import] except ImportError: try: - import importlib_metadata # type: ignore[no-redef] + import importlib_metadata except ImportError: log.misc.debug("Neither importlib.metadata nor backport available") return None diff --git a/requirements.txt b/requirements.txt index 2e993e977..87652ace0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,14 +2,14 @@ adblock==0.6.0 colorama==0.4.6 -importlib-metadata==5.1.0 ; python_version=="3.7.*" -importlib-resources==5.10.1 ; python_version=="3.7.*" or python_version=="3.8.*" +importlib-metadata==6.0.0 ; python_version=="3.7.*" +importlib-resources==5.12.0 ; python_version=="3.7.*" or python_version=="3.8.*" Jinja2==3.1.2 -MarkupSafe==2.1.1 -Pygments==2.13.0 +MarkupSafe==2.1.2 +Pygments==2.14.0 PyYAML==6.0 -typing_extensions==4.4.0 ; python_version<"3.8" -zipp==3.11.0 +typing_extensions==4.5.0 ; python_version<"3.8" +zipp==3.15.0 # Unpinned due to recompile_requirements.py limitations pyobjc-core ; sys_platform=="darwin" pyobjc-framework-Cocoa ; sys_platform=="darwin" diff --git a/scripts/dev/build_release.py b/scripts/dev/build_release.py index f5d88b4ce..3ac48ad55 100755 --- a/scripts/dev/build_release.py +++ b/scripts/dev/build_release.py @@ -249,7 +249,7 @@ def smoke_test(executable: pathlib.Path, debug: bool, qt6: bool) -> None: "", ] - raise Exception("\n".join(lines)) + raise Exception("\n".join(lines)) # pylint: disable=broad-exception-raised def verify_windows_exe(exe_path: pathlib.Path) -> None: @@ -354,7 +354,7 @@ def build_mac( gh_token=gh_token) utils.print_title("Building .app via pyinstaller") - call_tox(f'pyinstaller-64{"-qt6" if qt6 else ""}', '-r', debug=debug) + call_tox(f'pyinstaller-64bit{"-qt6" if qt6 else ""}', '-r', debug=debug) utils.print_title("Patching .app") patch_mac_app(qt6=qt6) utils.print_title("Re-signing .app") @@ -438,8 +438,9 @@ def _build_windows_single( _maybe_remove(out_path) python = _get_windows_python_path(x64=x64) - suffix = "64" if x64 else "32" + suffix = "64bit" if x64 else "32bit" if qt6: + # FIXME:qt6 does this regress 391623d5ec983ecfc4512c7305c4b7a293ac3872? suffix += "-qt6" call_tox(f'pyinstaller-{suffix}', '-r', python=python, debug=debug) @@ -638,7 +639,7 @@ def read_github_token( if optional: return None else: - raise Exception( + raise Exception( # pylint: disable=broad-exception-raised "GitHub token needed, but ~/.gh_token not found, " "and --gh-token not given.") @@ -654,6 +655,7 @@ def github_upload(artifacts: List[Artifact], tag: str, gh_token: str) -> None: tag: The name of the release tag gh_token: The GitHub token to use """ + # pylint: disable=broad-exception-raised import github3 import github3.exceptions utils.print_title("Uploading to github...") diff --git a/scripts/dev/changelog_urls.json b/scripts/dev/changelog_urls.json index 06a7396e3..1946017b3 100644 --- a/scripts/dev/changelog_urls.json +++ b/scripts/dev/changelog_urls.json @@ -2,7 +2,7 @@ "pylint": "https://pylint.pycqa.org/en/latest/whatsnew/2/index.html", "tomlkit": "https://github.com/sdispater/tomlkit/blob/master/CHANGELOG.md", "dill": "https://github.com/uqfoundation/dill/commits/master", - "isort": "https://pycqa.github.io/isort/CHANGELOG/", + "isort": "https://github.com/PyCQA/isort/blob/main/CHANGELOG.md", "lazy-object-proxy": "https://github.com/ionelmc/python-lazy-object-proxy/blob/master/CHANGELOG.rst", "mccabe": "https://github.com/PyCQA/mccabe#changes", "pytest-cov": "https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst", @@ -41,7 +41,7 @@ "Jinja2": "https://jinja.palletsprojects.com/en/latest/changes/", "MarkupSafe": "https://markupsafe.palletsprojects.com/en/latest/changes/", "flake8": "https://github.com/PyCQA/flake8/tree/main/docs/source/release-notes", - "flake8-docstrings": "https://pypi.org/project/flake8-docstrings/", + "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-bugbear": "https://github.com/PyCQA/flake8-bugbear#change-log", @@ -92,7 +92,6 @@ "urllib3": "https://github.com/urllib3/urllib3/blob/main/CHANGES.rst", "lxml": "https://github.com/lxml/lxml/blob/master/CHANGES.txt", "wrapt": "https://github.com/GrahamDumpleton/wrapt/blob/develop/docs/changes.rst", - "pep517": "https://github.com/pypa/pep517/blob/main/doc/changelog.rst", "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", @@ -141,7 +140,6 @@ "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", - "future": "https://python-future.org/whatsnew.html", "pefile": "https://github.com/erocarrera/pefile/commits/master", "SecretStorage": "https://github.com/mitya57/secretstorage/blob/master/changelog", "bleach": "https://github.com/mozilla/bleach/blob/main/CHANGES", @@ -155,11 +153,13 @@ "twine": "https://twine.readthedocs.io/en/stable/changelog.html", "webencodings": "https://github.com/gsnedders/python-webencodings/commits/master", "PyJWT": "https://github.com/jpadilla/pyjwt/blob/master/CHANGELOG.rst", - "commonmark": "https://github.com/readthedocs/commonmark.py/blob/master/CHANGELOG.md", "rich": "https://github.com/Textualize/rich/blob/master/CHANGELOG.md", "ply": "https://github.com/dabeaz/ply/blob/master/CHANGES", "pyobjc-core": "https://pyobjc.readthedocs.io/en/latest/changelog.html", "pyobjc-framework-Cocoa": "https://pyobjc.readthedocs.io/en/latest/changelog.html", "trove-classifiers": "https://github.com/pypa/trove-classifiers/commits/main", - "asciidoc": "https://asciidoc-py.github.io/CHANGELOG.html" + "asciidoc": "https://asciidoc-py.github.io/CHANGELOG.html", + "pyproject_hooks": "https://pyproject-hooks.readthedocs.io/en/latest/changelog.html", + "markdown-it-py": "https://github.com/executablebooks/markdown-it-py/blob/master/CHANGELOG.md", + "mdurl": "https://github.com/executablebooks/mdurl/commits/master" } diff --git a/scripts/dev/ci/docker/Dockerfile.j2 b/scripts/dev/ci/docker/Dockerfile.j2 index fb0095194..0ca7d330d 100644 --- a/scripts/dev/ci/docker/Dockerfile.j2 +++ b/scripts/dev/ci/docker/Dockerfile.j2 @@ -1,9 +1,11 @@ FROM archlinux:latest +RUN pacman-key --init && pacman-key --populate {% if unstable %} RUN sed -i '/^# after the header/a[kde-unstable]\nInclude = /etc/pacman.d/mirrorlist\n\n[testing]\nInclude = /etc/pacman.d/mirrorlist\n\n[community-testing]\nInclude = /etc/pacman.d/mirrorlist' /etc/pacman.conf {% endif %} -RUN pacman -Suyy --noconfirm \ +RUN pacman -Sy --noconfirm archlinux-keyring +RUN pacman -Su --noconfirm \ git \ python-tox \ python-distlib \ @@ -29,11 +31,6 @@ RUN pacman -Suyy --noconfirm \ libyaml \ xorg-xdpyinfo -# WORKAROUND for https://bugs.archlinux.org/task/76720 -{% if unstable %} -RUN pacman -U --noconfirm https://archlinux.org/packages/extra/x86_64/mesa/download/ -{% endif %} - {% if not webengine %} RUN pacman -U --noconfirm \ https://archive.archlinux.org/packages/q/qt5-webkit/qt5-webkit-5.212.0alpha4-18-x86_64.pkg.tar.zst \ diff --git a/scripts/dev/src2asciidoc.py b/scripts/dev/src2asciidoc.py index 1267a278a..2ad4dd60b 100755 --- a/scripts/dev/src2asciidoc.py +++ b/scripts/dev/src2asciidoc.py @@ -499,6 +499,7 @@ def _format_block(filename, what, data): what: What to change (authors, options, etc.) data; A list of strings which is the new data. """ + # pylint: disable=broad-exception-raised what = what.upper() oshandle, tmpname = tempfile.mkstemp() try: @@ -525,9 +526,8 @@ def _format_block(filename, what, data): except: os.remove(tmpname) raise - else: - os.remove(filename) - shutil.move(tmpname, filename) + os.remove(filename) + shutil.move(tmpname, filename) def regenerate_manpage(filename): diff --git a/scripts/dev/update_3rdparty.py b/scripts/dev/update_3rdparty.py index b1991fa1f..71d7ae7b5 100755 --- a/scripts/dev/update_3rdparty.py +++ b/scripts/dev/update_3rdparty.py @@ -66,6 +66,7 @@ def download_nsis_plugins(): def find_pdfjs_asset(assets, legacy): """Find the PDF.js asset to use.""" + # pylint: disable=broad-exception-raised for asset in assets: name = asset["name"] if ( @@ -82,6 +83,7 @@ def get_latest_pdfjs_url(gh_token, legacy): Returns a (version, url)-tuple. """ + # pylint: disable=broad-exception-raised github_api = 'https://api.github.com' endpoint = 'repos/mozilla/pdf.js/releases/latest' request = urllib.request.Request(f'{github_api}/{endpoint}') diff --git a/tests/conftest.py b/tests/conftest.py index 134f967e9..f875ac3d9 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -302,7 +302,7 @@ def pytest_report_header(config): @pytest.fixture(scope='session', autouse=True) def check_display(request): if utils.is_linux and not os.environ.get('DISPLAY', ''): - raise Exception("No display and no Xvfb available!") + raise RuntimeError("No display and no Xvfb available!") @pytest.fixture(autouse=True) diff --git a/tests/end2end/fixtures/quteprocess.py b/tests/end2end/fixtures/quteprocess.py index 5745b5356..df3a15ff1 100644 --- a/tests/end2end/fixtures/quteprocess.py +++ b/tests/end2end/fixtures/quteprocess.py @@ -290,7 +290,7 @@ class QuteProc(testprocess.Process): profile = self.request.config.getoption('--qute-profile-subprocs') if hasattr(sys, 'frozen'): if profile: - raise Exception("Can't profile with sys.frozen!") + raise RuntimeError("Can't profile with sys.frozen!") executable = str(pathlib.Path(sys.executable).parent / 'qutebrowser') args = [] else: diff --git a/tests/end2end/test_invocations.py b/tests/end2end/test_invocations.py index 3730c887f..415aa5020 100644 --- a/tests/end2end/test_invocations.py +++ b/tests/end2end/test_invocations.py @@ -204,9 +204,9 @@ def test_misconfigured_user_dirs(request, server, temp_basedir_env, home = tmp_path / 'home' home.mkdir() temp_basedir_env['HOME'] = str(home) - config_userdir_dir = (tmp_path / 'config') + config_userdir_dir = tmp_path / 'config' config_userdir_dir.mkdir(parents=True) - config_userdir_file = (tmp_path / 'config' / 'user-dirs.dirs') + config_userdir_file = tmp_path / 'config' / 'user-dirs.dirs' config_userdir_file.touch() assert temp_basedir_env['XDG_CONFIG_HOME'] == str(tmp_path / 'config') @@ -307,7 +307,7 @@ def test_webengine_download_suffix(request, quteproc_new, tmp_path): (tmp_path / 'user-dirs.dirs').write_text( 'XDG_DOWNLOAD_DIR={}'.format(download_dir)) env = {'XDG_CONFIG_HOME': str(tmp_path)} - args = (['--temp-basedir'] + _base_args(request.config)) + args = ['--temp-basedir'] + _base_args(request.config) quteproc_new.start(args, env=env) quteproc_new.set_setting('downloads.location.prompt', 'false') diff --git a/tests/helpers/stubs.py b/tests/helpers/stubs.py index 493bfd55e..134028012 100644 --- a/tests/helpers/stubs.py +++ b/tests/helpers/stubs.py @@ -623,6 +623,10 @@ class FakeDownloadManager: return False +class FakeHistoryTick(Exception): + pass + + class FakeHistoryProgress: """Fake for a WebHistoryProgress object.""" @@ -641,7 +645,7 @@ class FakeHistoryProgress: def tick(self): if self._raise_on_tick: - raise Exception('tick-tock') + raise FakeHistoryTick('tick-tock') self._value += 1 def finish(self): diff --git a/tests/unit/browser/test_history.py b/tests/unit/browser/test_history.py index 20c76a23f..4997567d3 100644 --- a/tests/unit/browser/test_history.py +++ b/tests/unit/browser/test_history.py @@ -471,7 +471,7 @@ class TestRebuild: # Trigger a completion rebuild monkeypatch.setattr(web_history.database, 'user_version_changed', lambda: True) - with pytest.raises(Exception, match='tick-tock'): + with pytest.raises(stubs.FakeHistoryTick, match='tick-tock'): history.WebHistory(web_history.database, progress=progress) assert web_history.metainfo['force_rebuild'] diff --git a/tests/unit/browser/webengine/test_spell.py b/tests/unit/browser/webengine/test_spell.py index 2218b5c31..859f4209b 100644 --- a/tests/unit/browser/webengine/test_spell.py +++ b/tests/unit/browser/webengine/test_spell.py @@ -34,7 +34,7 @@ def test_version(message_mock, caplog): with caplog.at_level(logging.WARNING): assert spell.version('malformed_filename') is None msg = message_mock.getmsg(usertypes.MessageLevel.warning) - expected = ("Found a dictionary with a malformed name: malformed_filename") + expected = "Found a dictionary with a malformed name: malformed_filename" assert msg.text == expected diff --git a/tests/unit/browser/webkit/test_mhtml.py b/tests/unit/browser/webkit/test_mhtml.py index dabffeb78..2570850ea 100644 --- a/tests/unit/browser/webkit/test_mhtml.py +++ b/tests/unit/browser/webkit/test_mhtml.py @@ -94,8 +94,8 @@ def test_refuses_non_ascii_header_value(checker, header, value): 'root_content': b'', 'content_location': 'http://example.com', 'content_type': 'text/plain', + header: value, } - defaults[header] = value writer = mhtml.MHTMLWriter(**defaults) with pytest.raises(UnicodeEncodeError, match="'ascii' codec can't encode"): writer.write_to(checker.fp) diff --git a/tests/unit/components/test_misccommands.py b/tests/unit/components/test_misccommands.py index 342b39f64..3a4118fb4 100644 --- a/tests/unit/components/test_misccommands.py +++ b/tests/unit/components/test_misccommands.py @@ -78,7 +78,7 @@ def test_debug_trace_exception(mocker): """Check that exceptions thrown by hunter.trace are handled.""" def _mock_exception(): """Side effect for testing debug_trace's reraise.""" - raise Exception('message') + raise Exception('message') # pylint: disable=broad-exception-raised hunter_mock = mocker.patch.object(misccommands, 'hunter') hunter_mock.trace.side_effect = _mock_exception diff --git a/tests/unit/config/test_configexc.py b/tests/unit/config/test_configexc.py index ecb17373b..57d6391eb 100644 --- a/tests/unit/config/test_configexc.py +++ b/tests/unit/config/test_configexc.py @@ -59,7 +59,7 @@ def test_no_option_error(deleted, renamed, all_names, expected): def test_no_option_error_clash(): with pytest.raises(AssertionError): - configexc.NoOptionError('opt', deleted=True, renamed='foo') + _ = configexc.NoOptionError('opt', deleted=True, renamed='foo') def test_no_autoconfig_error(): diff --git a/tests/unit/config/test_configtypes.py b/tests/unit/config/test_configtypes.py index e5d66eeaa..d89083a86 100644 --- a/tests/unit/config/test_configtypes.py +++ b/tests/unit/config/test_configtypes.py @@ -249,12 +249,14 @@ class TestAll: configtypes.PercOrInt, # ditto ]: return - elif (isinstance(klass, functools.partial) and klass.func in [ - configtypes.ListOrValue, configtypes.FlagList, configtypes.List, - configtypes.Dict]): - # ListOrValue: "- /" -> "/" - # List: "- /" -> ["/"] - # Dict: '{":": "A"}' -> ':: A' + + # Dict and List deserialize to yaml but serialize to json, so we can't + # do a naive round trip test with them. For example: + # ListOrValue: "- /" -> "/" + # List: "- /" -> ["/"] + # Dict: ':: A' -> '{":": "A"}' + compound_types = (configtypes.ListOrValue, configtypes.List, configtypes.Dict) + if isinstance(typ, compound_types): return assert converted == s diff --git a/tests/unit/extensions/test_loader.py b/tests/unit/extensions/test_loader.py index e9b8055aa..488c3edc2 100644 --- a/tests/unit/extensions/test_loader.py +++ b/tests/unit/extensions/test_loader.py @@ -91,7 +91,7 @@ class _Hook: def __call__(self, *args): if self.raising: - raise Exception("Should not be called!") + raise AssertionError("Should not be called!") self.called = True diff --git a/tests/unit/misc/test_ipc.py b/tests/unit/misc/test_ipc.py index 9b6aa286c..2390c6f90 100644 --- a/tests/unit/misc/test_ipc.py +++ b/tests/unit/misc/test_ipc.py @@ -262,7 +262,7 @@ class TestSocketName: elif utils.is_linux: pass else: - raise Exception("Unexpected platform!") + raise AssertionError("Unexpected platform!") class TestExceptions: diff --git a/tests/unit/misc/test_sessions.py b/tests/unit/misc/test_sessions.py index ad4c6e7c3..a19f69761 100644 --- a/tests/unit/misc/test_sessions.py +++ b/tests/unit/misc/test_sessions.py @@ -286,7 +286,7 @@ class FakeWebView: def load_history(self, data): self.loaded_history = data if self.raise_error is not None: - raise self.raise_error # pylint: disable=raising-bad-type + raise self.raise_error @pytest.fixture diff --git a/tests/unit/misc/test_sql.py b/tests/unit/misc/test_sql.py index 38869f712..5e33a5a1e 100644 --- a/tests/unit/misc/test_sql.py +++ b/tests/unit/misc/test_sql.py @@ -473,7 +473,9 @@ class TestTransaction: with database.transaction(): my_table.insert({'column': 1}) my_table.insert({'column': 2}) - raise Exception('something went horribly wrong') - except Exception: + raise RuntimeError( + 'something went horribly wrong and the transaction will be aborted' + ) + except RuntimeError: pass assert database.query('select count(*) from my_table').run().value() == 0 diff --git a/tests/unit/utils/test_standarddir.py b/tests/unit/utils/test_standarddir.py index c7795d94a..ef1da5a07 100644 --- a/tests/unit/utils/test_standarddir.py +++ b/tests/unit/utils/test_standarddir.py @@ -266,7 +266,7 @@ class TestArguments: def test_basedir_relative(self, tmpdir): """Test --basedir with a relative path.""" - basedir = (tmpdir / 'basedir') + basedir = tmpdir / 'basedir' basedir.ensure(dir=True) with tmpdir.as_cwd(): args = types.SimpleNamespace(basedir='basedir') diff --git a/tests/unit/utils/test_utils.py b/tests/unit/utils/test_utils.py index f88af2bae..ad2c8b5f7 100644 --- a/tests/unit/utils/test_utils.py +++ b/tests/unit/utils/test_utils.py @@ -34,7 +34,7 @@ from qutebrowser.qt.core import QUrl, QRect, QPoint from qutebrowser.qt.gui import QClipboard import pytest import hypothesis -from hypothesis import strategies +from hypothesis import strategies, settings import yaml import qutebrowser @@ -425,7 +425,7 @@ class TestPreventExceptions: @utils.prevent_exceptions(42) def func_raising(self): - raise Exception + raise RuntimeError("something went wrong") def test_raising(self, caplog): """Test with a raising function.""" @@ -434,6 +434,7 @@ class TestPreventExceptions: assert ret == 42 expected = 'Error in test_utils.TestPreventExceptions.func_raising' assert caplog.messages == [expected] + assert caplog.records[0].exc_info[1].args[0] == "something went wrong" @utils.prevent_exceptions(42) def func_not_raising(self): @@ -448,7 +449,7 @@ class TestPreventExceptions: @utils.prevent_exceptions(42, True) def func_predicate_true(self): - raise Exception + raise RuntimeError("its-true") def test_predicate_true(self, caplog): """Test with a True predicate.""" @@ -456,15 +457,16 @@ class TestPreventExceptions: ret = self.func_predicate_true() assert ret == 42 assert len(caplog.records) == 1 + assert caplog.records[0].exc_info[1].args[0] == "its-true" @utils.prevent_exceptions(42, False) def func_predicate_false(self): - raise Exception + raise RuntimeError("its-false") def test_predicate_false(self, caplog): """Test with a False predicate.""" with caplog.at_level(logging.ERROR, 'misc'): - with pytest.raises(Exception): + with pytest.raises(RuntimeError, match="its-false"): self.func_predicate_false() assert not caplog.records @@ -546,13 +548,17 @@ class TestIsEnum: assert not utils.is_enum(23) +class SentinalException(Exception): + pass + + class TestRaises: """Test raises.""" def do_raise(self): """Helper function which raises an exception.""" - raise Exception + raise SentinalException def do_nothing(self): """Helper function which does nothing.""" @@ -571,15 +577,15 @@ class TestRaises: def test_no_args_true(self): """Test with no args and an exception which gets raised.""" - assert utils.raises(Exception, self.do_raise) + assert utils.raises(SentinalException, self.do_raise) def test_no_args_false(self): """Test with no args and an exception which does not get raised.""" - assert not utils.raises(Exception, self.do_nothing) + assert not utils.raises(SentinalException, self.do_nothing) def test_unrelated_exception(self): """Test with an unrelated exception.""" - with pytest.raises(Exception): + with pytest.raises(SentinalException): utils.raises(ValueError, self.do_raise) @@ -657,6 +663,7 @@ class TestSanitizeFilename: assert utils.sanitize_filename(name, replacement=None) == 'Bad File' @hypothesis.given(filename=strategies.text(min_size=100)) + @settings(max_examples=10) def test_invariants(self, filename): sanitized = utils.sanitize_filename(filename, shorten=True) assert len(os.fsencode(sanitized)) <= 255 - len("(123).download") @@ -891,7 +898,7 @@ def test_ceil_log_hypothesis(number, base): @pytest.mark.parametrize('number, base', [(64, 0), (0, 64), (64, -1), (-1, 64), (1, 1)]) def test_ceil_log_invalid(number, base): - with pytest.raises(Exception): # ValueError/ZeroDivisionError + with pytest.raises((ValueError, ZeroDivisionError)): math.log(number, base) with pytest.raises(ValueError): utils.ceil_log(number, base) @@ -170,7 +170,7 @@ commands = {envpython} scripts/dev/check_doc_changes.py {posargs} {envpython} scripts/asciidoc2html.py {posargs} -[testenv:pyinstaller-{64,32}{,-qt6}] +[testenv:pyinstaller-{64bit,32bit}{,-qt6}] basepython = {env:PYTHON:python3} passenv = APPDATA diff --git a/www/header.asciidoc b/www/header.asciidoc index 66f6f2bb3..de6268f2e 100644 --- a/www/header.asciidoc +++ b/www/header.asciidoc @@ -24,9 +24,11 @@ part-time on qutebrowser, funded by donations.</b></p> <p>To sustain this for a long time, your help is needed! See the -<a href="https://github.com/sponsors/The-Compiler/">GitHub Sponsors page</a> for more -information. Depending on your sign-up date and how long you keep a certain -level, you can get qutebrowser t-shirts, stickers and more! +<a href="https://github.com/sponsors/The-Compiler/">GitHub Sponsors page</a> or +<a href="https://github.com/qutebrowser/qutebrowser/blob/master/README.asciidoc#donating">alternative +donation methods</a> for more information. Depending on your sign-up date and +how long you keep a certain level, you can get qutebrowser t-shirts, stickers +and more! </p> </div> +++ |