Compare commits

...

3221 Commits
v2.2.1 ... main

Author SHA1 Message Date
Florian Bruhin 7e3df43463 Disable child focus workaround on unaffected Qt versions
The workaround added for #7820 seems to cause datalist dropdowns to lose focus
on Wayland. Let's just disable the old workaround on Qt versions that are not affected
by the original issue, which seems to be Qt 6.6.3+.

Fixes #8831.
2026-01-04 22:25:49 +01:00
Florian Bruhin 9ae082b29b version: Add QtWebEngine 6.9.3 2026-01-04 22:25:49 +01:00
dependabot[bot] b417f2a23b build(deps): bump peter-evans/create-pull-request from 7 to 8
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 7 to 8.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v7...v8)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-16 12:51:26 +01:00
dependabot[bot] 615cee7309 build(deps): bump actions/upload-artifact from 5 to 6
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5 to 6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-16 12:51:19 +01:00
dependabot[bot] 65c1ca9691 build(deps): bump actions/cache from 4 to 5
Bumps [actions/cache](https://github.com/actions/cache) from 4 to 5.
- [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/v4...v5)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-16 12:51:09 +01:00
qutebrowser bot 12bed611c5 Update dependencies 2025-12-15 17:05:29 +01:00
Florian Bruhin bc72687d7d Update changelog URLs 2025-12-08 16:55:52 +01:00
Florian Bruhin c32b7d4b60 Fix dependency update issues 2025-12-08 10:53:13 +01:00
qutebrowser bot 3f9ef123e7 Update dependencies 2025-12-08 04:29:09 +00:00
Florian Bruhin f2547f8a09 scripts: Make smoke test fail output less confusing 2025-11-30 18:46:03 +01:00
qutebrowser bot edd5114492 Release v3.6.3
(cherry picked from commit ee13dac738)
2025-11-30 17:37:53 +00:00
Florian Bruhin 184a242937 ci: Make sure git knows the main branch
Something seems to have changed about how sparse checkouts are done on GHA, so the main branch isn't found.
2025-11-30 18:35:05 +01:00
Florian Bruhin 17c19a09b7 build_release: Try to get more information on crashes
Currently CI crashes on macOS, but without any useful logs.
2025-11-30 18:11:25 +01:00
Florian Bruhin 88aa47c377 Add qt.workarounds.disable_accessibility setting
This disables accessibility with Qt 6.10.1, which
causes frequent segfaults.

Closes #8797
2025-11-30 17:54:33 +01:00
dependabot[bot] 0570545342 build(deps): bump actions/checkout from 5 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-30 00:15:59 +01:00
qutebrowser bot f408f20ad9 Release v3.6.2
(cherry picked from commit b2c5d5fa0d)
2025-11-27 20:57:13 +00:00
Florian Bruhin 500a8df209 Update user agents 2025-11-27 21:55:44 +01:00
Florian Bruhin 13d9904b90 Update changelog for v3.6.2 2025-11-27 21:29:21 +01:00
Florian Bruhin b3e4dba731 qtargs: Remove old workaround with Qt 6.10.1 2025-11-27 21:28:34 +01:00
qutebrowser bot 4164205663 Update dependencies 2025-11-27 17:21:32 +01:00
qutebrowser bot f5e2660890 Update dependencies 2025-11-24 16:37:39 +01:00
Florian Bruhin 69f3882ce3 tests: Skip hangouts extension test on Qt 5 2025-11-23 11:42:49 +01:00
Florian Bruhin 8e42727d31 Update changelog 2025-11-22 10:40:30 +01:00
Florian Bruhin 31a5737c61 Avoid disabling off-the-record profile Hangouts extension with Qt 6.10.1
Otherwise this results in a crash, see #8785
2025-11-22 10:38:46 +01:00
Florian Bruhin 8ae5e3d83b version: Use correct profile for extension list
See #8785
2025-11-21 22:50:52 +01:00
Florian Bruhin 4f40a8b46b tests: Improve test_version output 2025-11-21 18:39:24 +01:00
Florian Bruhin 59a64af67f tests: Adjust permissions storage workaround for Qt 6.10.1 2025-11-21 18:35:03 +01:00
Florian Bruhin 66cbe0d9c9 Add QtWebEngine 6.10.1 security patch version 2025-11-21 18:31:43 +01:00
Florian Bruhin 0ef5053a65 tests: Stabilize flaky session scrolling test
Equivalent of d8079515fa
See #5390
2025-11-18 15:00:20 +01:00
qutebrowser bot 6ddff3ae0d Update dependencies 2025-11-18 14:08:13 +01:00
Florian Bruhin 9316d428ef ci: Drop Archlinux Qt 5 images/jobs
For now, Qt 5 is still tested via the Qt 5.15 PyPI wheels.

See https://github.com/qutebrowser/qutebrowser/issues/8417#issuecomment-3495979318
https://lists.archlinux.org/archives/list/arch-dev-public@lists.archlinux.org/thread/U45C4RAW4IXVLO376XGFNLEGGFFXCULV/
2025-11-11 09:13:30 +01:00
Florian Bruhin 71ed8cdbf5 Update changelog 2025-11-11 09:09:05 +01:00
Florian Bruhin 62fdb15532 Merge commit 'bc191b798' 2025-11-11 09:07:00 +01:00
Florian Bruhin bc191b798d wmname: Remove trivial functions 2025-11-11 09:06:49 +01:00
Florian Bruhin f8fbb0609f Update changelog 2025-11-11 08:46:36 +01:00
Florian Bruhin 55fb26fce1 Revert "fix: change fullscreen state when switching tab"
This reverts commit b89bf07d1e.

This turned out to be annoying when enabling fullscreen manually and then
switching through tabs.
2025-11-11 08:45:55 +01:00
Jan Palus 25dc019886
Unify librarry loading for X11/Wayland wmname
libwayland-client.so is development symlink used during linking and there's no need to
have it installed (usually shipped in -devel/-dev packages) on user's machines. Instead
of hardcoding library file name, use same mechanism as in libX11 which let's Python
figure the details and share common logic between X11 and Wayland.

Fixes #8771
2025-11-11 00:51:05 +01:00
Florian Bruhin 81d7b6a74c tests: Use star-unpacking instead of itertools.chain
pytest will soon deprecate using a non-collection iterable in parametrize:
https://docs.pytest.org/en/latest/deprecations.html#parametrize-iterators
2025-11-10 13:02:26 +01:00
qutebrowser bot 6ec5504ab3 Update dependencies 2025-11-10 07:39:05 +01:00
Florian Bruhin 9b69c889ef doc: Add additional chrome:// pages 2025-11-07 11:45:51 +01:00
Florian Bruhin 4e87ef303f ci: Update macOS runners / versions
https://github.blog/changelog/2025-09-19-github-actions-macos-13-runner-image-is-closing-down/

- CI: Switch to macOS 15 Intel runner
  (macOS 14 is still tested with Apple Silicon)
- Nightly: Use macOS 15 Intel runner for nightly releases
  (macOS 14 would be better to align with actual Intel releases, but it is
  a -large runner, thus possibly metered)
- Releases: Use macOS 14 for Intel releases
  This is a -large runner, but releases don't happen often.
2025-11-05 16:51:43 +01:00
gesh 2f8234ee2e doc: Correct Arch Linux links
Arch hasn't been using the [community] repository for 9 months now[1],
correct the links for that.
Also, youtube-dl has been replaced in [extra] by yt-dlp[2][3], unsure
when -- I think this was in 2023?
Finally (and the trigger for this commit), given #8332, correct the
guidance on Arch Linux to point to pdfjs-legacy instead of pdfjs.

[1]: https://archlinux.org/news/cleaning-up-old-repositories/
[2]: https://aur.archlinux.org/packages/youtube-dl
[3]: https://archlinux.org/packages/extra/any/yt-dlp/
2025-11-05 14:26:04 +01:00
Florian Bruhin a8f0b47451 tests: Ignore more bogus Chromium messages 2025-11-03 18:32:17 +01:00
Florian Bruhin 4a5b7bd6e4 Update changelog 2025-11-03 18:10:24 +01:00
OmeletWithoutEgg b89bf07d1e fix: change fullscreen state when switching tab 2025-11-03 18:09:28 +01:00
Rebecca 70bf4689fc Fixed whitespace
Removed excess line of whitespace.
2025-11-03 18:09:01 +01:00
Rebecca 1cbb6fccf0 Fixed minor issue in configuration docs
The docs show an example for adding domain filtering for configuration options. However the example only matches the root of a domain rather than all pages on a domain which is for example, the default case when using the `tsh` shortcut to disable/enable javascript on a page.
2025-11-03 18:09:01 +01:00
Rebecca d3e4245d0f Improved logging for configuration loading
- When loading a configuration file, if the configuration uses domain filtering then the domain filter expression is logged in the debug log.
2025-11-03 18:09:01 +01:00
qutebrowser bot 3160048619 Release v3.6.1
(cherry picked from commit 2e5f805cce)
2025-11-03 15:30:02 +00:00
Florian Bruhin aa93eb1614 Adjust stack trace parsing for newer Python 2025-11-03 16:26:12 +01:00
qutebrowser bot df9cef3a58 Update dependencies 2025-11-03 06:33:33 +01:00
dependabot[bot] 214e2e9ac2 build(deps): bump actions/upload-artifact from 4 to 5
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-27 20:41:53 +01:00
qutebrowser bot 68574b88cc Update dependencies 2025-10-27 08:21:55 +01:00
Florian Bruhin 6e8e24050d Fix changelog 2025-10-26 23:02:14 +01:00
dependabot[bot] 5fe9bf97e3 build(deps): bump actions/setup-node from 5 to 6
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 5 to 6.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-25 22:36:25 +02:00
Florian Bruhin b646d606d7 Fix releasing focus when leaving command mode
The fix for #8223 in 6f21accfae
was misguided: We don't really care about the statusbar being hidden,
controlled release of keyboard focus needs to happen in any case where
we're hiding the command widget (as that's when we lose keyboard focus).

Fixes #8750.
2025-10-25 16:43:06 +02:00
Florian Bruhin 1e4ddc2c6b ci: Fix finding existing draft release 2025-10-24 17:02:41 +02:00
Florian Bruhin 3fce0518bd scripts: Avoid showing entire file tree diff in CI log 2025-10-24 17:00:19 +02:00
Florian Bruhin 3808ebfdb3 ci: Find existing draft release for reuploads 2025-10-24 16:23:03 +02:00
Florian Bruhin 0421aacd64 ci: Check out release branch for reuploads 2025-10-24 15:45:15 +02:00
Florian Bruhin 0c2a673e27 scripts: Clean up build_release 2025-10-24 15:06:20 +02:00
Florian Bruhin afa456f396 ci: Skip existing artifacts when reuploading
After a release failed and we want to retry,
some assets might already have been uploaded.

Skip those instead of attempting to reupload.
2025-10-24 14:53:40 +02:00
Florian Bruhin 461077b6cf ci: Fix reupload in script 2025-10-24 14:34:20 +02:00
Florian Bruhin e208f5e121 ci: Add ability to reupload after borked release 2025-10-24 14:33:24 +02:00
Florian Bruhin 0f320051e0 scripts: Ignore another line during smoke tests 2025-10-24 14:17:29 +02:00
Florian Bruhin ee40f13a30 Update release checklist
minor releases happen far more often
2025-10-24 14:17:29 +02:00
qutebrowser bot 06c4fac54a Release v3.6.0 2025-10-24 12:11:30 +00:00
Florian Bruhin 1392d55f53 Update changelog 2025-10-24 13:53:21 +02:00
Florian Bruhin 269d81371d Update user agents 2025-10-24 13:50:15 +02:00
qutebrowser bot 346a59a6f0 Update dependencies 2025-10-24 12:28:48 +02:00
Florian Bruhin d8079515fa tests: Stabilize flaky scrolling test
See #5390
2025-10-24 12:26:00 +02:00
Florian Bruhin 294534cf66 tests: Mark found lines more clearly 2025-10-24 12:25:45 +02:00
Florian Bruhin da9bd515fd scripts: Update build-release ignores for Qt 6.10 2025-10-24 12:05:35 +02:00
Florian Bruhin 5ac0cb97a8 Fix Qt 5 2025-10-24 00:01:28 +02:00
Florian Bruhin 242cf2a22e version: Add basic info about loaded WebExtensions 2025-10-23 23:24:40 +02:00
Florian Bruhin 6f9cf43d6d Fix mypy 2025-10-22 22:03:33 +02:00
Florian Bruhin 00b3bba99a Qt 6.10: Disable Hangouts extension via API
See https://github.com/qutebrowser/qutebrowser/issues/8694#issuecomment-3276414407
2025-10-22 21:45:48 +02:00
Florian Bruhin 111178358a tests: Add new ignores for Qt 6.10 + GHA + Windows
See #8694
2025-10-22 17:36:45 +02:00
Florian Bruhin e098609a8a Add missing PyQt 6.10 requirement files 2025-10-22 17:01:19 +02:00
Florian Bruhin 721ba1e036 Add PyQt 6.10 release
Needs --extra-index-url due to PyQt6-WebEngine-Qt6 missing because of PyPI size limits.
2025-10-22 16:03:46 +02:00
Florian Bruhin c5e7a73ab7 tests: Set pythonpath in pytest.ini
Makes pytest work without PYTHONPATH=. if running outside tox.
2025-10-22 16:03:46 +02:00
qutebrowser bot 67db09a9c9 Update dependencies 2025-10-20 12:16:34 +02:00
dependabot[bot] 4925715dfc build(deps): bump github/codeql-action from 3 to 4
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3 to 4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-13 20:30:12 +02:00
Florian Bruhin 6f8576b343 Update changelog 2025-10-13 17:59:44 +02:00
qutebrowser bot 7bffed47ed Update dependencies 2025-10-13 18:00:02 +02:00
Florian Bruhin 642c5fe2fe ci: Fix python versions, take 2 2025-10-12 15:03:49 +02:00
Florian Bruhin 621f20adb3 configcommands: Fix :config-list-remove with invalid value 2025-10-12 14:53:45 +02:00
Florian Bruhin 9d80bc2076 Fix Dict configtype hypothesis test
If dict keys are too long for YAML, .from_str()
will fail with a YAML parse error.

Closes #8530
2025-10-12 14:43:03 +02:00
Florian Bruhin 88415c6aa0 ci: Adjust Python versions
Run Python 3.14 with PyQt 6.9 instead of 6.8, and remove -dev
2025-10-12 13:39:57 +02:00
Florian Bruhin 5c2076ab2d tests: Add Qt.Key.Key_Keyboard
New in Qt 6.10:
https://codereview.qt-project.org/c/qt/qtbase/+/605015
2025-10-12 13:32:01 +02:00
Florian Bruhin 7b2773814b Update changelog 2025-10-12 13:17:48 +02:00
Florian Bruhin 467b9a7d4a Add site-specific quirk for gitlab.gnome.org
Fixes #8509
2025-10-12 13:17:43 +02:00
Florian Bruhin 816b8aaa00 Adjust comment for workaround 2025-10-12 01:16:30 +02:00
Florian Bruhin d38b5a423e Update changelog 2025-10-11 21:17:03 +02:00
Florian Bruhin 7f45b178c9 Adjust imports 2025-10-11 20:49:52 +02:00
Florian Bruhin 26368f0b90 Work around per-domain UA header not working on redirects
See https://bugreports.qt.io/browse/QTBUG-140515
Fixes #8679
2025-10-11 20:49:19 +02:00
Teddy ff76871f4e replacing os.path with pathlib 2025-10-11 17:14:45 +02:00
Florian Bruhin 9ddbc964d4 Fix hardware acceleration on Wayland with Qt <= 6.9
Equivalent to https://codereview.qt-project.org/c/qt/qtwebengine/+/663568

    Specify native platform for ANGLE's EGL backend on Wayland

    Set EGL_PLATFORM=wayland to force ANGLE to obtain EGL display connection
    for wayland platform. Otherwise, the display connection for
    EGL_DEFAULT_DISPLAY may belong to a platform which Nvidia's EGL driver
    doesn't support. In case of unsupported platform, EGL may fallback to
    Mesa software renderer (LLVMPipe) disabling hardware acceleration in
    Chromium.

Fixes #8637
2025-10-10 23:33:28 +02:00
Florian Bruhin 2b4e5757b0 Reenable accelerated 3D canvas on QtWebEngine 6.8.2+
Qt 6.8.2 has a more fine-grained workaround:
https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/606122

This never seems to have it made to Qt 6.9+, but I can't seem to reproduce the
issue anymore (neither with PDF.js nor with Google Sheets), even on older
affected Qt versions, even on older Intel hardware. Maybe something else (mesa
etc.?) changed and this was fixed there?

Let's reenable this and find out if it breaks things again for someone.

Fixes #8346
See #7489, #8001, #8006
2025-10-10 23:07:09 +02:00
Florian Bruhin ddfd17d749 Fix focus issues with fullscreen notification
This is conceptually similar to the release_focus
signal added in 6aa19eb90f and
6f21accfae, but without having to thread the
signal through to TabbedBrowser and back.

Weirdly, doing self.setFocusPolicy(Qt.FocusPolicy.NoFocus) in
FullscreenNotification.__init__ did not help, so let's just set the focus
manually instead.

Fixes #8174.
Fixes #8625.
2025-10-10 20:46:48 +02:00
Florian Bruhin 6f21accfae Fix focus handling when closing hidden statusbar
From knezi's analysis in #8722:

    The problem was that in Qt, slots are called in the order of connection, so
    even though there's a code that tries to set up the focus correctly, it's
    run after the cmd widget is hidden and hence the focus is already moved and
    it doesn't work as expected.

Follow-up for #2236/#8024.
Fixes #8223.
Supersedes and closes #8722.
Also see #8625 and #8174 (which are not fixed by this).
2025-10-10 20:15:12 +02:00
Florian Bruhin 6b48ae4084 Update security patch version for Qt 6.10 release 2025-10-10 19:03:14 +02:00
Florian Bruhin e300327eea Update certifi changelog URL 2025-10-10 19:03:14 +02:00
mathis renaud 9d1dfcfe5c Make 'tox -e mypy' work again in tox.ini
Fix #8344
2025-10-10 19:03:16 +02:00
Florian Bruhin 897fc40f4d
Merge pull request #8725 from qutebrowser/update-dependencies
Update dependencies
2025-10-06 12:58:14 +02:00
qutebrowser bot 24aab77607 Update dependencies 2025-10-06 04:22:56 +00:00
Florian Bruhin c37b9ebf5b tests: Adjust for changed exception
Follow-up to 2ae3086244
2025-10-02 09:28:55 +02:00
Florian Bruhin 2ae3086244 qutescheme: Improve handling of invalid path -> host redirects 2025-10-02 09:07:15 +02:00
Florian Bruhin 4aa807032f qutescheme: Simplify URL/path normalization logic
See #8711
2025-10-02 09:04:17 +02:00
Florian Bruhin 0867a95abb qutescheme: Add tests for redirects 2025-10-02 08:59:23 +02:00
Florian Bruhin 25ff649efe Fix lint 2025-10-01 17:14:43 +02:00
Florian Bruhin f57afa39e8 webenginetab: Improve _on_navigation_request workarounds
- Use QTimer.singleShot to avoid crashes with QtWebEngine 6.10:
  https://bugreports.qt.io/browse/QTBUG-140543
- Disable back/forward workaround for QtWebEngine >= 6.6,
  as the underlying issue seems to be fixed there.

See https://github.com/qutebrowser/qutebrowser/issues/8694#issuecomment-3276397840
and #8711.
2025-10-01 17:09:01 +02:00
Florian Bruhin da8428f9ba webenginetab: Move QtWebEngine specific workaround
See #8711
2025-10-01 16:31:30 +02:00
Florian Bruhin 75475ee87b version: Adjust security patch version for Qt 6.10 RC 2025-09-30 09:02:07 +02:00
Florian Bruhin 8ebce896ad
Merge pull request #8717 from qutebrowser/update-dependencies
Update dependencies
2025-09-30 09:02:27 +02:00
qutebrowser bot 43b5618c0a Update dependencies 2025-09-29 04:23:12 +00:00
Florian Bruhin c9498995df
Merge pull request #8709 from andyflesner/patch-1
Update Python performance reference link in FAQ
2025-09-24 09:12:28 +02:00
Florian Bruhin aaba038a16
Merge pull request #8708 from qutebrowser/update-dependencies
Update dependencies
2025-09-24 08:00:56 +02:00
Florian Bruhin 92f3633662 tests: Skip nested prompts test on unaffected Qt versions
Qt < 6.9 doesn't crash in this situation, and seems to handle nested prompts
differently, causing the test to still wait for a prompt answer.

Follow-up to a13306a79f
2025-09-24 07:59:21 +02:00
Andy Flesner 7ce0e03614
Update Python performance reference link in FAQ 2025-09-23 21:45:27 -05:00
qutebrowser bot d64781c31c Update dependencies 2025-09-22 04:24:08 +00:00
Florian Bruhin a8f9fc1396 Update changelog 2025-09-21 18:36:36 +02:00
Florian Bruhin a13306a79f Fix exception when quitting with download prompt open
If we have a pending download with a prompt and quit qutebrowser, we get:

    mainwindow:closeEvent:715 Closing window 0
    quitter:shutdown:221 Shutting down with status 0, session None...
    prompt:shutdown:121 Shutting down with loops [<qutebrowser.utils.qtutils.EventLoop object at 0x7fa034725770>]
    quitter:shutdown:235 Deferring shutdown stage 2
    prompt:ask_question:179 Ending loop.exec() for <qutebrowser.utils.usertypes.Question default='/tmp/qbdl/download/' mode=<PromptMode.download: 5> option=None text='Please enter a location for <b>https://proof.ovh.net/files/1Mb.dat</b>' title='Save file to:'>
    prompt:ask_question:181 Restoring old question None
    prompt:_on_show_prompts:299 Deleting old prompt qutebrowser.mainwindow.prompt.DownloadFilenamePrompt(question=<qutebrowser.utils.usertypes.Question default='/tmp/qbdl/download/' mode=<PromptMode.download: 5> option=None text='Please enter a location for <b>https://proof.ovh.net/files/1Mb.dat</b>' title='Save file to:'>)
    prompt:_on_show_prompts:303 No prompts left, hiding prompt container.
    objreg:on_destroyed:112 schedule removal: 0
    objreg:on_destroyed:112 schedule removal: tab
    [...]
    objreg:on_destroyed:112 schedule removal: 0
    objreg:on_destroyed:112 schedule removal: main-window
    objreg:on_destroyed:112 schedule removal: tabbed-browser
    objreg:on_destroyed:112 schedule removal: status-command
    objreg:on_destroyed:112 schedule removal: completion
    objreg:on_destroyed:112 schedule removal: mode-manager
    objreg:on_destroyed:112 schedule removal: hintmanager
    objreg:on_destroyed:112 schedule removal: prompt-container
    quitter:_shutdown_2:241 Stage 2 of shutting down...
    [...]
    webenginedownloads:_on_state_changed:63 State for <qutebrowser.browser.webengine.webenginedownloads.DownloadItem basename='1Mb.dat'> changed to DownloadCancelled
    downloads:_on_begin_remove_row:1076 _on_begin_remove_row with idx 0, webengine True
    downloads:_remove_item:995 Removed download 1: 1Mb.dat [100%|?.??B]
    modeman:leave:429 Leaving mode KeyMode.prompt (reason: aborted)
    crashsignal:_handle_early_exits:229 Uncaught exception
    Traceback (most recent call last):
    File "[...]/qutebrowser/mainwindow/prompt.py", line 344, in _on_aborted
        modeman.leave(self._win_id, key_mode, 'aborted', maybe=True)
        ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "[...]/qutebrowser/keyinput/modeman.py", line 214, in leave
        instance(win_id).leave(mode, reason, maybe=maybe)
        ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "[...]/qutebrowser/keyinput/modeman.py", line 435, in leave
        self.left.emit(mode, self.mode, self._win_id)
        ^^^^^^^^^
    RuntimeError: wrapped C/C++ object of type ModeManager has been deleted
2025-09-21 18:33:05 +02:00
Florian Bruhin c6b486ce81 Fix segfault with nested download prompts
For an unknown reason, if a download prompt is triple-nested, Qt segfaults here:

    #0  add_lazy_attrs (td=0x7ffff52e0dd1 <QtPrivate::sizedFree(void*, unsigned long)+32>) at sip_core.c:6255
    #1  sip_add_all_lazy_attrs (td=0x7ffff52e0dd1 <QtPrivate::sizedFree(void*, unsigned long)+32>) at sip_core.c:6304
    #2  0x00007ffff636598e in sip_api_is_py_method_12_8 (gil=gil@entry=0x7fffffff8b8c, pymc=pymc@entry=0x7fffffff8b8b "", sipSelfp=sipSelfp@entry=0x7fffffff8ba8, cname=cname@entry=0x0, mname=mname@entry=0x7ffff636d57b "__dtor__") at sip_core.c:7402
    #3  0x00007ffff6365c2c in sip_api_is_py_method_12_8 (mname=0x7ffff636d57b "__dtor__", cname=0x0, sipSelfp=0x7fffffff8ba8, pymc=0x7fffffff8b8b "", gil=0x7fffffff8b8c) at sip_core.c:7356
    #4  callPyDtor (self=<optimized out>) at sip_core.c:5375
    #5  sip_api_instance_destroyed_ex (sipSelfp=0x7fffffff8c40) at sip_core.c:5311
    #6  0x00007ffff5fc9967 in sipQEventLoop::~sipQEventLoop() () from [...]/python3.13/site-packages/PyQt6/QtCore.abi3.so
    #7  0x00007ffff0bcd749 in QFileInfoGatherer::getInfo (this=0x5555583f9bc0, fileInfo=...) at [...]/qt5/qtbase/src/gui/itemmodels/qfileinfogatherer.cpp:349
    #8  0x00007ffff0be2629 in QFileSystemModelPrivate::fileSystemChanged (this=0x5555583f9870, path="/tmp/qbdl/download", updates=QList<std::pair<QString, QFileInfo>> (size = 3) = {...}) at [...]/qt5/qtbase/src/gui/itemmodels/qfilesystemmodel.cpp:1966
    (full stacktrace has 183 frames)

After a lot of experimentation, I figured out that moving the `NullIconProvider`
to a class variable (or removing it entirely) seems to help. Note that making it
`global` (but keeping the instanciation inside `FilenamePrompt._init_fileview()`)
did not!

This is semi-blind fix: It's unclear to me if this is a proper fix, or if the
changed memory layout just causes the issue to temporary disappear.

However, given that `QFileInfoGatherer::getInfo()` calls into the icon provider,
it might very well be the real deal.

Closes #8674
2025-09-21 18:07:34 +02:00
Florian Bruhin 18bea32975 Revert "pylint: Remove unneeded suppression"
This reverts commit 7e770765a9.
2025-09-17 18:08:06 +02:00
Florian Bruhin 7e770765a9 pylint: Remove unneeded suppression 2025-09-17 16:06:01 +02:00
Florian Bruhin 1aaf621409 pakjoy: Move main block to function 2025-09-17 15:59:08 +02:00
Florian Bruhin 7d8d14eb07 config: Add file select completions for yazi 2025-09-17 15:44:37 +02:00
Florian Bruhin 226d167ec7 Qt 6.10: Skip incompatible pakjoy tests
See https://github.com/qutebrowser/qutebrowser/issues/8694#issuecomment-3276414407
2025-09-17 15:35:22 +02:00
Florian Bruhin a7822d1e2a pakjoy: Add simple example code 2025-09-16 11:14:47 +02:00
Florian Bruhin 1f4ca40f78 tests: Work around Qt 6.10 permission persistence bug
https://bugreports.qt.io/browse/QTBUG-140194
https://github.com/qutebrowser/qutebrowser/issues/8694#issuecomment-3274635002
2025-09-16 10:58:47 +02:00
Florian Bruhin 75239be8b6 Merge branch 'update-dependencies' 2025-09-15 18:00:46 +02:00
Florian Bruhin 488339b3d5 coverage: Set patch = subprocess
Subprocess measuring got integrated into coverage.py and removed from
pytest-cov:

https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst#700-2025-09-09
https://coverage.readthedocs.io/en/latest/config.html#run-patch
2025-09-15 13:12:38 +02:00
qutebrowser bot 52917f9c31 Update dependencies 2025-09-15 04:21:54 +00:00
Florian Bruhin 326a83309a version: Update for Qt 6.10 Beta 4 2025-09-11 01:00:01 +02:00
Florian Bruhin 264d91eaec ci: Fix shellcheck 2025-09-09 23:27:24 +02:00
Florian Bruhin 9e280eb80f ci: Add scoop dir to PATH 2025-09-09 23:23:07 +02:00
Florian Bruhin c278069946 ci: Fix actionlint 2025-09-09 23:11:03 +02:00
Florian Bruhin 5894221924 ci: Upgrade release workflow to windows 2022
windows-2019 is unsupported by GitHub Actions:
https://github.com/actions/runner-images/issues/12045
2025-09-09 22:07:55 +02:00
Florian Bruhin af2450591c ci: Install NSIS manually for nightly builds
window-latest switched to windows-2025, where GitHub doesn't preinstall NSIS:
https://github.com/actions/runner-images/issues/12677

Let's install it manually (untested, might need follow-up commits).

The release.yml workflow uses windows-2019 (and will switch to windows-2022 in a
follow-up commit), so it is unaffected for now.
2025-09-09 22:07:55 +02:00
Florian Bruhin 65de4fde16 pakjoy: Fix filename for debug builds 2025-09-09 22:07:55 +02:00
Florian Bruhin 4d6dccfed5 Qt 6.10: Ignore new logging messages
See #8694
2025-09-09 22:07:55 +02:00
Florian Bruhin 45483d0994
Merge pull request #8698 from qutebrowser/update-dependencies
Update dependencies
2025-09-08 23:38:42 +02:00
Florian Bruhin c3eef39050
Merge pull request #8701 from qutebrowser/dependabot/github_actions/actions/setup-node-5
build(deps): bump actions/setup-node from 4 to 5
2025-09-08 23:31:04 +02:00
Florian Bruhin a93f2e917d
Merge pull request #8700 from qutebrowser/dependabot/github_actions/actions/github-script-8
build(deps): bump actions/github-script from 7 to 8
2025-09-08 23:30:33 +02:00
Florian Bruhin d8beaa1e9d
Merge pull request #8699 from qutebrowser/dependabot/github_actions/actions/setup-python-6
build(deps): bump actions/setup-python from 5 to 6
2025-09-08 23:30:11 +02:00
dependabot[bot] aa6fcab23a
build(deps): bump actions/setup-node from 4 to 5
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 5.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 19:00:03 +00:00
dependabot[bot] 1e243b0d06
build(deps): bump actions/github-script from 7 to 8
Bumps [actions/github-script](https://github.com/actions/github-script) from 7 to 8.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v7...v8)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 18:59:59 +00:00
dependabot[bot] ce6be4f741
build(deps): bump actions/setup-python from 5 to 6
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 18:59:56 +00:00
qutebrowser bot 195d19ec3f Update dependencies 2025-09-08 04:22:17 +00:00
Florian Bruhin 78b55f84cc scripts: Handle ImportError without QUTE_QT_WRAPPER set in link_pyqt
If link_pyqt() is run from mkvenv.py, QUTE_QT_WRAPPER may not be set,
so we shouldn't crash when trying to display import error messages.
2025-09-05 11:24:51 +02:00
Florian Bruhin 7f532f69d2 requirements: Qt 6.9.2 2025-09-03 00:38:32 +02:00
Florian Bruhin 50080e8607
Merge pull request #8692 from qutebrowser/update-dependencies
Update dependencies
2025-09-03 00:31:42 +02:00
Florian Bruhin 17522478db version: Update for QtWebEngine 6.9.2 and 6.10 2025-09-02 23:47:00 +02:00
qutebrowser bot 44dbef482e Update dependencies 2025-09-01 04:26:18 +00:00
Florian Bruhin c0216a1309 Update changelog 2025-08-25 10:27:11 +02:00
Florian Bruhin c63a98e3e6 Merge remote-tracking branch 'origin/pr/8681' 2025-08-25 10:26:38 +02:00
Florian Bruhin 08f5509bed Fix tests with broken asciidoc install 2025-08-25 10:26:25 +02:00
Florian Bruhin 4180e04f24
Merge pull request #8686 from qutebrowser/update-dependencies
Update dependencies
2025-08-25 09:07:41 +02:00
qutebrowser bot 3cdacde13e Update dependencies 2025-08-25 04:23:50 +00:00
Sander ada069b3e3
feat(qutedmenu): sort history results by last access time 2025-08-21 23:20:34 +02:00
Florian Bruhin 9e99d6df34
Merge pull request #8676 from qutebrowser/update-dependencies
Update dependencies
2025-08-18 23:08:52 +02:00
qutebrowser bot afd1515d8d Update dependencies 2025-08-18 04:33:54 +00:00
Florian Bruhin 6d1cd0282a
Merge pull request #8670 from qutebrowser/update-dependencies
Update dependencies
2025-08-14 00:52:36 +02:00
Florian Bruhin 21082a85a4
Merge pull request #8673 from qutebrowser/dependabot/github_actions/actions/checkout-5
build(deps): bump actions/checkout from 4 to 5
2025-08-14 00:50:12 +02:00
dependabot[bot] 745bb7f4f0
build(deps): bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-12 01:09:55 +00:00
qutebrowser bot ec86816be1 Update dependencies 2025-08-11 04:37:07 +00:00
Florian Bruhin 85e1a132bb scripts: Update shellcheck error ignores for password_fill 2025-08-04 11:35:04 +02:00
Florian Bruhin d8fd61811c
Merge pull request #8659 from qutebrowser/update-dependencies
Update dependencies
2025-08-04 10:14:55 +02:00
qutebrowser bot 40b3e70659 Update dependencies 2025-08-04 04:43:36 +00:00
Florian Bruhin 0c035c41d8 Adjust qt.workarounds.disable_accelerated_2d_canvas description
Closes #8660
2025-07-29 10:15:06 +02:00
Florian Bruhin f2ec540a1b tests: Fix sys.flags workaround with older Python versions
types.SimpleNamespace only accepts a positional argument with Python 3.13: 'https://docs.python.org/3/whatsnew/3.13.html#types'
2025-07-29 10:10:13 +02:00
Florian Bruhin b9aec6777a tests: Fix monkeypatching of sys.flags on Python 3.14
With Python 3.14, since argparse enabled coloring by default:
17c5959aa3
running test_cmdutils.py failed with a lengthy traceback finishing in:

```
INTERNALERROR> pluggy.PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown.
INTERNALERROR> Plugin: /home/florian/proj/qutebrowser/git/tests/conftest.py, Hook: pytest_runtest_makereport
INTERNALERROR> PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown.
INTERNALERROR> Plugin: rerunfailures, Hook: pytest_runtest_makereport
INTERNALERROR> PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown.
INTERNALERROR> Plugin: hypothesispytest, Hook: pytest_runtest_makereport
INTERNALERROR> PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown.
INTERNALERROR> Plugin: pytest-bdd, Hook: pytest_runtest_makereport
INTERNALERROR> AttributeError: 'types.SimpleNamespace' object has no attribute 'verbose'
```

with one part pointing to Python internals:

```pytb
INTERNALERROR>   File "/home/florian/proj/qutebrowser/git/.tox/py314-pyqt68/lib/python3.14/site-packages/_pytest/_code/code.py", line 669, in exconly
INTERNALERROR>     lines = format_exception_only(self.type, self.value)
INTERNALERROR>   File "/usr/lib/python3.14/traceback.py", line 180, in format_exception_only
INTERNALERROR>     te = TracebackException(type(value), value, None, compact=True)
INTERNALERROR>   File "/usr/lib/python3.14/traceback.py", line 1106, in __init__
INTERNALERROR>     suggestion = _compute_suggestion_error(exc_value, exc_traceback, wrong_name)
INTERNALERROR>   File "/usr/lib/python3.14/traceback.py", line 1653, in _compute_suggestion_error
INTERNALERROR>     import _suggestions
INTERNALERROR>   File "<frozen importlib._bootstrap>", line 1371, in _find_and_load
INTERNALERROR>   File "<frozen importlib._bootstrap>", line 1342, in _find_and_load_unlocked
INTERNALERROR>   File "<frozen importlib._bootstrap>", line 951, in _load_unlocked
INTERNALERROR>   File "<frozen importlib._bootstrap>", line 496, in _verbose_message
INTERNALERROR> AttributeError: 'types.SimpleNamespace' object has no attribute 'verbose'
```

This happens when Python tries to access sys.flags.verbose, but we replaced it
with a fake object that does not have a .verbose attribute anymore (only
temporarily, but for some reason that's enough to trigger the issue anyways).

Since we can't mutate sys.flags, instead we create an object that copies all
sys.flags attributes, and then use that as a nicer replacement.

See #8529
2025-07-27 13:58:15 +02:00
Florian Bruhin 6b3b83981a Qt 6.10: Adjust security patch version 2025-07-21 13:47:45 +02:00
Florian Bruhin d80d80b867 Qt 6.10: Adjust CI test skipping 2025-07-21 13:47:45 +02:00
Florian Bruhin c9d3b61ca2
Merge pull request #8656 from qutebrowser/update-dependencies
Update dependencies
2025-07-21 13:42:03 +02:00
qutebrowser bot 87ad9dce57 Update dependencies 2025-07-21 04:37:45 +00:00
Florian Bruhin 961b4a212d
Merge pull request #8644 from qutebrowser/update-dependencies
Update dependencies
2025-07-14 07:27:52 +02:00
qutebrowser bot e151c2d0cf Update dependencies 2025-07-14 04:34:13 +00:00
Florian Bruhin c79257dc8d Remove pytest-mock pytest warning ignore
Fixed in pytest-mock 3.14.1
2025-07-08 21:15:15 +02:00
Florian Bruhin 22f1b57347 lint: Move check-manifest into pyroma
pyroma now runs check-manifest if installed,
so we can simplify things there.
2025-07-07 08:09:47 +02:00
Florian Bruhin 2536cc2313 tox: Fail pyroma run on degradations
The only rating we're satisfied with is Mascarpone!
2025-07-07 08:04:25 +02:00
Florian Bruhin d15052a67a Add stub pyproject.toml file
This keeps our setup.py around for now, while still supporting a PEP-517
compliant build. It's the minimum required change to make modern pyroma stop
complaining, and hopefully to avoid deprecation warnings.

Partially duplicates #8560
See #3526
2025-07-07 08:00:29 +02:00
qutebrowser bot be87927923 Update dependencies 2025-07-07 04:27:56 +00:00
Florian Bruhin 7315c34957 Add support for hinting elements inside shadow DOMs
Supersedes and closes #7617
See #3569 (fixed partially)
2025-07-01 16:49:10 +02:00
Florian Bruhin 8bf6a9c448
Merge pull request #8629 from qutebrowser/update-dependencies
Update dependencies
2025-06-30 08:04:38 +02:00
qutebrowser bot 9e459a004c Update dependencies 2025-06-30 04:28:14 +00:00
Florian Bruhin e7af54898e Add X11/Wayland information to version info
Unfortunately there is no way to get this information from Qt, so I had to
resort to some funny low-level C-like Python programming to directly use
libwayland-client and Xlib. Fun was had! Hopefully this avoids having to ask
for this information every time someone shows a bug/crash report, as there
are various subtleties that can be specific to the Wayland compositor in use.
2025-06-25 09:34:35 +02:00
Florian Bruhin 7664fdbb34
Merge pull request #8623 from qutebrowser/update-dependencies
Update dependencies
2025-06-24 20:53:48 +02:00
Florian Bruhin 81546c97ae version: Add security patch level for QtWebEngine 6.10 Beta 1 2025-06-24 20:42:03 +02:00
qutebrowser bot b2f58856a8 Update dependencies 2025-06-23 04:29:58 +00:00
Florian Bruhin 5e565f4dc7 Fix PermissionElement tests 2025-06-16 22:27:55 +02:00
Florian Bruhin 879c964c35 Update changelog 2025-06-16 14:09:41 +02:00
Florian Bruhin 2ec0f8fa77 Extend PermissionElement workaround to Qt 6.9.1+
Fixes #8612
2025-06-16 14:09:41 +02:00
Florian Bruhin 9d5aeefa8c
Merge pull request #8610 from qutebrowser/update-dependencies
Update dependencies
2025-06-16 10:33:39 +02:00
qutebrowser bot ed6329737f Update dependencies 2025-06-16 04:28:21 +00:00
Florian Bruhin 04a1d11905
Merge pull request #8603 from qutebrowser/update-dependencies
Update dependencies
2025-06-09 10:47:18 +02:00
qutebrowser bot 47724f913e Update dependencies 2025-06-09 04:26:50 +00:00
Florian Bruhin a45d57feee tests: Adjust ignored log message for newer Chromium
QtWebEngine 6.9 seems to use webengine/DawnWebGPUCache/ instead of DawnCache/
2025-06-06 12:53:10 +02:00
Florian Bruhin eca17870ae tests: Extend Qt 6.9.0 workaround to .1
Still seems to be failing, see https://github.com/qutebrowser/qutebrowser/issues/8444#issuecomment-2569610110
2025-06-06 11:30:27 +02:00
Florian Bruhin 959dc5a9e5 tests: Correctly deactivate SignalHandler after tests
Otherwise, the python_hacks timer might continue running
and affects test_early_timeout_check, similiarly to what was fixed in
74c7ff2641.
2025-06-06 10:53:38 +02:00
Florian Bruhin 7b388017c3 Update changelog 2025-06-06 08:51:00 +02:00
Florian Bruhin 55ca67f3e2 tests: Stop hardcoding indices for module versions 2025-06-06 08:49:28 +02:00
Florian Bruhin 6b86a9072f version: Rely on importlib.metadata.version too
Packages are slowly migrating to not having a __version__ attribute anymore,
instead relying on importlib.metadata to query the installed version.

jinja2 now shows a deprecation warning when accessing the __version__
attribute: https://github.com/pallets/jinja/pull/2098

For now we keep accessing __version__ for other packages (we still need the
logic for PyQt and its special version attributes anyways), but we fall back on
importlib.metadata.version if we can't get a version that way, and we stop
trying __version__ for jinja2.
2025-06-06 08:47:00 +02:00
qutebrowser bot 96e535c7ed Release v3.5.1
(cherry picked from commit be7cf1ab15)
2025-06-05 14:55:03 +00:00
Florian Bruhin 1217f7fa45 Update user agents 2025-06-05 16:38:10 +02:00
Florian Bruhin c1e7b6e8f3 tests: Ignore test_restart hang on Windows 2025-06-05 15:09:57 +02:00
Florian Bruhin 2e343403de tests: Ignore another bogus Chromium log message 2025-06-05 15:08:00 +02:00
Florian Bruhin 2ec16a947f ci: Switch nightly builds to windows-latest
We don't really care which exact Windows version we use there
2025-06-05 15:01:29 +02:00
Florian Bruhin ced24549df Update changelog 2025-06-05 14:22:40 +02:00
Florian Bruhin 272693ef3e Adjust comment 2025-06-05 14:06:43 +02:00
Florian Bruhin 5926932a6d Update changelog 2025-06-05 14:06:03 +02:00
Florian Bruhin 3f31a0005a Fix mimetype for PDF.js files on Windows
With windows-2022 and windows-2025 on GitHub Actions,
we get:

    qutescheme:data_for_url:128 url: qute://pdfjs/web/viewer.mjs, path: /web/viewer.mjs, host pdfjs
    webenginequtescheme:requestStarted:105 Returning text/plain data

which causes:

    JS: [qute://pdfjs/build/pdf.mjs:0] Failed to load module script: Expected a
    JavaScript module script but the server responded with a MIME type of
    "text/plain". Strict MIME type checking is enforced for module scripts per
    HTML spec.

It's unclear why we get text/plain back there in the first place (can't
reproduce on a local Windows 11 install), but it's definitely wrong, so let's
just override that problematic case.
2025-06-05 13:41:28 +02:00
Florian Bruhin 9219869cb9 ci: Test on windows-2022 and windows-2025
windows-2019 is deprecated: https://github.com/actions/runner-images/issues/12045
2025-06-05 11:38:42 +02:00
Florian Bruhin 0b5f70f029 ci: Switch to Qt 6.9 for Windows/macOS
That's what we're shipping, so we should also test that.
2025-06-05 11:36:33 +02:00
Florian Bruhin bff2ad9086 version: Add QtWebEngine 6.9.1 2025-06-05 11:33:41 +02:00
Florian Bruhin 696a4490ff Hide Qt 6.9.1 IPC signal warning
The warning is triggered from inside Qt and most
likely bogus:
https://bugreports.qt.io/browse/QTBUG-137424

See https://github.com/qutebrowser/qutebrowser/pull/8595#issuecomment-2938912511
2025-06-05 11:17:35 +02:00
qutebrowser bot 9cf95165a9 Update dependencies 2025-06-04 06:44:58 +00:00
toofar f9eb71b4c8
Merge pull request #8593 from qutebrowser/update-dependencies
Update dependencies
2025-06-03 21:39:42 +12:00
toofar 422680046e Update PDF.js version extraction for 5.3.31
It's changed in this PR: https://github.com/mozilla/pdf.js/pull/19956
to have the version string as a comment in the file, instead of the
variable.

Making the regex more forgiving increases the chance of matching on the
wrong string on a past or future version. I've only tested with the
previous version (v5.2.133) and it seemed to still work there.

Changes I made to the regex:

* add the literal * to the match group of possible prefixes of pdfjsVersion
* make the quotes around the version optional
* make the semicolon at the end of the line optional
* add newline to the list of characters that can terminate the match
  group (otherwise it was matching across the end of the line up to the
  first string, kinda odd when there was a $ after the match group)
2025-06-02 20:51:30 +12:00
toofar 060f4a59d6 mypy: cast variable only on Qt5
We only have to cast these variables on Qt5. If we cast them on Qt6 mypy
warns of a redundant cast. If we ignore that warning mypy complains of a
redundant ignore on Qt5.

Add a conditional on `machinery.IS_QT5` and only cast it required.

But also move that conditional out to a utility function to avoid
duplicating code in the function doing the actual logic.

I'm re-using the `_T` generic TypeVar defined above. Not sure if it's
proper to re-use them or not. Doesn't python have a better way of
defining generics now?

I added the `valid-type` ignore because mypy was complaining:

    Variable "to_type" is not valid as a type

I'm not sure if there is some way to do it better, but `reveal_type()`
says that the call site is getting the right type back in the end.
2025-06-02 20:03:00 +12:00
qutebrowser bot 291dda69e5 Update dependencies 2025-06-02 04:26:41 +00:00
Florian Bruhin 329977b42c
Merge pull request #8587 from qutebrowser/update-dependencies
Update dependencies
2025-05-30 12:27:00 +02:00
Florian Bruhin 072b03a631 Avoid version warnings with PyQtWebEngine-Qt5 5.15.17
With PyQtWebEngine-Qt5 5.15.17 (Qt 5.15.19), we seem to run into similar issues
like we already did with Qt 6.5:

https://github.com/qutebrowser/qutebrowser/issues/7624#issuecomment-1474008470
9cb54b2099

However, skipping the ELF test is not enough, as we also get warnings
at runtime (as we don't have any API to get the version at runtime).

We don't care much about Qt 5 at this stage, so let's just not output
warnings in that case (and nothing in the code should care about the exact
QtWebEngine patch level beyond 5.15.2 anyways).

For most user-facing things, we *can* get the exact version number from
the user-agent, so this should not actually affect much.
2025-05-29 23:42:40 +02:00
Florian Bruhin 9ba931075b doc: Add Doom-One theme 2025-05-26 17:46:07 +02:00
qutebrowser bot 0de8337969 Update dependencies 2025-05-26 04:25:50 +00:00
Florian Bruhin aef5355436 Revert "flake8: Disable N808"
This reverts commit a14b986326.

Now allowed in pep8-naming 0.15.1.
2025-05-19 16:05:46 +02:00
Florian Bruhin 856aeb3f47 Avoid log spam on new QWebEngineView children
With Qt 6.9, Qt creates QObjects for accessibility
tree nodes, which result in a lot of log spam.

Fixes #8542
2025-05-19 16:04:58 +02:00
Florian Bruhin c86ddd11be
Merge pull request #8579 from qutebrowser/update-dependencies
Update dependencies
2025-05-19 10:20:20 +02:00
qutebrowser bot aab33cc596 Update dependencies 2025-05-19 04:24:12 +00:00
Florian Bruhin bb7bbb6ead eventfilter: Ignore QKeyEvents in ChildEventFilter
Based on crash reports, sometimes somehow a QKeyEvent gets lost in there.
2025-05-16 18:17:44 +02:00
Florian Bruhin 9447182809 Add debug logging for failed WebEngineHistory deserialization
This sometimes fails with 'The data stream has read past the end of the data in
the underlying device', which turns up in crash reports around once a month.

This is somewhat similar to https://bugreports.qt.io/browse/QTBUG-117489 - but
without knowing the data and without being able to reproduce, it's unclear what
the culprit could be.
2025-05-14 08:47:08 +02:00
Florian Bruhin 9c7a75616c ci: Switch to tox main branch 2025-05-13 12:32:02 +02:00
Florian Bruhin 858606c18d ci: Remove QtWebKit testing
It's broken in weird ways since recently (`:version` not loading,
segfault in test_version.py). Since nobody should be using it anyways,
there is no point in spending time on debugging a tricky issue.

Next step is probably ripping it out completely, but that's a separate
can of worms.

See #4039
2025-05-13 09:29:04 +02:00
Florian Bruhin 049cf49705
Merge pull request #8567 from qutebrowser/update-dependencies
Update dependencies
2025-05-13 09:25:35 +02:00
qutebrowser bot 4633a0704e Update dependencies 2025-05-12 04:22:23 +00:00
Florian Bruhin a2072db15d requirements: use full syntax for misc checks 2025-05-08 11:25:14 +02:00
Florian Bruhin 9685c5a383 requirements: Use patched tox for Python 3.14
See https://github.com/tox-dev/tox/issues/3523
2025-05-08 11:22:55 +02:00
Florian Bruhin c682ccb1b2 tests: Ignore more libEGL warnings 2025-05-08 10:17:03 +02:00
Florian Bruhin 81f65dbb46 docker: Install libxml2-legacy from official repos
Reverts:
- a3bdcca37b
- 1b7557b73b
- 06e7950588
- 9aef02e96c
- c5fe31e828
2025-05-08 09:21:35 +02:00
Florian Bruhin 6cbf2847c8 docker: Try working around QtWebKit issues 2025-05-07 17:59:15 +02:00
Florian Bruhin 74c7ff2641 tests: Properly delete webengine DownloadManager objects
We create the DownloadManager with parent=qapp, which means they will stick
around forever after the test finished.

While we disconnect the QWebEngineProfile::downloadRequested() signal,
we keep the DownloadManager around, which also keeps around its download-update
timers.

Those will then result in tests/unit/utils/usertypes/test_timer.py::test_early_timeout_check
being flaky, as their _validity_check_handler slot keeps getting called in the
background. Due to the globally mocked time.monotonic(), this results in
nonsensical error messages such as:

    Got logging message on logger misc with level WARNING:
    Timer download-update (id ...) triggered too early:
    interval 500 but only -1023.269s passed!

After this change, we now clean up those objects properly, thus fixing the
flakiness.

See #5390.
2025-05-07 14:06:03 +02:00
Florian Bruhin a4b3ca48df tests: Add sanity check for stray timer objects
This makes sure the test consistently fails if there is still some timer in the
background, instead of getting flaky.
2025-05-07 13:39:48 +02:00
Florian Bruhin 9f16a1f879 tests: Properly delete mode_manager instances
To fix a flaky tests/unit/utils/usertypes/test_timer.py::test_early_timeout_check
(where a download-update timer from an earlier test fails), I looked into what
usertypes.Timer instances where left over after a test finished.

It turns out that there were about 190 still existing "partial-match" and
"normal-inhibited" timers when breaking in test_timer.py, even when just running
tests in tests/unit/browser/ and tests/unit/utils/usertypes.

This is because we pass qapp as parent to the ModeManager we create, but that
means it will be forever alive if we don't take care of cleaning it up after a
test.

Perhaps our tests should have some sort of mechanism that checks whether there
are any "leftovers" after a test has finished (perhaps even as part of
pytest-qt?), but for now, let's just fix the issues we can directly see.
2025-05-07 13:22:10 +02:00
Florian Bruhin ed99c82440 tests: Fix pattern 2025-05-06 14:41:13 +02:00
Florian Bruhin 20a9130cee Ignore a random Qt 5 log message
No idea where this came from...
2025-05-06 14:27:57 +02:00
Florian Bruhin 102f43cbde scripts: Ignore another stderr output on macOS 2025-05-06 14:08:00 +02:00
Florian Bruhin c5fe31e828 docker: Add link 2025-05-06 14:06:10 +02:00
Florian Bruhin 9aef02e96c docker: Don't install libxml2.13 for webkit 2025-05-06 10:28:17 +02:00
Florian Bruhin 06e7950588 docker: Always install base-devel 2025-05-06 09:18:07 +02:00
Florian Bruhin 1b7557b73b docker: Don't run makepkg as root 2025-05-06 09:15:27 +02:00
Florian Bruhin 5e6a878f64 docker: Also downgrade libarchive for QtWebEngine 2025-05-06 09:12:23 +02:00
Florian Bruhin a3bdcca37b docker: Install libxml2.13 2025-05-06 09:11:20 +02:00
Florian Bruhin 0a9b6aab73 debug: Make get_all_objects usable without objects.qapp
Needed for some test debugging, and seems harmless enough to just commit as-is
as I might need it again.
2025-05-05 09:53:06 +02:00
Florian Bruhin 8f8748e486
Merge pull request #8558 from qutebrowser/update-dependencies
Update dependencies
2025-05-05 08:46:09 +02:00
Florian Bruhin a14b986326 flake8: Disable N808 2025-05-05 08:15:52 +02:00
qutebrowser bot 422d268fe3 Update dependencies 2025-05-05 04:21:54 +00:00
toofar b3138d1be8
Merge pull request #8553 from qutebrowser/update-dependencies
Update dependencies
2025-04-25 18:36:08 +12:00
toofar e67aea60e8 Update changelog link for mypy extensions 2025-04-25 16:50:07 +12:00
toofar 67e7677523 Downgrade hypothesis
Skip this hypothesis version pending https://github.com/HypothesisWorks/hypothesis/issues/4375
Our test suite is currently failing due to running python with `-b` and
being configured to fail on warnings.

We'll pick it up on the next update run or so.
2025-04-25 16:47:01 +12:00
qutebrowser bot 9249c5cb0e Update dependencies 2025-04-25 04:33:28 +00:00
Florian Bruhin c601bd0c7a
Merge pull request #8545 from qutebrowser/update-dependencies
Update dependencies
2025-04-17 11:19:31 +02:00
Florian Bruhin f9933d2f3e userscripts: Properly avoid tldextract warning
The previous fix in 3dc212a815 was insufficient,
as the inner `getattr(extract_result, "registered_domain")` was always evaluated
first (thus triggering the deprecation warning again).

We also cannot do:

    getattr(extract_result, "top_domain_under_public_suffix", None) or extract_result.registered_domain

as `""` is a valid value for it.
2025-04-17 11:11:33 +02:00
qutebrowser bot 95f9472a6b Update dependencies 2025-04-14 04:21:48 +00:00
toofar 701046cd9f
Merge pull request #8537 from qutebrowser/update-dependencies
Update dependencies
2025-04-14 12:08:02 +12:00
Florian Bruhin aa41b6719f tests: Ignore another message 2025-04-13 14:53:21 +02:00
Florian Bruhin 05b42c57ee ci: Fix config properly... 2025-04-13 13:40:37 +02:00
Florian Bruhin 77b5c0c1cd ci: Fix config 2025-04-13 13:37:44 +02:00
Florian Bruhin 84ec45c13f ci: Try Python 3.14 again
Cache is now cleared, so it might just work
2025-04-13 13:28:34 +02:00
Florian Bruhin ecbca59dea Update changelog 2025-04-13 10:25:43 +02:00
qutebrowser bot 67d8e012a3 Release v3.5.0 2025-04-12 21:28:50 +00:00
Florian Bruhin dea1de5dab Update changelog 2025-04-12 21:33:19 +02:00
Florian Bruhin 9aa53ea205 tests: Wait for tab-close being run properly
Leaks into the next test otherwise, making it flaky.
2025-04-12 21:28:30 +02:00
Florian Bruhin 7bc6c33bb5 Reapply "tests: Try to stabilize test_auto_leave_insert_mode"
This reverts commit 1d2faf2fa2.

This seems to be correct, the issue is the previous test not waiting until it's
finished properly.
2025-04-12 21:25:11 +02:00
Florian Bruhin 9e0f7ccc51 tests: Make sure we don't leave stale download managers behind
Speculative fix for test_early_timeout_handler in
tests/unit/utils/usertypes/test_timer.py failing:

    >  assert len(caplog.messages) == 1
    E  AssertionError: assert 5 == 1

due to:

    ------------------------------ Captured log call -------------------------------
    WARNING  misc:usertypes.py:467 Timer download-update (id 620757000) triggered too early: interval 500 but only -609.805s passed
    WARNING  misc:usertypes.py:467 Timer download-update (id 922746881) triggered too early: interval 500 but only -609.429s passed
    WARNING  misc:usertypes.py:467 Timer download-update (id 1056964613) triggered too early: interval 500 but only -609.537s passed
    WARNING  misc:usertypes.py:467 Timer download-update (id 1912602631) triggered too early: interval 500 but only -609.671s passed
    WARNING  misc:usertypes.py:467 Timer t (id -1) triggered too early: interval 3 but only 0.001s passed
2025-04-12 21:16:30 +02:00
Florian Bruhin 1d2faf2fa2 Revert "tests: Try to stabilize test_auto_leave_insert_mode"
This reverts commit f6f2a1252b.

Does more harm than good, for reasons I don't entirely understand yet.
2025-04-11 19:45:41 +02:00
Florian Bruhin f6f2a1252b tests: Try to stabilize test_auto_leave_insert_mode
We sometimes tried to use hints before the page was fully rendered (?), thus
causing no elements to be found.

It also doesn't make much sense to test leaving insert mode if we aren't in
insert mode yet, so make sure we entered it first.

See #5390
2025-04-11 17:28:31 +02:00
Florian Bruhin 86c89e00c5 Qt 6.9: Skip more qutescheme tests
If the renderer process crash happens, rerunning
doesn't seem to fix anything, even if the page is
opened in a new tab.

See #8536
2025-04-11 17:18:51 +02:00
Florian Bruhin 4f4ad4147a Revert "tests: Try to combat Qt 6.9 flakiness more"
This reverts commit 7204168684.

Doesn't actually help on CI...
2025-04-11 17:18:32 +02:00
Florian Bruhin 13b87e5968 ci: Avoid Python 3.14 Alpha 7
See https://www.riverbankcomputing.com/pipermail/pyqt/2025-April/046210.html and #8529
2025-04-11 17:18:06 +02:00
Florian Bruhin 7204168684 tests: Try to combat Qt 6.9 flakiness more
See #8536
2025-04-11 16:00:45 +02:00
Florian Bruhin 3dc212a815 userscripts: Avoid tldextract warning 2025-04-11 15:41:59 +02:00
Florian Bruhin 351fef8c1e Update comment 2025-04-10 15:52:50 +02:00
Florian Bruhin 4053249229 tests: Fix deprecated usage 2025-04-08 21:11:43 +02:00
Florian Bruhin 8b820f015b ci/tox/requirements: Update for Qt 6.9 2025-04-08 21:09:32 +02:00
Florian Bruhin afeb1ebbaa tests: Fix TestYamlMigrations.test_user_agent 2025-04-08 20:50:13 +02:00
Florian Bruhin 6b5ebe7187 Add a test for js_async crash
Follow-up to c32f5afcc4
See #3895 and #8400.
2025-04-08 20:47:54 +02:00
Florian Bruhin c073a30afe Update changelog 2025-04-08 20:38:50 +02:00
Florian Bruhin b16551548f Remove QtWebEngine/... from default UA
Good old https://webaim.org/blog/user-agent-string-history/ strikes yet again.
Let's just masquerade as Chromium instead of the constant pointless fight.
2025-04-08 20:28:15 +02:00
Florian Bruhin 961a9390da Remove the ua-slack site specific quirk
Closes #8510
2025-04-08 20:19:34 +02:00
Florian Bruhin b5a399831b tests: Disable MAP_DISCARD workaround for fixed Qt versions 2025-04-08 19:42:16 +02:00
Florian Bruhin bbdf9faf5e Qt 6.9: Mark one more test as flaky 2025-04-08 14:37:51 +02:00
Florian Bruhin d9d8701696 Fix flake8 2025-04-08 14:36:34 +02:00
Florian Bruhin 3280c8dacc tests: Avoid CI issues with qutescheme and Qt 6.9
see #8536
2025-04-08 14:03:26 +02:00
Florian Bruhin 54b6c92713 Python 3.14: Skip newly added stdlib file test
See #8529
2025-04-08 12:35:51 +02:00
Florian Bruhin de3fa06eff Fix lint
mccabe complexity too high, but despite a lot of 'if' the function is quite linear.
2025-04-08 10:42:42 +02:00
Florian Bruhin ef2ceccd29 Qt 6.9: Work around QtWebEngine not handling <permission> element
See #8539
2025-04-07 21:58:45 +02:00
qutebrowser bot 9a23ce6c3c Update dependencies 2025-04-07 04:20:42 +00:00
Florian Bruhin 21b2d63f4d doc: Remove dead matrix bridge link 2025-04-06 14:35:58 +02:00
toofar c32f5afcc4 Fix crash when JS is run async on deleted tabs
My reproducer is this:

* open the browser with the auto insert mode JS primed, and two tabs:

    `python3 -m qutebrowser -T -s input.insert_mode.auto_load true about:blank?1 about:blank?2`

* close the second tab: `d`
* re-open the closed tab then close it again real quick: `u` then `d`

If you have trouble reproducing, try increasing the 65ms delay in
`handle_auto_insert_mode` to be bigger (like 500ms).

Closes: #3895
2025-04-05 18:18:10 +13:00
Florian Bruhin ab3b77cb1e Revert "Make private browsing asserts more useful"
This reverts commit b09a1385f5.
2025-04-04 12:55:28 +02:00
Florian Bruhin b09a1385f5 Make private browsing asserts more useful
The assert in commands.py sometimes fails, hopefully this will help track things down.
2025-04-04 12:02:42 +02:00
Florian Bruhin 4e5eb90857 ci: Fix Python 3.14 Pillow build 2025-04-02 13:34:27 +02:00
Florian Bruhin 72647298b7 ci: Fix Python 3.14 derp 2025-04-02 13:31:55 +02:00
Florian Bruhin 71381c0da6 ci: Try to fix Python 3.14 version 2025-04-02 13:30:46 +02:00
Florian Bruhin 3aa839998b Python 3.14: Add to tox/CI
Part of #8529
2025-04-02 13:22:35 +02:00
Florian Bruhin 65a3a3cf9a Python 3.14: Ignore DeprecationWarnings in plugins
https://github.com/pytest-dev/pytest-mock/issues/468
https://github.com/ionelmc/pytest-benchmark/issues/283

Part of #8529
2025-04-02 13:15:32 +02:00
Florian Bruhin 163bb9fa0c Python 3.14: Update cheroot workaround
https://github.com/cherrypy/cheroot/issues/734
https://github.com/python/cpython/issues/129354
Part of #8529
2025-04-02 12:52:24 +02:00
Florian Bruhin c165d1a0da Update changelog 2025-03-31 13:40:22 +02:00
Florian Bruhin 1ab93bad33
Merge pull request #8329 from VitoMinheere/7966-tab-move-zero-division-error
Fix zero division bug in tab-move +
2025-03-31 13:39:35 +02:00
Florian Bruhin 69f0eae600 Drop unneeded nonlocal 2025-03-31 08:44:45 +02:00
Florian Bruhin ef397e9417 Update changelog URLs 2025-03-31 08:40:01 +02:00
qutebrowser bot c60ebe8eef Update dependencies 2025-03-31 04:21:42 +00:00
Florian Bruhin 4dde8e1594 version: Add security patch version for Qt 6.8.3 2025-03-26 13:51:52 +01:00
Florian Bruhin b6d5a5cf14 Fix and simplify JS quirks tests 2025-03-25 14:23:48 +01:00
Florian Bruhin c4d8502872 Add site-specific quirk for Digitec/Galaxus madness 2025-03-25 13:04:26 +01:00
Florian Bruhin 2f20e3b60b Update iniconfig changelog url 2025-03-24 11:29:35 +01:00
qutebrowser bot 873b874c5f Update dependencies 2025-03-24 11:29:28 +01:00
Florian Bruhin a460770414 tests: Adjust qt69_ci_flaky 2025-03-21 11:29:32 +01:00
Florian Bruhin e4ab45e3b2 setup: Move from deprecated license classifier to SPDX 2025-03-21 11:25:45 +01:00
Florian Bruhin d0407852f4 Fix lint 2025-03-21 11:24:24 +01:00
Florian Bruhin 59be37007d Polyfill URL.parse for PDF.js v5 modern build 2025-03-21 10:42:55 +01:00
Florian Bruhin b43c79989e pdfjs: Add new no-system-pdfjs debug flag
This can be used to easily test a different PDF.js version manually (which is
installed via update_3rdparty.py), without having to uninstall the system-wide
one first.
2025-03-21 10:42:17 +01:00
Florian Bruhin 939e0fa817 Adjust Slack UA quirk
See #8510
2025-03-21 10:42:17 +01:00
toofar 18db4cc937 changelog entries for bitwarden userscript
Will it be cherry picked to the release branch? Should I have made a new
section for the 3.5.0 release? We'll see!
2025-03-19 20:24:10 +13:00
toofar 4a675115e1
Merge pull request #7781 from dezeroku/cleaned-up
userscripts: fix qute-bitwarden failing with expired session
2025-03-19 20:13:13 +13:00
toofar 02b9f5eed1
Merge pull request #8518 from qutebrowser/update-dependencies
Update dependencies
2025-03-18 21:10:16 +13:00
qutebrowser bot cc20112a67 Update dependencies 2025-03-17 04:20:14 +00:00
dezeroku d49c96aa29
userscripts: fix qute-bitwarden failing with expired session
This could be seen as "Vault is locked" error in the logs,
if run with the --nointeraction flag
2025-03-16 16:47:08 +01:00
Florian Bruhin b0e05ee160 Qt 6.9: Only disable software rendering for darkmode tests
Looks like the "tests hanging" issue was fixed between Beta 3 and RC.

See #8444
2025-03-15 16:49:43 +01:00
Florian Bruhin 4c9e989c39 Qt 6.9: Upgrade security patch version 2025-03-15 12:28:55 +01:00
Florian Bruhin 237e90985d docker: Downgrade libxslt
ImportError: /usr/lib/libxslt.so.1: undefined symbol: xmlCtxtParseDocument
2025-03-15 12:25:43 +01:00
Florian Bruhin e3db31e29e tests: Match message properly for invalid URL
pytest now warns about it, which fails bleeding tests:
2c8cd64d5f
2025-03-15 12:25:43 +01:00
user202729 f25604b819 Bitwarden: Pass master password in environment variable 2025-03-12 15:53:50 +01:00
Harm te Molder b183e6a39a Add Solarized theme 2025-03-12 15:52:18 +01:00
Florian Bruhin 1f90da7694 Update user agents / quirks
Fixes #8492 (hopefully)
2025-03-12 15:41:54 +01:00
Florian Bruhin 7ad4bb70fe Shorten Chromium version in UA by default
Fixes #8426
2025-03-12 15:25:55 +01:00
Florian Bruhin b271559f82 tests: Fix without explicit platform 2025-03-12 15:02:22 +01:00
Florian Bruhin 51541add20 Fix lint 2025-03-12 14:44:19 +01:00
Florian Bruhin 328b5966ef Add initial support for running tests offscreen
Makes

    QT_QPA_PLATFORM=offscreen pytest

pass.

See #4914
2025-03-12 14:41:50 +01:00
Florian Bruhin 4cc67d3603 Qt 6.9: Force software rendering for tests
Not yet quite sure what exactly is the culprit, but this seems to help for all
tests (!) to pass with Xvfb locally.

For now only scoped to Qt 6.9.0. Will probably already need to reevaluate with
the RC, but definitely with the final release.

See #8444
2025-03-12 14:41:32 +01:00
Florian Bruhin 8c2cfe8f7e tests: Fix handling of qapp_args
Until now, if the seccomp bpf sandbox needs to be disabled,
PaintHoldingCrossOrigin was not disabled anymore.
2025-03-12 11:32:22 +01:00
Florian Bruhin c35fc88211 tests: Disable BPF sandbox with glibc 2.41
Fixes #8507
2025-03-12 11:29:12 +01:00
Florian Bruhin 90c40152ed Simplify getting signal for renderer process exit 2025-03-11 19:30:33 +01:00
Florian Bruhin 27606f2fe3 Show signal names on renderer process crashes
Makes debugging issues easier.
2025-03-11 19:10:49 +01:00
Florian Bruhin 561986cad8 tests: Clear messages between test cases
Makes watching the UI (or screenshots) more useful as we don't have any
leftovers from previous tests.
2025-03-11 18:51:12 +01:00
Florian Bruhin 2810021896 Qt 6.9: Adjust version numbers
See #8444
Also see #4914
2025-03-11 18:01:45 +01:00
Florian Bruhin a875f3e8be Qt 6.9: Adjust pakjoy ID
See #8444
2025-03-11 18:01:45 +01:00
Florian Bruhin 7b4c163142 Qt 6.9: Add additional error message ignores
See #8444
2025-03-11 18:01:45 +01:00
toofar 8b2ab6b01d
Merge pull request #8505 from qutebrowser/update-dependencies
Update dependencies
2025-03-11 20:03:38 +13:00
toofar 4f985feede update changelog URL 2025-03-10 23:05:00 +13:00
qutebrowser bot 2efaf92b7c Update dependencies 2025-03-10 04:20:15 +00:00
toofar a0fd88aac8
Merge pull request #8497 from qutebrowser/update-dependencies
Update dependencies
2025-03-04 08:56:43 +13:00
toofar 42c9973c01 update isort changelog link 2025-03-03 19:45:58 +13:00
qutebrowser bot c9374fd80a Update dependencies 2025-03-03 04:22:07 +00:00
qutebrowser bot dd66300caf Update dependencies 2025-02-24 10:32:38 +01:00
Florian Bruhin 33ba05c657 ci: Go back to Ubuntu 22.04 for Docker
See #8424
2025-02-24 09:43:42 +01:00
Florian Bruhin 990c4d4cfc tests: Adjust sandbox test expectations for Ubuntu 24.04
See #8424
2025-02-24 09:40:06 +01:00
Florian Bruhin 1a6d32cc3d ci: Upgrade Ubuntu versions
Avoid deprecated Ubuntu 20.04 which will be unsupported in April:
https://github.com/actions/runner-images/issues/11101

For Qt 6.8 and auxiliary jobs (linters etc.), switch from 22.04 to 24.04.
2025-02-23 22:23:01 +01:00
Florian Bruhin de8a2c04b8 bleeding: Avoid deprecated egg syntax
See https://github.com/pypa/pip/issues/13157
2025-02-23 22:00:32 +01:00
Florian Bruhin 12e6838267 bleeding: Avoid broken gherkin-official >= 31
See https://github.com/cucumber/gherkin/issues/373
2025-02-23 21:59:39 +01:00
Florian Bruhin fdfa9109ff doc: Adjust Fedora freeworld install instructions 2025-02-18 11:56:29 +01:00
Florian Bruhin 0eff340063 mypy: Enable new strict_bytes option
See https://peps.python.org/pep-0688/#no-special-meaning-for-bytes
2025-02-17 10:55:22 +01:00
Florian Bruhin eb2e39de1e scripts: Add new bump-my-version deps 2025-02-17 10:55:22 +01:00
Florian Bruhin 0b221d3e24 mypy: Fix new mypy issues 2025-02-17 10:55:22 +01:00
qutebrowser bot f7c8c67818 Update dependencies 2025-02-17 10:55:22 +01:00
Florian Bruhin accce7fdef Update urlmatch tests for Python fixes
https://github.com/python/cpython/issues/78541
https://github.com/python/cpython/issues/105704
https://github.com/python/cpython/pull/129418
2025-02-17 09:57:44 +01:00
Florian Bruhin 718d66fb6d Merge remote-tracking branch 'origin/pr/7591' 2025-02-15 16:10:24 +01:00
Florian Bruhin 60f526d81f Add new changelog URLs from bump-my-version 2025-02-03 18:40:35 +01:00
qutebrowser bot 4004799f2c Update dependencies 2025-02-03 16:55:59 +00:00
Florian Bruhin 1615e8a40e Merge remote-tracking branch 'origin/pr/8462' 2025-02-03 17:45:48 +01:00
qutebrowser bot bfb580ee91 Update dependencies 2025-02-03 11:01:24 +01:00
Florian Bruhin 4a1a30bc33 Add security patch version for Qt 6.8.2 2025-02-03 10:55:23 +01:00
Jun Chen 6b3901ccee chore: update bumpversion configuration to disallow dirty working directory and fix version replacement 2025-01-31 11:36:13 -07:00
Jun Chen 6b25fdf648 chore: replace bump2version with bump-my-version 2025-01-30 19:14:38 -07:00
sarabande 9bae38ede6
Merge branch 'qutebrowser:main' into main 2025-01-30 11:04:39 -07:00
Florian Bruhin 7bd941cda0 Make duplicate notification IDs non-fatal
The notification.Error there is unhandled otherwise.
2025-01-30 12:59:43 +01:00
Jun Chen e63781d49b docs: update contributing guide with new issue tracker link 2025-01-29 22:38:59 +01:00
Jun Chen 03224a0015 docs: update contributing guide with new issue tracker link 2025-01-29 13:39:35 -07:00
Florian Bruhin 322977dc0d Update changelog URLs for twine upgrade 2025-01-27 16:15:28 +01:00
qutebrowser bot 60177ab975 Update dependencies 2025-01-27 04:21:24 +00:00
qutebrowser bot 9b59cd02cb Update dependencies 2025-01-20 08:25:56 +01:00
Florian Bruhin b3090870d3 scripts: Rename test_requirements function
Falsely flagged by https://github.com/m-burst/flake8-pytest-style/blob/master/docs/rules/PT028.md
2025-01-19 11:56:42 +01:00
qutebrowser bot 253a818ecc Update dependencies 2025-01-13 04:22:20 +00:00
Florian Bruhin 0a32d6fef5 Fix qt69_ci_flaky marker
Follow-up to ed8141cb4b
2025-01-09 11:51:45 +01:00
Florian Bruhin c5395c23f7 Update changelog 2025-01-09 11:51:45 +01:00
Florian Bruhin d272804126 Disable DocumentPictureInPicture API
The DocumentPictureInPicture JS API added in Chromium 116 is not implemented in
QtWebEngine. This results in createWindow() being called with a window type with
random value, which then causes qutebrowser to bail out:

    Traceback (most recent call last):
    File ".../qutebrowser/browser/webengine/webview.py", line 123, in createWindow
        raise ValueError("Invalid wintype {}".format(debug_type))
    ValueError: Invalid wintype 843995690

Until this is fixed in Qt, we pass an argument to Chromium to disable the API
entirely, so that web pages hopefully fall back to something else.

In the case of the new Google Huddle feature, this results in them still working
with an on-page overlay instead.

Thanks to Joshua Cold and Vivia for helping to debug this!

Fixes #8449
See https://bugreports.qt.io/browse/QTBUG-132681
2025-01-09 11:51:45 +01:00
Florian Bruhin ed8141cb4b tests: Improve handling of qutescheme on Qt 6.9 CI
See #8444
2025-01-06 15:14:21 +01:00
Florian Bruhin 2b8c053aee Merge branch 'update-dependencies' 2025-01-06 15:07:30 +01:00
Florian Bruhin 7eb9bc45de Adjust Pillow changelog URL 2025-01-06 15:05:02 +01:00
Florian Bruhin 7d1179e0e3 Fix mypy issues after 1.14 upgrade
mypy does not do type narrowing with "in":
https://github.com/python/mypy/issues/12535

And mypy now knows that those values can be None:
https://github.com/python/typeshed/pull/12936
2025-01-06 14:46:22 +01:00
Florian Bruhin 977c90939c tests: Add --qute-strace-subprocs flag
Was needed for #8444 debugging, but might be useful for other issues with
qutebrowser subprocesses as well.
2025-01-06 12:30:19 +01:00
qutebrowser bot 980105aa11 Update dependencies 2025-01-06 04:23:13 +00:00
Florian Bruhin 3934d727e4 Qt 6.9: xfail failing test on CI for now
Probably not our fault, and shouldn't break CI until we figure out what could be
going on there...

See https://github.com/qutebrowser/qutebrowser/issues/8444#issuecomment-2569610110
2025-01-03 19:04:36 +01:00
Florian Bruhin 3144264a9d First adjustments for Qt 6.9
See #8444
2025-01-03 16:45:39 +01:00
Florian Bruhin a52f378787 Add qute-translate-popup to userscript list 2025-01-03 15:45:56 +01:00
qutebrowser bot 1bcb536a44 Update dependencies 2024-12-14 22:28:12 +01:00
Florian Bruhin 3f5ce51502 ci: Back to Ubuntu 22.04
Follow-up to 531b28771c as some stuff broke
2024-12-14 22:27:15 +01:00
qutebrowser bot 5c899e304f Release v3.4.0 2024-12-14 20:51:45 +00:00
Florian Bruhin 5a153d76ea Use/recommend libegl1 without -mesa
libegl1-mesa was a "transactional dummy package" as early as Ubuntu 20.04, and
got removed in 22.04.

See https://packages.ubuntu.com/search?keywords=libegl1-mesa&searchon=names&suite=all&section=all
2024-12-14 21:50:10 +01:00
Florian Bruhin 531b28771c ci: Upgrade some jobs from Ubuntu 20.04 to 24.04
Ubuntu 20.04 will be EOL in April 2025, and PyQt 6.8 does not support being
installed on it anymore:
https://pyqt-builder.readthedocs.io/en/stable/releases.html

Other than for the oldest Qt 5 / Qt 6 envs, and for utility envs, let's use
Ubuntu 22.04 or 24.04.
2024-12-14 21:20:15 +01:00
Florian Bruhin 2546c0746d Update changelog 2024-12-14 21:08:01 +01:00
Florian Bruhin 68e52903ae Update user agents 2024-12-14 21:05:28 +01:00
Florian Bruhin e643f8f881 Fix misc linting
Not strictly required here as it's Qt6-only, but fine
2024-12-13 13:03:31 +01:00
Florian Bruhin a0bbcd6259 requirements: Remove index-url again
Now on PyPi, partially reverts 3a956b4097
2024-12-13 13:03:31 +01:00
Florian Bruhin c563e2d302 mypy: Be more clever about Qt 6.8 2024-12-13 13:03:31 +01:00
Florian Bruhin 4a5515666e Revert "js: Set eslint to ecmascript 2020"
This reverts commit 86e2573c39.
Breaks stuff with QtWebKit, whoops...
2024-12-13 13:03:31 +01:00
Florian Bruhin b5e9cf85df mypy: Update ignores for PyQt 6.8 2024-12-13 13:03:31 +01:00
qutebrowser bot 6c7fd52b8e Update dependencies 2024-12-13 13:03:31 +01:00
Florian Bruhin c462cf62e4 pdfjs: Add some comments to polyfills 2024-12-10 22:15:00 +01:00
Florian Bruhin 86e2573c39 js: Set eslint to ecmascript 2020
Needed for the ?. operator which is supported since Chromium 80:
https://caniuse.com/mdn-javascript_operators_optional_chaining

Also makes eslint enforce trailing commas for function calls, which seems fine.
2024-12-10 22:14:48 +01:00
Florian Bruhin f8ce3a932c ci: Upgrade node version
Not strictly necessary, just a drive-by fix.
2024-12-10 17:47:12 +01:00
Florian Bruhin 666b7d4df0 pdfjs: Make eslint happy about polyfills 2024-12-10 17:45:13 +01:00
Florian Bruhin 9d1ca7cbf5 pdfjs: Move polyfills to separate file 2024-12-10 17:39:10 +01:00
Florian Bruhin 9e70ffeaad Switch to legacy PDF.js build
The normal PDF.js build only officially supports the latest Chromium, so things
might break every once in a while with QtWebEngine (e.g. #8199, #7335).

Let's instead bundle and recommend the legacy build.

Closes #8332
Closes #7721 (reworded)
Also see #7135
2024-12-10 11:47:39 +01:00
Florian Bruhin e7b346ecf2 scripts: Try harder to 'hdiutil create' the .dmg
See https://github.com/actions/runner-images/issues/7522#issuecomment-2527820259
2024-12-10 10:31:47 +01:00
Florian Bruhin c0c3caead5 Add Qt 5.15.18 Chromium version 2024-12-10 08:28:35 +01:00
Florian Bruhin 8f274c4e18 mkvenv: Add arm64 to supported platforms 2024-12-10 00:47:04 +01:00
Florian Bruhin f056f49bd1 tests: Fix file path matching on Windows
Qt 6.8 change?
2024-12-10 00:35:29 +01:00
Florian Bruhin d91750f5ae tests: ignore another bogus Chromium message 2024-12-10 00:33:21 +01:00
Florian Bruhin 54839c59e4 py313: Fix root paths in tests on Windows
https://docs.python.org/3/whatsnew/3.13.html#os-path
"On Windows, isabs() no longer considers paths starting with exactly one slash
(\ or /) to be absolute."

See https://github.com/python/cpython/issues/44626
and #8205
2024-12-09 23:50:00 +01:00
Florian Bruhin 728fe7625b Fix pylint 2024-12-09 23:49:54 +01:00
Florian Bruhin 9e8ea8eee4 tests: Re-add flaky marker
See 258e61f97c - unfortunately still flaky
2024-12-09 22:55:44 +01:00
Florian Bruhin a51b631d26 Fix mypy 2024-12-09 22:52:12 +01:00
Florian Bruhin 45d04be1c9 py313: Also ignore cheroot error on Windows
See #8205
2024-12-09 22:49:29 +01:00
Florian Bruhin 68eacd2036 py313: Avoid deprecated pathlib.PurePath.is_reserved()
Looks like the CI upgrade was the first time we tested this on Windows?
Whoops!

https://github.com/python/cpython/issues/88569
https://docs.python.org/3/whatsnew/3.13.html#new-deprecations
See #8205
2024-12-09 20:57:05 +01:00
Florian Bruhin 258e61f97c tests: Stabilize reloading in tests
The test added in fbd148f983 was flaky because
reloading didn't wait for the page load to actually finish fully, and thus the
element not being found on the page.

Fix this by providing the page path to the step, and making sure it waits for it
to be fully loaded again.

Also undos some flaky tags done in 2018:
12e5375931
c1c182d958

As this might have been the real culprit.
If not, those should be re-added.

See #8348, #5390
2024-12-09 20:48:45 +01:00
Florian Bruhin 3a956b4097 ci: Add preliminary PyQt 6.8 environment
See #8242
2024-12-09 20:16:27 +01:00
Florian Bruhin bb652cc108 ci: Fix up Python versions
Follow-up to b1ad5c2e30
2024-12-09 20:14:10 +01:00
Florian Bruhin d45de75129 tox: Remove Python 3.13 typing-extensions handling
See #8205
2024-12-09 20:11:45 +01:00
Florian Bruhin 061c1f0f85 Fix lint 2024-12-09 17:57:21 +01:00
Florian Bruhin 54b220348f Fix lint 2024-12-09 17:32:07 +01:00
Florian Bruhin 960d9aaaa5 tests: Initialize QtWebEngine spell dictionary path earlier
Turns out there are various places in the tests that somehow cause Qt to start
caching the dict location, not just actually accessing
.[is|set]SpellCheckEnabled() like I originally assumed.

Thus, move setting QTWEBENGINE_DICTIONARIES_PATH into conftest.py so it's run
before any tests. However, remove the sanity check after, as that requires
initializing a QWebEngineProfile which we might not always want to do when
running a subset of unit tests. If something goes wrong with this, chances are
we'll only notice later in the tests anyways.

Follow-up to db8e508530
See #8330
2024-12-09 17:26:12 +01:00
Florian Bruhin c501ae375e scripts: Close sqlite connections properly in importer
Found thanks to runnning Python 3.13 tests on CI.

See #8205
2024-12-09 16:51:55 +01:00
Florian Bruhin 4918e6d8ff macOS: Avoid deprecated file associations
Based on Chromium's Info.plist.

Fixes #7306, see #8416 for more possible improvements.
2024-12-09 16:41:24 +01:00
Florian Bruhin 946ec0ab25 py313: Update docs
See #8205
2024-12-09 16:15:01 +01:00
Florian Bruhin b1ad5c2e30 ci: Use Python 3.13
- Newest Linux/macOS/Windows environments (should be roughly same as release,
  especially for Windows/macOS)
- Nightly binary builds
- Release automation

Closes #8205
2024-12-09 16:14:48 +01:00
Florian Bruhin 4c7325f912 py313: Suppress cheroot warnings
https://github.com/cherrypy/cheroot/issues/734
See #8205
2024-12-09 16:08:47 +01:00
Florian Bruhin 48d3c7d97c py313: Ignore maxsplit deprecation warning
2f48300931
https://github.com/pytest-dev/pytest-bdd/issues/752
https://github.com/pytest-dev/pytest-bdd/pull/753

See #8205
2024-12-09 16:06:54 +01:00
Florian Bruhin 321898eb54 Update changelog 2024-12-09 14:45:41 +01:00
Florian Bruhin db8e508530 Fix Qt 6.8 spell checking test
Starting with Qt 6.8, Qt enforces that the spell checking dictionary path exists
when enabling spell checking (but it doesn't check whether there is actually
anything in there). This caused our test ensuring that spell checking gets
enabled properly to fail, as we never actually set a proper directory.

We now do, though we need to do so for the entire test session, as QtWebEngine
caches the directory.

Reverts 7475d38
See https://github.com/qutebrowser/qutebrowser/issues/8242#issuecomment-2333609589
Fixes #8330
2024-12-09 14:39:53 +01:00
Florian Bruhin 3cfefd121c Avoid Qt 6.8 spell check warning
Due to a Qt bug, we get a misleading error even when trying to *disable*
spell checking: https://bugreports.qt.io/browse/QTBUG-131969

To avoid that from happening, we now only call setSpellCheckEnabled() if
the value actually changed.

See #8242, #8330 (not the same issue but related)
2024-12-09 14:08:44 +01:00
Florian Bruhin d7328af221 Add JSON resource type
Added in Qt 6.8, documented as:

    a JSON module (import ... with { type: "json" })

See #8242
2024-12-09 14:05:37 +01:00
Florian Bruhin 4d5ed99ff5 link_pyqt: Try QtCore before sip
Makes for nicer error messages if there's no PyQt at all.
2024-12-09 13:59:33 +01:00
qutebrowser bot 5d3df09146 Update dependencies 2024-12-09 11:25:49 +01:00
Florian Bruhin 557cd19a1d ci: Try harder to detach dmg image
See https://github.com/actions/runner-images/issues/7522
2024-12-06 21:45:27 +01:00
Florian Bruhin 6c9fd35bfa Update changelog 2024-12-06 20:49:14 +01:00
Ruben Gonzalez 3a3c03a4df In POSIX sh, echo flags are undefined 2024-12-06 19:40:28 +00:00
Florian Bruhin 3dce208237 Use Python 3.12 for nightly builds 2024-12-06 20:39:58 +01:00
Florian Bruhin 5cb14d4d4b Run shellcheck over all scripts/*.sh files
See #8409
2024-12-06 20:39:34 +01:00
Florian Bruhin a7b566e7b3 Remove pytest-bdd<8 limit 2024-12-06 14:53:03 +01:00
Florian Bruhin acc06cdd39 Merge branch 'gherkin8342' 2024-12-06 14:52:08 +01:00
Florian Bruhin e2fb1fba8b Revert "Bleeding requirements: Use pytest-bdd release"
This reverts commit 26b4ec6cef.
2024-12-05 19:27:10 +01:00
Florian Bruhin aed06c5f48 Add gherkin-official changelog URL 2024-12-05 19:26:58 +01:00
Florian Bruhin 59fd7876a1 pytest-bdd 8: Fix borked tag 2024-12-05 19:15:47 +01:00
Florian Bruhin f91dc2d52d pytest-bdd 8: Adjust Python code for multiline steps 2024-12-05 16:19:46 +01:00
Florian Bruhin f4260a6e55 pytest-bdd 8: Fix comments and remaining syntax issues
Looks like inline comments are not permitted anymore.
2024-12-05 16:19:29 +01:00
Florian Bruhin a8a5068e62 pytest-bdd 8: Fix missing multiline step quoting 2024-12-05 16:13:04 +01:00
Florian Bruhin cec00266d0 pytest-bdd 8: Fix tags
Tags containing spaces aren't supported anymore, so we can't add additional skip
descriptions sadly...
2024-12-05 16:11:17 +01:00
Florian Bruhin bb462c2602 pytest-bdd 8: Fix indentations 2024-12-05 16:05:59 +01:00
Florian Bruhin f524926216 Fix tab indentation in feature files 2024-12-05 15:39:56 +01:00
Florian Bruhin 629a38d654 Upgrade to pytest-bdd 8 2024-12-05 15:36:18 +01:00
Florian Bruhin e15d266309 Merge branch 'xhr-accept-language'
# Conflicts:
#	doc/changelog.asciidoc
2024-12-05 15:08:28 +01:00
Florian Bruhin f3d280ba53 Expand comment 2024-12-05 15:04:56 +01:00
Florian Bruhin e158a480f5 Add QtWebEngine 6.8.1 Chromium security version 2024-12-04 21:17:03 +01:00
Florian Bruhin 69ac04d389 Drop macOS 12
The GHA runner is gone now: https://github.com/actions/runner-images/issues/10721

Closes #8327
2024-12-04 20:56:22 +01:00
Florian Bruhin df75956cf9 Update docs 2024-12-04 20:51:58 +01:00
Florian Bruhin a1d89a83b0 Merge remote-tracking branch 'origin/pr/8348' 2024-12-04 20:40:19 +01:00
Florian Bruhin 06501886eb
Merge pull request #8406 from qutebrowser/update-dependencies
Update dependencies
2024-12-02 04:46:24 +00:00
qutebrowser bot e6a0446a92 Update dependencies 2024-12-02 04:20:49 +00:00
toofar 40adc6696b
Merge pull request #8397 from qutebrowser/update-dependencies
Update dependencies
2024-12-01 20:29:22 +13:00
Florian Bruhin a397aa069e Also handle QtWebKit Accept-Language correctly
On QtWebKit, we only set Accept-Language in the request interceptor.
2024-11-27 18:10:00 +01:00
Florian Bruhin 0144a314ad Respect Accept-Language set via XHR
Similarly to #5998, XHR requests should be able to set their custom
Accept-Language values - and for some odd reason, stuff breaks on websites
sometimes when that's not respected.

There's no way for qutebrowser to know if a given header value is already set in
a request (i.e. whether we're adding or overriding). Thus we only really have
two options here:

1) Don't set any shared.custom_headers() for XHR requests at all.
2) Special-case Accept-Language here, because the issue usually is triggered by
the global override, but that already gets set just fine via QWebEngineProfile
anyways.

Given that 2) is the thing causing trouble in the wild and it's unclear what the
desired behavior for 1) is (e.g. for the DNT header), let's go for 2) here.
2024-11-27 17:48:03 +01:00
Florian Bruhin ddac8a16bf Simplify assert 2024-11-26 15:21:24 +01:00
qutebrowser bot 17792f87e8 Update dependencies 2024-11-25 04:20:31 +00:00
Florian Bruhin 2ba07fe490
Merge pull request #8387 from qutebrowser/update-dependencies
Update dependencies
2024-11-24 00:30:52 +00:00
Florian Bruhin 3608b2b3be Pin pytest-bdd<8
See https://github.com/qutebrowser/qutebrowser/issues/8342
2024-11-24 01:09:01 +01:00
dependabot[bot] 4b7cc881ec Bump codecov/codecov-action from 4 to 5
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-24 00:06:49 +00:00
toofar 77c880544f fix test for webkit
Was getting an import error when trying to import the webengine version.
Not going to skip the tests using this step since they seemed to be
working otherwise, probably this behavior isn't needed on webkit anyway.
2024-11-23 12:15:33 +13:00
toofar 66759c7172 Check pyqt version against hex number, not str
A string comparison of version numbers relies on nice simple version
numbers with approximately the same amount of digits. Who knows what
various systems are running!

Switch to the integer format version number. It's harder to grep for
when dropping a Qt version, but hopefully we have enough "6.8"s around
it to compensate.
2024-11-23 12:15:33 +13:00
toofar 427fb47e0c add copyright header to test file
review feedback

Hopefully this is an okay header format for checkers to pick up, it's
the same as in qutebrowser/html/version.html except with the doctype
declaration above.
2024-11-23 12:15:33 +13:00
toofar 1888944a69 minimize conditional expression
review feedback

I've mixed opinions on this. I'm not convinced that ternary expressions
are more readable than an if/else block.

Also if someone passes a string into this function it'll return
"access-paste" now.
2024-11-23 11:36:14 +13:00
Aryan Dev Shourie 590a602e57 capitalized github text to maintain consistency 2024-11-22 17:01:59 +00:00
qutebrowser bot 664c554bf6 Update dependencies 2024-11-18 04:22:39 +00:00
toofar 6d9563035e Add test checking `Feature(8)` == ClipboardReadWrite
Co-Authored-By: Florian Bruhin <me@the-compiler.org>
2024-11-17 19:48:40 +13:00
toofar a085e3caa0 use `unlink(missing_ok=True)`
Combine the `if exists` and `unlink` in one step and avoid any race
conditions with the file disappearing in between them.

Co-Authored-By: Florian Bruhin <me@the-compiler.org>
2024-11-17 19:48:40 +13:00
toofar 4dd36aca04 Change check for new API to try/catch
Previously it would have crashed with an AttributeError if a user had a
PyQt of 6.8 but Qt of 6.7.

Switch to catching any AttributeError which will hopefully cover
either or both of Qt and PyQt not being a new enough version, even if
it's a bit less of an explicit check.
2024-11-17 19:48:40 +13:00
Florian Bruhin 07bd9a691a tests: Ignore irrelevant Chromium warning 2024-11-11 12:53:29 +01:00
qutebrowser bot c03d3dd6ac Update dependencies 2024-11-11 10:23:04 +00:00
Florian Bruhin af884a02c8 ci: Upgrade codecov action 2024-11-10 20:01:44 +01:00
Florian Bruhin a04126b22b hypothesis: Inherit our CI settings from hypothesis CI profile
See 13c3785854

deadline=None and suppressing the too_slow health check is already part of that.
Also fixes a hypotheses -> hypothesis typo.
2024-11-10 19:40:54 +01:00
Florian Bruhin f382a1a18f Remove pytest-benchmark filterwarning 2024-11-10 19:36:51 +01:00
Florian Bruhin c075f6650e Merge remote-tracking branch 'origin/update-dependencies' 2024-11-10 19:36:21 +01:00
toofar 57465a6768 Assert on unexpected config value when prompting
This branch gets entered if the value of a setting linked to a feature
is anything other than True, False or "ask". I think this could only
happen due to a programming error, for example when you add an entry to
`_WebEnginePermissions` that was linked to a String type setting. So I
think putting an assert here instead of a warning should be fine and
more explicit. (Or should be be `utils.Unreachable`? Or `ValueError`?)
2024-11-10 14:38:47 +13:00
Florian Bruhin 49e67c4dc9 Fix up changelog
See #7625
2024-11-07 14:58:47 +01:00
qutebrowser bot b495e78b8a Update dependencies 2024-11-04 04:20:40 +00:00
toofar 1127c0de19
Merge pull request #8359 from qutebrowser/update-dependencies
Update dependencies
2024-10-29 11:17:56 +13:00
toofar 7535207fd3 Merge remote-tracking branch 'upstream/main' into feat/68_permissions_askeverytime 2024-10-29 10:22:44 +13:00
toofar e55624703b Move config-type-to-bool thing to an abstract class
Relying on `hasattr()` made me feel a bit guilty. So I've moved these
conditionals to be backed by a class. The only class based alternative I
can think of is putting it on the base type and leaving all the other
config variables to raise errors. But that doesn't tell the type system
anything.
2024-10-29 10:20:56 +13:00
toofar fbd148f983 Support persisting clipboard prompt choices
All the promptable feature permissions so far have been of type BoolAsk.
The prompt uses a "yesno" mode prompt and only results in a bool. The
persistence logic only supports bools.

Previously I made the shared prompt support the String type clipboard
permission setting by treating non "ask" values as False (you only get
prompted if the global setting is "none" anyway), but saving the prompt
results with `:prompt-accept --save` didn't work because the persistence
code only supported bools.

What we want to do when saving is convert `False` to "none" and `True`
to "access-paste". This mirrors the new webengine logic. It does mean we
can't let users choose to persist either none/access/access-paste, but
webengine doesn't prompt us if the page is already allowed "access" but
is trying to paste anyway. If it did we would have to use a non-yesno
prompt for this (perhaps it could be driven directly by the ConfigType).

For now I've added a new concept to the ConfigTypes to allow them to be
casted to and from bools, so that we can plumb this String type from the
boolean yesno prompt.

TODO:
* try to make it an interface so we don't have to use `hasattr` (even if
  it means multiple inheritance)
* add test coverage to test_configtypes.py
2024-10-29 10:05:21 +13:00
qutebrowser bot 643bdf7305 Update dependencies 2024-10-28 04:21:24 +00:00
toofar 4c3337f553 Skip clipboard end2end tests on webkit
The test page is using a JS API that is too new for qtwebkit:

    23:07:54.898 DEBUG    js         shared:javascript_log_message:190 [http://localhost:37635/data/prompt/clipboard.html:97] TypeError: undefined is not an object (evaluating 'navigator.clipboard.readText')
2024-10-28 15:26:25 +13:00
toofar f891dd3137 Wait for quteproc shutdown in across-restarts prompt test
This is failing with:

    ERROR tests/end2end/test_invocations.py::test_permission_prompt_across_restart - PermissionError: [WinError 5] Access is denied: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpytep6gj0\\cache\\webengine\\Cache\\Cache_Data\\data_0'

In pytest teardown, while trying to clean up a temp dir, probably the
basedir. The test above waits for shutdown at the end of the test, maybe
that's what's needed here.

Otherwise maybe just `@pytest.mark.skipif(utils.is_windows)` 🤷
2024-10-28 15:26:25 +13:00
toofar 28890f6fbb Change `content.javascript.clipboard` default to `ask`
Now that we support prompting for clipboard access, change the default
for this setting to match all the other settings that have an "ask"
value.
2024-10-28 15:26:25 +13:00
toofar f551bbbb76 Move new permission API check from pytest markers to BDD step
For tests that do the same prompt in the same session, they are failing
on Qt6.8 and PyQWebEnginet6.7 because we can't disable the new WebEngine
behaviour.

We can work around this by getting a fresh instance for each test, but I
don't want to make more tests slower if I don't have to. So move that
logic into a custom "fresh instance" prompt that will only create one
when needed.
2024-10-28 15:26:25 +13:00
toofar 0192b58a6a Support 'ask' for clipboard permissions
WebEngine now supports prompting for permission when a web page tries to
access the clipboard. Previously we only supported fixed permissions that
applied globally.

This commit

1. adds support for permission requests with the new ClipboardReadWrite
   permission
2. tweaks the generic JS prompt handler in browser/shared.py to handle
   seeing a setting which isn't of type BoolAsk
3. adds end2end tests around clipboard permissions, both the existing
   global ones and the new per-URL ones

1. the ClipboardReadWrite permission

I added this as an int because the relevant PyQt isn't out yet and users
with 6.8 running with PyQt6.7 are already seeing this.

I added an "ask" value to the existing String type
`content.javascript.clipboard` setting and set the
default/global/fallback permissions to False if ask is set globally.
Hmm, maybe we should change the default actually... I'll have to check
what the other prompt supporting settings default to.

2. tweaked prompt handler

This was treating the string values that weren't "ask" (like "none" and
"access") as truthy and allowing the action. I've changed the bool
checks to be exact checks to add a warning if this happens again.

Then I added an exception to the warning logging for known cases like
this. I did try looking at adding a new setting type. Something that was
descended from String but had an `__eq__` method that understood bools
and would treat `access-paste` as True and everything else as False. But
that didn't work out because it looks like config values are stored as
python values and the config classes are just static and don't actually
hold values. Oh well, maybe a better pattern will emerge with time.

3. tests

Apparently there were no tests around the clipboard settings. Perhaps
not a coincidence given how confusing they are (what does access-paste
mean?).

I copied a test file from some random test site, tweaked it a little bit
and got to work. For the paste test it's a bit awkward because I don't
know if we have a way to fill the clipboard in a nice way for the tests.
So I'm just matching on "Text pasted: *", which is usually an empty
string.

The prompt tests require running against Qt6.8 to get the new prompt
behaviour (don't need pyqt68 though).
2024-10-28 15:26:25 +13:00
toofar 4fab7b4357 Add clipboard permission tests
There are some changes in this area in Qt6.8, so it would be good to
have some test coverage.

The "access permission - copy" one is broken in 6.8. Still need to raise
that upstream.
2024-10-27 13:42:35 +13:00
toofar 5ad68024b2 mypy: ignore pyqt attribute from the future
Once pyqt 6.8 is released mypy will probably start complaining about an
unnecessary ignore statement and we can remove it.
2024-10-27 12:48:53 +13:00
toofar 8064e3ea6f Disable QtWebEngine's permissions persistence feature
QtWebEngine has a new feature where it will remember what permissions
you have granted or denied. It has three options regarding permissions
storage:

    AskEveryTime -- don't store
    StoreInMemory -- store in memory only
    StoreOnDisk -- store in memory and on disk

By default it does the StoreOnDisk behavior. Having webengine remember
whether you granted or denied a permission would make the qutebrowser UX
around that area inconsistent. For example the default y/n actions for a
permission prompt in qutebrowser will only accept that single
permission request, and you'll be re-prompted if you reload the page.
Users may be used to this and if webengine started remembering
permission grants the users may be surprised to find that the page was
accessing features without prompting them for permission anymore.
Additionally we already have our own permission storage machinery in
autoconfig.yml.

This commit will set the webengine feature to AskEveryTime, which disables
any storing of permission grants.

Also adjusts the skip marker of the affected tests so they'll be enabled
again on Qt versions with the appropriate permissions API.
2024-10-27 12:48:46 +13:00
Florian Bruhin a138ab8978 Fix some broken links 2024-10-22 18:17:08 +02:00
Florian Bruhin d49675eeed Remove outdated version check 2024-10-22 18:10:19 +02:00
qutebrowser bot ad29c973f8 Update dependencies 2024-10-21 12:32:07 +02:00
Florian Bruhin dc5662b141 Update chromium release dates 2024-10-21 10:28:32 +02:00
Florian Bruhin 58dec07d27 Tests: Catch error with :tab-next/:tab-prev and no tabs
Ref #1448
2024-10-17 10:01:10 +02:00
bosshogg 85435c7574 Revert change to _count
Adds a specific check for only -1 in _current_index
2024-10-16 18:40:44 +02:00
bosshogg 5691e04afc Remove duplicate checking of widget existence
_run_userscript handles the case different than _current_index()
2024-10-16 17:20:08 +02:00
bosshogg 9fc6ea0434 Fix checks failing on first tab 2024-10-16 17:13:01 +02:00
Marcel Schilling 2aacfe1a8c
Rewrite `.feature` files to use the `"""` syntax
fixes #8342
2024-10-15 15:17:45 +02:00
Florian Bruhin af835c26ad Update changelog 2024-10-15 12:00:25 +02:00
Florian Bruhin ffe7d00a62 Merge branch 'drop-py38' 2024-10-15 11:58:54 +02:00
toofar cc3c1e2050 Enable pylint Too many positional arguments warning
This re-enables the pylint too-many-positional-arguments for the main
application code. It's still disabled for tests because that's how you pull in
pytlint fixtures, and I don't think we want to push people into being creative
with fixtures just to get around that.

When functions are called with many positional arguments the reader has to do
a bit of heavy lifting to figure out in what position a value is being passed,
and it's easier to make mistakes. So I would like to encourage using keyword
arguments for long argument lists.

I've set the `max-positional-arguments` to a completely arbitrary 7, from a
completely arbitrary 5, because there were many more violations under 7. If
like 99% of our functions fit under 7 it's probably fine.

Regarding the exceptions:
* objreg.register: I grepped it and it looks like everything is only passing
  the first two args as positional already, lucky!
*  `_get_color_percentage`: only one usage of it, but I was in "add directive
  comment" mode
* update_3rdparty.py: only one usage, already using kwargs
* pyqtProperty: idk
* commands.py: "its complicated". Many methods in this file map to commands
  used in qutebrowser's command mode. In that case it's usual for them to be
  called as flags, rather than positional. But it could be complicated to wade
  into that, and having one file excluded isn't so bad.
2024-10-15 11:55:04 +02:00
Florian Bruhin ff5d4d3564 Avoid passing a parent to QProcess
With the upgrade to MarkupSafe 3.0, something funny happened when trying to pass
the GUIProcess object to jinja after launching a userscript:

    [...]
    File "[...]/qutebrowser/browser/qutescheme.py", line 291, in qute_process
        src = jinja.render('process.html', title=f'Process {pid}', proc=proc)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "[...]/qutebrowser/utils/jinja.py", line 123, in render
        return environment.get_template(template).render(**kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [...]
    File "html/process.html", line 11, in block 'content'
    File "[...]/lib/python3.11/site-packages/markupsafe/__init__.py", line 42, in escape
        if hasattr(s, "__html__"):
           ^^^^^^^^^^^^^^^^^^^^^^
    RuntimeError: wrapped C/C++ object of type GUIProcess has been deleted

This can be reproduced with:

    qutebrowser --temp-basedir ':cmd-later 0 spawn -u -o /bin/echo test'

We pass the `GUIProcess` to the Jinja template as `proc`, which then formats it as
`{{ proc }}`` (to stringify it). For some reason, with the newest MarkupSafe/Jinja
versions, this now triggers the `if hasattr(s, "__html__")` check in MarkupSafe
(which has been around for a while). That then presumably causes PyQt to try and
access the underlying C++ object for `GUIProcess``, but that has already been
deleted.

But why is it deleted in the first place, if we keep track of even completed
processes data ever since we added `:process` in a3adba81c? It looks like the Qt
parent-child relationship is the culprit here: When we pass a parent to the
`GUIProcess`` from the userscript runner, it will get deleted as soon as said
runner is cleaned up (which happens after the userscript has finished).

We probably never noticed this before because we only accessed data from the
Python wrapper and not from the C++ side, but it still seems like a good idea
to avoid passing a parent for a long-lived object (with time-based cleanup) in
the first place.
2024-10-15 11:55:04 +02:00
Florian Bruhin f175f611f8 pylint: Disable too-many-positional-arguments
Added in 3.3.0:
https://pylint.pycqa.org/en/latest/whatsnew/3/3.3/index.html

Some of those arguments could probably indeed be keyword-only,
but for some of the functions shown by pylint, those are qutebrowser command
handlers where a positional argument has different semantics.
2024-10-15 11:55:04 +02:00
Florian Bruhin ab7d04a951 Fix wrong type annotation
This was wrong ever since 0a835ecd92,
but due to the version conditional usage, mypy did not check it.
2024-10-15 11:55:04 +02:00
Florian Bruhin 2ab963cef8 Remove pytz changelog URL 2024-10-15 11:55:04 +02:00
Florian Bruhin 7083fee655 Recompile requirements 2024-10-15 11:55:04 +02:00
Florian Bruhin cc18a624b5 Remove importlib_resources from requirements 2024-10-15 11:55:04 +02:00
Florian Bruhin 0fd6fc19f2 recompile_requirements: Fix with diff.mnemonicPrefix set 2024-10-15 11:55:04 +02:00
Florian Bruhin 088b5973eb Update mimetype overrides
See https://github.com/python/cpython/commits/main/Lib/mimetypes.py
2024-10-15 11:55:04 +02:00
Florian Bruhin eb8121ffd5 Use Callable from collections.abc as well
Did run with ruff pretending to use Python 3.10,
because otherwise it won't reformat those:

    ruff check --select 'UP035' --fix --config 'target-version = "py310"' --unsafe-fixes

This is because collections.abc.Callable inside Optional[...] and Union[...] is
broken with Python 3.9.0 and 3.9.1:

https://github.com/asottile/pyupgrade/issues/677
https://github.com/astral-sh/ruff/issues/2690
https://github.com/python/cpython/issues/87131

However, pylint can detect problematic usages (of which we only have one),
so we might as well use the new thing everywhere possible for consistency.

Also see #7098
2024-10-15 11:54:53 +02:00
Florian Bruhin 97104b2000 Use builtin list/dict/set/... types for annotations
See https://peps.python.org/pep-0585/
and https://docs.python.org/3/whatsnew/3.9.html#type-hinting-generics-in-standard-collections

Done via:

    ruff check --select 'UP006' --fix --config 'target-version = "py39"' --unsafe-fixes

followed by removing unused imports:

    ruff check --select 'F401' --fix --config 'target-version = "py39"'

and a semi-manual review to find imports that are still needed (but ruff doesn't know about yet):

    git diff | grep '^-' | grep import | grep -v "from typing"

Also see #7098.
2024-10-15 11:54:49 +02:00
Florian Bruhin c32b8090ca Import typing classes from collections.abc
See https://peps.python.org/pep-0585/
and https://docs.python.org/3/whatsnew/3.9.html#type-hinting-generics-in-standard-collections

Not changing List/Dict/Set/etc. in this commit, as that's a way bigger change.

Done via:

    ruff check --select 'UP035' --fix --config 'target-version = "py39"'

Also see #7098.
2024-10-15 11:54:35 +02:00
Florian Bruhin 8cf9cc9f1b nsis: Check for newer Windows build
Follow-up to #8321, so we only claim to support what Qt actually officially does.
2024-10-15 11:52:34 +02:00
Florian Bruhin 26b4ec6cef Bleeding requirements: Use pytest-bdd release
See https://github.com/qutebrowser/qutebrowser/issues/8342
2024-10-15 11:42:07 +02:00
Florian Bruhin 463bde5c8e Update changelog 2024-10-15 10:33:53 +02:00
Willow Barraco 61746e0f58 desktop: qutebrowser as webp mime type viewer
This is decent webp viewer, like other web browser.
2024-10-15 10:33:12 +02:00
Florian Bruhin c598cbbc71 Revert "ci: Avoid Archlinux' pyqt6 6.1.7-3 which lacks QSignalSpy"
This reverts commit 27e446d26d.
Archlinux now uses a PyQt 6.8 development snapshot.
2024-10-15 00:47:31 +02:00
toofar f895c022cb
Merge pull request #8337 from qutebrowser/update-dependencies
Update dependencies
2024-10-14 19:21:03 +13:00
qutebrowser bot 80ed616230 Update dependencies 2024-10-14 04:18:59 +00:00
bosshogg de5fbf711d Raise CommandError if there are no tabs or widgets
Show the user "No WebView avaible" when tryin to do an action on tabs or
widgets that don't exist.
2024-10-13 22:40:18 +02:00
Florian Bruhin 6bf159581e
Merge pull request #8301 from qutebrowser/dependabot/github_actions/peter-evans/create-pull-request-7
Bump peter-evans/create-pull-request from 6 to 7
2024-10-13 21:51:28 +02:00
Florian Bruhin b976a31ffa
Merge pull request #8321 from qutebrowser/feat/8260_drop_qt5_builds
Remove support for making Qt5 builds
2024-10-13 21:45:05 +02:00
Florian Bruhin 27e446d26d ci: Avoid Archlinux' pyqt6 6.1.7-3 which lacks QSignalSpy
See https://github.com/qutebrowser/qutebrowser/issues/8242#issuecomment-2409077518
2024-10-13 20:28:43 +02:00
Florian Bruhin 4d069b8fc3 Use str.removeprefix() and str.removesuffix()
https://docs.python.org/3/whatsnew/3.9.html#new-string-methods-to-remove-prefixes-and-suffixes
2024-10-13 18:24:44 +02:00
Florian Bruhin fe868901ab Remove all importlib_resources backport usage 2024-10-13 18:24:44 +02:00
Florian Bruhin 2ad1a579b1 Remove :debug-cache-stats conditionals 2024-10-13 18:24:44 +02:00
Florian Bruhin 71039e0d53 Minor Python 3.8 dropping adjustments 2024-10-13 18:24:44 +02:00
Florian Bruhin bcff1e90ea Update checkpyver for 3.8 drop 2024-10-13 18:24:44 +02:00
Florian Bruhin eb67b20417 Update docs for Python 3.8 drop 2024-10-13 18:24:44 +02:00
Florian Bruhin 5337882657 Adjust linters for dropping Python 3.8 2024-10-13 18:24:44 +02:00
Florian Bruhin 3288ec8598 Adjust Python versions in setup.py 2024-10-13 18:24:44 +02:00
Florian Bruhin bd3774dfc8 Drop Python 3.8 from tox/CI 2024-10-13 18:24:44 +02:00
Florian Bruhin 02cee732fc
Merge pull request #8334 from qutebrowser/update-dependencies
Update dependencies
2024-10-13 17:20:31 +02:00
qutebrowser bot 6093306ff5 Update dependencies 2024-10-13 14:54:29 +00:00
toofar 0ab1e3b757 Clear webengine's permissions.json on start
To avoid WebEngine remembering granted permissions across restarts,
remove their persistence file when we start up.

This is only technically required when Qt=>6.8 and PyQt<6.8. But we only
take action if the file exists anyway, so it's safe enough to run all
the time and that means less conditional code to test ;)

There are a few options for where we could do this cleanup, I'm choosing
to do it at the latest point possible, which is right before we set
`setPersistentStoragePath()`, since the permissions manager is
re-initialized after that, see https://bugreports.qt.io/browse/QTBUG-126595

TODO:
* call the new setPersistentPermissionsPolicy API when PyQt>=6.8
2024-10-13 18:52:29 +13:00
toofar dfd4fffaac Add test around remembering permissions across restart
Qt 6.8 has its own permission grant persistence features. This means
that if you accept a permission prompt in qutebrowser, and don't save
it, it will be remembered by webengine anyway and you won't be
re-prompted again.

This test demonstrates that behaviour by temporarily granting a
permission, restarting the browser in the same basedir, then seeing if
we get prompted for the permission again or not. If not it fails on the
"Asking question" line.

We can't do much about re-prompting for a permission in the same browser
instance (Qt saves the permission grant in memory too) but we can clean
up the persisted permission files on browser starts so it doesn't
remember it forever. At that point the skip mark can be removed from
this test.
2024-10-13 17:59:00 +13:00
toofar 50bf3bdd52
Merge pull request #8323 from qutebrowser/update-dependencies
Update dependencies
2024-10-13 15:19:56 +13:00
toofar 7475d385ac Comment out failing test assertion for now
Ref: https://github.com/qutebrowser/qutebrowser/issues/8330
2024-10-13 14:10:43 +13:00
Florian Bruhin 4d2aa13db3 Fix pdf.js downloading tests
See ee89bd1c39
which was part of PDF.js v4.7.76 (2024-10-06).

This should work both with the old and new version.
2024-10-12 22:20:02 +02:00
Florian Bruhin 775db2caef Update Chromium security patch versions 2024-10-12 22:19:58 +02:00
Florian Bruhin cc73134ead Add tenative v3.4.0 changelog 2024-10-12 21:50:07 +02:00
qutebrowser bot eacdca5a36 Release v3.3.1
(cherry picked from commit fc0d7e08bc)
2024-10-12 19:40:58 +00:00
Florian Bruhin 94dce5f1d4 Update release checklist 2024-10-12 21:38:20 +02:00
Florian Bruhin 7d6ea4b58b Fix up changelog 2024-10-12 21:37:17 +02:00
Florian Bruhin 5a8964dc48 Update changelog 2024-10-12 21:31:27 +02:00
Florian Bruhin 28480f394b Update the Firefox UA for quirks
See #5182
2024-10-12 21:31:27 +02:00
Florian Bruhin 5057c9a2ca Update content.headers.user_agent completions 2024-10-12 21:31:27 +02:00
qutebrowser bot 7d1d6459e0 Release v3.3.0 2024-10-12 19:23:16 +00:00
bosshogg 431b2c1633 Fix zero division bug in tab-move +
Do the modulo by 1 incase self._count() is 0 or negative
2024-10-11 22:23:30 +02:00
bitraid 52a8576d7c Simplify OS version checks in nsis installer
22000 is the earliest win11 build, so no need to check for that
separately.
AtLeastWin11 is from https://github.com/kichik/nsis/blob/master/Include/WinVer.nsh#L552
Remove fail label since all failures fall through.
2024-10-09 21:40:37 +13:00
qutebrowser bot dea648ccd8 Update dependencies 2024-10-07 04:22:07 +00:00
toofar 3a48111e53 update node version for eslint
Github is updating all their actions to node 20, may as well do the same
here? Not strong need to update it, just spotted this.
2024-10-05 13:55:15 +13:00
toofar d24a4c5ab0 Remove Qt5 switches from release building scripts etc
I just searched for qt5 and deleted stuff. EZ.
Will leave on a branch for a bit and see if I feel like testing this at
all, otherwise maybe leave this stuff in here and make it not called.

Not 100% sure that we need to remove all this stuff when we just want
the CI to go green. But tbh if we don't need to make Qt5 releases then
we don't need it. Better to be bold and pull it out than have to work
around it in the future. And we can always revert the commit.
2024-10-05 13:55:15 +13:00
toofar fc9fe75033 Remove qt5 nightly jobs
They require maintenance, but we don't have a great need for Qt5 builds.
See https://github.com/qutebrowser/qutebrowser/issues/8260

All the Qt5 switches are still in tox, the build release script and the
nsis installer.
2024-10-05 13:29:50 +13:00
toofar 0b0eb46b55 update expected security patch version for Qt 6.7.3 2024-10-05 12:03:35 +13:00
toofar 3bc30e748d Merge pull request #8243 from feat/e2e_screenshots 2024-10-05 11:30:57 +13:00
toofar a30b973f3e
Merge pull request #8316 from qutebrowser/update-dependencies
Update dependencies
2024-10-02 07:42:40 +13:00
Florian Bruhin c8b7cbbbda
Merge pull request #8317 from webknjaz/docs/8313-gentoo-kerberos-use-flag
📝 Mention `kerberos` USE-flag on Gentoo
2024-09-30 15:39:22 +02:00
Sviatoslav Sydorenko 0b6db05499
📝 Mention `kerberos` USE-flag on Gentoo
This flag is vital for the allow-list configuration to be picked up.
It should be set globally and `dev-qt/qtwebengine` should be
recompiled after it's enabled.

Ref #8313.
2024-09-30 15:37:00 +02:00
qutebrowser bot 1cc408b77f Update dependencies 2024-09-30 04:20:13 +00:00
toofar b73aadb737
Merge pull request #8309 from qutebrowser/update-dependencies
Update dependencies
2024-09-27 18:24:50 +12:00
qutebrowser bot 2a75b341b8 Update dependencies 2024-09-23 04:19:57 +00:00
toofar b6163af21e
Merge pull request #8305 from qutebrowser/update-dependencies
Update dependencies
2024-09-18 12:36:17 +12:00
toofar a409f9acf7 add changelog for jaraco.collections 2024-09-18 11:35:30 +12:00
qutebrowser bot 61eb05d043 Update dependencies 2024-09-17 11:14:19 +00:00
toofar 78a74a2e2a Include platformdirs in test requirements as a workaround too
See the previous commit db83a82fe1
2024-09-17 23:04:25 +12:00
toofar db83a82fe1 Include platformdirs in dev requirements as a workaround
See 433074c681, this is the same cause. An older version of a
package being included in requirements files because setuptools injects
its vendored packages into sys.path and we use pip freeze to build lock
files. Then when you install two requirements files at the same time they
end up having conflicting versions. This at least means we include the
latest version, which will do until we move to a method of generating
lock files that just works off of the raw requirements file.
2024-09-17 20:35:42 +12:00
dependabot[bot] cff456f232
Bump peter-evans/create-pull-request from 6 to 7
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 6 to 7.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v6...v7)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-09 18:43:12 +00:00
toofar 4bd7b5541b
Merge pull request #8293 from qutebrowser/update-dependencies
Update dependencies
2024-09-06 20:43:07 +12:00
toofar a05cbe4f30 Adjust permission tests for changes to 6.8 permission storage feature
Qt have updated their permission storage feature so it respects our
the setting our basedir feature uses, so now all the tests that use
"Given I have a fresh instance" are passing.

The remaining failing ones do pass if I make them run in a fresh
instance, but I am leaving them as xfail because a) opening a new
instance is slow b) the new upstream behaviour causes a regression in
the qutebrowser behavior (you don't get re-prompted where you would have
been previously) so I feel like it is correct for some tests to be
failing! We have to set AskEveryTime at some point and we can address
them then.
2024-09-06 19:53:06 +12:00
toofar 3331a4cc6a Dump 6.8 beta4 security patch version 2024-09-06 19:35:51 +12:00
toofar 4ba0e00bbd Ignore no dictionary errors on CI
The message is:

    The following paths were searched for Qt WebEngine dictionaries:
      /tmp/qutebrowser-basedir-qrhbqblr/data/qtwebengine_dictionaries
    but could not find it.
    Spellchecking can not be enabled.

Tests are failing on "Logged unexpected errors".
2024-09-06 18:13:21 +12:00
toofar d49dd3d48f fix changelog urls 2024-09-06 17:43:12 +12:00
qutebrowser bot 16781b5b09 Update dependencies 2024-09-03 07:26:01 +00:00
toofar adf39e9f72 also update jaroco-context as a workaround
see previous commit
2024-09-03 19:17:09 +12:00
toofar 433074c681 Add importlib_resources to tests requirements file as workaround
Currently the dependency update job is failing[1] because one of the
tests installs multiple requirements files before running the tests and
it claims they have conflicting versions of `importlib_resources` (6.4.0
vs 6.4.4). 6.4.0 is in the pinned files and there is a 6.4.4 available.

Looking though the logs the first time I see importlib_resources==6.4.0
is when printing the requirements for the `test` requirements file.
But it's not mentioned at all when installing that file. Which makes me
think it found it's way into the virtualenv by some other means.

Looking at git blame for the test requirements lock file, it looks like
importlib_resources was introduced in
https://github.com/qutebrowser/qutebrowser/pull/8269 and indeed I can
see version 6.4.0 in setuptools vendored folder[2].

So it looks like this is another issue caused by setuptools adding their
vendored packages into sys.path.

Options I can see for resolving this:

a. add importlib_resources as a dependency in requirements.txt-raw so
  that we always pull down the newest one, even though we don't need it
b. add an @ignore line for importlib_resources
    * I think in the unlikely event we end up needing it then it being
      ignored might be hard to spot
c. drop python 3.8 support
d. switch to a requirements compilation method that doesn't use `pip
  freeze`

I've chosen (a) here because I think it's less surprising than (b), less
work than (c) and I already have a PR up for (d). And it's only pulled
down for 3.8 anyhow, so we'll drop this workaround when we drop that.

[1]: https://github.com/qutebrowser/qutebrowser/actions/runs/10660624684/job/29544897516
[2]: https://github.com/pypa/setuptools/tree/main/setuptools/_vendor
2024-09-03 19:02:52 +12:00
toofar 3852f12091 Don't list each screenshot name in pytest report
This bit is printed right about the test result summary, so now that the
file names are just test names, printing them out just above the full
test paths in the results seems a bit redundant.
The section header prints out the file path with the screenshots and
that's the important part. It looks fine to me printing a section header
without any section contents. Example:

    -------------------- End2end screenshots available in: /tmp/pytest-of-user/pytest-108/pytest-screenshots ---------------------
    =================================================== short test summary info ====================================================
    FAILED tests/end2end/features/test_completion_bdd.py::test_deleting_an_ornpen_tab_via_the_completion - AssertionError: assert 'http://local...ata/hello.txt' == 'http://local...ata/sello.txt'
    FAILED tests/unit/utils/test_resources.py::TestReadFile::test_glob_deleting_resources_subdir[True-pathlib] - AssertionError: assert ['html/subdir...ir-file.html'] == ['html/subdir...ir-sile.html']
    FAILED tests/unit/utils/test_resources.py::TestReadFile::test_glob_deleting_resources_subdir[False-zipfile] - AssertionError: assert ['html/subdir...ir-file.html'] == ['html/subdir...ir-sile.html']
    FAILED tests/unit/utils/test_resources.py::TestReadFile::test_glob_deleting_resources_subdir[True-zipfile] - AssertionError: assert ['html/subdir...ir-file.html'] == ['html/subdir...ir-sile.html']
    FAILED tests/end2end/features/test_utilcmds_bdd.py::test_cmdrepeatlast_with_modeswitching_command_deleting - AssertionError: assert 'http://local...ata/hello.txt' == 'http://local...ata/sello.txt'
    FAILED tests/unit/utils/test_resources.py::TestReadFile::test_glob_deleting_resources_subdir[False-pathlib] - AssertionError: assert ['html/subdir...ir-file.html'] == ['html/subdir...ir-sile.html']
    =========================================== 6 failed, 23 passed, 8 skipped in 22.59s ===========================================
2024-08-24 23:12:55 +12:00
toofar ea5d15ad2e Remove timestamp and test path from screenshot names.
Hopefully now that we have reporting in the test results, and pytest
retaining of old directories, we don't have to encode so much
information in the filenames to help you make sense of them.

Previously the png filenames looked like this:

    2024-08-24T12_42_11.160556-tests_end2end_features_test_completion_bdd.py__test_deleting_an_open_tab_via_the_completion.png

Now they just have the individual test name, eg:

    test_deleting_an_open_tab_via_the_completion.png

The two times people will want to look at these files and I want to make
sure they can find what they are looking for are:

* running the tests locally
    * the directory with the images is printed out right above the
      pytest summary, hopefully that is a clear enough reference to the
      tests and that has the full path to the tests, not just the name
    * if people run multiple test runs and want to find older images
      they will have to know, or guess, how the pytest temp dir naming
      scheme works, or go back in their terminal scrollback
* when downloading images as artifacts to debug tests
    * The zip files with images from a job currently have names like
      end2end-screenshots-2024-08-18-fef13d4-py310-pyqt65-ubuntu-22.04.zip
    * Hopefully that zip file name is specific enough
    * I'm not sure if the individual filenames with just test name in
      them are specific enough for this case. But presumably people will
      be looking at the run logs in CI anywhere and will be able to
      match up a failing test with the screenshot easy enough

Pytest appears to sanitize test names enough for upload-artifact.
Couldn't see any docs on it, but I put all the characters it complains
about in a BDD test name and they all go stripped out.
2024-08-24 23:12:55 +12:00
Florian Bruhin 213a163623 test: Ignore new libEGL warnings
Seem to fail all tests on Archlinux-unstable
2024-08-23 21:44:20 +02:00
Florian Bruhin 130479e2bd Add missing copyright / license headers to qutebrowser.qt
Done via:

reuse annotate \
    --exclude-year \
    -c 'Florian Bruhin (The Compiler) <mail@qutebrowser.org>' \
    --license="GPL-3.0-or-later" \
    qutebrowser/qt/*.py
2024-08-22 15:12:22 +02:00
toofar 451cc6fd56 Refer to mkvenv script by full path in install docs
Might help with people copying and pasting commands. I don't think the
script installs itself in bin/ in the virtualenv it creates?

Closes: #8263
2024-08-18 13:23:02 +12:00
toofar 622b98df12 update changelog for e2e test screenshots 2024-08-18 12:43:40 +12:00
toofar 914227ca1c Set TMPDIR to RUNNER_TEMP on CI
The upload artifact action can't collect artifacts from /tmp/ in the test
runners. So now that we are writing the screenshots that we want to collect
later to the pytest `tmp_path` location we need to make sure that lives
somewhere the later actions can find it.

Pytest uses `tempfile.gettempdir()` to find the temp dir, and that respects a
number of environment variables including `TMPDIR`. This commits sets TMPDIR
to RUNNER_TEMP in in our test runners to make pytest uses the temp dir that's
mounted into the action containers.

For the docker based runners I can use the `env` map, but for the ubuntu ones
it didn't let me expand `${{ runner.temp }}` in the end map under `step`, so
I'm writing it to the env file for the runner instead. It failed to parse the
action yaml and said:

    > Unrecognized named-value: 'runner'. Located at position 1 within expression: runner.temp

For the user part of the `pytest-of-$user` directory, I looked at the new
screenshot related test summary lines to see what the user was called.
`runner` on the ubuntu containers and `user` in our docker containers. Pytest
maintains the "pytest-current" symlink to the latest temp folder.
2024-08-18 12:42:35 +12:00
toofar cc85d61303 Teach sanity check in tests about temp dirs under HOME
On GitHub the RUNNER_TEMP dir is inside the user's home directory. I
think the spirit of the check is making sure you aren't touching stuff
like ~/.config/qutebrowser/ in the tests, if it's within a specified
tempdir it should be fine
2024-08-18 12:42:35 +12:00
toofar 0c3807b04a Add pytest report section listing e2e screenshots
I would like it to be obvious to contributors who run the tests locally
that there are screenshots of the processes under test that they can
examine. I don't think it's obvious that there could be useful files
sitting round in a temp directory.

This commit adds the screenshot file paths to a user property on failed
tests then adds a custom report section that pulls that lists those
properties. That way when there is errors users will get the paths to
the images printed out alongside the report of failed tests.

I find it difficult to navigate the internals of pytest. I tried various
ways of printing information and getting that information to methods
that could do the printing but couldn't get anything to work. I ended up
entirely copying this SO post which worked really well for attaching
information to test results in a place that is accessable to the
reporting hook: https://stackoverflow.com/a/64822668

It's added to the end of the existing terminal report hook, because
while it seems you can have two of those hooks, things can get pretty
confusing with interleaved reports and not all of them running every
time.

    --------------------- End2end screenshots available in: /tmp/pytest-of-user/pytest-56/pytest-screenshots ---------------------
    2024-08-17T14_49_35.896940-tests_end2end_features_test_utilcmds_bdd.py__test_cmdrepeatlast_with_modeswitching_command_deleting.png
    2024-08-17T14_49_37.391229-tests_end2end_features_test_completion_bdd.py__test_deleting_an_open_tab_via_the_completion.png
    =================================================== short test summary info ====================================================
    FAILED tests/end2end/features/test_utilcmds_bdd.py::test_cmdrepeatlast_with_modeswitching_command_deleting - AssertionError: assert 'http://local...ata/hello.txt' == 'http://local...ata/sello.txt'
    FAILED tests/end2end/features/test_completion_bdd.py::test_deleting_an_open_tab_via_the_completion - AssertionError: assert 'http://local...ata/hello.txt' == 'http://local...ata/sello.txt'
    ====================================================== 2 failed in 5.18s =======================================================

From adding debug messages I can see:

    RUNNER_TEMP=/home/runner/work/_temp
    /tmp/pytest-of-runner/pytest-0/pytest-screenshots

Means that I don't think GHA will be able to collect the temp files
because they are not being written to the temp dir being mounted in from
outside. I think that's the case anyway. Might have to pass
--basetemp=$RUNNER_TEMP to pytest or set TEMP or something. TODO
2024-08-18 12:42:35 +12:00
toofar 2fcd6eafc4 Save screenshots to tmp_path, move stuff into fixtures
Saving screenshots to the temp directories managed by pytest means we
don't have to worry about cleaning up from previous runs because pytest
will create a new folder for each run. Now that we aren't cleaning stuff
up means we don't have to worry about workers clobbering each other
because all they are going to do is write to files with the names of
tests which have already been distributed amongst them.

Moving to the pytest temp dirs instead of a hardcoded one also means
that it'll be less obvious to users where the screenshots are. Pytest
doesn't seem to have much UX around pointing people to interesting
artifacts in the "temp" dir. So I'll have another look at adding this
information to the test report.

Since this implementation is now more tightly couple with pytest I've
pulled some code out of the QuteProc process into fixtures.

TODO:
* add screenshot locations to test report
* adapt GHA zip file creation to get files from /tmp/pytest-of-$user/pytest-current/pytest-screenshots
* review filenames to see if pytest does a good enough sanitization for
  us, from what I've seen it doesn't slugify that path of the tests, and
  it tends to truncate names. I think having the full test path in the
  filenames could be useful for people who download the zip file from
  the github actions to investigate CI failures
2024-08-18 12:42:35 +12:00
toofar 557b2f37fd Don't clobber screenshot dir when running with xdist
Ohhh! I didn't realize the e2e tests where running in parallel already.
Interesting.

Anyhow, use the builtin `filelock` module to make sure different test
processes in the same session don't re-create the screenshot directory.

This is based on advice here: https://pytest-xdist.readthedocs.io/en/latest/how-to.html#making-session-scoped-fixtures-execute-only-once

I'm saving the lock object to the session stash because it seems the
lock is released when the FileLock object is destroyed. So this ties
it's lifecycle to the test session lifecycle, with xdist hopefully all
the tests processes live for the whole run.
2024-08-18 12:42:35 +12:00
toofar 78b6fd5cad Position e2e browser at top left corner of screen
When taking screenshots of the test process running under xvfb it's
offset from the top left corner, the default geometry of qutebrowser is
800x600+50+50. The default size of pytest-xvfb is 800x600, which means
part of the browser window is outside the X11 screen and doesn't get
captured.

This commit duplicates the width and height from the default geometry in
mainwindow.py but sets the x and y offsets to zero so that the browser
window is fully contained within the X11 window.
2024-08-18 12:42:35 +12:00
toofar a3238eb494 upload e2e failure screenshots as artifacts
This commit takes a screenshot of the active browser window when an
end2end test fails. When running on CI a zip file of screenshots will be
attached to the run summary as an artifact. When run locally screenshots
will be left in /$TMPDIR/pytest-screenshots/.

The screenshot is of the Xvfb screen that the tests are running under.
If there are multiple windows open it will likely only show the active
window because a) we aren't running with a window manager b) the Xvfb
display is, by default, the same size as the browser window.

I'm not sure if xvfb is used on the Window runs in CI. We could fall
back to trying to take screenshots if not running under xvfb but I'm a
bit wary of an automatic feature that takes screenshots of people's
desktops when running locally. Even if they just to to /tmp/ it might be
surprising. We can change it later if it turns out we need to try to
take screenshots in more cases.

I'm using pillow ImageGrab, the same as pyvirtualdisplay.smartdisplay. I'm
getting the display number from the pytest-xvfb plugin and formatting it
appropriately (pyvirtualdisplay has an already formatted one which is used by
the smartdisplay, but that's not accessible).

Pillow is now a requirement for running the tests. I thought about making
it gracefully not required but I'm not sure how to inform the user with
a warning from pytest, or if they would even want one. Maybe we could
add a config thing to allow not taking screenshots?

I had to bump the colordepth config for pytest-xvfb otherwise pillow
complained that the default 16bit color depth wasn't supported as it
only supports 24bit, see https://github.com/python-pillow/Pillow/blob/1138ea5370cbda5eb328ec949
8c314d376c81265/src/display.c#L898

I'm saving screenshots to a temp dir because I don't want to put them in
my workdir when running locally. I want to clear the directory for each
run so that you don't get confused by looking at old images. I'm not
100% sure about the lifecycle of the process classes though. Eg if we
have two processes they might both try to create the output directory.
I'm using pytest.session.stash to save the directory so perhaps the
lifecycle of the stash will handle that? Not sure.

Ideally the images would be uploaded somewhere where we could click
through and open them in the browser without having to download a zip
file, but I'm not sure how to achieve that.

It would be nice to print in the test logs that a screenshot was saved
and where to. Just so you could copy paste the filename instead of
having to match the sanitized filename against failing test names. But I
don't know how to log stuff from this stage in the pytest lifecycle.

TODO:
* I'm not sure that the screenshot captures the whole browser window?
  Maybe the browser windows is bigger than the X11 display?

Closes: #7625
2024-08-18 12:42:29 +12:00
Florian Bruhin f3459a8f14 Reset PyInstaller environment on :restart
Starting with PyInstaller 6.10 (6.9?), we're supposed to tell PyInstaller when
we restart our application (and a subprocess should outlive this process).

In their words:

    The above requirement was introduced in PyInstaller 6.9, which changed the
    way the bootloader treats a process spawned via the same executable as its
    parent process. Whereas previously the default assumption was that it is
    running a new instance of (the same) program, the new assumption is that the
    spawned process is some sort of a worker subprocess that can reuse the
    already-unpacked resources. This change was done because the worker-process
    scenarios are more common, and more difficult to explicitly accommodate
    across various multiprocessing frameworks and other code that spawns worker
    processes via sys.executable.

https://pyinstaller.org/en/stable/common-issues-and-pitfalls.html#independent-subprocess
https://pyinstaller.org/en/stable/CHANGES.html (6.10)

While from a quick test on Windows, things still worked without setting the
variable (possibly because we don't use a onefile build), it still seems
reasonable to do what PyInstaller recommends doing.

Follow-up to #8269.
2024-08-13 16:03:54 +02:00
Florian Bruhin ba210f52f1 Simplify type annotation
See #8269
2024-08-13 11:58:50 +02:00
toofar afe3e4aef5
Merge pull request #8269 from qutebrowser/update-dependencies
Update dependencies
2024-08-13 18:01:47 +12:00
toofar 452408870b adjust babel changelog (case change) 2024-08-12 19:29:07 +12:00
toofar 096a4edec2 Add changelog URLs
Few new vendored packages showing up from setuptools for environments
where pkg_resources is being imported for some reasons.

I don't think these requirements should be in our requirements files,
they aren't direct dependancies and they aren't declared as dependancies
of setuptools (and we are currently excluding setuptools from our
requirements files anyway, although apparently that is not the right
thing to do these days). These are actually not installed as normal
packages by are vendored packages shipped with setuptools.

Options I see to deal with them:

1. suck it up and add them to the compiled requirements files
  * not ideal, but should be harmless. They are real packages that the
    setuptools authors have chose to use
2. exclude these new packages using the markers in comments
  * maybe, seems like it could lead to issues in the future if any of
    these packages start getting declared as proper dependancies
3. find out where pkg_resources is being imported and stop it
  * I don't seem to be able to reproduce this behaviour locally, even
    when using a py3.8 docker container. And we are literally only
    running `pip freeze` via subprocess, what could the difference be?
  * I don't particularly want to delve into the arcane python packaging
    stuff, it seems to be layers and layers of very specific issues and
    old vendored packages
4. stop using pip freeze to compile requirements files and just compute
   them based off of the raw files themselves
   * Don't give us the chance to use stuff that we don't depend on but
     happens to be installed. We get other nice things with this too

This commit does (1). I'll open a follow up PR to do (4).
2024-08-12 19:29:07 +12:00
toofar 0050fc99dc mypy: adapt new type hints to pyqt5
Ah! I'm having flashbacks to last year.

1. pyqt5 has plural enum names = define conditional type variable
2. pyqt5 doesn't wrap all the nullable things in Optional = sneakily
   make the existing overload function signature conditional.
   There might be some other was to solve this, not sure. I know we have
   qtutils.add_optional() but in this case it's complaining that the
   signature doesn't match the parent. Narrowing or widening the type of
   the returned object doesn't affect the function signature. Possibly
   we could define our own type variable MaybeOptional...
2024-08-12 19:29:06 +12:00
toofar aceef82b24 mypy: Attempt to extract base class from completion categories
The methods in `completionmodel.py` dealing with completion categories
were annotated with `QAbstractItemModel`. In mypy's latest 3.11 update
it correctly pointed out that there is code relying on some attributes,
like `name`, being on the categories but `QAbstractItemModel` didn't
implement those attributes.

This commit adds a new base class for completion categories which
defines the extra attributes we expect. It also changes the type hints
to ensure all list categories inherit from it.

There is a couple of downsides to the current implementation:
* It's using multiple inheritance
  * the completionmodel code currently expects categories to have all
    the methods of `QAbstractItemModel` plus a few other attributes.
    Each of the categories inherit from a different Qt model, so we
    can't just remove the Qt model from their class definition.
  * trying to extract the Qt models to a `widget` class is way too much
    work to fit in a dependency update, and I'm not sure it'll be the
    right thing to do because the categories are primarily Qt models, so
    we would have have to proxy most methods. Perhaps if they added
    their extra metadata to a central registry or something
  * I tried using a typing.Protocol for BaseCategory but when trying to
    make it also inherit from QAbstractItemModel it got grumpy at me
* It doesn't enforce that the attributes are actually set
  * it makes mypy happy that they are there, but there is nothing
    warning child classes they have forgotten to set them. Mypy does at
    least warn about categories that don't inherit from `BaseCategory`
    so implementors will hopefully go there an look at it.
  * Apparently you can do some stuff with abstract properties, that
    might even have type hinting support. But that's a bit much for me
    to want to pile in there tonight

At lest the type hints in `completionmodel.py` are more correct now!
2024-08-12 19:29:06 +12:00
toofar 98f85cbfcc Fix more type hints
New mypy 3.11 update got smarter and raise some issues, they appear to
be correct in all cases.

There are several `type: ignore[unreachable]` comments in conditionals
on `sys.stderr` being None, which were introduce in a comment
specifically to handle a case where `sys.stderr` could be None. So
presumable the ignore comments were just to shut mypy up when it was
making mistakes.

In `debug.py` it was complaining that the class handling branch was
unreachable, because the type hint was overly restrictive. We do indeed
handle both classes and objects.

`log.py` got some extra Optional annotations around a variable that
isn't set if `sys.stderr` is None.
2024-08-12 18:16:21 +12:00
toofar b91e142643 Remove `callback` arg to webkit print preview
mypy 1.11 has new and improved support for checking partial functions,
and it works great! It says:

    qutebrowser/components/misccommands.py: note: In function "_print_preview":
    qutebrowser/components/misccommands.py:74: error: Unexpected keyword argument "callback" for "to_printer" of
    "AbstractPrinting"  [call-arg]
            diag.paintRequested.connect(functools.partial(
                                        ^
    qutebrowser/browser/browsertab.py:269: note: "to_printer" of "AbstractPrinting" defined here

We indeed removed the callback arg in 377749c76f

And running `:print --preview` on webkit crashes with:

    TypeError: WebKitPrinting.to_printer() got an unexpected keyword argument 'callback'

With this change print preview works again (on webkit), which I'm a
little surprised by!
2024-08-12 18:16:21 +12:00
toofar e2f718a518 Adjust some type hints to better match parent classes
mypy 1.11 has stricter checking of the type signature overridden methods: https://github.com/python/mypy/blob/master/CHANGELOG.md#stricter-checks-for-untyped-overrides

There's a couple of places where I added type hints and had to duplicate the
default kwarg value from the parent.

In `completionmodel.py` it was complaining that the type signature of
`parent()` didn't match that of `QAbstractItemModel` and `QObject`. I've
changed it to be happy, and incidently made it so the positional arg is
optional, otherwise it's impossible to call `QObject.parent()`. Options that I
see:

1. support both variant of parent() - what I've done, the technically correct
   solution
2. have the two overload definitions but in the actual implementation make the
   positional argument required - would mean one overload signature was a lie,
   but would make it more clear how to call `CompletionModel.parent()
3. do type: ignore[override] and leave it as it was

In the end I don't expect there to be many callers of
`CompletionModel.parent(child)`.

I also added a few more function type hints to `completionmodel.py` while I
was there. Not all of them though!

In `objreg.py` I expanded the user of `_IndexType` because as
7b9d70203f say, the window register uses int as the key.
2024-08-12 18:16:21 +12:00
qutebrowser bot 59b2cc71ce Update dependencies 2024-08-12 04:21:43 +00:00
Florian Bruhin b9441cad45 Fix crash when the renderer process terminates for an unknown reason
With PyQt 6, this gets represented as
QWebEnginePage.RenderProcessTerminationStatus(-1)
which is != -1, thus leading to a KeyError.

Updating to a RendererProcessTerminationStatus
enum value works fine on both PyQt5 and PyQt6.
2024-08-04 21:00:50 +02:00
toofar 43fa657f55 Make failed subframe styling error matching more flexible
In the Qt6.8.0-beta2 release for some reason the error message now looks like;

    Failed to style frame: Failed to read a named property '_qutebrowser' from 'Window': Blocked a frame with origin "http://localhost:35549" from accessing a cross-origin frame.

It seems to have an extra "Failed to read a named property '_qutebrowser' from
'Window'" before the "Blocked a frame ..." bit. Seems like maybe a nested
exception situation? Not sure what's going on there but the exception is still
being caught, which is the point of the test.

Hopefully we don't have more issues with subframes cropping up...
2024-07-28 18:58:29 +12:00
toofar 779bb73920 Update pakjoy and chromium versions for Qt6.8
Looks like the kde-unstable arch repo has updated again. It says
6.8.0beta2-1.

I guess the number might change again in the future, still a couple of
months to go before release.
2024-07-28 16:00:17 +12:00
toofar c3f34a8a39 update docs and changelog for URL match patterns link 2024-07-27 11:20:17 +12:00
toofar 152571c9cd Merge pull request #8268 from greenfoo/update_match_patterns_link
Update link to chrome match patterns documentation
2024-07-27 11:13:16 +12:00
Fernando Ramos d65489da91 Update link to match patterns documentation 2024-07-21 21:53:18 +02:00
Florian Bruhin 5003929cdd pakjoy: Fix Qt 5 tests 2024-07-15 08:11:10 +02:00
Florian Bruhin 086c1b4c08 scripts: Adjust PyQt[56]-sip package names 2024-07-15 08:09:13 +02:00
qutebrowser bot a2c8ebf257 Update dependencies 2024-07-15 04:21:46 +00:00
Florian Bruhin 6e84639276 pakjoy: Test behavior when explicitly enabled 2024-07-14 22:14:00 +02:00
Florian Bruhin dfcb6e3f7c pakjoy: Improve error message and add test 2024-07-14 22:04:56 +02:00
owl 67aeae367c
pakjoy: show error message if workaround was explicitly requested and failed 2024-07-14 21:32:25 +02:00
Florian Bruhin 564293fb6e Update pakjoy setting description 2024-07-12 16:33:14 +02:00
Florian Bruhin 2088ecebd9 pakjoy: Add more hardcoded IDs and fix tests 2024-07-12 16:00:52 +02:00
Florian Bruhin bcf792a0dc Add more hardcoded IDs and tests 2024-07-12 15:28:38 +02:00
owl d9b9349656
Add setting to disable Google Hangouts extension
Fixes #8257
2024-07-12 12:36:50 +02:00
toofar 71291280ac
Merge pull request #8256 from qutebrowser/update-dependencies
Update dependencies
2024-07-08 18:38:31 +12:00
qutebrowser bot 2dbb518a8d Update dependencies 2024-07-08 04:20:22 +00:00
Florian Bruhin a5c5cdb08b Fix some typos
Thanks to https://github.com/crate-ci/typos
2024-07-02 13:40:15 +02:00
Florian Bruhin 5f50586ca4 style: Deal with unreachable code and pylint
https://pylint.pycqa.org/en/latest/whatsnew/3/3.2/index.html#what-s-new-in-pylint-3-2-4
2024-07-01 16:44:56 +02:00
Florian Bruhin aae05613b5 style: Use dict.fromkeys()
Added in flake8-comprehensions 3.15.0:
https://github.com/adamchainz/flake8-comprehensions/blob/main/CHANGELOG.rst
2024-07-01 16:43:09 +02:00
qutebrowser bot 95075d20ff Update dependencies 2024-07-01 04:21:28 +00:00
Florian Bruhin 4d2361288d ci: Fix pip/python usage for QtWebKit
I'm sure I tested this locally before pushing
b241b0360b but now it's broken?

This seems to fix things now. See #8247.
2024-06-29 21:59:43 +02:00
Florian Bruhin b241b0360b ci: Install a newer Python 3.10 for QtWebKit image
Starting with the upgrade to Hypothesis 6.103.4 we got hangs when pytest exits.
This is caused by:

https://github.com/HypothesisWorks/hypothesis/pull/4013

combined with:

https://github.com/python/cpython/issues/102126

which was fixed in Python 3.10.11, but the latest 3.10 packaged by Archlinux was
3.10.10.

Thus, we instead build a newer 3.10 from the AUR.
This bumps the build time up to about 20 minutes on my machine, which is
probably acceptable since those are nightly builds only anyways. We could
probably half that by disabling --enable-optimization, but that would be at the
cost of making the actual test runs (which run more often) slower.

Closes #8247
2024-06-29 20:47:59 +02:00
Florian Bruhin b78fc5765a ci: Drop macOS 11
Will be dropped on GitHub Actions tomorrow:
https://github.blog/changelog/2024-05-20-actions-upcoming-changes-to-github-hosted-macos-runners/

For unit tests, we now run them on macOS 13 instead, thus testing on all three
macOS versions we currently support.

For releases, this forces us to now support macOS 12 as the oldest supported
version and drop macOS 11 support. Thus, we should not have a v3.2.2 release.

Not backporting this commit so CI fails there rather than silently bumping up
requirements.
2024-06-27 22:04:40 +02:00
Florian Bruhin df1066b833 Replace all logging._acquireLock usages
Follow-up to d0cc8d4, see #8205
2024-06-26 17:41:30 +02:00
Florian Bruhin f377fd36d9 Fix up changelog
Cherry-picking 21ee2d093a resulted in an accidental v3.3.0 section in the changelog.
2024-06-25 11:19:55 +02:00
qutebrowser bot f9cfef973a Release v3.2.1
(cherry picked from commit 8cb4556245)
2024-06-25 09:07:53 +00:00
Florian Bruhin 547530e33c Move apple silicon releases to v3.2.1 2024-06-25 10:40:46 +02:00
Florian Bruhin 307245c8cf Update changelog 2024-06-25 10:06:27 +02:00
Florian Bruhin addff4f8c4
Merge pull request #8245 from qutebrowser/update-dependencies
Update dependencies
2024-06-25 10:02:03 +02:00
Florian Bruhin c836004dc0 Update mypy changelog URL
Seems to contain patch versions too
2024-06-25 09:41:57 +02:00
qutebrowser bot d34bbada03 Update dependencies 2024-06-25 07:11:53 +00:00
Florian Bruhin f56d992f01
Merge pull request #8244 from qutebrowser/update-dependencies
Update dependencies
2024-06-25 09:04:16 +02:00
Florian Bruhin 4f66661ff8 Update sip changelog URL 2024-06-25 08:57:36 +02:00
Florian Bruhin d0cc8d4fe9 tests: Update private logging API usage for Python 3.13
See https://github.com/python/cpython/issues/109461
Using it as a context manager already works fine in earlier Python versions too.

See #8205
2024-06-25 08:47:01 +02:00
qutebrowser bot 514026053d Update dependencies 2024-06-24 04:19:39 +00:00
toofar b3b9678699
Merge pull request #8158 from qutebrowser/feat/manual_docker_docs
Tips for contributors to run the webkit backend
2024-06-23 20:39:06 +12:00
toofar d0422a982f Tips for contributors to run the webkit backend
My virtualenv I used to run webkit has rotted long ago and I don't remember
how I set it up. There is a PyQtWebKit project on PyPI but I don't know
who that's published by.

So I figured I would write some notes for myself on using the docker container
used for CI instead. I chose to mount the current directory (which is
presumably a qutebrowser checkout!) directly into the container instead of
cloning it so I could have quicker feedback between making code changes and
running tests.

Then there's a couple of things that stem from that. Since the user in the
container is different from the one in the host we have to move some things
that are normally written to the current directory to be written elsewhere.
There are other ways to approach this (eg you can add `-u $(id -u)` to the
docker command line, although that makes things a bit confusing in the
container) but arguably it's good for the container not to be able to write to
the host, hence making that volume read only.

The TOX_WORK_DIR trick is from
[here](https://github.com/tox-dev/tox/issues/20), apart from with
`{toxinidir}` in it too because the pyroma env was failing with just
`.tox`, saying the pyroma binary needed to be in the allowlist, possibly
it was doing full path matching without normalizing.

The hypothesis folks
[here](https://github.com/HypothesisWorks/hypothesis/issues/2367#issuecomment-595524571)
say if you want to override the examples DB location with an env var to
do it yourself. It's actually only a warning from hypothesis, it says it
falls back to an in-memory DB, but I guess the tests run with
warnings-are-errors. You can also pass `database=None` to make
hypothesis skip example storage altogether.

I'm using tox to run commands in a virtualenv with the right stuff in it
because, uh, because I was copying the CI workflow actually. I just found out
about the `exec` subcommand to override the `commands` defined for the env,
neat! One point of awkwardness about that is that since we are using the
PyQt from the OS we need any virtualenv we use to have access to the OS
packages, which isn't the default for virtualenvs created by tox. The
text envs use the link_pyqt script for that but if you are using this
container and the first thing you do is run `tox exec` then that
wouldn't have been run. So I'm setting `VIRTUALENV_SYSTEM_SITE_PACKAGES`
to tell tox to always make the system packages available in the
virtualenvs it manages.

I did try using the mkvenv script instead of tox but it complained when
trying to install the current directory in editable mode because
setup.py tries to write to a git-commit-id file.
2024-06-23 20:12:38 +12:00
toofar 68755ed850 Change Qt6.8 failing permission test xfail to "skip"
The "Async question interrupted by async one" test was failing on CI but
not locally. Not sure why, changing the tests to skip instead of xfail.
The downside is that we won't bet a notification when upstream fixes the
issues, hopefully they mark the QTBUG as closed and we see it that way.
I think we do have to do something else to deal with this persistent
permission thing anyway, assuming they don't change it to be
off-by-default, so I'm sure we'll be looking in this area again!

They'll at the very least be re-enabled when we get a PyQt 6.8.
2024-06-23 20:11:25 +12:00
toofar 9ffa98535f Ignore QSaveFile::commit warning message in tests
The test (`test_failing_flush()`) is deliberately trying to write to a
close file. This is a new error in Qt 6.8 it seems.

Ignore just the specific file for this test in case it pops up somewhere
else later.
2024-06-23 20:11:25 +12:00
toofar 39f8ce5130 XFail permission tests that have changed behavior on 6.8
WebEngine now has it's own mechanism to remember permission, and it's
turned on by default. We can't disable it until PyQt picks up the new
`QWebEngineProfile::setPersistentPermissionsPolicy()`. So the first test
that prompts for a permission will persist that setting and later ones
will fail because they don't get the prompt they expect.

For now lets set them to xfail while we figure out what to do with
permission persisting for actual users. That we we can reduce the noise
in the test results!

The WebEngine permissions persistence mechanism doesn't seem to
respect whatever we are doing to separate storage per-basedir. Testing
with a temp basedir like so:

    python3 -m qutebrowser -T https://web-push-book.gauntface.com/demos/notification-examples/

I see this file has been created under my home directory:

    $ cat ~/.local/share/qutebrowser/qutebrowser/QtWebEngine/Default/permissions.json
    {"Notifications":{"https://web-push-book.gauntface.com/":true}}

I've raised an issue upstream about that here: https://bugreports.qt.io/browse/QTBUG-126595

We've got two things to think about regarding how to deal with this new
on-by-default feature:

1. what do we do for the tests? We can Disable the feature (if on new
   enough PyQt) or add a test setup step that ... restarts the browser
   and deletes the permissions.json. That's not great
2. what do we do for real users? See below

By default I would recommend disabling the webengine one since we
already have our own. BUT we can't actually disable it until PyQt
updates with the new APIs, which can take a while, and it's pretty
likely people will be using the new Qt version before PyQt updates. So
it would be best to figure out what we can do before that! Can we make
it respect the basedir data path? Can we make it write to some fake file
we throwaway? chmod +i?

Hopefully Qt makes the permission JSON respect the data path we set and
then at the very least we can remove the JSON file after a permission is
set. It'll still be a change in behavior for users on Qt 6.8 and PyQt
6.7 though as it'll likely remember permissions within a browser
instance by default, which isn't the case for our implementation
currently.

Related to: https://github.com/qutebrowser/qutebrowser/issues/8242#issuecomment-2175949686
2024-06-23 20:11:25 +12:00
toofar 52632d0f99 make Qt 6.8 security patch version match arch unstable
The security patch numbers reported by Qt are not accurate yet (haven't
been updated on the dev branch since 6.7 was released), but this makes
the test pass and it will tell us when it needs updating again.

Relates to: https://github.com/qutebrowser/qutebrowser/issues/8242#issuecomment-2175936721
2024-06-23 20:11:25 +12:00
toofar c57a280ef0 update docs for url:yank addition 2024-06-23 10:17:21 +12:00
toofar fcd68efd3c update changelog for 7879 and 7950
Move the entry about stripping query params up to the next minor release
and move it into the "changed" section, instead of "fixed".
2024-06-22 16:34:38 +12:00
toofar f14f2afd10 Merge branch 'fix/7947_clean_up_selection_models' 2024-06-22 16:31:22 +12:00
toofar bab8596a68 Merge pull request #7879 from michaelfm1211/main
Move URL to yankable string conversion to urlutils
2024-06-22 16:30:35 +12:00
Florian Bruhin dfae071aed ci: Try installing OpenSSL 1.1 for Qt 5 docker
Only OpenSSL 3 is installed currently, and for some reason, Qt 5 started failing in CI complaining that it only found OpenSSL 3 and not 1.1...
2024-06-20 17:52:10 +02:00
Florian Bruhin 6fd66619ba Switch to new Archlinux testing layout
should fix Docker package generation and maybe nightly builds
2024-06-20 11:10:34 +02:00
Florian Bruhin 7bbef811f3 Add debugging output to security version test 2024-06-18 16:36:25 +02:00
Florian Bruhin 3221e6ca49 Update Chromium version information 2024-06-18 16:36:25 +02:00
toofar 96b0942046
Merge pull request #8239 from qutebrowser/update-dependencies
Update dependencies
2024-06-18 19:54:46 +12:00
toofar 88fc8d1934
Merge pull request #8241 from qutebrowser/dependabot/github_actions/docker/build-push-action-6
Bump docker/build-push-action from 5 to 6
2024-06-18 19:00:38 +12:00
dependabot[bot] 74ccf05be1
Bump docker/build-push-action from 5 to 6
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-17 18:11:57 +00:00
qutebrowser bot 03f5ad870a Update dependencies 2024-06-17 04:20:19 +00:00
toofar 167d7ac87d update changelog for qute-pass idna 2024-06-16 11:24:23 +12:00
toofar 90cf7e1ff9 Merge pull request #8133 from DrTobe/idna-matching
Add Unicode normalization and IDNA encoding to qute-pass userscript.
2024-06-16 11:20:42 +12:00
Florian Bruhin ab1b444d37
Merge pull request #8233 from bmwiedemann/ftbfs2036
Fix tests after year 2036
2024-06-15 01:30:15 +02:00
Bernhard M. Wiedemann 8bacbad1d6
Fix tests after year 2036
Background:
As part of my work on reproducible builds for openSUSE, I check that software still gives identical build results in the future.
The usual offset is +16 years, because that is how long I expect some software will be used in some places.
This showed up failing tests in our package build.
See https://reproducible-builds.org/ for why this matters.
2024-06-14 12:08:51 +02:00
Florian Bruhin 3eeeaa5b48 scripts: Push to experimental repo if on experiments CI 2024-06-11 23:06:59 +02:00
Florian Bruhin 27164d0d6e Build separate Apple Silicon release
With GitHub Actions now providing macOS 14 runners with M1 chips, we can
build a separate Apple Silicon release there and upload it.

Universal wheels are currently not possible, see #8229 for details.

Closes #6478
2024-06-11 23:01:47 +02:00
Florian Bruhin 02ad04386d
Merge pull request #8227 from qutebrowser/update-dependencies
Update dependencies
2024-06-10 10:05:11 +02:00
qutebrowser bot cc34d09393 Update dependencies 2024-06-10 04:21:11 +00:00
toofar 00daefff7e Add test to ensure `set_model(None)` cleans up
We want to make sure that the selection model gets deleted when clearing
the model, since we are switching from doing that directly to having it
happen indirectly based off of signals we don't manage.

Hopefully this doesn't end up to be flaky. I think we are depending on
this happening in two different Qt even loop runs (`model.deleteLater()`
in the first one then `selmod.deleteLater()` gets called from the
`model.deleted` signal).

I tried using `qtbot.wait_signals()` with a list but it segfaulted in
some cleanup method. Perhaps is doesn't handle the deleted signal well?

Alternately we could maybe just wait for the selmodel one and check
`sip.isdelted(model)` to check the model is gone too.
2024-06-09 18:16:01 +12:00
toofar fe81422f94 Ignore QItemSelectionModel no-op message.
This starts happening reliably with the "Using session completion" end
to end test after the previous change where I made it so we don't set
the completion widget model to none, just call `deleteLater()` on the old
one. The relevant part of the test is:

        And I run :session-save hello
        # This loads a completion model with one entry
        When I run :cmd-set-text -s :session-load
        # This one selects the entry, which clears the model because the
        # session completion only applies to the first word after the
        # command, which we've just selected.
        And I run :completion-item-focus next
        # This does nothing, since we have no completion model loaded,
        # not sure why it is in the test, presumably making sure no
        # exception is thrown.
        And I run :completion-item-focus next

The log message is reliable in the test but it's a bit flaky to
reproduce manually. I've reproduced it via `for f in 1 2;do qute-send -i
/tmp/qutebrowser-basedir-npzdpupy/runtime/ipc-8075cf54f63b8e1bc05db34f41292c38
":completion-item-focus next" ;done` if I manually go through the
scenario a few times. Possibly it would reproduce easier if I pin it to
one process using `taskset`.

I think the reason for this is that the model is marked for deletion in
the next event loop, then a signal goes out, then the selection model is
marked for deletion on the next event loop. And possibly this only
happens between the model and the selection model being deleted?
2024-06-09 18:16:01 +12:00
Florian Bruhin 44a631b43b doc: Update similar project list 2024-06-05 22:44:00 +02:00
Florian Bruhin 1e1af23d34 Fix earlyinit with no Qt available
We need to wait with init_qtlog until after we know we have Qt available.

Closes #8220
2024-06-04 22:32:10 +02:00
Florian Bruhin 60f5ce153a Update user agent completions in config 2024-06-04 22:27:59 +02:00
Florian Bruhin 79942fa466 scripts: Update data link for ua_fetch.py
Same developer, just repo moved apparently
2024-06-04 22:27:59 +02:00
qutebrowser bot ae7d7fb426 Release v3.2.0 2024-06-03 14:42:27 +00:00
Florian Bruhin 9271e64bd5
Merge pull request #8217 from qutebrowser/update-dependencies
Update dependencies
2024-06-03 14:29:57 +02:00
toofar fb35cf9fdc Revert "Add Riverbank Computing as extra index for PyQt requirements"
Mostly reverts the below, as the new release is on the main PyPI repo
now.
Keeps the change to misc_checks.py

This reverts commit 470ec752e1.
2024-06-03 18:26:03 +12:00
toofar b45d98f1c6 update changelog URLs for WebEngineSubwheel 2024-06-03 18:20:44 +12:00
qutebrowser bot 74e4476893 Update dependencies 2024-06-03 04:23:36 +00:00
toofar b77cbbb2c3 Don't set completion model to None, just delete it
To avoid a leak when calling `QTreeView.setModel(None)`, this commit switches
to relying on the `model.destroyed` signal to make sure related state is
cleaned up. Upstream bug: https://bugreports.qt.io/browse/QTBUG-49966

When you call `setModel(None)` on a QTreeView it causes a small memory leak
of `QItemSelectionModel` objects created by the QTreeView's child QHeaderView
object.

`QAbstractItemView` will create a new `QItemSelectionModel` whenever a model
is set, even if that model is `None`. When the new model is non-null the
new selection model will be set to be deleted when the new model is, but when
the new model is None the new selection model will be linked to the
static `QAbstractItemModelPrivate::staticEmptyModel()`. Since that empty model
lives forever, so do the related section models, unless callers take care to
clean them up themselves.

Both `QTreeView` and it's child `QHeaderView` implement `QAbstractItemView`
and have this behaviour. For the `QTreeView` we were making sure to delete
the old selection model ourselves (as of fe1215c74d). But for the one
created by the `QHeaderView` we can't get a reference it because
`QTreeView.setModel()` would call `QHeaderView.setModel()` and then
`QHeaderView.setSelectionModel()` right away to assign it's own
selection model to the child, leaving no references to the selection
model created by `QHeaderView.setModel()`.

I was previously using `header.findChildren(QItemSelectionModel)` to clean up
old orphaned selection models, but this approach is a lot simpler!

To observe this for yourself you can plonk something like this in
`set_model()` before the early return and switch between the old and new
implementation and see how it changes behaviour.

        header = self.header()
        header_children = header.findChildren(QItemSelectionModel)
        our_children = self.findChildren(QItemSelectionModel)
        print(f"{len(our_children)=} {len(header_children)=}")

You can also observer the selection models accumulating in Gammaray
(https://github.com/KDAB/GammaRay/) if you just open and close the selection a
lot and then filter the object view by "model".

The relevant code is in `QTreeView` and `QAbstractItemView`'s
`setModel()`, `setSlectionModel()` and `modelDestroyed()`. Bot mostly in
the `setModels()` where you can see the relevant signals being connected
and disconnected.
https://code.qt.io/cgit/qt/qtbase.git/tree/src/widgets/itemviews/qtreeview.cpp#n179

Fixes: #7947
2024-06-03 12:42:32 +12:00
Florian Bruhin af2d151175 Make __init__.py work on old Python 2024-06-01 14:09:53 +02:00
Florian Bruhin 56f14fba2d Fix security patch version in changelog 2024-06-01 13:34:30 +02:00
Florian Bruhin 3036be1300 Fix copyright text 2024-05-29 17:47:16 +02:00
Florian Bruhin d3dc1bf4c1 Update changelog 2024-05-29 08:45:28 +02:00
Florian Bruhin 8e50b74bb0
Merge pull request #8209 from qutebrowser/update-dependencies
Update dependencies
2024-05-27 07:09:45 +02:00
qutebrowser bot 4577fcc8eb Update dependencies 2024-05-27 04:21:09 +00:00
Florian Bruhin 7d32df88cb Adjust security patch version for Qt 6.7.1 2024-05-25 14:51:29 +02:00
Florian Bruhin 63b5708bae Revert "adjust test strings for incrementing connection IDs"
This reverts commit ccebbd6ebb.
2024-05-25 14:49:51 +02:00
Florian Bruhin b41cc1d0fc Syntax simplifications
- Drop trailing comma inside trivial tuple
- Use r"""...""" for string containing ", as \" inside r"..." is taken literally
  (I'm surprised it works!)
- Use ['"] instead of ('|")
- Also adjust the inner [^'] to [^'"] for consistency
2024-05-25 13:19:42 +02:00
Florian Bruhin af1d537970 Try stabilizing 'Clicking on focused element'
The problem was that 'qute-input focused' wasn't logged. Let's see if this helps.
2024-05-25 13:19:42 +02:00
Florian Bruhin 04b2b0bdea Revert "Use a proper increasing id for ipc logging"
This reverts commit 7144e72116.

Turns out this adds complexity, but doesn't really help with debugging that
much, and also needs us to guess what the correct ID might be.

We should rather go for a nicer (but more invasive) cleanup by having a separate
IPCConnection class that stores a socket and ID, see #8208.
2024-05-25 13:17:13 +02:00
Florian Bruhin 8ca2b7939f
Merge pull request #8199 from qutebrowser/feat/8170_pdfjs_withresolve
Add Promise.withResolvers polyfill for latest PDF.js version
2024-05-25 13:09:52 +02:00
toofar e86ef0b2fd update changlog entry for pdf.js fix 2024-05-25 09:42:02 +12:00
toofar 3aaa3ce16d Adapt pdf.js unit test for changed string delims
As of at the very least the latest version the version string looks
like:

    const pdfjsVersion = "4.2.67";

So change the regex to allow double quotes too.
2024-05-25 09:41:44 +12:00
toofar 7eb32a7550 update_3rdparty: move dict related imports into method
I'm trying to update pdf.js in the bleeding edge CI jobs. It complains
that either it can't find PyQt or it can't find yaml depending on how I
invoke tox. Joy. Since dict stuff isn't run by default in this script
hopefully that is the only broken import path and moving it into the
function lets the pdfjs (and ace) bit of the script work fine.

Actually, looking at the stack traces below, both of them are from dict
related code!

    tox exec -re bleeding -- python scripts/dev/update_3rdparty.py --gh-token ***
      Traceback (most recent call last):
        File "/__w/qutebrowser/qutebrowser/scripts/dev/update_3rdparty.py", line 20, in <module>
          from scripts import dictcli
        File "/__w/qutebrowser/qutebrowser/scripts/dev/../../scripts/dictcli.py", line 25, in <module>
          from qutebrowser.browser.webengine import spell
        File "/__w/qutebrowser/qutebrowser/scripts/dev/../../scripts/../qutebrowser/browser/webengine/spell.py", line 14, in <module>
          from qutebrowser.utils import log, message, standarddir
        File "/__w/qutebrowser/qutebrowser/scripts/dev/../../scripts/../qutebrowser/utils/message.py", line 15, in <module>
          from qutebrowser.qt.core import pyqtSignal, pyqtBoundSignal, QObject
        File "/__w/qutebrowser/qutebrowser/scripts/dev/../../scripts/../qutebrowser/qt/core.py", line 17, in <module>
          machinery.init_implicit()
        File "/__w/qutebrowser/qutebrowser/scripts/dev/../../scripts/../qutebrowser/qt/machinery.py", line 278, in init_implicit
          raise NoWrapperAvailableError(info)
      qutebrowser.qt.machinery.NoWrapperAvailableError: No Qt wrapper was importable.

    python scripts/dev/update_3rdparty.py --gh-token ***
      Traceback (most recent call last):
        File "/__w/qutebrowser/qutebrowser/scripts/dev/update_3rdparty.py", line 20, in <module>
          from scripts import dictcli
        File "/__w/qutebrowser/qutebrowser/scripts/dev/../../scripts/dictcli.py", line 25, in <module>
          from qutebrowser.browser.webengine import spell
        File "/__w/qutebrowser/qutebrowser/scripts/dev/../../scripts/../qutebrowser/browser/webengine/spell.py", line 14, in <module>
          from qutebrowser.utils import log, message, standarddir
        File "/__w/qutebrowser/qutebrowser/scripts/dev/../../scripts/../qutebrowser/utils/message.py", line 17, in <module>
          from qutebrowser.utils import usertypes, log
        File "/__w/qutebrowser/qutebrowser/scripts/dev/../../scripts/../qutebrowser/utils/usertypes.py", line 16, in <module>
          from qutebrowser.utils import log, qtutils, utils
        File "/__w/qutebrowser/qutebrowser/scripts/dev/../../scripts/../qutebrowser/utils/qtutils.py", line 39, in <module>
          from qutebrowser.utils import usertypes, utils
        File "/__w/qutebrowser/qutebrowser/scripts/dev/../../scripts/../qutebrowser/utils/utils.py", line 29, in <module>
          import yaml
      ModuleNotFoundError: No module named 'yaml'
2024-05-25 09:41:44 +12:00
toofar 22370b457f Install recent pdf.js in some CI jobs
This installs pdf.js in a selection of CI jobs. Previously the PDF.js
tests (in qutescheme.feature) were skipped in CI because it wasn't
installed anywhere. There has been a couple of recent cases where pdf.js
started depending on javascript features that are too new for even the
most recent QtWebEngine to support. The aim of this commit is to catch
that case. This doesn't add coverage for older webengine releases.

This also incidentally updates the ace editor in these test jobs, since that is
also updated by default by the update_3rdparty script. Hopefully that
doesn't cause issues.

The reasoning for installing on each type of job:

*ubuntu jobs*: not installed - while our main test runs are on ubuntu
  there is an upstream issue where many assets used by pdf.js (like icons
  used in the toolbar) aren't packaged, see #7904. This causes warning
  messages because assets requested via qutescheme can't be found, which
  causes the tests to fail. We could a) install pdf.js from source instead
  of using the ubuntu one b) ignore the warning logs c) skip this
  environment and rely on tests elsewhere. I've chosen to do (c). I don't
  see a huge benefit in testing pdf.js across multiple environments if we
  aren't using it installed from the OS anyway. We could install from
  source but currently all the Qt < 6.5 tests are failing from some other
  JS error, and I think fixing that is out of scope of this issue.

*docker Qt6*: installed - the archlinux pdfjs package works fine and we are
  only testing the most recent Qt versions because arch users are expected
  to stay up to date.

*docker Qt5*: not installed - doesn't support JS features required by
  PDF.js. I guess we could install the legacy build from source here. I'm
  mostly worried about catching new breakages for this commit though

*windows*: installed - we install pdf.js from source when making a
  release so it would be nice to do that in tests too.

*macos*: not installed - the tests that were catching the breakages are
  end2end tests which we don't run on mac. And I think there was an
  error from the :versions tests here, don't remember.

*bleeding edge*: installed - from source

pdf.js tests fail on Qt < 6.5 with `Uncaught TypeError: Cannot read
properties of null (reading 'mainContainer')`

The `TestPDFJSVersion.test_real_file` unit tests currently fails because
`version._pdfjs_version()` returns `unknown (bundled)`, not sure why. I
think this is pre-existing and it also wasn't being run on CI.
2024-05-25 09:41:44 +12:00
toofar 48d57cd5c8 Add `Promise.withResolvers()` polyfill for pdf.js
It's needed for both the main page (which we generate using jinja) and
the worker script.

Closes: https://github.com/qutebrowser/qutebrowser/issues/8170
2024-05-25 09:41:44 +12:00
toofar 1f2a0016b7 put windows IPC fix changelog in correct release [ci skip] 2024-05-25 09:40:44 +12:00
toofar 68a8d618d6 update changelog for flaky windows qtimer issue 2024-05-25 09:34:01 +12:00
toofar 669795058b Handle "early timer" log messages in tests
The `test_cleanup()` test for guiprocess was triggering the early timer
warning messages because it was using a VeryCourse timer with a 100ms
interval. Changed it to to a normal Course timer (the default) for that
test.

For the `ipc-timeout` timer we know that is happening in the tests on
windows. It's being logged in lost of e2e tests, the elapsed times it's
logging are between 0 and 0.020s. I'm not sure if it's the right thing
to be changing the log level in production code or marking the messages
as expected in test code.
2024-05-25 09:34:01 +12:00
toofar 5e4d0f1870 Add unit tests for early timer firing checking 2024-05-25 09:34:01 +12:00
toofar ccebbd6ebb adjust test strings for incrementing connection IDs 2024-05-25 09:34:01 +12:00
toofar f6e9295c50 remove unneeded QTimer imports 2024-05-25 09:34:01 +12:00
toofar 9c8a80798a Use common timer validity check in usertypes.Timer
Since we are now checking for early timer firings in usertype.Timer I
figured why do it in two places, lets call the check method on Timer in
the handler in the IPC class too.

I also removed the platform and version check because while the bug only
happens under those conditions the check to ensure a timer event was
valid should work everywhere. Right? We can add them back of someone
wants but I'm not sure I see a point.

It would be nice if we could filter out invalid timer events in
usertypes.Timer and not require the consuming code to have to do
anything. But that would be more work, so lets wait until more places of
code actually need to care about it, chances are it'll be fixed in Qt
soon enough anyway.

I also think usertypes.Timer should be restarting the time so it gets
called at the proper time. But if we aren't filtering the events that
would mean it gets called twice.
2024-05-25 09:34:01 +12:00
toofar c5fa5a0dc9 lint: Add misc check for QTimer initialization
Since we added some sanity checking in usertypes.Timer() around
QTBUG-124496 it would be convenient if there was a reminder for future
timer users to use our Timer object instead. Here's one!

It's looking for QTimer initialisations, we are still allowing
QTimer.singleShot(), although that probably can hit the same issue.

It uses an end-of-line anchor in the regex so you can put a comment (any
comment) on the end of the line to ignore the check.
2024-05-25 09:34:01 +12:00
Florian Bruhin 38abfdb8a0 check more timers 2024-05-25 09:34:01 +12:00
Florian Bruhin 52346a1910 Check all timers for early triggering 2024-05-25 09:34:01 +12:00
Florian Bruhin 38053466fd Ignore timeout 2024-05-25 09:34:01 +12:00
Florian Bruhin 00c56456be back to normal ipc impl 2024-05-25 09:34:01 +12:00
Florian Bruhin 5b84600fa6 logging 2024-05-25 09:34:01 +12:00
Florian Bruhin 48b27a356c timestamps 2024-05-25 09:34:01 +12:00
Florian Bruhin ef0517da69 Use a separate IPCConnection class 2024-05-25 09:34:01 +12:00
Florian Bruhin 4fadca2ae7 tests: Make ssl message matching fuzzier
Windows seems to struggle with the dash
2024-05-25 09:34:01 +12:00
Florian Bruhin 7144e72116 Use a proper increasing id for ipc logging 2024-05-25 09:34:01 +12:00
Florian Bruhin 6d99dff10b Merge branch 'update-dependencies' 2024-05-24 21:53:08 +02:00
Florian Bruhin a2983553bb Merge branch 'feat/pyqt67_enablement' 2024-05-24 21:51:34 +02:00
Florian Bruhin 72d7e2327b Update for new pylint/astroid releases
- Add a couple new "raise utils.Unreachable" to avoid
  possibly-used-before-assignment issues.
- Simplify an "if" for the same reason
- Remove an unneeded "return"
- Use "NoReturn" to prepare for pylint knowing about it in the future:
  https://github.com/pylint-dev/pylint/issues/9674
- Add some ignores for used-before-assignment false-positives
- Ignore new undefined-variable messages for Qt wrapers
- Ignore a new no-member warning for KeySequence:
  https://github.com/pylint-dev/astroid/issues/2448#issuecomment-2130124755
2024-05-24 21:46:04 +02:00
Florian Bruhin 470ec752e1 Add Riverbank Computing as extra index for PyQt requirements
Easier fix instead of 6c4be8ef03.
Seems to get picked up just fine, and shouldn't hurt when it's not needed, as we
don't use --pre. Thus, no development releases should be installed.
2024-05-24 17:08:56 +02:00
Florian Bruhin 0f51171141 Revert "Try getting PyQt 6.7 from Riverbank server"
This reverts commit 6c4be8ef03.

Possibly easier solution in next commit.
2024-05-24 17:08:56 +02:00
Florian Bruhin 8b44c26146 Try getting PyQt 6.7 from Riverbank server
See https://www.riverbankcomputing.com/pipermail/pyqt/2024-April/045832.html and https://github.com/pypi/support/issues/3949
2024-05-24 17:08:56 +02:00
toofar 3f1842b729 Update requirements and CI for PyQt6.7
6.7 is released now, some distros are already shipping it!

This commit:
1. adds a new 6.7 requirements file (the plain 6 one has already been
   updated by the bot)
2. adds a new tox env referring to the new requirements file
3. updates the mac and windows installer jobs to run with pyqt67 with the
   assumption we'll be including that in our next release
4. adds two new CI environments for 6.7, one each for python 3.11 and 3.12
   (3.12 only came out like 6 months ago)
5. updates a couple of references to the py37 tox env that looked like they
   were missed, 3.7 support was dropped in 93c7fdd
6. updates various ubuntu containers to the latest LTS instead of the previous
   related one - this is quite unrelated to this change but I thought I would
   give it a go, no need to use the old one unless we are specifically testing
   on it?
   - linters - they use tox but probably use system libraries
   - these all run in nested containers anyway, should be fully isolated
   - codeql - eh, uses a third party action, check the docs if it fails
   - irc - as above
2024-05-24 17:08:56 +02:00
Florian Bruhin f72b862da5 tests: Re-add pytest-benchmark warning ignore
This was fixed but never released...
2024-05-24 17:07:52 +02:00
Florian Bruhin ecf0fd225a Increase YAML warning deadline with --with-pydebug
This makes things significantly slower
2024-05-24 16:57:20 +02:00
Tobias Naumann 12ebc843d1 Move idna_encode function calls out of loops whenever possible to avoid repeated computations 2024-05-24 00:16:04 +02:00
Florian Bruhin 6339eacda4 py313: Upgrade typing-extensions 2024-05-23 14:52:10 +02:00
Florian Bruhin 2d89a6f4c0 tox: Add py313 2024-05-23 08:35:12 +02:00
Florian Bruhin f1c18360a2 tests: Remove warning ignores for fixed issues 2024-05-23 08:12:30 +02:00
toofar c0d883849d
Merge pull request #8200 from qutebrowser/feat/7901_handle_no_selectionmodel_on_clear_selection
Handle no selectionmodel on clear selection
2024-05-21 07:43:56 +12:00
qutebrowser bot 1d8a2acf77 Update dependencies 2024-05-20 04:21:17 +00:00
toofar 04b0d84bda update changelog for None selection model fix 2024-05-19 14:34:23 +12:00
toofar 117cb15b8d Handle selection model being None when clearing selection
Change `CompletionView.on_clear_completion_selection()` to call the Qt
selection model getter, instead of our one. Since it can be called when the
selection model has already been cleared and our one asserts that there
is a selection model to return.

Back in the distant past there was a change to handle the completion widget's
selection model being None when the `on_clear_completion_selection()` slot was
called: https://github.com/qutebrowser/qutebrowser/commit/88b522fa167e2f97b

More recently a common getter for the selection model was added so we could
have a single place to apply type narrowing to the returned object from the Qt
getter (the type hints had been updated to be wrapped in `Optional`): https://github.com/qutebrowser/qutebrowser/commit/92dea988c01e745#diff-1559d42e246323bea35fa064d54d48c990999aaf4c732b09ccd448f994da74cf

It seems this is one place where it does, and already did, handle that
optional. So it didn't need to change to use the new getter. This is called
from the `Command.on_mode_left` signal, not sure why the selection model is
None here. Perhaps it already gets cleared by the effects of the `hide_cmd`
signal that gets fired earlier, or perhaps even from the `self.hide()` on the
line before. Anyway, this was working for several years and seems harmless
enough.
2024-05-19 14:29:31 +12:00
Florian Bruhin 9bf0393923 tests: Don't make QSslSocket error fail tests
Bleeding environment fails tests/unit/browser/webkit/test_certificateerror.py on Qt 5, maybe due to OpenSSL 3.x
2024-05-16 09:31:42 +02:00
Florian Bruhin a7a7c434e2 Fix handling of missing QtWebEngine resources
I was getting crash reports from someone about this. Not sure what's going wrong
there (hence the additional information in the exception).

What's clear however is that we're raising ParseError, but only handling that
when actually parsing. The code calling copy_/_find_webengine_resources only
handles OSError. So let's raise a FileNotFoundError instead.
2024-05-10 18:41:50 +02:00
Florian Bruhin 81de20d78b
Merge pull request #8195 from vEnhance/patch-1
Fix some spelling errors
2024-05-10 12:50:54 +02:00
Evan Chen 350f94222d
reading comprehension failure
more coffee required
2024-05-09 13:35:13 -04:00
Evan Chen 310c865f29
Fix some spelling errors 2024-05-09 10:58:04 -04:00
Florian Bruhin dbcfab4fb9
Merge pull request #8189 from qutebrowser/update-dependencies
Update dependencies
2024-05-06 07:47:47 +02:00
qutebrowser bot 17ff150dfd Update dependencies 2024-05-06 04:20:35 +00:00
Florian Bruhin 99029144b5
Merge pull request #8182 from qutebrowser/dynamic-dark-mode
Dynamic dark mode
2024-05-05 20:37:01 +02:00
Florian Bruhin ef62208ce9
Merge pull request #8181 from qutebrowser/fill-in-security-version
Improve Chromium (security) version output
2024-05-05 20:36:09 +02:00
Florian Bruhin edba6f18cb Update changelog 2024-05-01 00:30:41 +02:00
Florian Bruhin 9c901b2101 Add more dark mode logic unit tests 2024-04-30 23:31:58 +02:00
Florian Bruhin 9320c8f2e5 Fix tests/lint 2024-04-30 23:31:58 +02:00
Florian Bruhin dfcfc686ce Support setting dark mode at runtime and with URL patterns
See #3636, #5542, #7743
2024-04-30 23:31:58 +02:00
Florian Bruhin 2edfd459a4 Infer Chromium security version when API is unavailable
We already had all this information in a comment anyways.
I made it machine-readable using:

    s/#\s+(\d*)\.(\d*)\.(\d*): Security fixes up to ([^ ]*)\s+\((.*)\)/utils.VersionNumber(\1, \2, \3): (_BASES[XX], '\4'),  # \5

plus some manual post-processing.

Thanks to that, we can now get the security version from that data even on
QtWebEngine < 6.3, if that information is known. When we fall back to a base
version (e.g. 6.7.99 -> 6.7), we make sure to not pretend that we have the .0
state of things, though.

Finally, we cross-check the information against the current Qt version if we
have the API, which mostly ensures the data is accurate for human readers.

See #7187 and #8139.
2024-04-30 23:31:25 +02:00
Florian Bruhin a85c3e2712 version: Update security patch version comments
Mostly based on CHROMIUM_VERSION in QtWebEngine
and chromereleases.googleblog.com.
2024-04-30 23:31:25 +02:00
Florian Bruhin 6419cf282b Move pastebin button up for version info 2024-04-30 23:31:25 +02:00
Florian Bruhin 40f6193cc7 Split QtWebEngine version across multiple lines
More readable now that we have more information in it.

Also always show the source, now that we have the space for it, and "UA" isn't
the obvious default anymore anyways.
2024-04-30 23:31:25 +02:00
Florian Bruhin 5152296f7f
Merge pull request #8179 from qutebrowser/update-dependencies
Update dependencies
2024-04-30 23:06:30 +02:00
Florian Bruhin a8f4feabb7 Exit command mode in editor tests
Similarly to 24d01ad257, failing Qt 5.15 tests
showed some evidence of us being stuck in command mode in the next test file
(hints.feature). On the first test there ("Scenario: Using :hint-follow outside
of hint mode (issue 1105)"):

    17:38:51.073 ERROR    message    message:error:63 hint-follow: This command
    is only allowed in hint mode, not command.

but:

    end2end.fixtures.testprocess.WaitForTimeout: Timed out after 15000ms waiting
    for {'category': 'message', 'loglevel': 40, 'message': 'hint-follow: This
    command is only allowed in hint mode, not normal.'}.

I agree with what has been said: This should never happen, because we restart
the qutebrowser process between test files. I did some of the mentioned "more
examination" but also don't have an explanation.

To avoid more flaky tests, let's roll with another bandaid solution.
2024-04-30 20:34:50 +02:00
Florian Bruhin 3d96fc2656 Make qt.machinery.Unavailable inherit ModuleNotFoundError
With pytest 8.2, pytest.importorskip(...) now only considers ModuleNotFoundError
rather than all ImportErrors, and warns otherwise:
https://github.com/pytest-dev/pytest/pull/12220

While we could override this via

    pytest.importorskip(..., exc_type=machinery.Unavailable)

this is a simpler solution, and it also makes more sense semantically:

We only raise Unavailable when an import is being done that would otherwise
result in a ModuleNotFoundError anyways (e.g. trying to import QtWebKit on Qt
6).
2024-04-30 19:24:25 +02:00
Florian Bruhin 0fec3c7fb2 Update changelog 2024-04-30 17:15:22 +02:00
Florian Bruhin b0002ac71f Preload broken qutebrowser logo resource
When qutebrowser is running but its installation has been deleted/moved, it
fails in somewhat mysterious but predictable ways. This is e.g. the case
currently, when people upgrade their Archlinux packages and upgrade from Python
3.11 to 3.12. When doing that with qutebrowser open, on the next page load, it
will:

- Have a crashed renderer process, because (assumingly) the process executable
  is gone on disk.
- Which then causes us trying to render an error page, but that fails due to
  broken_qutebrowser_logo.png being gone from disk.
- The FileNotFoundError then causes jinja2 to import jinja2.debug at runtime,
  but that *also* fails because the jinja2 package is gone.

We work around this by loading the PNG into RAM early, and then using the cached
version instead. This amends b4a2352833 which did
the same with HTML/JS resources, but never for this PNG, which (looking at crash
logs) seems to be a somewhat common breakage.

Alternatives I've considered:

- Catching the FileNotFoundError and not showing an error page at all.
- Generating a PNG with an explanatory text via QPainter and returning that.

However, with the renderer process crash happening in the first place for
unknown reasons, it's unclear if the error page ever gets actually displayed...
Let's roll with this for now, and if this causes a repeating renderer process
crash, fix that separately (also see #5108).
2024-04-30 17:03:11 +02:00
Florian Bruhin 26ef6bffd2 tabbedbrowser: Clean up QTBUG 91715 workaround
By returning early, we can move the logic up a bit and handle the normal case after.
2024-04-30 15:26:04 +02:00
qutebrowser bot 4fdc32ffe1 Update dependencies 2024-04-29 04:20:02 +00:00
toofar eb65fb1a7d
Merge pull request #8173 from qutebrowser/update-dependencies
Update dependencies
2024-04-29 10:56:34 +12:00
toofar bdbbb93cd2 fix lint, add cheroot log ignores
mypy:

Mypy knows about the QDataStream.Status.SizeLimitExceeded attribute now,
so we can remove the ignore. But mypy for pyqt5 doesn't know about it,
so put the whole graceful block behind an additional conditional as well
to hide it from pyqt5 mypy.

cheroot:

looks like the format of the error message we are already ignoring
changed slightly. The `ssl/tls` bit changed to `sslv3`, at least in our
setup.
2024-04-28 12:43:40 +12:00
qutebrowser bot 085af13014 Update dependencies 2024-04-27 07:20:49 +00:00
toofar 92decf1c42
Merge pull request #8168 from qutebrowser/update-dependencies
Update dependencies
2024-04-27 19:11:25 +12:00
qutebrowser bot daa0662497 Update dependencies 2024-04-27 18:39:57 +12:00
toofar 817091c61d Revert "delay fake-key" and add waits in e2e tests instead
Previously (a209c86c55) I've added a delay in browser code before sending
events to the page to account with a race condition where events weren't
processed after navigating. Then I had to add extra checks to tests that had
tight timing requirements.

That was for click-element, this commit reverts an attempt at the same
strategy for fake-key and instead adds wait statements in the tests that where
hitting the original race condition (sending events "too soon" after a
navigation).

The reason for the different approach here is that after adding the delay in
fake-key I had to add an extra "wait for log line" message to a few tests with
tight timing requirements to watch for a Tab key press. That worked great for
webengine but it made some tests start failing on webkit. We don't seem to get
that log message on webkit. I've got no-idea why and frankly think I've spent
way too much time on just a handful of tests already.

It's unfortunate we have to add manually delays in the e2e tests. It makes me
think if anyone else adds a test in the future with this combination of steps
(open page, run fake-key) they'll run into the same issue and it'll be hard to
spot. Oh well, we'll deal with that when it comes up.

The tests that where failing on webkit are the ones in caret.feature
touched in this commit.

Reverts included in this commit:

Revert "Delay fake-key events by 10ms"

This reverts commit 9f050c7460.

Revert "Wait for evidence of Tab key press in tests before proceeding"

This reverts commit d47d247941.
2024-04-27 18:05:44 +12:00
toofar d47d247941 Wait for evidence of Tab key press in tests before proceeding
In the previous commit 9f050c7460 "Delay fake-key events by 10ms" I delayed
events for fake-key by 10ms to deal with a timing issue with sending events
right after a navigation not being processed.

Just like last time that's caused a few tests with tight timing constraints to
break because they proceed to the next command before the fake-key events have
taken effect.

Maybe it would have been better to just put the waits in the e2e tests in the
first case instead of in the production code? Well, we'll see. Maybe I'll
never have to deal with this again.
2024-04-27 15:20:00 +12:00
toofar 9f050c7460 Delay fake-key events by 10ms
Similar to a209c86c55 "Delay QEvent driven mouse clicks by 10ms" it seems
that sending fake-key QEvents immediately after a navigation causes the events
to not be processed.

This is causing e2e tests in keyinput.feature to fail in a flaky, but
frequent, manner. This can also be resolved in some other ways like putting
a wait in the e2e tests like so:

        When I open data/keyinput/log.html
        And I wait 0.01s
        And I run :fake-key <Escape>

But relying on maintainers to remember to do that seems error prone. If this
10ms delay turns out to be something to get rid of we could try keep this
delay to be used in less cases:

1. add some magic to e2e tests where it compares the previous and current line
   and if it sees an open and a click-element or fake-key line next to each
   other it delays for a bit
2. in the application code in tab.send_event() store the time of last
   navigation and queue events for sending till after that

The affected tests in this case where:

    tests/end2end/features/test_keyinput_bdd.py::test_fakekey_sending_key_to_the_website
    tests/end2end/features/test_keyinput_bdd.py::test_fakekey_sending_special_key_to_the_website
    tests/end2end/features/test_keyinput_bdd.py::test_fakekey_sending_keychain_to_the_website
2024-04-27 14:51:02 +12:00
toofar 24d01ad257 Exit mode before edit tests.
Exit prompt mode on the last test in downloads.feature because it's
preventing the next tests in editor.feature from running. Screenshots of
the first failing test in editor.feature shows a prompt open and
jsprompt open in the background.

This shouldn't happen as there is a module level fixture in conftest.py
that is supposed to close and re-open the browser process between each
feature file. That bears more examination but for now this change looks
pretty painless.
2024-04-27 13:44:38 +12:00
toofar 44a63d9b3a Wait for evidence of click in e2e before proceeding
I've added a 10ms delay when sending a fake click via QEvents to help with a
timing issue in the prompt e2e tests in Qt6.7. Apparently that throws off the
tight timing of this one test! I guess the `:scroll bottom` comes before the
iframe has been clicked.

I'm a little worried that if we are depending on timing stuff like this we
should be looking at a more thorough solution. Maybe the "and follow" suffix
can trigger it to wait for "Clicked *editable element!"?
Also I can try to reduce the delay in the click, but 10ms is pretty short
already.
2024-04-27 13:44:03 +12:00
toofar a209c86c55 Delay QEvent driven mouse clicks by 10ms
On CI with Qt 6.7 we are seeing several tests failing in a flaky, but
frequent, manner. These tests all seem to be doing :click-element and
sending a "fake" click, as in one driven by QEvents, to a button on the
test page after opening the page in an existing tab. In the logs we see
that the element was identified with JS correctly but we don't see any
evidence of the actual click after that.

I've been testing locally with `python3 -m pytest
tests/end2end/features/test_prompts_bdd.py -k test_javascript_confirm`.

Delaying the click event by as little as 5ms seems to make the tests
consistently pass. I'm setting it to an arbitrary 10ms here for no good
reason. It's unfortunate that we have to change production code to make
tests pass, it's unlikely that a 10ms window will affect real usage, and
the problem is only immediately after a navigation. If we can't find a
better way to resolve this and want to get rid of the 10ms delay when no
needed we could maybe look at when the last navigation time for the tab
was to decide whether to delay or not.

I also tried changing all the "open in" lines in the failing tests to be
"open in new tab" and that seemed to make the flaky tests pass
consistently too. But relying on people writing tests in a specific way
wouldn't really be fixing the problem.

Additionally, running just one test at a time (with `taskset -c 1 ...`)
made all the tests pass consistently. So it seems like the root cause
could have something to do with that, somehow. Or maybe just running the
pytest process and the browser process on the same CPU causes enough of
a delay to not trigger it.

I don't know what the root cause of this change is, or if we can use a
more event based way of knowing when the page (or its focus proxy) is
ready to receive events. I've tried digging through events and debugging
webengine and haven't got anywhere, hopefully this delay is painless
enough that it'll do. To summarize, the page, or focus proxy, doesn't
process events (all events, just mouse events?) immediately after
navigating.

I initially tried delaying all events in `tab.send_event()`, but that
caused some caret tests to fail (the `selectionfollow_with_link_tabbing`
e2e ones), not sure why. So I walked back to just delaying click events.
I've seen some intermittent flakyness in
`test_misc_bdd.py::test_clicking_on_focused_element` and
`tests/end2end/features/test_keyinput_bdd.py::test_fakekey_sending_keychain_to_the_website`
which may indicate that `:fake-key` needs the same treatment. We'll see
how things stand once it's been stable on the main branch for a while
instead of being muddled up in this investigation branch.

I thought the issue might be that the RenderWidgetHostViewQt was being swapped out
on the new page load and the old one being sent the event. So I added a bunch
of debug logging to try to get a better view of that. None of this debug
logging is showing up when the tests fail so it seems that isn't the case.

The tests failing in the last four bleeding edge qt6 tests before these
changes were (test, count):

    ('tests/end2end/features/test_keyinput_bdd.py::test_fakekey_sending_special_key_to_the_website', 2),
    ('tests/end2end/features/test_prompts_bdd.py::test_using_contentjavascriptalert', 2),
    ('tests/end2end/features/test_editor_bdd.py::test_select_two_files_with_multiple_files_command', 2),
    ('tests/end2end/features/test_misc_bdd.py::test_clicking_first_element_matching_a_selector', 2),
    ('tests/end2end/features/test_misc_bdd.py::test_clicking_on_focused_element', 2),
    ('tests/end2end/features/test_prompts_bdd.py::test_javascript_prompt_with_default', 2),
    ('tests/end2end/features/test_prompts_bdd.py::test_using_contentjavascriptprompt', 2),
    ('tests/end2end/features/test_prompts_bdd.py::test_javascript_confirm__aborted', 2),
    ('tests/end2end/features/test_editor_bdd.py::test_file_selector_deleting_temporary_file', 1),
    ('tests/end2end/features/test_keyinput_bdd.py::test_fakekey_sending_keychain_to_the_website', 1),
    ('tests/end2end/features/test_prompts_bdd.py::test_javascript_confirm__no', 1),
    ('tests/end2end/features/test_prompts_bdd.py::test_javascript_confirm_with_default_value', 1),
    ('tests/end2end/test_insert_mode.py::test_insert_mode[100-input.html-qute-input-keypress-awesomequtebrowser]', 1),
    ('tests/end2end/features/test_misc_bdd.py::test_clicking_an_element_by_position', 1),
    ('tests/end2end/features/test_prompts_bdd.py::test_javascript_confirm__yes', 1),
    ('tests/end2end/features/test_prompts_bdd.py::test_javascript_confirm_with_invalid_value', 1),
    ('tests/end2end/test_insert_mode.py::test_insert_mode[125-input.html-qute-input-keypress-awesomequtebrowser]', 1),
    ('tests/end2end/features/test_editor_bdd.py::test_select_two_files_with_single_file_command', 1),
    ('tests/end2end/features/test_keyinput_bdd.py::test_fakekey_sending_key_to_the_website', 1),
    ('tests/end2end/features/test_misc_bdd.py::test_clicking_an_element_by_id_with_dot', 1),
    ('tests/end2end/features/test_prompts_bdd.py::test_javascript_alert_with_value', 1)

For debugging in GBD under test I ran the test process under GDB and
passed a script to GDB to print out a message, and then continue, when
it hit a breakpoint. Unfortunately, the tests always passed when run
under GDB.

For that I changed `_executable_args()` in quteprocess to return `"gdb",
"-q -x handleMouseEvent-breakpoint -args".split() + [executable] + args`
where `handleMouseEvent-breakpoint` is:

    set breakpoint pending on
    set debuginfod enabled off
    break RenderWidgetHostViewQtDelegateClient::handleMouseEvent
      commands
        call (void) fprintf(stderr, "Entering handleMouseEvent\n")
        continue
      end
    run

The tests were consistently passing, but erroring on the invalid gdb log lines.
2024-04-27 13:40:52 +12:00
toofar 80931acab0
Merge pull request #8139 from qutebrowser/feat/7187_chromium_security_patch_in_version
Show chromium security patch version in :version
2024-04-20 19:25:42 +12:00
Florian Bruhin 91be21aede Avoid quitting when closing KDE file dialog
See https://bugreports.qt.io/browse/QTBUG-124386

Fixes #8143
2024-04-16 11:10:16 +02:00
Florian Bruhin 6bccc722c0
Merge pull request #8164 from qutebrowser/update-dependencies
Update dependencies
2024-04-16 10:28:24 +02:00
qutebrowser bot 6cb75b568a Update dependencies 2024-04-15 04:31:03 +00:00
toofar afe6d4a5f1 update changelog for #8162 2024-04-13 16:43:37 +12:00
toofar 4e38b3e8df 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.
2024-04-13 16:38:00 +12:00
toofar fc0126005d
Merge pull request #8162 from NocturnalNessa/small_fix_for_tor_identity_script
Changed line 35 of tor_identity userscript to stop it throwing an err…
2024-04-13 15:42:14 +12:00
Vanessa Frank 295943060c Changed line 35 of tor_identity userscript to stop it throwing an error when '--control-port' is passed 2024-04-11 17:41:42 -06:00
Florian Bruhin 90ee0ea710 Adjust changelog URLs 2024-04-09 19:22:22 +02:00
Florian Bruhin 031aff11bc flake8: Remove redundant pytest style options
Default since flake8-pytest-style 2.0.0: https://github.com/m-burst/flake8-pytest-style#change-log
2024-04-09 19:16:17 +02:00
Florian Bruhin f6b752ffb0 mypy: Remove show_error_codes
Default since 0.991: https://mypy-lang.blogspot.com/2022/11/mypy-0990-released.html
2024-04-09 19:13:27 +02:00
toofar b255e1c36a
Merge pull request #8152 from qutebrowser/update-dependencies
Update dependencies
2024-04-09 19:46:14 +12:00
toofar 7c2116751f 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.
2024-04-09 08:23:27 +12:00
toofar 642d63344c Add backports.tarfile changelog link
It's a new externalised dependency of jaraco.context, doesn't seem to
have a RTD site yet.

ref: e13fc7f2b3
2024-04-09 08:19:16 +12:00
toofar 98421e3c35 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!
2024-04-09 08:09:31 +12:00
qutebrowser bot 4a12ae7804 Update dependencies 2024-04-08 04:22:53 +00:00
toofar 0a541983c3 Pin eslint for now until we support v9+
See https://github.com/qutebrowser/qutebrowser/issues/8159
2024-04-06 18:30:25 +13:00
toofar 26dcc4a7a9 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
2024-04-06 12:05:31 +13:00
toofar b812ec2628 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.
2024-04-06 11:29:31 +13:00
Florian Bruhin 3d86d7876a Add role="switch" to default hints.selectors
See https://www.reddit.com/r/qutebrowser/comments/1bomb3h/closing_popups_within_a_webpage_and_toggling/
2024-03-27 23:58:36 +01:00
Florian Bruhin 9560d7355f Fix derp 2024-03-27 20:25:10 +01:00
Florian Bruhin 60ce2e6705 Add missing date to comment 2024-03-27 20:18:54 +01:00
Florian Bruhin 53e37cbf41 Update chromium versions 2024-03-27 20:15:15 +01:00
Florian Bruhin 713a4e5ec2 Fix caret tests on Qt 6 and Windows 2024-03-27 19:49:09 +01:00
Florian Bruhin 7a969a2d54 Add caret browsing debug logging 2024-03-27 16:55:18 +01:00
Florian Bruhin 481542844d tests: Avoid using autofocus for click_element tests
Similarly to the last commit (982b8bdcec),
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.
2024-03-27 13:05:28 +01:00
Florian Bruhin 982b8bdcec 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.
2024-03-27 12:34:30 +01:00
Florian Bruhin 0b220117e2 tests: Fix glob matching 2024-03-26 14:30:20 +01:00
Florian Bruhin f671e997cc tox: Avoid installing PyQt from source for bleeding envs
Right now, the Riverbank PyPI server has a PyQt5 sdist but no wheels.
2024-03-26 14:23:05 +01:00
Florian Bruhin 6ee7a23c7e tests: Ignore new SSL error message
Seems to break in bleeding edge tests
2024-03-26 14:15:09 +01:00
Florian Bruhin 0a5d92119e importer: Stop using deprecated bs4 findAll
Fails bleeding edge CI due to warnings
2024-03-26 14:09:09 +01:00
Florian Bruhin d37f5b7be0 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
2024-03-26 13:57:07 +01:00
Florian Bruhin 1ee138b681 qtutils: Handle QDataStream.Status.SizeLimitExceeded 2024-03-25 23:29:24 +01:00
Florian Bruhin a45cfb89cb tests: Add new ignored error messages 2024-03-25 23:05:25 +01:00
Florian Bruhin ad3ba9fe84 tests: Avoid accessing Qt statics at import time
With a Qt 6.7 developer build, the tests fail with:

    ASSERT failure in QtGlobalStatic::ApplicationHolder<QAS>::PlainType*
    QtGlobalStatic::ApplicationHolder<QAS>::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 <module>

See https://codereview.qt-project.org/c/qt/qtbase/+/495239
2024-03-25 23:05:16 +01:00
Florian Bruhin 01f4807eaf 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
2024-03-25 12:15:03 +01:00
toofar 52c83cf485
Merge pull request #8142 from qutebrowser/update-dependencies
Update dependencies
2024-03-25 19:14:04 +13:00
toofar 17ddde3f72 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
2024-03-25 18:41:46 +13:00
qutebrowser bot d0eac83676 Update dependencies 2024-03-25 04:21:29 +00:00
toofar 01de692348
Merge pull request #8124 from qutebrowser/dependabot/github_actions/softprops/action-gh-release-2
build(deps): bump softprops/action-gh-release from 1 to 2
2024-03-25 13:04:02 +13:00
toofar a795164da4
Merge pull request #8123 from qutebrowser/update-dependencies
Update dependencies
2024-03-25 12:20:33 +13:00
toofar 75c991b998 update importlib metadata changelog URL
See 2f3d0161f3 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
2024-03-25 11:49:20 +13:00
toofar 52106c383b 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
2024-03-23 11:51:35 +13:00
Florian Bruhin 93b8438ebc Update doc heading for Windows
See #8136
2024-03-22 16:03:06 +01:00
Tobias Naumann bc7d956f77 Add Unicode normalization and IDNA encoding to qute-pass userscript for the 'pass' mode (gopass support missing) 2024-03-18 16:34:57 +01:00
qutebrowser bot ab9e575ab9 Update dependencies 2024-03-18 04:21:00 +00:00
dependabot[bot] 201a533b4d
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] <support@github.com>
2024-03-11 18:29:51 +00:00
Florian Bruhin c073412b49 Rename readme_renderer in changelog URLs 2024-03-04 21:28:47 +01:00
qutebrowser bot e02e709d7c Update dependencies 2024-03-04 19:16:02 +00:00
Florian Bruhin f0d3130aae
Merge pull request #8114 from qutebrowser/update-dependencies
Update dependencies
2024-02-26 11:16:30 +01:00
toofar 2f3d0161f3 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.
2024-02-26 19:22:27 +13:00
qutebrowser bot 52f5147666 Update dependencies 2024-02-26 04:20:13 +00:00
toofar f6b8275f0c
Merge pull request #8106 from qutebrowser/update-dependencies
Update dependencies
2024-02-25 17:39:48 +13:00
toofar 4f91fc4025
Merge pull request #8110 from tarneaux/main
Allow reloading config on SIGHUP
2024-02-25 16:56:15 +13:00
toofar 42cf53ae7c 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?
2024-02-25 16:52:32 +13:00
toofar 5687177d4d 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.
2024-02-25 16:30:27 +13:00
toofar 145bfe4de0 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.
2024-02-25 15:56:34 +13:00
toofar 6050017809 update changelog for SIGHUP handling 2024-02-24 23:23:42 +13:00
toofar f6c0e4ebc8 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: 210ce8ca7c
2024-02-24 23:23:42 +13:00
tarneo aafb44cbaa
Run message.error() on SIGHUP config errors 2024-02-22 11:27:52 +01:00
tarneo d5926756ae
Replicate config_source in SIGHUP handler 2024-02-22 11:21:20 +01:00
tarneo 566c07c789
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.
2024-02-21 21:15:10 +01:00
toofar e6a0d2bf2f 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.
2024-02-20 18:45:33 +13:00
qutebrowser bot 569716bef5 Update dependencies 2024-02-19 04:20:46 +00:00
toofar b92f053350
Merge pull request #8101 from qutebrowser/update-dependencies
Update dependencies
2024-02-17 09:58:40 +13:00
Florian Bruhin da2c7ee7cd ci: Try more sed cross-platform madness 2024-02-13 16:44:03 +01:00
qutebrowser bot 5615d0e59b Update dependencies 2024-02-12 04:20:45 +00:00
Florian Bruhin e42c3222b1
Merge pull request #8091 from qutebrowser/dependabot/github_actions/peter-evans/create-pull-request-6
build(deps): bump peter-evans/create-pull-request from 5 to 6
2024-02-05 20:12:22 +01:00
dependabot[bot] 5f8423f9d3
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] <support@github.com>
2024-02-05 18:47:44 +00:00
Florian Bruhin aac4d2b4a7
Merge pull request #8090 from qutebrowser/update-dependencies
Update dependencies
2024-02-05 07:21:44 +01:00
qutebrowser bot 4af52180b5 Update dependencies 2024-02-05 04:20:36 +00:00
Florian Bruhin c12340802d ci: Remove weird sed usage
Broke on Windows nightly builds for some reason
2024-02-02 11:06:04 +01:00
Florian Bruhin cd25d8096d tox: Stop pinning virtualenv for Python 3.12
Reverts 0b0401f8bb

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
2024-01-30 20:27:34 +01:00
toofar 94445413c4
Merge pull request #8085 from qutebrowser/update-dependencies
Update dependencies
2024-01-29 18:24:22 +13:00
qutebrowser bot a0437782f1 Update dependencies 2024-01-29 04:19:53 +00:00
toofar 6b7a3510f2
Merge pull request #8080 from qutebrowser/dependabot/github_actions/actions/cache-4
build(deps): bump actions/cache from 3 to 4
2024-01-28 22:25:01 +13:00
dependabot[bot] 238c97f71e
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] <support@github.com>
2024-01-22 18:56:48 +00:00
Florian Bruhin 3494614fcb Update changelog URLs 2024-01-22 10:53:22 +01:00
Florian Bruhin 5456a4153a Update flake8 ignores 2024-01-22 09:53:55 +01:00
Florian Bruhin 8afe153564 Update changelog URL 2024-01-22 09:52:41 +01:00
qutebrowser bot 0563dc0eda Update dependencies 2024-01-22 04:20:11 +00:00
Florian Bruhin fedea10187 Fix consistency of 'dark mode' spelling
Thanks to absinthium
2024-01-17 11:25:23 +01:00
Florian Bruhin c9910c3dfe
Merge pull request #8067 from qutebrowser/update-dependencies
Update dependencies
2024-01-15 11:40:14 +01:00
qutebrowser bot 96ff6132cb Update dependencies 2024-01-15 04:21:31 +00:00
Florian Bruhin 6bc140bf71 listcategory: Clean up building regex pattern
- Don't split the pattern in weird places used for str.join, instead
  build up the individual groups and then "".join them, which seems more
  readable to me.
- Don't reuse "val" for both the user-input pattern and the regex pattern.
2024-01-12 18:53:22 +01:00
Florian Bruhin ee9aecda46 listcategory: Fix O(n^2) performance if no match
With the change in #7955, if the regex did not match, it ended up retrying the
lookahead at every position of the string (expected), but then *also* repeated
that process for every position in the string. Thus, a non-matching pattern
ended up in O(n^2) performance (with n = length of URL).

Instead, anchor the pattern at the beginning of the string. This doesn't change
behaviour as we use .* at the beginning of every lookahead anyways, but it means
we end up with O(n) instead of O(n^2) performance.

Co-authored-by: toofar <toofar@spalge.com>
2024-01-12 18:53:22 +01:00
Florian Bruhin 13f6cfa715 Reapply "Update changelog for 7955"
This reverts commit 6a149901fb.
2024-01-12 18:53:22 +01:00
Florian Bruhin f8df682b90 Reapply "Merge pull request #7955 from arza-zara/search_any_order"
This reverts commit 45d483479a.
2024-01-12 18:53:22 +01:00
Florian Bruhin 0a82ae4073
Merge pull request #8063 from ju-sh/patch-1
Typo fix
2024-01-12 10:02:57 +01:00
Julin S 7c6b4fe845
Typo fix
Trivial typo fix
2024-01-12 12:28:53 +05:30
Florian Bruhin 6a149901fb Revert "Update changelog for 7955"
This reverts commit dbd0bfbe8e.

See previous commit
2024-01-11 17:31:11 +01:00
Florian Bruhin 45d483479a Revert "Merge pull request #7955 from arza-zara/search_any_order"
This reverts commit fe1faa14b9, reversing
changes made to 04af4c657d.

For my setup with 310 quickmarks and 94 bookmarks, this makes qutebrowser hang
for around a minute on every keypress.
2024-01-11 17:30:27 +01:00
Florian Bruhin 4b11776f76 tests: Upgrade our hook implementation for pytest 7
https://docs.pytest.org/en/7.4.x/deprecations.html#py-path-local-arguments-for-hooks-replaced-with-pathlib-path
https://docs.pytest.org/en/7.4.x/reference/reference.html#std-hook-pytest_ignore_collect

8.0.0 removes the "path" compatibility alias we used.
2024-01-10 14:41:39 +01:00
Florian Bruhin 1ad6b68d33 tests: Ignore yet another mesa (?) warning
As shown in detail by toofar in dff25d10bc,
mesa 23.3 seems to trigger some new error messages.

On my setup locally, it also triggers the warning that's ignored here.

Why that's not the case on CI or for others is unclear to me, I gave up
trying to understand graphics stuff on Linux.

I'll just presume this is the same underlying cause, and refer to the
commit message of the commit above for more details.
2024-01-10 14:33:26 +01:00
toofar a2b81bee86
Merge pull request #8057 from qutebrowser/update-dependencies
Update dependencies
2024-01-10 21:01:06 +13:00
qutebrowser bot 293e3559bc Update dependencies 2024-01-08 04:20:19 +00:00
toofar b490f288a9
Merge pull request #8052 from qutebrowser/update-dependencies
Update dependencies
2024-01-01 19:27:03 +13:00
qutebrowser bot 9bf6f89036 Update dependencies 2024-01-01 04:20:20 +00:00
toofar f13ac06ba3
Merge pull request #8049 from qutebrowser/update-dependencies
Update dependencies
2023-12-26 15:03:56 +13:00
toofar 19204f441e Update qute-pylint requirements regex for new setuptools.
In `pylint_checkers/setup.py` we define the package name as `qute_pylint`. When
setuptools was creating the egg (or wheel?) it was sanitizing the package name
replacing all problematic chars, including underscore, with a hyphen (-). So
the output of `pip freeze`, among other things, have the name with a hyphen:
`qute-pylint`. This was fixed in setuptools so underscores are no longer
sanitized: https://github.com/pypa/setuptools/issues/2522

Change the regex to include both just in case someone is running it with the
old setuptools or something. Also because I'm not able to reproduce the
hyphen version of the name locally, not sure why. Maybe it depends on your
python or importlib version too?
2023-12-26 14:09:35 +13:00
qutebrowser bot ecdb2bfe88 Update dependencies 2023-12-25 04:22:00 +00:00
toofar dff25d10bc Ignore mesa "error" logs
Mesa upgraded from 23.2.1-2 to 23.3.1-1 a couple of days ago. Since then
there has been some non-fatal InvalidLine errors in the CI jobs (eg
https://github.com/qutebrowser/qutebrowser/actions/runs/7281982007/job/19843511920)

Based on https://gitlab.freedesktop.org/mesa/mesa/-/issues/10293 I'm
assuming these log messages don't actually indicate errors and the tests
pass when they are ignore.

Weirdly, I'm only seeing these errors related to the
`tests/end2end/test_invocations.py::test_misconfigured_user_dirs` test,
I'm not sure why. It doesn't look much different from the ones around
it.

Possibly we could ignore these lines just for that test, or maybe play
round with it more to find out why it is different. But since the lines
are non fatal I'll just ignore them everywhere. I'm a little worried
about that because they are quite generic, but at least they are still
logged when they are ignored.

They might change these error logs messages to be warning log messages
based on that issue. But it'll probably still fail the tests since we
match on all log lines?

The "always try zink" change was introduced in https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25640
It looks like there might be a `LIBGL_KOPPER_DISABLE` which may skip
this behaviour. Not I'm not sure, the commit message says:

> don't load non-sw zink without dri3 support
> this is going to be broken, so don't bother trying
> also add LIBGL_KOPPER_DRI2 so people can continue to footgun if they
> really really want to

I assume we aren't trying to run with non-sw zink but with non-zink sw?
idk

Maybe we should be setting force_software_rendering=software-opengl or
LIBGL_ALWAYS_SOFTWARE instead so that it never tries to use the vulkan
backed zink?
2023-12-21 15:21:19 +13:00
toofar dbd0bfbe8e Update changelog for 7955 2023-12-21 12:31:31 +13:00
toofar fe1faa14b9 Merge pull request #7955 from arza-zara/search_any_order
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).
2023-12-21 12:28:22 +13:00
toofar 04af4c657d
Merge pull request #8042 from qutebrowser/dependabot/github_actions/actions/upload-artifact-4
build(deps): bump actions/upload-artifact from 3 to 4
2023-12-21 11:42:39 +13:00
toofar a478b0422d
Merge pull request #8041 from qutebrowser/dependabot/github_actions/github/codeql-action-3
build(deps): bump github/codeql-action from 2 to 3
2023-12-21 11:10:01 +13:00
dependabot[bot] b84ae4053c
build(deps): bump actions/upload-artifact from 3 to 4
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-18 18:32:17 +00:00
dependabot[bot] 4c431fd22d
build(deps): bump github/codeql-action from 2 to 3
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-18 18:32:14 +00:00
Florian Bruhin 7dbc02c40b
Merge pull request #8038 from qutebrowser/update-dependencies
Update dependencies
2023-12-18 10:48:42 +01:00
qutebrowser bot 66229f4d64 Update dependencies 2023-12-18 04:20:09 +00:00
toofar fbb3e10ce1 Add placeholder changelog entries for next two releases
I would like to make merging PRs lower friction. One aspect of that for
me is having to think about where to add the changelog info, whether it
should go in an existing section, whether I should create a new section,
what the format changelog is supposed to be in. These questions are a
bit coupled with the decision of whether to backport a change or not.

Those aren't hard questions but I don't usually have a long stretch of
time for open source work. So making it so I don't have to make those
decisions at merge time makes it easier for me to fit that work into my
day. Previously it seemed to me that the norm was to only have a future
changelog entry for the next patch release. Occasionally I would merge
stuff and add it to the patch release changelog entry and then think
about how I would have made getting any security fixes out harder or how
it would have to be corrected at backport time. So this is kind of a
pre-commitment that yes, we are going to be merging stuff to main that
won't make it to the next release.

A lot, but not all, of the above rambling will also be mitigated by
adopting a fragment based changelog management system (#7101), because
that means that more of the stuff we have to worry about when merging is
only in the context of the PR. Eg just describe that the change does,
don't worry too much about where that description is going to end up.

Other follow up stuff we could do if norms are established or need
re-enforcing:

* update contributor docs to describe more of the branching strategy as
  it applies to merging
* update contributor docs to describe backporting steps and philosophy
* link changelog entries to milestones?
2023-12-12 09:19:53 +13:00
toofar 26f1069d2a
Merge pull request #8029 from qutebrowser/dependabot/github_actions/actions/setup-python-5
build(deps): bump actions/setup-python from 4 to 5
2023-12-12 09:04:51 +13:00
toofar 0eb5b193af
Merge pull request #8028 from qutebrowser/update-dependencies
Update dependencies
2023-12-12 08:12:31 +13:00
dependabot[bot] 3d9bf9651f
build(deps): bump actions/setup-python from 4 to 5
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-11 18:33:46 +00:00
toofar da59327e3e Regenerate pylint requirements with isort pinned
I added isort!=5.13.0 in misc/requirements/requirements-pylint.txt and
ran `python3 scripts/dev/recompile_requirements.py pylint` in `docker
run -v `pwd`:/work -w /work -it python:3.8-bookworm bash` based off of
main.

Then reverted the relevant part of the update dependencies commit with
`git show HEAD misc/requirements/requirements-pylint.txt | patch -R -p
1` and manually updated the two deps from the local update run :)

    diff --git i/misc/requirements/requirements-pylint.txt w/misc/requirements/requirements-pylint.txt
    index 80319adc03a7..1c8fa33e623a 100644
    --- i/misc/requirements/requirements-pylint.txt
    +++ w/misc/requirements/requirements-pylint.txt
    @@ -11,7 +11,7 @@ idna==3.6
     isort==5.12.0
     mccabe==0.7.0
     pefile==2023.2.7
    -platformdirs==4.0.0
    +platformdirs==4.1.0
     pycparser==2.21
     PyJWT==2.8.0
     pylint==3.0.2
    @@ -21,6 +21,6 @@ requests==2.31.0
     six==1.16.0
     tomli==2.0.1
     tomlkit==0.12.3
    -typing_extensions==4.8.0
    +typing_extensions==4.9.0
     uritemplate==4.1.1
     # urllib3==2.1.0

ref: https://github.com/qutebrowser/qutebrowser/pull/8028#issuecomment-1849363267
2023-12-11 21:42:54 +13:00
qutebrowser bot c0141b0952 Update dependencies 2023-12-11 04:20:19 +00:00
qutebrowser bot a9f6ad9731 Release v3.1.0 2023-12-08 15:30:58 +00:00
Florian Bruhin 4928153227 Upgrade release Python to 3.12 2023-12-08 15:44:18 +01:00
Florian Bruhin bfe2878ca8 Merge branch 'explicit-focus-handling' 2023-12-08 15:14:54 +01:00
Florian Bruhin 9a648dcbac Add birthday page 2023-12-08 15:13:45 +01:00
Florian Bruhin 6aa19eb90f Explicitly handle focus before hiding UI elements
Almost 7 years ago, it was observed that hiding the status bar causes some
websites being scrolled to the top: #2236.

Back then, it never really was clear why this happens. However, with the v3.0.0
release, we had a regression causing the same thing to happen when leaving
prompt mode: #7885.

Thanks to "git bisect", the culprit was found to be 8e152aa, "Don't give
keyboard focus to tab bar", which was a fix for #7820. However, it still wasn't
clear why this phenomenon happens.

What made things clearer to me was a combination of debugging and an old comment
by pevu: https://github.com/qutebrowser/qutebrowser/issues/2236#issuecomment-337882102

> Chromium-browser has the same issue. When you open lipsum.com, scroll down,
> then focus the location bar (url box), then press Tab, it will jump to the
> top of the page and focus the first link. This doesn't happen when you
> switch focus using the mouse.
>
> It seems to be an issue of how the view containing the website is focused
> when all qutebrowser ui elements disappear.

And indeed, tabbing into the web contents from the UI elements via the tab key
in Chromium causes the website to start at the top, presumably as an
accessibility feature?

Essentially, this is also what happens in qutebrowser when an UI element is
hidden while it still has focus: In QWidget::hide() (or, rather,
QWidgetPrivate::hide_helper()), Qt moves the focus to the next widget by
calling focusPrevNextChild(true):
https://github.com/qt/qtbase/blob/v6.6.1/src/widgets/kernel/qwidget.cpp#L8259-L8271

And apparently, focusPrevNextChild() basically does the same thing as pressing
the tab key, to the point that there is some code in Qt Declarative actually
making tab keypresses out of it (which I'm still not sure is related, or maybe
just the cause of #4579):
https://github.com/qt/qtdeclarative/blob/v6.6.1/src/quickwidgets/qquickwidget.cpp#L1415-L1429

Some debugging confirms that this is exactly what happening:

1) We hide the status bar (or prompt) which has keyboard focus
2) Qt focuses the web view, which triggers the Chromium feature (?) scrolling it
   to the very top.
3) Only then, in TabbedBrowser.on_mod_left(), we noticed that the command or
   prompt mode was left, and reassign focus to the web view properly.

In step 2), before this change, Qt happened to focus the tab bar (before we set
the focus manually to the web contents), and thus this didn't happen.
Not sure why it didn't focus the tab bar when we hid the status bar (maybe
because how our widget hierarchy works with TabbedBrowser?).

Python stacktrace of hiding prompt:

    Traceback (most recent call first):
    <built-in method hide of DownloadFilenamePrompt object at remote 0x7fffb8bc65f0>
    File ".../qutebrowser/mainwindow/prompt.py", line 204, in _on_mode_left
        self.show_prompts.emit(None)
    File ".../qutebrowser/keyinput/modeman.py", line 434, in leave
        self.left.emit(mode, self.mode, self._win_id)
    File ".../qutebrowser/keyinput/modeman.py", line 445, in mode_leave
        self.leave(self.mode, 'leave current')

C++ stacktrace, with the focus change presumably being passed of to Chromium
here: https://github.com/qt/qtwebengine/blob/dev/src/core/render_widget_host_view_qt_delegate_client.cpp#L714

    #0  QtWebEngineCore::RenderWidgetHostViewQtDelegateClient::handleFocusEvent(QFocusEvent*) () at /usr/src/debug/qt6-webengine/qtwebengine-everywhere-src-6.6.0/src/core/render_widget_host_view_qt_delegate_client.cpp:708
    #1  QtWebEngineCore::RenderWidgetHostViewQtDelegateClient::handleFocusEvent(QFocusEvent*) () at /usr/src/debug/qt6-webengine/qtwebengine-everywhere-src-6.6.0/src/core/render_widget_host_view_qt_delegate_client.cpp:705
    #2  0x00007fffe5fea70c in QtWebEngineCore::RenderWidgetHostViewQtDelegateClient::forwardEvent(QEvent*) () at /usr/src/debug/qt6-webengine/qtwebengine-everywhere-src-6.6.0/src/core/render_widget_host_view_qt_delegate_client.cpp:300
    #3  0x00007fffe4dd5c79 in QQuickItem::event(QEvent*) (this=0x555556b6cd20, ev=0x7fffffffa320) at /usr/src/debug/qt6-declarative/qtdeclarative-everywhere-src-6.6.0/src/quick/items/qquickitem.cpp:8871
    #4  0x00007ffff1f7318b in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x555556b6cd20, e=0x7fffffffa320)
        at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/widgets/kernel/qapplication.cpp:3290
    #5  0x00007ffff295e4a7 in  () at /usr/lib/python3.11/site-packages/PyQt6/QtWidgets.abi3.so
    #6  0x00007ffff59626d8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x555556b6cd20, event=0x7fffffffa320) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/corelib/kernel/qcoreapplication.cpp:1118
    #7  0x00007ffff596271d in QCoreApplication::sendEvent(QObject*, QEvent*) (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/corelib/kernel/qcoreapplication.cpp:1536
    #8  0x00007fffe4f33f15 in QQuickDeliveryAgentPrivate::setFocusInScope(QQuickItem*, QQuickItem*, Qt::FocusReason, QFlags<QQuickDeliveryAgentPrivate::FocusOption>)
        (this=<optimized out>, scope=<optimized out>, item=<optimized out>, reason=<optimized out>, options=...) at /usr/src/debug/qt6-declarative/qtdeclarative-everywhere-src-6.6.0/src/quick/util/qquickdeliveryagent.cpp:439
    #9  0x00007fffe4dd348a in QQuickItem::setFocus(bool, Qt::FocusReason) (this=0x555556b724d0, focus=<optimized out>, reason=Qt::TabFocusReason) at /usr/include/qt6/QtCore/qflags.h:73
    #10 0x00007fffe4e7239b in QQuickWindow::focusInEvent(QFocusEvent*) (this=<optimized out>, ev=<optimized out>) at /usr/src/debug/qt6-declarative/qtdeclarative-everywhere-src-6.6.0/src/quick/items/qquickwindow.cpp:231
    #11 0x00007ffff1fc3a05 in QWidget::event(QEvent*) (this=0x555556457b50, event=0x7fffffffa770) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/widgets/kernel/qwidget.cpp:9111
    #12 0x00007ffff1f7318b in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x555556457b50, e=0x7fffffffa770)
        at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/widgets/kernel/qapplication.cpp:3290
    #13 0x00007ffff295e4a7 in  () at /usr/lib/python3.11/site-packages/PyQt6/QtWidgets.abi3.so
    #14 0x00007ffff59626d8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x555556457b50, event=0x7fffffffa770) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/corelib/kernel/qcoreapplication.cpp:1118
    #15 0x00007ffff596271d in QCoreApplication::sendEvent(QObject*, QEvent*) (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/corelib/kernel/qcoreapplication.cpp:1536
    #16 0x00007ffff1f7f1b2 in QApplicationPrivate::setFocusWidget(QWidget*, Qt::FocusReason) (focus=0x555556457b50, reason=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/widgets/kernel/qapplication.cpp:1538
    #17 0x00007ffff1fca29d in QWidget::setFocus(Qt::FocusReason) (this=0x555556b1ceb0, reason=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/widgets/kernel/qwidget.cpp:6580
    #18 0x00007ffff1fb4f1b in QWidget::focusNextPrevChild(bool) (this=<optimized out>, next=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/widgets/kernel/qwidget.cpp:6844
    #19 0x00007ffff298d0ac in  () at /usr/lib/python3.11/site-packages/PyQt6/QtWidgets.abi3.so
    #20 0x00007ffff298d0ac in  () at /usr/lib/python3.11/site-packages/PyQt6/QtWidgets.abi3.so
    #21 0x00007ffff298d0ac in  () at /usr/lib/python3.11/site-packages/PyQt6/QtWidgets.abi3.so
    #22 0x00007ffff1fbdb76 in QWidgetPrivate::hide_helper() (this=this@entry=0x55555646a360) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/widgets/kernel/qwidget.cpp:8271
    #23 0x00007ffff1fbf158 in QWidgetPrivate::setVisible(bool) (this=0x55555646a360, visible=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/widgets/kernel/qwidget.cpp:8447
    [...]

We fix this problem by explicitly handling focus before hiding the UI elements.
This is done with a new TabbedBrowser.on_release_focus() slot, which is bound to
signals emitted just before things are hidden: The existing Command.hide_cmd()
for the status bar, and a new release_focus() signal for prompts.

Additionally, we make sure to not double-handle hiding in the statusbar
code when it's already handled separately for comamnd mode.

Unfortunately, no tests for this, as application window focus is required to
reproduce the issue. In theory, a test in scroll.feature could be added though,
which loads simple.html, scrolls down, shows/hides a prompt or the status bar,
and then checks the vertical scroll position is != 0.

Fixes #2236
Fixes #7885
2023-12-07 21:30:37 +01:00
Florian Bruhin c698091f55 Avoid calling DownloadItem.origin() if unneeded
See #7854
2023-12-05 14:31:58 +01:00
Florian Bruhin 9d8c263e9a Extend pakjoy to Qt 6.5.0/.1/.2 with dark mode
See #7837
2023-12-05 13:46:02 +01:00
Florian Bruhin b40e1861c3 Fix lint and tests 2023-12-04 19:55:06 +01:00
Florian Bruhin 383f8a2e82
Merge pull request #8016 from arza-zara/docstrings
Fix docstrings
2023-12-04 19:48:26 +01:00
arza dcb4233fd0 Fix docstrings 2023-12-04 18:43:18 +02:00
Florian Bruhin 21c7699eac Add content.javascript.legacy_touch_events setting
Closes #7814
2023-12-04 16:44:56 +01:00
Florian Bruhin 0ffb04cfc0 Fix lint and tests 2023-12-04 16:16:46 +01:00
Florian Bruhin 23b4f19713 Fix lint and derp 2023-12-04 15:43:29 +01:00
Florian Bruhin 4d3314cad8 Upgrade changelog and changelog URLs 2023-12-04 15:00:06 +01:00
Florian Bruhin 8a498185c1 Merge remote-tracking branch 'origin/pr/8015' 2023-12-04 14:59:40 +01:00
Florian Bruhin 21869d149a Support QWebEngineSettings.WebAttribute.ReadingFromCanvasEnabled
See #7646
2023-12-04 14:59:08 +01:00
Florian Bruhin c1a1a13775 qtargs: Supply values with lambda instead of keys
Makes the lambdas more flexible, e.g. mapping a single key to a different flag depending on Chromium version. Ended up being unneeded for reading from canvas flag, but still useful.
2023-12-04 14:58:36 +01:00
Florian Bruhin 8cd06741bb Expose QtWebEngine 6.6 dark mode image classifier policy
Implemented as a separate setting in Chromium, but exposed to qutebrowser users
as a value for `policy.images`, as it's a simple toggle that does not have any
effect when `policy.images` is not set to `smart` anyways.

To support this, the _Settings.mapping value now supports None values,
which leads to _Setting.chromium_tuple to return None, which means that
no switch is added in this case.

See #7646
2023-12-04 14:28:22 +01:00
Florian Bruhin 2a10461ca4 Remove dark mode settings removed from Chromium
Closes #7929
2023-12-04 13:39:52 +01:00
Florian Bruhin 1cd6d5af63 Update dark mode docs 2023-12-04 13:16:23 +01:00
qutebrowser bot 6fbc15e3cf Update dependencies 2023-12-04 11:52:34 +00:00
Florian Bruhin 145292899c Update changelog 2023-12-04 12:48:13 +01:00
Florian Bruhin 0aa57e4f72 Merge remote-tracking branch 'origin/pr/7935' 2023-12-04 12:46:51 +01:00
Florian Bruhin e8a7c6b257 Update changelog 2023-12-04 12:33:55 +01:00
Florian Bruhin 6e6e9d285e Merge branch 'pdfjs-fix' 2023-12-04 10:49:30 +01:00
Florian Bruhin 1d29cf641b Simplify get_pdfjs test
Given that the two branches share rather little, it seems simpler to separate the two tests. Also use monkeypatch, since we don't use any of unittest.mock's complexity
2023-12-04 10:46:30 +01:00
toofar 5e847cd4ea update changelog for accel 2d canvas take 2 2023-12-04 19:32:40 +13:00
toofar 88c35c9df0 tweak savefile_open type hints
This was fixed up in https://github.com/qutebrowser/qutebrowser/pull/8006
after a mypy update caused us to examine the typing.AnyStr thing a bit more.
But both overloads got set to have a `str` return type, so the possible
bytes return type got lost. Mypy didn't pick that up because `binary=True` is
only used in `qutebrowser/browser/webkit/cookies.py` which probably isn't
being type checked.

I had to remove the default from the binary arg of the bytes version (the ` =
...` bit) because if both overloads have the kwarg as optional mypy doesn't
know which to match a call with just one positional argument against. Eg
`savefile_open('some_file')` would match both.

I checked with reveal_type:

    diff --git i/qutebrowser/utils/qtutils.py w/qutebrowser/utils/qtutils.py
    index 89175ca4ee60..5b86e441a1bc 100644
    --- i/qutebrowser/utils/qtutils.py
    +++ w/qutebrowser/utils/qtutils.py
    @@ -290,6 +290,20 @@ def savefile_open(
                 raise QtOSError(f, msg="Commit failed!")

    +def test_savefile_types() -> None:
    +    from typing_extensions import reveal_type
    +
    +    maybe_str_default = savefile_open("/tmp/string_file")
    +    # note: Revealed type is "contextlib._GeneratorContextManager[typing.IO[builtins.str]]"
    +    reveal_type(maybe_str_default)
    +    maybe_str_explicit = savefile_open("/tmp/string_file", binary=False)
    +    # note: Revealed type is "contextlib._GeneratorContextManager[typing.IO[builtins.str]]"
    +    reveal_type(maybe_str_explicit)
    +    maybe_bytes = savefile_open("/tmp/bytes_file", binary=True)
    +    # note: Revealed type is "contextlib._GeneratorContextManager[typing.IO[builtins.bytes]]"
    +    reveal_type(maybe_bytes)
    +
    +
     def qcolor_to_qsscolor(c: QColor) -> str:
         """Convert a QColor to a string that can be used in a QStyleSheet."""
         ensure_valid(c)
2023-12-03 12:04:10 +13:00
toofar 23a1689262 Merge branch 'main' into pr/7992
This is just to get the CI to re-trigger.

Apparently the checkout action doesn't actually checkout the branch
being proposed for merge but checks out an actual merge commit. So if
you push a PR while main is broken it'll say changes from main are on
your branch. That's a little unexpected.

main is fixed now and I tried re-running the CI jobs from the web UI but
they are still failing with the same errors. Hence this merge of main
just to get a change on the branch. I could have gone and found a typo
to fix instead. I know I've left enough of them around.

ref: https://github.com/actions/checkout/issues/881
2023-12-02 13:36:14 +13:00
toofar 75c78cadc4 Always disable accelerated canvas if set to auto on Qt6
We thought #7489 would be fixed on chrome 112 but it appears to still be
an issue. As discussed on the issue, it's not clear how many workflows
would be affected by accelerated 2d canvas and we don't have enough data
to detect the affected graphics configurations. So lets just disable
accelerated 2d canvas by default and users who want it turned on can do
so via the setting.

If some major use case pops up to enable this by default where possible
we can revisit and think of more nuanced feature detection.

I've kept the handling of callable values of `_WEBENGINE_SETTINGS`
because I don't like have to have something like
`--disable-accelerated-2d-canvas` written in code twice. The setting
above this one could probably be changed to use it too.
2023-12-02 12:53:44 +13:00
toofar 1aa3c952ab pakjoy: fix happy path test
read back the manifest inside the context manager so we can find the
work dir.
2023-12-02 12:41:23 +13:00
toofar 7d5acb6970 Add test for get_pdfjs_js_path() 2023-12-02 12:22:31 +13:00
Florian Bruhin d77053b86c Remove unused fixture 2023-12-01 23:47:48 +01:00
Florian Bruhin b5f11558a6 pdfjs: Simplify logic
Makes things easier if we get build/ right with the return value
2023-12-01 23:38:11 +01:00
Florian Bruhin a2c74ec1bf Remove unused vars 2023-12-01 23:32:07 +01:00
Florian Bruhin eabbdb8ea3 pdfjs: Fix :version crash with no pdf.js
pdfjs.get_pdf_basename() returned None, causing in a TypeError. Instead of
throwing mocker.patch at it, fix the underlying issue.

Given we made the same mistake in three places:

- :version
- test_real_file for PDF.js
- is_available() in pdfjs.py (calls the function but doesn't use the result, so
  is a nop now, even if PDF.js wasn't found)

...evidently we need to change the API so it still raises an exception if no
PDF.js is available.

Amends 0144ae3576.
2023-12-01 23:31:34 +01:00
Florian Bruhin 0c3c131074 Undo html change
html.escape is not needed after latest toofar changes
2023-12-01 22:57:31 +01:00
Florian Bruhin 302a8f582a pakjoy: Restore old QTWEBENGINE_RESOURCES_PATH value
Otherwise, doing :restart fails because it tries to copy quirk dir to quirk dir.

QtWebEngine reads the env var in resourcePath() in
src/core/web_engine_library_info.cpp. That only seems to be called from
WebEngineLibraryInfo::getPath(), and that in turn gets called from
ResourceBundle::LoadCommonResources() in src/core/resource_bundle_qt.cpp.

Finally, that only seems to be called during Chromium initialization, so it
seems alright for us to unset this as soon as we initialized the first profile.

It also seems to work fine in my testing on Google Meet, and indeed fixes
:restart.
2023-12-01 22:47:43 +01:00
Florian Bruhin 6034a4a176
Merge pull request #8009 from qutebrowser/update-dependencies
Update dependencies
2023-11-27 12:08:52 +01:00
qutebrowser bot 19dc338ecf Update dependencies 2023-11-27 04:20:57 +00:00
toofar c02a15b6c7 Cleanup pdfjs_name
Now we aren't using it for the patching we don't need it in this function.
Move the `get_pdfjs_basename()` call into `is_available()` too since having to
call two methods to check everything is there sounds like a pain.
2023-11-27 08:20:28 +13:00
toofar a39dd64c5e Move pdf.js fetch() disabler earlier in the file.
We are setting window.Response to undefined to cause certain versions of
pdf.js to detect that fetch() isn't available and to fall back to XHRs. In
more recent versions of pdf.js the HTML string we were matching against has
changed, it has a 'type="module"' attribute now, so we need to change the
pattern we match against.

I don't think it matters where we put this mocking though, so I've just put it
after '<head>', which should hopefully be less fragile than matching against a
'<script>' element.

Note that this workaround isn't even relevant for the latest versions of
pdf.js (4+). It doesn't seem to use a check on `window.Response` as part of
fetch feature detection anymore (instead it uses fetch() for https? urls and
XHR otherwise). But I figured it was better to have the workaround applying
consistently, and not having an effect, vs having the workaround silently fail
to apply. Don't have a strong opinion on it though.

The other way to fix this would have been something like:

    attrs = ""
    if pdfjs_name.endswith(".mjs"):
        attrs = ' type="module"'
    pdfjs_script = f'<script src="../build/{html.escape(pdfjs_name)}"{attrs}></script>'
2023-11-27 08:16:34 +13:00
toofar 0144ae3576 fix pdf.js detection in :version
Now that pdf.js could be shipped with either js or mjs file extensions we
shouldn't hardcode the filename. Call the function for detecting the filename
instead. And make it public.
2023-11-27 08:07:40 +13:00
toofar b643e7b411 Try getting sandbox page text again
On CI now the sandbox test is failing on windows when we pop the header
line with an index error. It looks like the only line present on the
page is "Sandbox Status". It was working on CI the other day! Grrr

Hopefully it's a timing issue and the JS just hasn't finished running
yet? Not sure if just loading it again is the most reliable. Ideally we
would be listening for some event...

Pretty low effort but if this makes the test stop being flaky and we
don't have to look at it again that's fine with me.
2023-11-24 21:47:01 +13:00
Florian Bruhin bd86577736 pakjoy: Add undocumented escape hatch 2023-11-22 22:23:53 +01:00
Florian Bruhin 4dab98a3be Update changelog 2023-11-22 22:16:30 +01:00
Florian Bruhin ea7fb86706 tests: Also disable PaintHoldingCrossOrigin for unit tests
See https://bugreports.qt.io/browse/QTBUG-112017 and #5390
2023-11-22 22:08:24 +01:00
Florian Bruhin 8a53e9b282 pakjoy: Use proper logic to discover resources dir 2023-11-22 20:14:33 +01:00
Florian Bruhin 2e2e0c8031 pakjoy: 100% test coverage 2023-11-22 18:02:18 +01:00
Florian Bruhin 6147cae901 pakjoy: Use existing tmp_cachedir 2023-11-22 18:02:18 +01:00
Florian Bruhin 6b7eb77c4d pakjoy: Run black 2023-11-22 18:02:18 +01:00
Florian Bruhin 9e3d421a15 pakjoy: Use declarative skipping in tests 2023-11-22 18:02:18 +01:00
Florian Bruhin 51dace7152 pakjoy: Use more constants 2023-11-22 18:02:18 +01:00
Florian Bruhin 50db87664d pakjoy: Remove existing work dir if unneeded 2023-11-22 18:02:18 +01:00
Florian Bruhin 4ffb8a37aa scripts: Keep coverage.xml
useful for tools showing coverage info in e.g. your editor
2023-11-22 14:44:34 +01:00
Florian Bruhin 23d6a331f7 pakjoy: Fix test_elf.py 2023-11-22 09:58:26 +01:00
Florian Bruhin 2787d2382a pakjoy: Separate _patch and patch_webengine 2023-11-22 09:32:23 +01:00
Florian Bruhin b4ad0c559d Fix another merge issue 2023-11-22 09:25:13 +01:00
Florian Bruhin e718db86bc Simplify PakParser._find_manifest 2023-11-22 09:21:48 +01:00
Florian Bruhin ab198177bd Merge branch 'main' into pakjoy 2023-11-22 09:17:43 +01:00
Florian Bruhin 7b6cda95fb Fix borked merge 2023-11-22 09:17:39 +01:00
Florian Bruhin 723a5db8f2 tests: Disable disable-features=PaintHoldingCrossOrigin
This seems to help with severe flakiness around clicking elements / JS
execution on Qt 6.4+.

See https://bugreports.qt.io/browse/QTBUG-112017
and #5390
2023-11-21 16:30:27 +01:00
Florian Bruhin 4f80d8e283 Simplify _SettingsWrapper profile function 2023-11-20 14:40:44 +01:00
Florian Bruhin 5288b2c083
Merge pull request #8006 from qutebrowser/update-dependencies
Update dependencies
2023-11-20 14:33:20 +01:00
Florian Bruhin 4c08a3393c Fix/improve typing for qtutils.savefile_open
Contrary to what I thought at the time when initially writing this,
typing.AnyStr isn't just an alias for IO[str] | IO[bytes], but is actually a
TypeVar. As per the Python docs, it should be used when there are *multiple*
places where the types need to match:

    def concat(a: AnyStr, b: AnyStr) -> AnyStr:
        return a + b

What we do instead is somewhat akin to "def fun() -> T:", which mypy already
comments on:

    error: A function returning TypeVar should receive at least one argument
    containing the same TypeVar  [type-var]
        def t() -> T:

Not quite sure why it doesn't in this case, or why it now raises an additional
error (possibly the new inferrence code or something?). Either way, with this
commit the annotations are now more correctly using Union[IO[str], IO[bytes]],
including typing.Literal overloads so that mypy actually knows what specific
type will be returned by a call.
2023-11-20 11:18:19 +01:00
qutebrowser bot 3759738f52 Update dependencies 2023-11-20 04:20:33 +00:00
toofar 9f8e9d96c8 Merge branch 'maint/6.6_in_ci'
PyQt 6.6 has been out for a while. Git uses on arch are already using
it. Likely our next pyinstaller release will be using it. This change
adds it to our test matrix, beyond the arch docker tests.

* Removing -dev tag from python 3.12 job
* Update ubuntu python 3.11 and 3.12 tests to use PyQt6.6
* Update macOS and windows tests to use PyQt6.6
* Allow running the nightly CI job on any branch, to get a pyinstaller
  build binary from your own branch

Closes: #7989
2023-11-19 19:48:52 +13:00
toofar 27c5cc8cae Update pytest summary problem matcher for colored output
We think that at some point pytest added color codes to the summary
output which broke these matcher regex. It looks like there is an issue
about stripping color codes here: https://github.com/actions/runner/issues/2341

I've added wildcard (or no-space) elements instead of trying to match
the color codes exactly (eg `\033\[31m` etc) because 1) that's not very
readable 2) I was having trouble getting that to work with egrep.

The goal is to match the target strings but not to match then later in
the line as part of a test log or whatever. For the '= short test
summary =' that should be pretty unique. For the ERROR|FAILED I reckon
that could be a bit more common. I'm just matching with any mount of
non-space characters because I reckon a space will crop up pretty early
in any line where ERROR isn't the first work.

I think this new matching will only apply to new or rebased PRs after it
is landed.

ref: https://github.com/qutebrowser/qutebrowser/issues/5390#issuecomment-1817503702
2023-11-19 13:42:12 +13:00
toofar 7444179a23 Update parsing of sandbox page on windows in tests
In the linux branch when it was doing:

    header, *lines, empty, result = text.split("\n")
    assert not empty

It was complaining that "empty" was "}", because the windows sandbox
page has JSON at the bottom now. The whole things looks to have changed
completely. I'm actually surprised it was working before, why would it
have been saying seccomp was enabled on windows?

Anyway, I did the debug-dump-text --plain that quteproc is doing in a VM
and tested this with sandboxing off an on. No idea how stable that will
be!

ref: https://github.com/qutebrowser/qutebrowser/issues/7989
2023-11-18 21:27:32 +13:00
toofar dc072a7825 Allow running nightly builds on any branch
The nightly jobs have a `workflow_dispatch` action, which means you can
kick the job off on any branch. But the build steps has the branch to
build on hardcoded. I would like to be able to build windows and mac
builds without having a local build environment setup.

The docs for the checkout action says it default to the main branch,
so the scheduled actions should keep working fine. But now we'll be able
to create builds off of other branches too.
docs: https://github.com/actions/checkout#usage

ref: https://github.com/qutebrowser/qutebrowser/issues/7989
2023-11-15 20:36:41 +13:00
toofar 4227aba7ba Update mac and windows CI to target for next release
It looks like our last release builds were done with python 3.11 and
PyQt 6.5.3. I'm expecting that since PyQt6.6 is out now our next release
will be on 6.6. So lets update the CI to match.

Questions:
* what about python12? I don't think there is a benefit to updating to
  that, so lets leave it.
* what about pyqt6.5? Do we care about testing that? Maybe for homebrew
  users? We aren't providing new builds with an old Qt right?

last release builds: https://github.com/qutebrowser/qutebrowser/actions/runs/6578864884

ref: https://github.com/qutebrowser/qutebrowser/issues/7989
2023-11-15 20:36:41 +13:00
toofar 1683b74aba bump py311 and py12 tests to use pyqt6.6
I'm not sure if we need a py3.11 pyqt6.5 variant or a py3.10 pyqt6.6
one? Those might well be combinations that people have (debian has 3.11
and 6.5 at the moment) but how much coverage do we need?

ref: https://github.com/qutebrowser/qutebrowser/issues/7989
2023-11-15 20:36:41 +13:00
toofar b4215d31b3 py3.12 is released now
ref: https://github.com/qutebrowser/qutebrowser/issues/7989
2023-11-15 20:36:41 +13:00
toofar c13089b64b
Merge pull request #7990 from qutebrowser/update-dependencies
Update dependencies
2023-11-15 20:34:00 +13:00
Florian Bruhin d46c876332 Update Surfingkeys link 2023-11-14 10:41:46 +01:00
toofar 119a3633b8
Merge pull request #8000 from qutebrowser/dependabot/github_actions/actions/github-script-7
build(deps): bump actions/github-script from 6 to 7
2023-11-14 17:26:26 +13:00
Eric Ericson 6c937f6150 qutebrowser/browser/pdfjs.py: sophisticate check for pdf.js somewhat
upstream shifted to mjs modules as of
927e50f5d4
2023-11-14 02:21:25 +01:00
dependabot[bot] a55f5332f9
build(deps): bump actions/github-script from 6 to 7
Bumps [actions/github-script](https://github.com/actions/github-script) from 6 to 7.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-13 18:07:46 +00:00
toofar 5cc948aeb5 Downgrade mypy for now
I believe we are being afflicted by this issue: https://github.com/python/mypy/issues/16451
Although I'm not 100% sure because there is a lot going on in this
function and I haven't managed to grok it.

The mypy 1.7 release [notes][1.7] say you can disable the new type
inference by running `tox -e mypy-pyqt6 -- --old-type-inference` and
indeed mypy passes with that. So either our type hints are incorrect or
we are hitting a bug. Considering the inferred type hint has a `Never`
in it I'm leading toward it being a bug. So I'll bump the mypy version
down and hopefully next week the issue will be resolved.

The mypy output before this commit was:

    mypy-pyqt6: commands[0]> .tox/mypy-pyqt6/bin/python -m mypy --always-true=USE_PYQT6 --always-false=USE_PYQT5 --always-false=USE_PYSIDE6 --always-false=IS_QT5 --always-true=IS_QT6 --always-true=IS_PYQT --always-false=IS_PYSIDE qutebrowser
    qutebrowser/utils/qtutils.py:239: error: Argument 1 to "contextmanager" has incompatible type
    "Callable[[str, bool, str], Iterator[IO[AnyStr]]]"; expected "Callable[[str, bool, str], Iterator[IO[Never]]]"  [arg-type]
        @contextlib.contextmanager
         ^
    qutebrowser/misc/lineparser.py: note: In member "save" of class "LineParser":
    qutebrowser/misc/lineparser.py:168: error: Need type annotation for "f"  [var-annotated]
                    with qtutils.savefile_open(self._configfile, self._binary) as f:
                         ^
    qutebrowser/misc/lineparser.py: note: In member "save" of class "LimitLineParser":
    qutebrowser/misc/lineparser.py:226: error: Need type annotation for "f"  [var-annotated]
                with qtutils.savefile_open(self._configfile, self._binary) as f:
                     ^
    qutebrowser/config/configfiles.py: note: In member "_save" of class "YamlConfig":
    qutebrowser/config/configfiles.py:292: error: Need type annotation for "f"  [var-annotated]
                with qtutils.savefile_open(self._filename) as f:
                     ^
    qutebrowser/misc/sessions.py: note: In member "save" of class "SessionManager":
    qutebrowser/misc/sessions.py:343: error: Need type annotation for "f"  [var-annotated]
                    with qtutils.savefile_open(path) as f:

[1.7]: https://mypy-lang.blogspot.com/2023/11/mypy-17-released.html
2023-11-13 20:23:06 +13:00
toofar d55e831f39 Merge second dependancy update.
Didn't manage to merge the first one in time.

ref: https://github.com/qutebrowser/qutebrowser/pull/7990
2023-11-13 18:46:09 +13:00
toofar bb9788f80f add pyqt6.6 requirements file
What is that big chain of !pyqt- etc mean? idk

ref: https://github.com/qutebrowser/qutebrowser/pull/7990
2023-11-13 18:45:18 +13:00
toofar f83cf4f504 Handle PyQt WebEngine version strings being Optional
With PyQt6-WebEngine 6.6.0 some pointer return types are now wrapped in
Optionals[]. In practice they should never be None, we've been relying on them
being set for long enough.

`qWebEngineVersion()` and `qWebEngineChromiumVersion()` now are typed as
returning `Optional[str]`. In `from_api()` we can handle the
`chromium_version` being null, so pass that through, but we are depending on
the `qtwe_version` being set, so add an assert there.

ref: https://github.com/qutebrowser/qutebrowser/pull/7990
2023-11-13 18:45:18 +13:00
toofar 399c72a9fb Handle profile.settings() return type being optional
With PyQt6-WebEngine 6.6.0 some pointer return types are now wrapped in
Optionals[]. In practice they should never be none though so I'm adding
some low effort null checking in here.

For the changes in `_SettingsWrapper` I'm not actually sure this is the
best way to be resolving this. mypy was complaining that `settings()` might be
None. How does asserting on the profile help? idk but that seems to make it
happy. Even more weirdly, none of these getters I changed seemed to be used
anywhere apart from tests. Except for getAttribute, that's used in webkit code.
Also the whole thing is checking the global default profile, generally
settings should be checked on the profile on the tab. So I think this might
just be some old code? idk, I just want to make mypy happy.

For the `init_user_agent()` change that was complaining about the profile
maybe being None.

ref: https://github.com/qutebrowser/qutebrowser/pull/7990
2023-11-13 18:45:18 +13:00
toofar 54e3993a59 Adapt chooseFiles() for PyQt6 type hints
The type of the two list arguments of chooseFiles() have changed from
`Iterable[str]` to `Iterable[Optional[str]]`.

I'm not sure it makes much sense to have individual list elements as
None. That seems like a pretty unlikely case. So we could just put an
ignore comment somewhere. I've added another copy of the lists, with
longer names, to strip any hypothetical Nones out. This allows us to be
backwards compatible with the old type hints (and the current Qt5 ones),
since that doesn't have the Optional part in the signature.

ref: https://github.com/qutebrowser/qutebrowser/pull/7990
2023-11-13 18:45:18 +13:00
toofar 88f165fd77 Handle Optional page getters in webengineinspector
With PyQt6-WebEngine 6.6.0 some pointer return types are now wrapped in
Optionals[]. In practice they should never be none though so I'm sprinkling
some low effort null checking in here.

Another alternative is to move the inspector classes to be based off, and to
work with, our overridden child classes of the view and page. But that's a
whole other piece of work, we might have to deal with signals and such meant
for web views that we don't want with the inspector. (On the other hand it
might actually be good. The inspector sometimes is surprising in how it acts
differently from the main views.)

There's a bit later on where I changed a local variable name from
`inspector_page` to `new_page`. The `inspector_page` variable is used later
and the type checker was complaining.

ref: https://github.com/qutebrowser/qutebrowser/pull/7990
2023-11-13 18:45:18 +13:00
toofar ca2b6c93ea Override getters for some WebEngineView attributes
With PyQt6-WebEngine 6.6.0 some pointer return types are now wrapped in
Optionals[]. In practice they should never be none though. So in a low effort
way of keeping the types we have to deal with in the calling code to
what they were before I'm overriding these getters that just do `assert thing
not None` to tell mypy not to worry about that case.

    QWebEngineView.page()
      The docs don't say anything but the source says it should always return
      something: https://github.com/qt/qtwebengine/blob/6.6.0/src/webenginewidgets/api/qwebengineview.cpp#L1001
    QWebEngineView.history()
      calls QWebEnginePage.history()
      where it is always set in the constructor: https://github.com/qt/qtwebengine/blob/6.6.0/src/core/api/qwebenginepage.cpp#L90
    QWebEngineView.settings()
      calls QWebEnginePage.settings()
      where it is always set in the constructor: https://github.com/qt/qtwebengine/blob/6.6.0/src/core/api/qwebenginepage.cpp#L90

ref: https://github.com/qutebrowser/qutebrowser/pull/7990
2023-11-13 18:45:18 +13:00
toofar cedef129f9 Change browsertab WidgetType to be our tab implementations
Changing the type to be our overridden implementation of the view means
we can push more common code down into the view class and make use of
overridden methods more consistently. In this case I'm adding some type
checking to some of the getters on the view.

`_set_widget()` should be being called from the concrete child tab
implementations. So the widget should always be our overridden version of
the Qt tab implementations.

Also change `_set_widget()` to use the common typevar.

Also change the _widget type in WebEngineTab to match what it is
actually being set to and to match all the _widgets in the other
concrete classes in that file.

ref: https://github.com/qutebrowser/qutebrowser/pull/7990
2023-11-13 18:45:18 +13:00
qutebrowser bot 9ebd28a108 Update dependencies 2023-11-13 18:45:18 +13:00
qutebrowser bot ef9301da92 Update dependencies 2023-11-13 04:24:22 +00:00
Florian Bruhin ea9dfcf710 Update backers.md 2023-11-10 16:03:12 +01:00
Florian Bruhin 4c36433d36 Merge remote-tracking branch 'origin/pakjoy' into pakjoy 2023-11-06 16:27:12 +01:00
toofar 9656f43a09 help mypy deal with pathlib
Seems mypy and I agree on something. It thinks that pathlib is abusing
the division operation and making python a less intuitive
language. Not sure why it is complaining though really, doing `Path /
"one" / "two"` seems to work fine in practice, and its on the pathlib
documentation page.

I was seeing this error locally and on CI

   qutebrowser/misc/pakjoy.py:155: error: Unsupported left operand type for / ("str")  [operator]
               resources_dir /= "lib" / "QtWebEngineCore.framework" / "Resources"
2023-11-05 19:25:36 +13:00
toofar 30cd758d14 fix lint 2023-11-05 17:49:13 +13:00
toofar cbcf941c83 Use safe_seek()
I have no idea in what case these errors would crop up. But vulture said
the function was unused, not it's used.
2023-11-05 17:49:13 +13:00
toofar a7f154662e Fix resource pak file location on mac.
On CI I'm seeing:

    No such file or directory: '/Users/runner/work/qutebrowser/qutebrowser/.tox/py39-pyqt515/lib/python3.9/site-packages/PyQt5/Qt5/resources'

Downloading the PyQt6_WebEngine_Qt6 wheel for mac from PyPI I can see the pak
file is at:

    ./PyQt6/Qt6/lib/QtWebEngineCore.framework/Resources/qtwebengine_resources.pak

And on a qutebrowser install made by pyinstaller it is at (symlinks in curly
braces):

    /Applications/qutebrowser.app/Contents/{Resources,Frameworks}/PyQt6/Qt6/lib/QtWebEngineCore.framework/{Resources,Versions/A/Resources}/qtwebengine_resources.pak

And the Qt data path for reference is:

    /Applications/qutebrowser.app/Contents/Frameworks/PyQt6/Qt6

So it looks like essentially we need to add a "lib/QtWebEngineCore.framework"
in there and capitalise "Resources".

A bit annoying to have the special case and hardocde paths like this. But it
should be pretty stable? I had a look at importlib_resources to try to see if
it could fine this stuff for us but I don't think it can.

I've checked with the pyinstaller windows builds and with the windows wheel
from PyPI and neither seem to need any special handling.
2023-11-05 17:49:13 +13:00
toofar f26a477d7c add tests for pakjoy
There is one test which does does the whole run through with the real
resources file from the Qt install, patches is to the cache dir, reads
it back and checks the json. All the other tests either use constructed
pak files or stop on earlier error cases.

For testing the actual parsing of the pak files I threw together a quick
factor method to make them.

I went back and forth over the parse code and looked for more error
cases, but it looks pretty solid to me
2023-11-05 17:48:11 +13:00
toofar c7c856ec6d Add log messages, catch parse errors.
The "doesn't exist at expected location" error message is a bit
misleading, it actually prints the location in the directory we copied
stuff to instead of the source one. Oh well, it's good enough.
2023-11-03 13:43:31 +13:00
toofar b161ec1fea Fix lint, move resource dir copying to method
Fixes lint: shadows variables, docstrings, unused attribute

Move resource dir copying to its own method:
* will probably help with unit tests
* allows for cleaner overriding of what file to patch (instead of a big
  nested block)

Adds a sneaky `assert` statement in there because the pak file should
definitely exist at that location. Although it not existing shouldn't
really be fatal...

Maintains the thing in `__main__`, although I'm not sure if we need to
keep that?
2023-11-03 13:40:41 +13:00
Florian Bruhin 044b1e38e9
Merge pull request #7980 from qutebrowser/update-dependencies
Update dependencies
2023-10-31 09:28:32 +01:00
qutebrowser bot 27b43bd5ac Update dependencies 2023-10-30 04:22:08 +00:00
toofar 25e0d02de4 Only patch resources on 6.6.0
The only affected version is 6.6.0. I'm passing `avoid_init` because
this patching is done right before the user agent is parsed (which only
happens on Qt5).

It's been proposed that we don't need to do this patching for users
running on distros that backported the fix to their webengine. Which I
think means that we would only do the patching on our bundled installer
version for window and mac. But I'm not sure I agree with that. I would
rather not have had to re-compile the fix into my build, and I don't
know what other distributors position on backporting patches is either.
For example I'm on debian, if they had 6.6.0, would they have backported
this fix? It looks like they've only got build related patches on the
current version for example: https://sources.debian.org/patches/qt6-webengine/6.4.2-final+dfsg-12/
And there's the flatpak version etc.

Anyway, if we want to add that check in too I think it would look like:

    if not hasattr(sys, 'frozen'):
        # Assume if we aren't frozen we are running against a patched Qt
        # version. So only apply this quirk in our bundled installers.
        return
2023-10-28 16:15:45 +13:00
toofar 931b653301 move resources patching later
We need to set the environment variable before webengine reads the
resources file. It could be unhelpful to do the patching before the IPC
/ open-in-existing-instance stuff, because that could lead to removing
the resources file the running instance is using, any later than that is
just down to developer preference I think. I chose to move it as late as
possible for now, just for clarity on where in the lifecycle it's
necessary. (This also means we can skip the separate backend check, but
that is pretty minor.)

I moved the patching later and later at init and verified that if it is
done before the profiles are initialized it successfully prevents the
crash. If done after the profiles are initialized we still crash. I do
remember looking at the profile initialization when trying to disable
extensions so that makes sense.
2023-10-28 15:58:09 +13:00
toofar ab7b079411 debug python imports
For windows I'm getting a "Module not found." error, which I suspect is
it not finding qutebrowser itself, but lets see.

ref: https://pyinstaller.org/en/stable/spec-files.html#giving-run-time-python-options
2023-10-28 10:44:55 +13:00
toofar 1fa678db61 Revert "Re-compile PyInstaller bootloader in CI."
This reverts commit 6042fccbf5.
2023-10-28 10:44:55 +13:00
toofar 6e534c74e7 Revert "walk_module workaround for PyInstaller"
This reverts commit 64af5f0e26.
2023-10-28 10:44:55 +13:00
toofar b4bbf3252f un-pin pyinstaller
ref: #7806
2023-10-28 10:44:44 +13:00
toofar 3bde102fe0 run pakjoy for real at application boot
It all just works!

Changes from the `__main__` implementation down below:

* copy the whole resources directory instead of just the one file:
  looking at the implementation around QTWEBENGINE_RESOURCES_PATH it
  uses the main resources file to find the one directory and then loads
  the other resources from that dir. So I'm assuming it was crashing
  because it couldn't find the other resources. Stack trace was:

    #1  0x00007fffe95f1dca in content::ContentMainRunnerImpl::Initialize(content::ContentMainParams) ()
       from /usr/local/Qt-6.6.0/lib/libQt6WebEngineCore.so.6
    #2  0x00007fffe628cf09 in QtWebEngineCore::WebEngineContext::WebEngineContext() ()
       from /usr/local/Qt-6.6.0/lib/libQt6WebEngineCore.so.6
    #3  0x00007fffe628dfa4 in QtWebEngineCore::WebEngineContext::current() ()
       from /usr/local/Qt-6.6.0/lib/libQt6WebEngineCore.so.6
    #4  0x00000210b845c780 in ?? ()
    #5  0x00000210b845c780 in ?? ()
    #6  0x00007fffffffd480 in ?? ()
    #7  0x00007fffe62391bb in QtWebEngineCore::ProfileAdapter::ProfileAdapter(QString const&) ()
       from /usr/local/Qt-6.6.0/lib/libQt6WebEngineCore.so.6

* write stuff to our cache dir, not tmp ;)

I haven't actually checked this fixes an affected version of Qt (need to
rebuild or get from riverbank pypi). But I unpacked the pak file and it
has the right fake URL in it.
2023-10-27 18:20:44 +13:00
toofar 82e2443049 fix non 6.6 resource entry lookup
We need to pass objects, not indexes. Test with Qt 6.5 to exercise this
path.
2023-10-27 17:49:55 +13:00
Florian Bruhin cee9e909fb doc: Group chrome pages 2023-10-24 14:39:58 +02:00
Florian Bruhin c75ee977f3 doc: Update chrome:// URLs 2023-10-24 14:39:58 +02:00
Florian Bruhin 8c071ba587 wip 2023-10-24 14:34:20 +02:00
Florian Bruhin 0f0853d77b
Merge pull request #7973 from qutebrowser/dependabot/github_actions/actions/setup-node-4
build(deps): bump actions/setup-node from 3 to 4
2023-10-24 08:48:36 +02:00
dependabot[bot] f53933b329
build(deps): bump actions/setup-node from 3 to 4
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-23 18:49:54 +00:00
Florian Bruhin 34f8fe0599
Merge pull request #7971 from qutebrowser/update-dependencies
Update dependencies
2023-10-23 12:42:43 +02:00
qutebrowser bot 1709987966 Update dependencies 2023-10-23 04:23:17 +00:00
arza a0d1dd0f10 Add a comment 2023-10-22 22:12:14 +03:00
Florian Bruhin 238a0fa2d1 wip: Add initial pakjoy.py 2023-10-21 00:32:13 +02:00
toofar 50e8117099 fix typo
if -> is
where -> were
2023-10-20 17:30:59 +13:00
qutebrowser bot fa862c786e Release v3.0.2
(cherry picked from commit f4ba52d33f)
2023-10-19 18:39:52 +00:00
Florian Bruhin 193b5a50a7 Fix up changelog 2023-10-19 20:36:07 +02:00
qutebrowser bot ea80b73d73 Release v3.0.1
(cherry picked from commit b3b1384037)
2023-10-19 18:15:46 +00:00
Florian Bruhin ccb5480cf6 Update UA completions 2023-10-19 20:02:57 +02:00
Florian Bruhin 4f549669bc Revert "Use different PyPI token tempoarily"
This reverts commit 597873286c.
2023-10-19 19:58:42 +02:00
Florian Bruhin 47c786484b docker: Downgrade more Qt for QtWebKit 2023-10-17 17:05:34 +02:00
Florian Bruhin a794c87e9b tox: Make -qt5 explicit for docker builds
Not needed on CI for a reason I don't quite understand, but needed locally for things to run.
2023-10-17 16:01:36 +02:00
Florian Bruhin 9d9f892ded docker: Also downgrade qt5-translations for WebKit 2023-10-17 16:01:36 +02:00
Florian Bruhin cb9095f870
Merge pull request #7964 from qutebrowser/update-dependencies
Update dependencies
2023-10-17 11:04:22 +02:00
Florian Bruhin 4fd5af3ab3 scripts: Fix typo 2023-10-17 09:46:44 +02:00
Florian Bruhin 1b7e3cdb7d scripts: Add more debugging info 2023-10-17 09:46:16 +02:00
Florian Bruhin a8355674da log: Ignore deprecation warning from new SIP
See https://riverbankcomputing.com/news/SIP_v6.7.12_Released
2023-10-17 09:33:06 +02:00
Florian Bruhin 4c6b34ea05 mypy fixup 2023-10-17 09:25:53 +02:00
Florian Bruhin 513fc2c329 Adjust diff_cover changelog name 2023-10-16 21:24:59 +02:00
Florian Bruhin a087b81451 Adjust for mypy 1.6
See https://mypy-lang.blogspot.com/2023/10/mypy-16-released.html
2023-10-16 21:24:34 +02:00
qutebrowser bot c20c196250 Update dependencies 2023-10-16 04:24:13 +00:00
toofar e5a7d5c7a3
Merge pull request #7958 from qutebrowser/update-dependencies
Update dependencies
2023-10-16 09:24:52 +13:00
toofar 2a32e1b1ae lint: the exec in namedtuple is useful here
https://pylint.readthedocs.io/en/stable/user_guide/messages/refactor/prefer-typing-namedtuple.html
Says to using the class based typing.NamedTuple instead of
collections.namedtuple, which just constructs a class based off of
strings.

Here we are creating a dynamic class based on the fields in the SQL result.
It's only called once for a query, so I don't think speed is an issue.
Also it's not used by the completion, looks like just :history
2023-10-15 17:16:55 +13:00
toofar a927a93d28 lint: allow comparing variables to 0
With pylint 3 there is a new option: https://pylint.readthedocs.io/en/latest/user_guide/messages/convention/use-implicit-booleaness-not-comparison-to-zero.html

It's disabled by default but we enable all warnings and disabled them as
desired.

This one is of the opinion that:

    if x == 0:

is bad and

    if x:

is good.

I feel that the first one (x == 0) is more clear. We aren't checking for
truthiness here, we are checking for a literal value, its very
intentional.

One might argue that being precious about making the type here is
redundant in current year with type checking tooling and all that. But
there are like a hundred of these checks in the code base so it seems a
well established pattern anyhow.

In summary, the new warning doesn't have a very strong use case and we
would prefer to stick with out established pattern.
2023-10-15 16:45:22 +13:00
toofar 207de5828d fix lint
Was getting R0913: Too many arguments (14/10) (too-many-arguments)

no idea what that is just showing up now
2023-10-14 17:25:39 +13:00
toofar 7f9713b20f Merge branch 'fix/7866_filepicker_mimetype_restrictions' 2023-10-14 15:24:58 +13:00
toofar 142f019c7a Merge branch 'update_slack_ua_quirk' 2023-10-14 15:23:13 +13:00
toofar a7a2420f02 Bump slack UA quirk for latest update
Slack now requires chrome 112+. At least one user says it still works
with 108 based. Although they did just do a UI refresh so I wouldn't be
surprised if something was broken with older versions.

Note that I'm not 100% sure that slack is actually doing a strict check
for 112, but based on their prior behaviour I assume so (they are
definitely checking for >99 so our old quirk is unhelpful at this
point).

Since I've told people to add ua-slack to their disabled quirks, should
I change the name of it now to make sure it gets re-enabled? Eh, they
can manage their own quirks.
2023-10-14 15:22:09 +13:00
toofar 2edce1244a Make "new_chrome" UA quirk a bit clever
We only want to be faking a newer chrome version, if we are already on a
newer one, we don't want to be faking an older one!

Another scenario is that we might want to fake a perpetually newer
version for some site. But that seems like a very problematic scenario
and I hope that never comes up.
2023-10-14 15:06:05 +13:00
toofar 750e2b0a72 pylint 3.0 deprectations
Changelog: https://pylint.pycqa.org/en/latest/whatsnew/3/3.0/index.html#summary-release-highlights

remove `__implements__`:
That attribute is apparently from a rejected PEP. They say to inherit
from BaseChecker, which we are already doing.
https://github.com/pylint-dev/pylint/pull/8404

check_messages -> only_required_for_messages:
Seems straightforward instructions. I haven't actually tested it.
https://github.com/pylint-dev/pylint/pull/8409

remove emptystring extension:
Looks like this has been replaced by https://pylint.readthedocs.io/en/stable/user_guide/messages/convention/use-implicit-booleaness-not-comparison-to-string.html
Which is disabled by default but we have `enable=ALL`, so I guess that means
we indeed have it enabled.

And update changelog URLs.
2023-10-11 19:16:01 +13:00
Florian Bruhin fcc6062e5b docker: Also downgrade qt5-declarative 2023-10-10 09:12:48 +02:00
Florian Bruhin 920262aaf9 Update cffi changelog 2023-10-10 09:12:31 +02:00
qutebrowser bot 2c503bf35d Update dependencies 2023-10-09 04:25:45 +00:00
arza 6671dbf2b4 Search ListCategory in any order of search terms 2023-10-07 11:02:26 +03:00
toofar 8c04527cb0
Merge pull request #7949 from qutebrowser/update-dependencies
Update dependencies
2023-10-05 08:41:46 +13:00
qutebrowser bot 7d9db29661 Update dependencies 2023-10-02 04:22:42 +00:00
toofar 7750a2f7a2 update changelog 2023-09-30 15:01:13 +13:00
toofar 0c04567feb Merge pull request #7925 from fstecker/download_icons
Override IconProvider for QFileSystemModel to prevent a slowdown in the
download dialog on Linux when browsing to directories with many files.
2023-09-30 14:51:14 +13:00
toofar fea33d607f Check runtime Qt version only.
Since the bug was fixed in qtbase it shouldn't matter what version of
PyQt (or webengine for that matter) you are running against. So pass
`compiled=False`.

Also expand the docstring of `check_version()` to explain a little more
what the `compiled` kwarg does. Based on a discussion here:
https://github.com/qutebrowser/qutebrowser/pull/7933#issuecomment-1732400960

What's still not clear to me is when the runtime and compiled Qt
versions can differ. I always have to rebuild PyQt when I switch Qt
versions, but maybe I'm doing something wrong there.
2023-09-29 14:07:30 +13:00
Philipp Albrecht 4e61bfedda Rename colors.webpage.darkmode.threshold.text
As Chromium 99.0.4785.0 (translates to Qt 6.4) renamed TextBrightnessThreshold to
ForegroundBrightnessThreshold, we want to reflect that in our related qutebrowser
setting.

These changes rename `colors.webpage.darkmode.threshold.text` to
`colors.webpage.darkmode.threshold.foreground`.

References:
* https://chromium-review.googlesource.com/c/chromium/src/+/3344100
* https://chromium-review.googlesource.com/c/chromium/src/+/3226389
* https://github.com/qutebrowser/qutebrowser/issues/7928
2023-09-28 20:42:53 +02:00
toofar 54c0c493b3 Change log message to use f-strings
TODO: configure the linter to tell people to do this.

As an aside, I'm not sure I agree that this is a good idea. It seems the
f-string interpolation does have a cost when you are not logging at that
level, and we do support disabling the ram logger. But we can change it
with automation anyway.
2023-09-27 18:59:27 +13:00
toofar 65bfefe926 Use mocker fixture instead of mock.patch
I forgot about that fixture.
2023-09-27 18:59:27 +13:00
toofar 7b603dd6bf Move method to module level.
This avoids having to mess about with static methods. And makes the test a bit
clearer as we aren't passing a class in place of an instance anymore.

Hopefully I put it in the right place. It's above the class where it is used.
Should it be at the top of the file? Bottom of the file? IDK
2023-09-27 08:51:58 +13:00
toofar a67832ba31 Turn into list before adding for mypy
The right hand side is turned into a list because `list + set` isn't
supported by python for some reason (why? Just make it a list).

The left hand side is turned into a list because Iterable doesn't
support + (why?). Possible I could change it to Sequence, but meh.
2023-09-27 08:51:58 +13:00
toofar fc470a69ed update changelog 2023-09-27 08:51:55 +13:00
toofar 5345d53418 Support wildcard mimes in filepicker workaround too
We've seen it in the wild, so it could happen, and it wasn't hard to add
in the end.

ref: #7866
2023-09-27 08:51:23 +13:00
toofar c0be28ebee Add extra suffixes to filepicker
Works around a Qt bug where QFileDialog might not see all the filename
extensions you have registered for a mimetype. There is an issue where
if you have suffixes (filename extensions) registered in your home dir
and in a system dir, it'll only see the ones in your home dir.
So get suffixes from python and proactively add them into the list the
list provided by the website. Duplicating work that Qt would already do,
if it weren't for the bug case we are working around.

Note that this does NOT help with mimetypes like `image/*` which, we
have seen in at least one example (on #7866). If we wanted to handle
that case it it looks like we could get the list from:

    [suffix for suffix, mime in mimetypes.types_map.items() if mime.startswith('image/')]

I added two tests. The first is a simple one but it felt a bit
imcomplete without actually testing that we were passing the right thing
to `super().chooseFiles()`. Not sure how "bad" it is to be mocking
`super()` and what should be instance methods unbound from the class.

Regarding the `qtutils.version_check()`, here we are only interested in
the Qt version check, but that class also checks the PyQt version. The
practical effect of this is that we would probably end up doing the
workaround for Qt 6.7.0 if we run against that with PyQt 6.6.x. But
since we are just adding stuff, it isn't slow and isn't called in a hot
path it doesn't really matter.
2023-09-27 08:51:23 +13:00
pylbrecht 50efac08f6 Rename Chromium setting for colors.webpage.darkmode.threshold.text
As Chromium 99.0.4785.0 (translates to Qt 6.4) renamed `TextBrightnessThreshold` to
`ForegroundBrightnessThreshold`, we need to reflect that in our mapping of the
qutebrowser option `colors.webpage.darkmode.threshold.text` to the Chromium setting.

By adding a new method (`_Definition.copy_replace_setting()`) we can introduce a new
`_Definition` for Qt 6.4 based on the preceding one for Qt 6.3, which contains the
renamed setting.

References:
* https://chromium-review.googlesource.com/c/chromium/src/+/3344100
* https://chromium-review.googlesource.com/c/chromium/src/+/3226389
2023-09-26 19:35:12 +02:00
Florian Bruhin 690813e1b1 Fix lint 2023-09-26 10:35:22 +02:00
Florian Bruhin f8e7fea0be Merge remote-tracking branch 'origin/pr/7934' 2023-09-26 07:41:02 +02:00
Florian Bruhin a6171337f9 Skip test_real_chromium_version on newer Qt versions
Is wrong on unstable Archlinux env when Qt is newer than PyQt. But no need for this when we have the API anyways.
2023-09-25 18:05:35 +02:00
Florian Bruhin a72709a00e Update changelog 2023-09-25 16:59:56 +02:00
Florian Bruhin 879a9928ee Remove QListView border
Fixes #7937
2023-09-25 16:59:56 +02:00
Florian Bruhin 01883a7ec4 tests: Ignore another spurious libva error 2023-09-25 16:59:56 +02:00
toofar fde4dd8434 Put qt.arg test back to being exact match
I previously changed the assertion to be a subset match, to deal with a qt arg
being added based on the Qt version the tests were being run on. I didn't
notice this fixture that can set setting to avoid that dynamic-ness instead.
2023-09-25 19:06:03 +13:00
toofar 4927534a68 Reduce args passed to `_qtwebengine_settings_args`
I added all three args to this function in an effort to allow for generic
feature detection, because other places further up in the code where using all
these variables for that. But I didn't look at how the stuff I
was passing in could be used. I can see `special_flags` has essentially already
been consumed. `namespace` is used for all kinds of stuff, there could
theoretically be a pretty simple mapping between the CLI arg and a setting
webengine setting but the only examples of that so for are the special flags
ones and debug flags, which are already generic in their own way. So if we've
gone this long without it we probably don't need it.
2023-09-25 18:59:03 +13:00
toofar 037333e09e
Merge pull request #7939 from qutebrowser/update-dependencies
Update dependencies

Doesn't look like anything scary there.
2023-09-25 18:38:19 +13:00
Florian Bruhin 88b2a7c871 Fix lint 2023-09-25 07:00:57 +02:00
qutebrowser bot 5cd2faba52 Update dependencies 2023-09-25 04:23:04 +00:00
Florian Bruhin 45e168f511 Fix and improve workaround
See #7913
2023-09-24 23:37:27 +02:00
Florian Bruhin 5a05a93e38 Work around QtWebEngine bug when serializing empty history
See https://bugreports.qt.io/browse/QTBUG-117489
Closes #7913
2023-09-24 21:11:43 +02:00
toofar 9a50f2875b update changelog 2023-09-23 19:29:45 +12:00
toofar 2e961080a8 Make accelerated 2d canvas setting tristate with auto
I would like to be able to disable this workound for new enough chromium
versions (we still need to test that chrome 111 will be fixed, but we
can always bump it up later).

I also wanted to use the declarative mapping `_WEBENGINE_SETTINGS` instead
of adding a new conditional in `_qtwebengine_args`, because that just
seems nicer.

So I changed `_WEBENGINE_SETTINGS` so that the value could also be a
function. The idea is that the function returns on of the other values
based on some feature detection. This also required passing down the
args being used for feature detection in the calling method already.

I feel like that dict is being a bit abused here and if the entries
could be turned into objects with a bit more consistency it might be
nice. But this isn't too bad, right?

Had to change the `test_qt_args` test to be a superset test instead of
exact match because the new `--disable-accelerated-2d-canvas` arg was
showing up in the results based on whatever Qt version you happen to be
running the tests on.
2023-09-23 19:29:45 +12:00
toofar 10cb81e81a Disable accelerated 2d canvas by default.
Ideally we would only enable this if we detected Intel graphics. But
that kind of feature detection is difficult to do cross platform. It's
easy to do with Qt (version.py) ... but it needs a QApplication and we
are trying to figure out what CLI args to pass to Qt, so we can't do
that.
So just disable it for everyone for now.

TODO:
* tests
* change to tri-state option, auto by default and make auto look at the
  webengine version and on for Qt6 < 6.7.0
2023-09-23 17:19:02 +12:00
Florian Bruhin 434f6906f9 Add TabBarStyle TypeError workaround 2023-09-21 11:24:04 +02:00
Florian Stecker 920a18ab15 replace QAbstractFileIconProvider by QFileIconProvider 2023-09-20 16:29:26 -04:00
Florian Bruhin 5207c4b625
Merge pull request #7923 from qutebrowser/dependabot/github_actions/docker/login-action-3
build(deps): bump docker/login-action from 2 to 3
2023-09-20 17:02:43 +02:00
dependabot[bot] 363c8a7e5c
build(deps): bump docker/login-action from 2 to 3
Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-20 12:45:29 +00:00
Florian Bruhin 59552ce75f
Merge pull request #7922 from qutebrowser/dependabot/github_actions/docker/build-push-action-5
build(deps): bump docker/build-push-action from 4 to 5
2023-09-20 14:34:37 +02:00
Florian Bruhin 8ffab699a0
Merge pull request #7924 from qutebrowser/dependabot/github_actions/docker/setup-buildx-action-3
build(deps): bump docker/setup-buildx-action from 2 to 3
2023-09-20 14:34:12 +02:00
Michael M 37db251be7
change is_pretty to pretty 2023-09-19 19:38:41 -05:00
Michael M 7c8d5572f1
use keyword arguments for get_url_yank_text 2023-09-19 19:35:10 -05:00
Michael M d480ea833c
Update doc/changelog.asciidoc
Co-authored-by: Florian Bruhin <me@the-compiler.org>
2023-09-19 19:26:57 -05:00
Florian Stecker 1df7d261fd Improve NullIconProvider 2023-09-19 19:34:27 -04:00
Florian Stecker 522899a64f Override IconProvider for QFileSystemModel 2023-09-19 12:29:07 -04:00
dependabot[bot] 385f8b2f7c
build(deps): bump docker/setup-buildx-action from 2 to 3
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-18 18:26:10 +00:00
dependabot[bot] 839a1ee8f4
build(deps): bump docker/build-push-action from 4 to 5
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4 to 5.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-18 18:26:05 +00:00
Florian Bruhin 4190a470c5 Add qtutils.is_wayland()
Backported to v3.0.x as simpler fix: b317038a01
2023-09-18 18:09:26 +02:00
Florian Bruhin c9b24c21c1 Add new Qt to changelog 2023-09-18 18:03:47 +02:00
Michael M 1b815695c8
change {yank_url} to {url:yank} 2023-09-18 09:01:39 -05:00
Florian Bruhin 413723c360
Merge pull request #7921 from qutebrowser/update-dependencies
Update dependencies
2023-09-18 13:02:03 +02:00
Florian Bruhin b35552e919
Merge pull request #7891 from qutebrowser/dependabot/github_actions/actions/checkout-4
build(deps): bump actions/checkout from 3 to 4
2023-09-18 12:51:21 +02:00
qutebrowser bot 2be3febced Update dependencies 2023-09-18 04:25:55 +00:00
Michael M 1f9cc97429
Update test_urlutils.py
Co-authored-by: port19 <port19@port19.xyz>
2023-09-15 11:09:41 -05:00
Michael M b402a9e4b5
Merge branch 'main' into main 2023-09-13 23:11:34 -05:00
Michael M 38e5513f4f
add more test 2023-09-13 23:10:02 -05:00
Michael M 5801d4b532
expand usage of urlutils.get_url_yank_text 2023-09-13 22:30:32 -05:00
Florian Bruhin b070cf45db
Merge pull request #7907 from qutebrowser/update-dependencies
Update dependencies
2023-09-11 12:27:24 +02:00
Florian Bruhin 96805e7d62 Remove hypothesis health check suppression
See https://github.com/HypothesisWorks/hypothesis/pull/3734
2023-09-11 11:11:26 +02:00
Florian Bruhin 98845f275a Adjust changelog URLs for new readme-renderer 2023-09-11 11:11:26 +02:00
qutebrowser bot 3cc79c562d Update dependencies 2023-09-11 04:22:04 +00:00
toofar 6e184c44ce update changelog 2023-09-10 17:57:02 +12:00
toofar 923d327c04 Merge pull request #7888 from brightonanc/timer-repairs
Fixing timers accumulating duplicate slots
2023-09-10 17:32:57 +12:00
Florian Bruhin 04bd4117ad tests: Fix derp 2023-09-08 19:37:40 +02:00
Florian Bruhin 08e498e207 First chromium version update for Qt 6.6 2023-09-08 19:19:40 +02:00
Florian Bruhin 855be48b02 Fix lint 2023-09-08 19:16:26 +02:00
Florian Bruhin 3fabc8fe37 tests: Ignore false-positive (?) hypothesis health check
See https://github.com/HypothesisWorks/hypothesis/issues/3733
Should fix nightly builds (and the next dependency upgrade).
2023-09-08 12:04:37 +02:00
Florian Bruhin ae2e679dfc tests: Ignore some more irrelevant messages 2023-09-06 16:38:46 +02:00
Florian Bruhin 8cea632df9
Merge pull request #7890 from qutebrowser/update-dependencies
Update dependencies
2023-09-06 16:11:18 +02:00
toofar 9f65926db2 update changelog 2023-09-05 22:31:47 +12:00
toofar dec114df89 Merge pull request #7847 from pylbrecht/broken-hints
Allow navigating from file:// to remote origins via hints.

Previously you would have seen a "Your internet access is blocked"
chrome error page.
2023-09-05 22:31:21 +12:00
Philipp Albrecht ff6668f295 Generalize (testdata) substitution in end2end tests
We replace the `(testdata)` placeholder with `testutils.abs_datapath()` in a few end2end
tests. So far we only needed to replace `(testdata)` with an OS path (e.g. in
`tests/end2end/features/spawn.feature`). By introducing `(testdata)` to an end2end test
in `tests/end2end/features/hints.feature`, we required a new use case: replacing
`(testdata)` as part of a valid file:// URI.

```
When I open file://(testdata)/some/file.txt
```

Replacing `(testdata)` in above BDD step with a plain OS path resulted in invalid URIs,
e.g. for the path "C:\\Users" above BDD step results in this invalid URI:

```
When I open file://C:\Users/some/file.txt
```

We deal with this by first isolating the `(testdata)` substitution in a single place.
Having `(testdata)` substitutions in a single place, we simply special-case the substitution
of file:// paths, which will be part of a URI.
Successful substitution for above BDD step looks like the following:

```
When I open file:///C:/Users/some/file.txt
```
2023-09-05 12:20:02 +02:00
dependabot[bot] 37172cf9cc
build(deps): bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-04 18:36:00 +00:00
qutebrowser bot c7c56fb035 Update dependencies 2023-09-04 04:22:47 +00:00
brightonanc ef18773a0d Satisfying flake8 linter. 2023-09-03 16:25:28 -04:00
brightonanc ba58ef4d55 Fixing two instances of timers accumulating duplicate slots over time 2023-09-03 14:19:16 -04:00
Michael M 3dc80fa192
Move URL to yankable string conversion to urlutils
See issue #7693
2023-09-01 20:15:45 -05:00
Florian Bruhin a1842e0226 Clarify changelog 2023-08-29 12:03:23 +02:00
toofar 4c04b8aba8 Update changelog 2023-08-29 18:06:56 +12:00
toofar e467adac9c Merge pull request #7834 from pylbrecht/purrr
Enforce digit limit (4300) on Count values passed by keypresses to avoid
segfaults due to cats sleeping on numpads.
2023-08-29 17:59:19 +12:00
Philipp Albrecht 43ca14aa53 Allow hinted navigation from file:// to remote origins
As of Qt 6 navigating from local to remote origins requires user interaction. This broke
following links to remote origins via hints from a local file (e.g. `bookmarks.html`),
because hints use JavaScript to open links by default.

Example:

1. Have a local `bookmarks.html`:
   ```html
   <!DOCTYPE html>
   <html>
       <head>
           <meta charset="utf-8">
           <title>My bookmarks</title>
       </head>
       <body>
           <a href="https://example.com/" id="link">some bookmark</a>
       </body>
   </html>
   ```
2. Open that local `bookmarks.html` in qutebrowser (e.g. `:open path/to/bookmarks.html`)
3. Start hinting
4. Follow a link to a bookmark (e.g. https://example.com/)
5. Instead of the link opening, be presented with `Your internet access is blocked`
   error

To fix this, we simply force a user interaction for all hints on file:// URLs (like we
did for `qute://` URLs in 8defe1ae44).

We skip the end2end test for webkit, because webkit does not support URLSearchParams[1]
used in `tests/end2end/data/hints/link_inject.html`

[1] https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams
2023-08-28 13:17:08 +02:00
Philipp Albrecht 3974725932 Normalize end2end data directory path
Given the following scenario:
```
When I open file://(testdata)/some/file.html
Then file://(testdata)/some/file.html should be loaded
```
If the end2end data directory is not normalized, the scenario fails because we try to
compare

```
file:///home/palbrecht/dev/qutebrowser/tests/helpers/../end2end/data/hints/link_inject.html?port=50…
```

to

```
file:///home/palbrecht/dev/qutebrowser/tests/end2end/data/hints/link_inject.html?port=50…
```

Normalizing the path resolves the `..` and fixes the issue.
2023-08-28 13:17:08 +02:00
toofar 36d399dc29
Merge pull request #7868 from qutebrowser/update-dependencies
Update dependencies
2023-08-28 16:58:45 +12:00
qutebrowser bot 4d15de5a3b Update dependencies 2023-08-28 04:23:01 +00:00
Florian Bruhin b981d0ab7f tox: Switch to --extra-index-url for bleeding env
This should make pip fall back to PyPI for packages not on Riverbank's server
2023-08-27 19:25:48 +02:00
Philipp Albrecht 51aa7abe54 Handle count exceeding string to int conversion
When handling counts during keyparsing we convert the count string to an integer. If the
count is too high (i.e. the count string has too many digits), we run into Python's
integer string conversion length limit[1]:
```
ValueError: Exceeds the limit (4300 digits) for integer string conversion: value has
4301 digits; use sys.set_int_max_str_digits() to increase the limit
```

Instead of blowing up with an exception, we now handle this more gracefully by showing
an error message.

Reproducer:
```
$ qutebrowser --temp-basedir ":later 500 fake-key -g $(printf '1%.0s' {1..4301})j"
```

**NOTE:**
I had to rename `_debug_log()`'s `message` argument to `msg`, because pylint yelled at
me for redefined-outer-name[2].

[1] https://docs.python.org/3/library/stdtypes.html#integer-string-conversion-length-limitation
[2] https://pylint.readthedocs.io/en/stable/user_guide/messages/warning/redefined-outer-name.html
2023-08-27 13:31:11 +02:00
Philipp Albrecht 21751603b4 Support opening file:// URLs in end2end tests
This is required to use BDD steps like the following:
```
When I open file://path/to/file.html
```

If we don't treat `file:` as a special scheme, we implicitly convert it to an invalid
URL:
```
http://localhost:48595/file:///path/to/file.html
```
2023-08-23 09:27:31 +02:00
Philipp Albrecht 42dfc82fb8 Use (testdata) in "I open {path}" BDD step 2023-08-23 09:26:07 +02:00
Florian Bruhin 8c2e23d248 Fix QHostInfo unit tests 2023-08-22 17:19:56 +02:00
Florian Bruhin 47daa9d872 Fix url.auto_search=dns on Qt 6
With PyQt6, comparing an enum member to bool will always be False.
2023-08-22 16:44:29 +02:00
Florian Bruhin 853a1b9d60
Merge pull request #7845 from qutebrowser/update-dependencies
Update dependencies
2023-08-21 07:40:15 +02:00
qutebrowser bot 35e4122a52 Update dependencies 2023-08-21 04:25:14 +00:00
toofar d4a7619f9c userscripts: run view_in_mpv jseval in main world
1. run jseval in main world: the script adds an element that calls the
   `restore_video` function. This was failing with a "not found" message
   on webengine, presumably because the dom click handler runs in the
   main world and the function was over in the jseval world. The the
   script predates webengine which is the backend that implements the
   worlds.
2. remove a console log message, seems to be just noise and easy enough
   to add back later
3. remove href attribute of the restore video link: this seemed to be
   causing the `restore_video` method to be called twice. The second
   time with `this` as the global Window object, which was causing an
   error because that has a null `parentNode` attribute.
4. added the `cursor: pointer` style that was needed since the element
   didn't have an href anymore
5. change the mpv flags `--terminal` -> `--quiet`. This means we get
   error messages (eg from yt-dlp) in error logs and in the `:process`
   page now. It can get a bit spammy though if you are running from a
   terminal. I'm getting a log of keepalive warning and error logs from
   ffmpeg. On the other hand it's really annoying to see a "process
   failed, see :process for details" and having no error messages in
   there.

Fixes: #7838
2023-08-20 10:57:14 +12:00
Florian Bruhin d5b5f26996 Update Chromium version comments 2023-08-19 19:09:14 +02:00
Florian Bruhin 07e1376e64 ci: Fix changelog URL for releases 2023-08-18 18:19:21 +02:00
qutebrowser bot b11ead8f42 Release v3.0.0 2023-08-18 14:15:48 +00:00
Florian Bruhin 967d0ce291 Revert "Release v3.0.0"
This reverts commit f3692d8f28.
2023-08-18 16:14:34 +02:00
Florian Bruhin 597873286c Use different PyPI token tempoarily
See https://github.com/pypi/support/issues/3111
2023-08-18 16:14:27 +02:00
qutebrowser bot f3692d8f28 Release v3.0.0 2023-08-18 13:38:14 +00:00
Florian Bruhin d4cc897bed Edit changelog for v3.0.0 2023-08-18 15:35:48 +02:00
Florian Bruhin adc2e1af7b Update install instructions
Closes #7833
2023-08-18 12:29:03 +02:00
Florian Bruhin bee84309c5 Ignore drag events on Qt 6.5.2 on Wayland
Closes #7827
2023-08-18 01:30:37 +02:00
Florian Bruhin 856d483724 Fix test on QtWebKit 2023-08-18 01:00:30 +02:00
Florian Bruhin 300bf173b8 Fix tests for new navigation request log output 2023-08-17 23:37:48 +02:00
Florian Bruhin a2697feb48 Work around back/forward navigation from qute://bookmark
With Qt 6.3+, user interaction is required to navigate outside of qute:// from a
qute:// page.

Follow-up to 8defe1ae44.
Also see 216a9f9a9b

Fixes #7815

See #7220 - should be revisited once we have a qute-bookmarks:// instead where
we can adjust permissions when registering the URL handler.
2023-08-17 23:00:04 +02:00
Florian Bruhin 051b0d6087
Merge pull request #7828 from pylbrecht/corrupt-session
Don't include "dead" tabs when saving sessions
2023-08-17 20:09:45 +02:00
Florian Bruhin d5a8f22a2a
Merge pull request #7832 from qutebrowser/auto-releases
Releases on CI
2023-08-17 20:05:24 +02:00
Florian Bruhin a4d22e9bd9 Fixup OpenSSL warning hint 2023-08-17 18:51:45 +02:00
Florian Bruhin 90f2cda25c Add hint to OpenSSL warning
See https://www.reddit.com/r/qutebrowser/comments/15tilax/troubleshooting_cannot_download_after_update_tls/
2023-08-17 18:48:16 +02:00
Florian Bruhin 8795b88d35 ci: Fix JS style issues 2023-08-17 14:51:53 +02:00
Florian Bruhin ffbbc3d9e7 Remove old download_release.sh
Releases aren't hosted on qutebrowser.org anymore
2023-08-17 14:47:49 +02:00
Florian Bruhin 9dfe641263 ci: Switch from experimental to real releases 2023-08-17 14:47:49 +02:00
Florian Bruhin 5567c9290b Update releasing docs 2023-08-17 14:47:49 +02:00
Florian Bruhin 60eb849fad ci: Check for open milestone before release 2023-08-17 12:42:21 +02:00
Florian Bruhin bcbfc2b68c ci: Add IRC notification for main channel
Releases are probably important enough
2023-08-17 12:42:21 +02:00
Florian Bruhin 67ae39561a ci: Use -x for cherry picks 2023-08-17 12:42:21 +02:00
Florian Bruhin fa74860417 ci: Use earlier release ID 2023-08-17 12:42:21 +02:00
Florian Bruhin c10cda7d4a ci: Use github script to update release
See https://github.com/softprops/action-gh-release/issues/163
2023-08-17 12:42:21 +02:00
Florian Bruhin 60bb247f0d scripts: Fix name for Windows installer
Regressed in c2210539a9e2be1deacf8df8f432e035d9b9b9f0:
The current NSIS installer still adds the suffix. Let's keep it there for now
until we switch to the rewritten one.

See #6050
2023-08-17 12:41:35 +02:00
Florian Bruhin ae150d3a97 scripts: Don't upload PGP signature to PyPI
See https://blog.pypi.org/posts/2023-05-23-removing-pgp/
2023-08-17 12:41:35 +02:00
Florian Bruhin 680a941e64 scripts: Fix artifact list on Windows
Regressed in c2210539a9e2be1deacf8df8f432e035d9b9b9f0:
We don't want to return a list of lists.
2023-08-17 12:40:24 +02:00
Florian Bruhin 66f654b95c scripts: Avoid inputs on CI when releasing 2023-08-17 12:39:00 +02:00
Florian Bruhin a59bf7bc5b ci: Set twine PyPI token 2023-08-17 12:39:00 +02:00
Florian Bruhin 0e07d3b7b6 scripts: Show more info when no release was found 2023-08-17 12:39:00 +02:00
Florian Bruhin ab820fe8a0 ci: Set up asciidoc properly for releases 2023-08-17 12:39:00 +02:00
Florian Bruhin 13ddb50170 ci: More automatic release improvements/fixes 2023-08-17 12:36:25 +02:00
Florian Bruhin 9757fa79ee ci: Use GitHub Script to get release branch
By default, we only get a narrow checkout, so we don't know about any
other branches. Use the GitHub API and some JS to get the release branch
instead.
2023-08-17 12:36:25 +02:00
Florian Bruhin 950d06ad5b ci: Initial automatic release support
See #3725
2023-08-17 12:35:53 +02:00
Florian Bruhin 704d0b8258 child event filter: Loosen check to only consider QWidget
Follow-up to a46e9f2036 to work correctly with
older Qt versions (< 6.4), where this is not a QQuickWidget apparently.

This also means we can simplify the workaround, as we are guaranteed to be on Qt
6.4+ anyways.

See #7820, #7831
2023-08-16 22:01:58 +02:00
Florian Bruhin a46e9f2036 child event filter: Ignore non-QQuickWidget children
When pressing buttons on some websites, or when starting to drag, it looks like
the WebView gets new QObject children which are not actually their focus proxy.

So far, this wasn't a big issue: We only ended up installing the tab event
filter on objects where it doesn't belong.

However, with the new focus workaround from #7820, we then ended up calling
`.setFocus()` on those QObjects, causing an AttributeError.

Thus, just don't do anything if we get new children that are not actually a
QQuickWidget.

Fixes #7831
2023-08-16 21:13:48 +02:00
Florian Bruhin d7b33759e5 Update content.headers.user_agent completion 2023-08-16 10:06:22 +02:00
Philipp Albrecht 5faae69f77 Skip invalid history items when saving a session
Opening a download in a new tab leaves a "dead" tab (see example of a "dead" tab below)
behind. When saving a session containing such a "dead" tab, we end up with entries in
the session like this one:
```yaml
  - active: true
    history:
    - active: true
      last_visited: '1970-01-01T02:00:00'
      pinned: false
      scroll-pos:
        x: 0
        y: 0
      title: ''
      url: ''
      zoom: 1.0
```

When loading a session containing such a "dead" tab, qutebrowser does not restore any
history of that session and logs the following error:
```
ERROR: Failed to load session default: PyQt6.QtCore.QUrl('') is not valid
```

As pointed out by @The-Compiler in this comment[1], the behavior of
`QWebEngineHistoryItem::isValid()`[2] changed somehow between Qt 6.4 and 6.5.
`QWebEngineHistoryItem::isValid()` now returns `True` for "dead" tabs, even though the
history item is not valid (i.e. `url().isValid()` returns `False`).

To fix this we simply add an additional check if the URL is valid before adding a tab to
the session to be saved.

[1] https://github.com/qutebrowser/qutebrowser/issues/7696#issuecomment-1672854592
[2] https://github.com/qt/qtwebengine/blob/v6.5.2/src/core/api/qwebenginehistory.cpp#L69-L75
2023-08-16 09:39:51 +02:00
Florian Bruhin 0d431ddc5d tests: Install more requirements from Riverbank PyPI server 2023-08-15 22:30:58 +02:00
Florian Bruhin cbdf18919c Skip too flaky cross-origin focus test 2023-08-15 20:33:58 +02:00
Florian Bruhin a25e7c2b64 Fix remaining references to old commands
Follow-up to #7809, see #7214
2023-08-15 20:15:48 +02:00
Florian Bruhin ed77670092 Update changelog 2023-08-15 20:07:16 +02:00
Florian Bruhin 3fd8e12949 Merge remote-tracking branch 'origin/pr/7809' 2023-08-15 20:04:30 +02:00
Florian Bruhin a196344742 ci: Use proper image for Qt 6 bleeding tests 2023-08-15 19:31:36 +02:00
Florian Bruhin b55a9f794b Rewrite cross-origin navigation test to use scrolling
Hopefully makes it more reliable
2023-08-15 19:29:45 +02:00
Florian Bruhin aea803cffa docker: Install xcb-utils-cursor on Arch for Qt 6 2023-08-15 19:11:49 +02:00
Florian Bruhin 403301223c wip: Add Qt 6 bleeding tests to CI 2023-08-15 19:05:19 +02:00
Florian Bruhin 8221fd7878 wip: Add Qt 6 bleeding tests to CI 2023-08-15 18:57:17 +02:00
Florian Bruhin 9a90a3950f wip: Add Qt 6 bleeding tests to CI 2023-08-15 18:30:00 +02:00
Florian Bruhin 0c0bad05cd ci: Upgrade bleeding tests to Qt 6 2023-08-15 17:04:50 +02:00
Florian Bruhin 66254e7e6e Fix bookmark tests, part 2 2023-08-15 16:51:08 +02:00
Florian Bruhin f819a189d4 Fix bookmark tests 2023-08-15 16:32:08 +02:00
Florian Bruhin 37d3f30f8b Fix issues with qute://start searching test 2023-08-15 16:27:22 +02:00
Florian Bruhin ec7664e93f Merge branch 'qt6-kbd-focus' 2023-08-15 16:26:44 +02:00
Florian Bruhin 19609fdb07 Add a test for keyboard focus after cross-origin navigation
Fails without the fix on main on QtWebEngine 6.4 (works on 6.2).
Works fine after the fix.

See #7820
2023-08-15 16:26:34 +02:00
Florian Bruhin f7846fc7aa tests: Don't encode headers set via Flask
See 5ff0a573f4

With that commit, encoding the header ourselves means that we'll actually be
navigating to the path `/b'data/...'` instead of `/data/...`.
2023-08-15 16:22:37 +02:00
Florian Bruhin a6e86629ed Improve child widget focus workaround
Don't rely on the global QApplication.focusWidget()

See #7820
2023-08-15 14:30:14 +02:00
Florian Bruhin f6d44b927a First child widget keyboard focus workaround
Fixes #7820
2023-08-15 14:30:10 +02:00
Florian Bruhin 0d2afd58f3 Add qtutils.qobj_repr()
Shows objectName() and the metaObject().className() if available.

More debug info for #7820
2023-08-15 14:30:06 +02:00
Florian Bruhin 8e152aaa0a Don't give keyboard focus to tab bar
This partially solves #7820. The web view still loses focus for an unknown
reason (apparently when swtiching out the rendering process?), but at least it
regains focus now when the window is unfocused and then focused again.
2023-08-15 09:22:30 +02:00
Florian Bruhin 57421dcd99 Further stabilize urlmark end2end tests 2023-08-14 18:26:06 +02:00
Florian Bruhin 0761d14bfc Fix qute://start search on Qt 6.2
Looks like the version check was wrong
2023-08-14 18:20:37 +02:00
Florian Bruhin 1d4784a9d2 Ignore mypy regression
See https://github.com/python/mypy/issues/15870
2023-08-14 17:55:21 +02:00
Florian Bruhin 22e662e9b0 tests: Fix log ignore for newer Qt
Seems to show as 50 instead of 65 somehow...
2023-08-14 17:52:30 +02:00
qutebrowser bot 9115a6212a Update dependencies 2023-08-14 04:21:37 +00:00
toofar 65750e4b54
Merge pull request #7803 from qutebrowser/feat/mac_sandbox_pre_release_pyinstaller
Feat/mac sandbox pre release pyinstaller
2023-08-14 15:42:38 +12:00
bitraid 7599dbc209 nsis: custom error message for Qt5 OS version check
The CheckPlatform macro will prompt the user user to use the 32bit installer
if they are on a 32bit system. But we don't provide a 32bit installer anymore.

This commit changes the OS version check for Qt5 builds to be based on checking
version numbers ourselves too, so that we can have our own error message.

Also moves the Qt5 conditionals to be compile time ones.
2023-08-13 15:14:24 +12:00
toofar 6f7b76f066 nsis: allow Win10 versions back to 1607 2023-08-13 15:14:24 +12:00
toofar c1841c7948 nsis: remove arch from binary path string
We dropped 32bit support in #7804 and as a result removed the arch
suffix from the binary that pyinstaller produces. This commit removes it
form the lookup path in the installer too.

Note that we are leaving the arch string in the installer itself for
now. Mostly because it'll be removed as part of a later change when the
installer itself is refreshed. But it might also be useful to clarify in
the installer names what the arch is? Maybe, that reasoning might not
fit with the previous change to remove the arch strings.
2023-08-13 15:14:24 +12:00
bitraid f903ae4985 nsis: minimum OS version check for Qt6
The Qt docs for 6.5 say that the minimum supported version is Windows 10
1809.

Experimentally it seems qutebrowser and it's dependencies work fine on a
version as early 1607.

There should be no change in OS version requirements for the Qt5 build,
although we've dropped 32 bit support already and in a future version of
the installer we may bring the minimum OS version support in line with
the Qt6 requirements for simplicity too.

Added a new QT5 version into the NSIS scripts so we can do the different
version check per installer build. It just uses the python bool
serialization format so should always be "True" or "False", but I've
added a fallback anyway for consistency.
2023-08-13 15:14:24 +12:00
toofar 1dba77ddb3 Stringify type hint to avoid circular import
Reproducers:

    python3 -c 'from qutebrowser.extensions import loader'
    python3 -c 'import qutebrowser.commands.command'

Specifically the first on was being called from misc/qutebrowser.spec in
the nightly installer build jobs.

Running the full application still works fine somehow. So it might be
possible to import things in the right order to avoid the loop. But
since this is part of our API we probably don't want to require too much
juggling.
2023-08-12 17:20:40 +12:00
toofar 0f2d34623c Merge remote-tracking branch 'upstream/main' into feat/mac_sandbox_pre_release_pyinstaller
Only conflict was the removal of support for 32bit builds in
build_release.py
2023-08-12 13:49:01 +12:00
toofar b018f3f081 Revert "qt6: Add macOS sandboxing warning"
This reverts commit 8715263c75.

ref: #7803
2023-08-12 13:36:50 +12:00
toofar 64af5f0e26 walk_module workaround for PyInstaller
Restored from dd2fc8e10bb9d4a1bd0158110173793a18736d6b

Now that we are putting our data files in the qutebrowser/ directory
again pkgutil/importlib is getting confused by that dir existing and
returning us a FileLoader for `qutebrowser.components`, I think that's
what's happening anyway. Should try reverting that and this commit and
see if extensions get loaded right again.

So bring back this workaround of using the toc on the PyInstaller loader
to get the list of component modules for now.

ref: #7803
2023-08-12 13:36:50 +12:00
toofar 32470686ce macOS: switch to more suitable bundle ID
Trying to switch the bundle ID again and see if that makes things work.
Will need to check 5.15 too.

ref: https://github.com/qutebrowser/qutebrowser/pull/7803#issuecomment-1657106925
Closes: #5180
2023-08-12 13:36:50 +12:00
toofar 088d6f48c2 Pin PyInstaller to specific commit
I don't want to deal with having to review development changes of
pyinstaller every week. So pin to one commit for now that we can
actually test. I'm subscribed to release notifications on github so I'll
manually change this back to point to the pyinstaller pypi package ones
it does.
2023-08-12 13:36:50 +12:00
Philipp Albrecht d5faeef14c Rename :edit-command to :cmd-edit
Group commands related to commands/commandline by prefixing them with `cmd-`. In this
case we additionally renamed the command slightly to fit better with the `cmd-` prefix.
2023-08-11 09:02:17 +02:00
Philipp Albrecht 86925b58cb Rename :repeat-command to :cmd-repeat-last
Group commands related to commands/commandline by prefixing them with `cmd-`. In this
case we additionally renamed the command slightly to fit better with the `cmd-` prefix.
2023-08-11 09:02:12 +02:00
Philipp Albrecht f354d3ab91 Rename :run-with-count to :cmd-run-with-count
Group commands related to commands/commandline by prefixing them with `cmd-`.
2023-08-11 09:02:08 +02:00
Philipp Albrecht 20de484de5 Rename :set-cmd-text to :cmd-set-text
Group commands related to commands/commandline by prefixing them with `cmd-`. In this
case renaming the command slightly was a better fit.
2023-08-11 09:02:02 +02:00
Philipp Albrecht 80b4d2f243 Rename :later to :cmd-later
Group commands related to commands/commandline by prefixing them with `cmd-`.
2023-08-11 09:02:01 +02:00
Philipp Albrecht 2fe4864b78 Rename :repeat to :cmd-repeat
Grouping commands related to commands/commandline by prefixing them with `cmd-`.
2023-08-11 09:00:27 +02:00
Florian Bruhin fc843f3944 Fix lint/tests 2023-08-10 16:53:52 +02:00
Florian Bruhin 216a9f9a9b Make qute://start search work with QtWebEngine 6.3+
Until we look at #7220 proper (thus splitting this into a qute-start:// which
could probably have more permissions to do remote requests), we'll need to do
with somewhat of a hack to allow this even if QtWebEngine does not.

Given the very limited scope (only from qute://start, only opening the search
engine URL, only with a form submitted request), this should be acceptable
without compromsing security in any way.

Fixes #7790
2023-08-10 16:37:40 +02:00
Florian Bruhin 8defe1ae44 Require user interaction for hints on qute:// pages
With Qt 6.3+, user interaction is required to navigate outside of qute:// from a
qute:// page.

Fixes #7815

See #7220 - should be revisited once we have a qute-bookmarks:// instead where
we can adjust permissions when registering the URL handler.
2023-08-10 15:30:34 +02:00
Florian Bruhin 0b200207dd Add --all to :{quick,book}mark-del
Needed mostly for urlmarks BDD tests so they can clear things between tests.
Hopefully with --all, this won't be accidentally triggered by users.

Preparation for #7815
2023-08-10 15:30:26 +02:00
Florian Bruhin 9e21e2e86b tests: Handle PermissionError for waitpid in test_restart
While not documented that way:
https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/cwait?view=msvc-170

It looks like that Windows sometimes sets errno to EACCES here (causing a
PermissionError):

>           os.waitpid(pid, 0)  # pid, options... positional-only :(
E           PermissionError: [Errno 13] Permission denied

I have no idea why it happens, but it results in flaky tests on CI.
We aren't particularly interested in this (we just want to make sure the process
is cleaned up before the next test runs...), so let's just ignore this.
2023-08-10 13:25:26 +02:00
Florian Bruhin 3b1c3856a9
Merge pull request #7797 from pylbrecht/build-on-ci
Run package building on CI with warnings turned into errors
2023-08-10 12:14:23 +02:00
Florian Bruhin 937b242b42
Merge pull request #7804 from qutebrowser/drop-32bit-windows
Drop 32bit Windows release support
2023-08-10 12:10:09 +02:00
Florian Bruhin b7a470025d mypy: Improve typing for cmdutils/qute_args
See https://github.com/python/mypy/issues/2087
2023-08-10 12:05:07 +02:00
Florian Bruhin e20bba8d91 Don't fail on weird pip warning
We got a `DeprecationWarning` during the package build, which we were not able to
reproduce locally. For now we just don't turn this particular `DeprecationWarning` into
an exception to not fail CI.
2023-08-09 12:46:58 +02:00
Philipp Albrecht 7d445e6617 Add CI job for package build
We want to run a package build in CI with warnings turned into exceptions, in order to
catch issues in CI (e.g. DeprecationWarning).
2023-08-09 12:46:58 +02:00
Philipp Albrecht 1976f1acdd Add package job to tox.ini
This is still *very* basic, but it serves its purpose of failing for warnings during
package build.

I verified that `tox -e package` is failing by introducing some warnings with this change:
```diff
diff --git a/setup.py b/setup.py
index feb949595..6810eaf1e 100755
--- a/setup.py
+++ b/setup.py
@@ -51,8 +51,7 @@ def _get_constant(name):
try:
   common.write_git_file()
   setuptools.setup(
-        packages=setuptools.find_namespace_packages(include=['qutebrowser',
-                                                             'qutebrowser.*']),
+        packages=setuptools.find_namespace_packages(include=['qutebrowser']),
       include_package_data=True,
       entry_points={'gui_scripts':
                     ['qutebrowser = qutebrowser.qutebrowser:main']},
```
2023-08-09 12:46:58 +02:00
Florian Bruhin 89b9110502 Prevent setting giant window titles
See #7801
2023-08-08 17:16:47 +02:00
Florian Bruhin a1af49e252 Fix lint/tests 2023-08-08 15:08:00 +02:00
Florian Bruhin 346819b294 notifications: Handle org.freedesktop.DBus.Error.ServiceUnknown 2023-08-08 14:36:48 +02:00
Florian Bruhin 585c4fbaa9 interceptor: Make sure redirect target URL is valid
Catches issues with invalid URLs early instead of later in the code (e.g. when
the brave adblocker runs on the URL).

Hopefully helps catch issues with broken config.py hacks calling redirect().
2023-08-08 14:18:24 +02:00
Florian Bruhin b5f71d2b50 notifications: Don't complain on upgraded server spec version
If a server gets fixed and now advertises spec 1.2, there is no reason we should
complain about things.

See 5427acd551
2023-08-07 12:19:59 +02:00
Florian Bruhin 94c768498d
Merge pull request #7821 from qutebrowser/update-dependencies
Update dependencies
2023-08-07 10:40:03 +02:00
qutebrowser bot 38223ecb40 Update dependencies 2023-08-07 04:22:49 +00:00
Florian Bruhin 9f5df2071f doc: Update related projects list 2023-08-06 00:03:01 +02:00
toofar d084df8e3b Remove macOS exception for "sandbox disabled" error message 2023-08-05 17:03:50 +12:00
toofar c2092640e7 Remove local re-signing of macOS build.
Now that we aren't patching the build we shouldn't have to try to
re-sign in.
2023-08-05 17:03:50 +12:00
toofar 5344163f4a
Merge pull request #7807 from qutebrowser/update-dependencies
Update dependencies
2023-08-02 21:29:48 +12:00
toofar fc91c976d3 manual update of cryptography (and rich)
When handling the automated dependancy update PR GH warned on push of a
low priority security issue with cryptography. So updating that now.

Rich has an update available too.

ref: https://github.com/qutebrowser/qutebrowser/security/dependabot/32
ref: #7807
2023-08-02 20:55:51 +12:00
toofar 36abc475d4 fix lint
Seems the new flake8 release is pulling down a (somewhat) new
pycodestyle that prefers is/is not over ==/!= when comparing exact
types. They should behave the same.

ref: #7807
2023-08-02 20:45:03 +12:00
qutebrowser bot 4049bac356 Update dependencies 2023-07-31 04:22:34 +00:00
toofar 693e391410 Remove local patching/symlinking of macOS build.
In the past various workarounds have been put in place to move/copy/symlink
files in the macOS app build to make PyQt work and let us sign it.

As of https://github.com/pyinstaller/pyinstaller/pull/7619 our downstream
patching should not be required.

The application seems to run fine.
The app size is 155 MB.
Signing is still to be verified.
2023-07-30 14:53:06 +12:00
toofar 6aa53a3c9b Update docs 2023-07-30 11:18:05 +12:00
toofar ea6c84e04b Use full sip module for PyQt5 too.
It's a change from before but it's strictly more accurate anyway, in the
application we are always using sip from under the PyQt module, even if
PyQt5 registers it as the plain `sip` too. And now it's consistent with
what we have to do for PyQt6.
2023-07-30 11:18:05 +12:00
toofar 6cfe5bc9c9 Merge pull request #7805 from coiby/sip_import
Fixed:
* The `PyQt{5,6}.sip` version is now shown correctly in the
  :version|--version output. Previously that showed the version from the
  standalone `sip` module which was only set for PyQt5.
2023-07-30 10:53:45 +12:00
Coiby Xu 34dcedf512 qt6: let importlib import PyQt6.sip
Currently, ":version" fails to show the sip version for Qt6. This is
because the sip module can't imported in the same way as Qt5. In Qt5,
the sip module can be imported after "from PyQt5.QtCore import *". In Qt
6, this is no longer the case,

    >>> from PyQt6.QtCore import *
    >>> import sip
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ModuleNotFoundError: No module named 'sip'

So let importlib import PyQt6.sip explicitly.
2023-07-29 18:32:16 +08:00
Florian Bruhin c2210539a9 Drop 32bit Windows release support
See #6050, still keeping open to track NSIS changes
2023-07-27 21:05:26 +02:00
toofar c0d31d399d adjust pyinstaller data paths to match importlib_resources
Not that we are looking up resources via importlib_resources for
pyinstaller builds too we need to change where the data files are
installed to to match what importlib_resources is expecting.

There was a comment in the previous resource lookup special case
complaining about the data files being at the top level so it seems this
is a change for the better anyhow.

Observed paths:

    requested file: qutebrowser.app/Contents/Frameworks/qutebrowser/config/configdata.yml
    actual file   : qutebrowser.app/Contents/Frameworks/config/configdata.yml
2023-07-27 19:17:27 +12:00
toofar f254680641 Drop 'frozen' special case for resources lookup
pyinstaller patches importlib_resources now so it should transparently
handle this special case for us.

ref: https://pyinstaller.org/en/stable/CHANGES.html?highlight=importlib.resources#id94
2023-07-27 19:15:16 +12:00
toofar 6042fccbf5 Re-compile PyInstaller bootloader in CI.
Since we are pulling down PyInstaller off of the develop branch we need
to recompile the bootloader, because upstream only commits a new one
back to the branch on releases. Luckily all the compiler requirements
seem to already be installed on CI.

For the record the macOS CI is currently failing with

    dlopen: dlopen(/Users/runner/work/qutebrowser/qutebrowser/dist/qutebrowser.app/Contents/MacOS/libpython3.10.dylib, 10): image not found

And upon inspection of dist/ that file seems to be at

    ./qutebrowser.app/Contents/Resources/libpython3.10.dylib
    ./qutebrowser.app/Contents/Frameworks/libpython3.10.dylib
    ./qutebrowser/_internal/libpython3.10.dylib
2023-07-27 19:12:03 +12:00
toofar a71aff389d Pin latest pyinstaller commit from develop branch
PyInstaller has [recently][symlinks] landed a change that should restore
the webengine sandbox on macOS builds. With a bit more testing we are
hoping that we can go ahead releasing builds based on that
in-development PyInstaller codebase even before they've made a release.

This commit pins our pyinstaller dependency to be the latest commit on
their develop branch.

[symlinks]: https://github.com/pyinstaller/pyinstaller/pull/7619
2023-07-27 19:08:18 +12:00
Florian Bruhin 6d84462d68 scripts: Fix broken condition
Broken in ffc06e58d6
2023-07-25 11:00:33 +02:00
Florian Bruhin d145f0c253 scripts: Fix typo 2023-07-24 20:16:11 +02:00
Florian Bruhin 7fbf9b56fa tox: Use PyQt6 release for mypy
6.5.2 is out with the fixes in
2023-07-24 20:16:11 +02:00
Florian Bruhin 6478496ca3 Revert "Revert "Revert "ci: Remove Python 3.12 for now"""
This reverts commit 70e8dc63e8.

We're on PyQt 6.5.2 now, which should fix the segfaults on exit.
2023-07-24 20:12:52 +02:00
Florian Bruhin 8fcd42fa12 Revert "Create a workaround to install PyQT 6.5.2 until release"
This reverts commit ed70741587.
2023-07-24 20:12:17 +02:00
Florian Bruhin 99379be292
Merge pull request #7799 from qutebrowser/update-dependencies
Update dependencies
2023-07-24 20:11:30 +02:00
qutebrowser bot 5b2038c4cb Update dependencies 2023-07-24 11:22:06 +00:00
toofar 7724f72950 libxcb-cursor0 in dependencies job and install docs
I don't think the dependencies jbos needs to be installing asciidoc anymore either but oh
well.

I just grepped for libxcb-shape0 and constituently added libxcb-cursor0
after it. I haven't checked it's in stretch but it should be.

ref: 6f5de192e0
2023-07-24 23:04:51 +12:00
Florian Bruhin d580b20407 Fix ipc handling after shutdown 2023-07-23 17:01:09 +02:00
Florian Bruhin 7bf5abbc69 Add a test for :restart 2023-07-23 16:32:49 +02:00
Florian Bruhin f8685230a5 Make sure ipc.shutdown() can be called twice
We still want to make sure that IPC is shut down early when using :restart.
However, doing it again should be a nop when quitting qutebrowser then
shuts it down again.

This accidentally worked before 6373959 ("Always delay stage 2 shutdown, not
only with prompts"), because most operations in shutdown() just happened to be
idempotent. Because we never returned to the Qt mainloop between the first and
the second call, the self._server.deleteLater() call didn't actually delete
anything yet.

After that change, however, we do end up in shutdown() again with an actually
deleted C++ QLocalServer object, so trying to call .close() on it again failed
with a RuntimeError.

Fixed #7681
2023-07-23 16:03:03 +02:00
Florian Bruhin 5e5da1c458 Update changelog 2023-07-23 15:48:12 +02:00
Florian Bruhin e7bdd850d1 Fix lint 2023-07-23 14:24:02 +02:00
Florian Bruhin 1cdeac1db7 Merge branch 'reuse' 2023-07-23 14:20:22 +02:00
Florian Bruhin a9d484d714 reuse: Readd missing clause 2023-07-23 14:17:49 +02:00
Florian Bruhin e909f57f4f Fix lint/tests 2023-07-23 14:10:10 +02:00
Florian Bruhin 09fd975af7 reuse: Add linting for old license comments 2023-07-23 13:53:31 +02:00
Florian Bruhin 9d749bd7d2 Revert "reuse: Run init commands"
This reverts commit 73303da665.
Not aiming for full REUSE compliance just yet
2023-07-23 13:50:15 +02:00
Florian Bruhin a537ac3e49 reuse: Replace last copyright texts 2023-07-23 12:59:11 +02:00
Florian Bruhin 8ddaef35d0 reuse: Fix more copyright headers
See previous commit, forgot ? after year range
2023-07-23 12:56:13 +02:00
Florian Bruhin 3eb826f664 reuse: Update remaining copyright texts
git ls-files | \
    xargs sed -Ei 's/Copyright [0-9]{4}(-[0-9]{4}) ([^<]*)<([^>]*)>/SPDX-FileCopyrightText: \2<\3>/'
2023-07-23 12:52:01 +02:00
Florian Bruhin 0718b25796 reuse: Initial copyright text update for myself
git ls-files | \
    xargs sed -Ei 's/Copyright [0-9]{4}(-[0-9]{4}) Florian Bruhin \(The Compiler\) <mail@qutebrowser\.org>/SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>/'
2023-07-23 12:49:05 +02:00
Florian Bruhin 67686bb1a7 reuse: Fix remaining userscripts without extension
reuse annotate --license="GPL-3.0-or-later" --style python \
    misc/userscripts/openfeeds \
    misc/userscripts/qute-bitwarden \
    misc/userscripts/qute-keepass \
    misc/userscripts/qute-keepassxc \
    misc/userscripts/qute-lastpass \
    misc/userscripts/qute-pass \
    misc/userscripts/tor_identity \
    misc/userscripts/dmenu_qutebrowser \
    misc/userscripts/rss
2023-07-23 12:28:23 +02:00
Florian Bruhin 9cd75691c9 reuse: Fix up the situation in qutebrowser/javascript/caret.js 2023-07-23 12:26:01 +02:00
Florian Bruhin d2975c6d09 reuse: Get files in misc/nsis/ to use SPDX
reuse annotate --license="GPL-3.0-or-later" --style python \
    misc/nsis/uninstall_pages.nsh \
    misc/nsis/install.nsh \
    misc/nsis/uninstall.nsh

And fixing qutebrowser.nsi manually as that uses iso-8859-1 and the reuse tool
doesn't like that apparently.
2023-07-23 12:19:27 +02:00
Florian Bruhin 77ca342cff reuse: Remove some more old license headers
git ls-files | \
xargs grep -l "This file is part of qutebrowser" | \
xargs grep -l SPDX-License-Identifier | \
xargs sed -i '/# This file is part of qutebrowser\./,/along with qutebrowser\.  If not, see <https:\/\/www\.gnu.org\/licenses\/>./d'
2023-07-23 12:15:03 +02:00
Florian Bruhin b2aaba6043 reuse: Adjust most license headers
git ls-files | xargs grep -l "is free software"  | xargs reuse annotate --license="GPL-3.0-or-later" --skip-unrecognised
2023-07-23 12:11:07 +02:00
Florian Bruhin 73303da665 reuse: Run init commands
- reuse init
- reuse download --all

See #7104
2023-07-23 12:10:12 +02:00
Florian Bruhin 9330e9fd91 Fix funny remaining master branch reference 2023-07-23 12:08:22 +02:00
Florian Bruhin ec34865168 Move master branch references to main
Closes #7097
2023-07-23 11:38:19 +02:00
Florian Bruhin 62fef9d9e6 Update changelog regarding dropped OS versions
See #7092, #6050
2023-07-22 20:08:26 +02:00
Florian Bruhin 97c1798d88 Update changelog 2023-07-22 19:20:43 +02:00
Florian Bruhin bacc76815a Merge remote-tracking branch 'origin/pr/7768' 2023-07-22 19:11:36 +02:00
Paul Mairo 8fdf168ac0 quitter: fix prompt_queue being None at shudown
When pressing C-c if qutebrowser is not fully started yet, the prompt_queue is not
initialized and prompts for an annoying crash report.

Fixes #6827
2023-07-22 16:14:51 +02:00
Florian Bruhin 4a031f4eaf Merge branch 'master' of https://github.com/rmpr/qutebrowser 2023-07-22 15:04:35 +02:00
Paul Mairo b9450a1356 fixup! fixup! mkvenv: Fix '--pyqt-type link' without --pyqt-version
I broke it oops
2023-07-22 15:03:13 +02:00
Paul Mairo 2a3993e5b8 fixup! mkvenv: Fix '--pyqt-type link' without --pyqt-version 2023-07-22 14:56:20 +02:00
Paul Mairo 5fa531e09e mkvenv: Fix '--pyqt-type link' without --pyqt-version
This is a follow-up of #7770 which was an attempt to fix the script broken in 9212ba9.
Before flipping the QT6 switch.
2023-07-22 14:38:06 +02:00
Florian Bruhin 04594f5f9d Fix Qt 5 warning opening always
The stray comma made it a tuple (False,) which was always True.
2023-07-22 14:28:57 +02:00
Florian Bruhin 273230eb07 Merge remote-tracking branch 'origin/pr/7789' 2023-07-22 12:36:31 +02:00
Paul Mairo ed70741587 Create a workaround to install PyQT 6.5.2 until release
Right now the version of PyQT available on PyPI is 6.5.1 and it's buggy with
Qutebrowser, this is a quick hack to get it working until it's released early next week.
2023-07-22 12:22:53 +02:00
Florian Bruhin 1387b0598b
Merge pull request #7772 from pylbrecht/logfilter
Don't crash on --logfilter at startup
2023-07-21 14:52:24 +02:00
Philipp Albrecht 01ab247a41 Initialize logging as early as possible
Now that `qutebrowser.utils.log` is a Qt-free zone, we can initialize logging before
`machinery.init()` without crashing.
2023-07-21 14:23:15 +02:00
Philipp Albrecht 5da4c6022e Add note on keeping qutebrowser.utils.log a Qt-free zone 2023-07-21 08:41:10 +02:00
Philipp Albrecht d7b420dc4b Log machinery info in machinery.init()
Now that we moved all Qt related things out of `qutebrowser.utils.log` we can import
`qutebrowser.utils.log` in `qutebrowser.qt.machinery`, and therefore move the machinery
log where it belongs.
2023-07-20 15:09:48 +02:00
Philipp Albrecht 250143a70a Move qt logger from qtlog to log
This resolves a temporary workaround for a circular import.

Now that we fully separated `qutebrowser.utils.log` and `qutebrowser.utils.qtlog`, we
can go back to keeping all logger definitions in the same place.
2023-07-20 15:09:48 +02:00
Philipp Albrecht e3a58e84c6 Don't crash on --logfilter 2023-07-20 15:09:48 +02:00
Philipp Albrecht f91ace9622 Move hide_qt_warning() to qtlog
Just to keep related things together.
2023-07-20 15:09:48 +02:00
Philipp Albrecht ebfe9b7aa0 Move qt_message_handler() to qtlog
I had to create `qtlog.init()` to deal with the global variable `_args`.
2023-07-20 15:09:48 +02:00
Philipp Albrecht 30570a5cad Move disable_qt_msghandler() to qtlog 2023-07-20 15:09:45 +02:00
Philipp Albrecht 1e0fb604ae Move shutdown_log() to qtlog 2023-07-20 15:09:05 +02:00
Philipp Albrecht b5b43a566e Add qtlog module 2023-07-20 15:09:05 +02:00
Florian Bruhin 059a280e4e
Merge pull request #7785 from qutebrowser/update-dependencies
Update dependencies
2023-07-20 15:06:19 +02:00
Florian Bruhin 9ef21eed1a tox: Update VIRTUALENV_PIP 2023-07-20 15:04:30 +02:00
qutebrowser bot 4e0180cede Update dependencies 2023-07-20 10:57:42 +00:00
Florian Bruhin 09f28f24c6 Fix lint 2023-07-20 12:42:29 +02:00
Florian Bruhin 5cfab728b2 Improve handling of Optional with new PyQt stubs 2023-07-19 17:27:55 +02:00
Florian Bruhin 92dea988c0 Initial upgrade to new PyQt6 stubs 2023-07-19 17:08:24 +02:00
Philipp Albrecht 1bd1c89256 Include qutebrowser *and* qutebrowser.* 2023-07-13 10:50:07 +02:00
Philipp Albrecht c4fff2fa83 Use explicit include 2023-07-13 10:44:55 +02:00
Philipp Albrecht 56062421e5 Map qutebrowser package to qutebrowser dir 2023-07-13 10:34:57 +02:00
Philipp Albrecht 2a34c15b69 Specify qutebrowser package via where= 2023-07-13 10:28:23 +02:00
Florian Bruhin 3b04cb1d99 mypy: Remvoe some more type ignores
Fixed in latest PyQt snapshots
2023-07-13 09:27:19 +02:00
Philipp Albrecht 0781e0d046 Include namespace packages in setuptools build
Building qutebrowser showed some warnings as the following:

```
/tmp/build-env-4jb2oh0t/lib/python3.8/site-packages/setuptools/command/build_py.py:201: _Warning: Package 'qutebrowser.html' is absent from the `packages` configuration.
!!

        ********************************************************************************
        ############################
        # Package would be ignored #
        ############################
        Python recognizes 'qutebrowser.html' as an importable package[^1],
        but it is absent from setuptools' `packages` configuration.

        This leads to an ambiguous overall configuration. If you want to distribute this
        package, please make sure that 'qutebrowser.html' is explicitly added
        to the `packages` configuration field.

        Alternatively, you can also rely on setuptools' discovery methods
        (for example by using `find_namespace_packages(...)`/`find_namespace:`
        instead of `find_packages(...)`/`find:`).

        You can read more about "package discovery" on setuptools documentation page:

        - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

        If you don't want 'qutebrowser.html' to be distributed and are
        already explicitly excluding 'qutebrowser.html' via
        `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
        you can try to use `exclude_package_data`, or `include-package-data=False` in
        combination with a more fine grained `package-data` configuration.

        You can read more about "package data files" on setuptools documentation page:

        - https://setuptools.pypa.io/en/latest/userguide/datafiles.html

        [^1]: For Python, any directory (with suitable naming) can be imported,
              even if it does not contain any `.py` files.
              On the other hand, currently there is no concept of package data
              directory, all directories are treated like packages.
        ********************************************************************************

!!
```

Using `find_namespace_packages()` as suggested in the setuptools docs[1] solved the issue.

[1] https://setuptools.pypa.io/en/latest/userguide/package_discovery.html#finding-namespace-packages
2023-07-12 10:46:46 +02:00
Florian Bruhin 9646f53fb5
Merge pull request #7764 from pylbrecht:search-vanished
Don't show warning when jumping to next/prev search result without matches
2023-07-10 16:38:36 +02:00
Florian Bruhin 72aee69c9f Fix lint after dropping PyQt6-stubs 2023-07-10 10:14:03 +02:00
Florian Bruhin 9fcba3d61b Update changelog URLs 2023-07-10 10:07:36 +02:00
Florian Bruhin 6d1dcc30ad Merge remote-tracking branch 'origin/update-dependencies' 2023-07-10 10:04:14 +02:00
qutebrowser bot 93fb20e67e Update dependencies 2023-07-10 04:23:00 +00:00
Florian Bruhin 5a9027c54e mypy: Switch to upstream stubs for PyQt6
They are getting much better
2023-07-09 01:02:33 +02:00
Florian Bruhin 8da62bcbf4 Add aria-haspopup to hint selectors
Helps on https://www.keepersecurity.com/ - see https://www.reddit.com/r/qutebrowser/comments/14qtlc8/no_hint_on_drop_down_list/
2023-07-05 22:37:56 +02:00
Florian Bruhin d2c1195924
Merge pull request #7766 from arza-zara/tox
tox: Fix vulture-pyqtlink environment
2023-07-05 15:13:59 +02:00
arza 312b7878fa tox: Fix vulture-pyqtlink environment 2023-07-05 14:52:17 +03:00
Philipp Albrecht 45f6cf01c3 Don't show warning when jumping to next/prev without matches 2023-07-05 11:16:55 +02:00
Florian Bruhin ee2c8c649c ci: Keep WebKit on life support for longer 2023-07-03 17:40:37 +02:00
toofar c25f63e6e8
Merge pull request #7763 from qutebrowser/update-dependencies
Update dependencies
2023-07-03 21:35:12 +12:00
toofar 9f9dfe7509 Add exceptiongroup changelog
Ref #7763
2023-07-03 20:44:52 +12:00
qutebrowser bot 9d89e16e19 Update dependencies 2023-07-03 04:24:46 +00:00
Florian Bruhin 4e67a1727a Fix lint/test issues 2023-06-30 19:29:28 +02:00
Florian Bruhin 63ff0624d0 tox: Inherit setenv instead of duplicating 2023-06-30 19:29:28 +02:00
Florian Bruhin d48d85324e qt6: Reduce duplicate misc_checks.py code 2023-06-30 19:29:28 +02:00
Florian Bruhin 37791422bf qt6: Make sure KeyInfo never has ints as members
This used to be possible in some situations and was handled in somewhat
unexpected places (e.g. .to_qt()). Instead, we now assume that KeyInfo
is always "clean", and we handle the conversion from an int to a Qt.Key
elsewhere.

This only seems to affect tests, since otherwise we already made sure
we get a Qt.Key and Qt.KeyboardModifier(s) e.g. in .from_event().
2023-06-30 19:29:28 +02:00
Florian Bruhin a05579d255 qt6: Update selection comment 2023-06-30 19:29:28 +02:00
Florian Bruhin 0e9f5e7e4f scripts: Upgrade to Qt 6
Using qutebrowser.qt where we import from qutebrowser already anyways
2023-06-30 19:29:28 +02:00
Florian Bruhin 29dffd782d Update userscripts to PyQt6 2023-06-30 19:29:28 +02:00
Florian Bruhin fb4e3722bb qt 6: Document purpose of wrappers 2023-06-30 19:29:28 +02:00
Florian Bruhin 7a2cee44b1 qt6: Keep pylint import order checks disabled 2023-06-30 19:29:28 +02:00
Florian Bruhin 729d7ce69d qt6: Widen env auto tests 2023-06-30 19:29:28 +02:00
Florian Bruhin 67e3826e9a Update vulture 2023-06-30 19:29:28 +02:00
Florian Bruhin 8f34a2c9c6 ci: Fix issues 2023-06-30 19:29:28 +02:00
Florian Bruhin 342cd9585a Fix mypy 2023-06-30 19:29:28 +02:00
Florian Bruhin b5d5c7f4d3 More qt 6 tooling 2023-06-30 19:29:28 +02:00
Florian Bruhin 58ee4cc21a qt6: Add a Qt 5 warning
Closes #7742
2023-06-30 19:29:28 +02:00
Florian Bruhin ffc06e58d6 qt6: Switch most tooling/linting to Qt 6
Only mypy missing now...
2023-06-30 19:29:28 +02:00
Florian Bruhin 0ac074575d qt 6: Update mkvenv.py for Qt 6 by default 2023-06-30 19:29:28 +02:00
Florian Bruhin 929bbff4ca qt 6: Update changelog 2023-06-30 19:29:28 +02:00
Florian Bruhin 2ccd49ddf1 qt: Introduce _WRAPPER_OVERRIDE for packagers 2023-06-30 19:29:28 +02:00
Florian Bruhin 73fb5c4c49 qt: Switch to autoselection of Qt backend by default 2023-06-30 19:29:28 +02:00
Florian Bruhin ad77048d53 qt: blackify 2023-06-30 19:29:28 +02:00
Florian Bruhin 73b51d274f Remove new modeline 2023-06-30 19:29:21 +02:00
Florian Bruhin 0e242f7466 typing updates after Python 3.7 drop 2023-06-30 16:05:02 +02:00
Florian Bruhin 8dd5ba0abe Fix test_qtargs on Qt 5 2023-06-30 15:59:08 +02:00
Florian Bruhin 8e024ee654
Merge pull request #7761 from pylbrecht/remove-vim-modelines
Remove vim modelines in favor of .editorconfig
2023-06-30 15:51:19 +02:00
Florian Bruhin 45de31374d Enable replaceAll quirk by default
See #7639
2023-06-30 15:35:51 +02:00
Florian Bruhin 693b25efd2 Add experimental_web_platform_features setting
Closes #7639
2023-06-30 15:32:46 +02:00
Florian Bruhin 7b63036178 Revert "Fix bad keyutils merge"
This reverts commit 127a4bf756.
2023-06-30 14:39:14 +02:00
Florian Bruhin a3ec252d09 Remove --enable-webengine-inspector
Fixes #7134
2023-06-30 14:16:20 +02:00
Florian Bruhin 127a4bf756 Fix bad keyutils merge 2023-06-30 14:13:18 +02:00
Florian Bruhin 735270a6d2 Also move Pyright / VS Code to Qt 6
See #7370
2023-06-30 14:07:40 +02:00
Florian Bruhin 4cf2eea580 qt6 mypy: Fix lint 2023-06-30 11:59:45 +02:00
Philipp Albrecht 6f727664a9 Add misc check to prevent vim modelines
We deprecated vim modelines. The introduced misc check will keep old pull requests from
re-introducing vim modelines.
2023-06-30 11:03:19 +02:00
Philipp Albrecht d9e8b638bf Remove vim modelines
We're deprecating vim modelines in favor of `.editorconfig`.

Removing vim modelines could be done using two one-liners. Most of the vim modelines
were followed by an empty line, so this one-liner took care of these ones:

```sh
rg '^# vim: .+\n\n' -l | xargs sed -i '/^# vim: /,+1d'
```

Then some of the vim modelines were followed by a pylint configuration line, so running
this one-liner afterwards took care of that:

```sh
rg '^# vim:' -l | xargs sed -i '/^# vim: /d'
```
2023-06-30 11:03:06 +02:00
Philipp Albrecht 4a31c537c2 Remove vim modeline hint from contributing docs
We're deprecating vim modelines in favor of `.editorconfig`.
2023-06-30 10:59:23 +02:00
Philipp Albrecht 08ea751fe1 Remove modeline pylint checker
We're deprecating vim modelines in favor of `.editorconfig`.
2023-06-30 10:59:06 +02:00
Florian Bruhin 43fc49e5ad mypy: Make misc.sql fully typed
That was an oversight apparently
2023-06-30 00:58:41 +02:00
Florian Bruhin 31ece1ecb0 mypy: Turn on disallow_untyped_defs by default
Done by removing the existing config and doing:

    tox -e mypy-pyqt6 | \
    grep -F .py | \
    cut -d: -f1 | \
    sort | \
    uniq | \
    sed 's/\.py//' | \
    sed 's/\//./g' | \
    while read line; do \
    echo "[mypy-$line]\ndisallow_untyped_defs = False\n" \
    done >> .mypy.ini

This means we now enforce type annotations for all new modules.
We can still add sections for upcoming PR merges where this is a problem.

Closes #7409
2023-06-30 00:55:19 +02:00
Florian Bruhin 904cab911d mypy: Install more typeshed types 2023-06-30 00:49:30 +02:00
Florian Bruhin a6d4227578 qt6 mypy: Fix lint 2023-06-30 00:29:16 +02:00
Florian Bruhin 9637b8b4fa qt6 mypy: Fix broken assert 2023-06-30 00:24:41 +02:00
Florian Bruhin 783963b4da Fix lint 2023-06-29 23:31:14 +02:00
Florian Bruhin 41f374a662 qt6 mypy: Fix lint 2023-06-29 23:27:29 +02:00
Florian Bruhin 50a1f004f0 qt6 mypy: Enable on CI 2023-06-29 23:16:35 +02:00
Florian Bruhin ea2de0b40c qt6 mypy: Fix remaining unused-ignore issues 2023-06-29 23:16:16 +02:00
Florian Bruhin 69e2bbd766 qt6 mypy: Fix PyQt5 QUrl issues with a more clever approach 2023-06-29 23:06:54 +02:00
Florian Bruhin 42f0ee36e3 qt6 mypy: Remove PyQt5 type ignores 2023-06-29 22:11:03 +02:00
Florian Bruhin d13bd0675d qt6 mypy: Fix handling of AbstractTab.is_deleted() 2023-06-29 22:10:44 +02:00
Florian Bruhin 7b1029653f qt6 mypy: Don't attempt to type-check OpenGL functions 2023-06-29 22:06:25 +02:00
Florian Bruhin c8744122f6 qt6 mypy: Fix unused-ignores with mypy-pyqt5 2023-06-29 21:56:08 +02:00
Florian Bruhin 3811ec71a7 mypy qt6: Ignore unreachable after rebase 2023-06-29 21:17:16 +02:00
Florian Bruhin ba694fe001 qt6 mypy: Fix qt5 mypy regressions 2023-06-29 21:10:45 +02:00
Florian Bruhin f2c308c6c1 qt6 mypy: Fix remaining issues
30 -> 0 errors
2023-06-29 21:10:43 +02:00
Florian Bruhin 09df332997 qt6 mypy: Fix typing around qenum_key
36 -> 30 errors
2023-06-29 21:10:01 +02:00
Florian Bruhin c42ce85820 qt6 mypy: Add missing pyqtProperty
39 -> 36 errors
2023-06-29 21:10:01 +02:00
Florian Bruhin 2ac6b0768b qt6 mypy: Fix first batch of various issues
50 -> 39 errors
2023-06-29 21:10:01 +02:00
Florian Bruhin 1ee66dd5ae qt6 mypy: Fix first batch of various issues
50 -> 40 errors
2023-06-29 21:10:01 +02:00
Florian Bruhin cca08369be qt6 mypy: Disable warn-unused-ignores
The ignores needed between Qt 5 and Qt 6 differ.
We could buy into e.g. only Qt 6 linting, but apparently e.g. VS Code
also shows more errors when removing the Qt 5 type ignores.

Instead, disable this for now. We might want to re-enable it when we see
a major change in the mypy changelog and filter the results manually.

81 -> 50 errors
2023-06-29 21:10:01 +02:00
Florian Bruhin 53d67e2c39 qt6 mypy: Lie about WebKit being available with Qt 6
185 -> 81 errors
2023-06-29 21:10:01 +02:00
Florian Bruhin 44bb9d7bad qt6 mypy: Fix moved Qt 6 imports in TYPE_CHECKING blocks
191 -> 185 errors
2023-06-29 21:10:01 +02:00
Florian Bruhin d27902e054 qt6 mypy: Add PyQt6-stubs
Unfortunately there is no PyPI release yet, so install from git.

243 -> 191 errors
2023-06-29 21:10:01 +02:00
Florian Bruhin 772c39cea2 scripts: Add a help to docker generate script 2023-06-29 10:30:55 +02:00
Florian Bruhin 5fa878c7d1 py38: Run modified pyupgrade
Modified to leave f-strings alone for now, and also not do some other
stuff we should do separately:

    diff --git i/pyupgrade/_main.py w/pyupgrade/_main.py
    index 4292174..37547b3 100644
    --- i/pyupgrade/_main.py
    +++ w/pyupgrade/_main.py
    @@ -294,7 +294,8 @@ def _fix_tokens(contents_text: str) -> str:
                    token.utf8_byte_offset == 0 and
                    token.line < 3 and
                    token.name == 'COMMENT' and
    -                tokenize.cookie_re.match(token.src)
    +                tokenize.cookie_re.match(token.src) and
    +                False
            ):
                del tokens[i]
                assert tokens[i].name == 'NL', tokens[i].name
    diff --git i/pyupgrade/_plugins/fstrings.py w/pyupgrade/_plugins/fstrings.py
    index e648075..eb44c0c 100644
    --- i/pyupgrade/_plugins/fstrings.py
    +++ w/pyupgrade/_plugins/fstrings.py
    @@ -88,7 +88,7 @@ def _format_params(call: ast.Call) -> set[str]:
        return params

    -@register(ast.Call)
    +# @register(ast.Call)
    def visit_Call(
            state: State,
            node: ast.Call,
    diff --git i/pyupgrade/_plugins/open_mode.py w/pyupgrade/_plugins/open_mode.py
    index a20b95c..0388781 100644
    --- i/pyupgrade/_plugins/open_mode.py
    +++ w/pyupgrade/_plugins/open_mode.py
    @@ -28,7 +28,7 @@ def _permute(*args: str) -> tuple[str, ...]:
        return tuple(''.join(p) for s in args for p in itertools.permutations(s))

    -MODE_REMOVE = frozenset(_permute('U', 'r', 'rU', 'rt'))
    +MODE_REMOVE = frozenset(_permute('U', 'rU', 'rt'))
    MODE_REPLACE_R = frozenset(_permute('Ub'))
    MODE_REMOVE_T = frozenset(_plus(_permute('at', 'rt', 'wt', 'xt')))
    MODE_REMOVE_U = frozenset(_permute('rUb'))

Then run with:

    git ls-files | grep -E '(\.py|misc/userscripts)' | xargs ~/tmp/pyupgrade/.venv/bin/pyupgrade --py38-plus

And manually reverted some changes (e.g. it picking up bash userscripts)
2023-06-26 14:39:54 +02:00
Florian Bruhin 93c7fdd60c Initial Python 3.7 drop 2023-06-26 14:39:54 +02:00
Florian Bruhin b9855b9104 Fix keyring changelog URL 2023-06-26 14:03:00 +02:00
Florian Bruhin 86a83240b9 Update broken userscript links 2023-06-26 13:55:45 +02:00
Florian Bruhin 6baa6dea26 Migrate :print --pdf to pathlib 2023-06-26 13:50:19 +02:00
Florian Bruhin 9e9b57772e tests: Resurrect :print --pdf test 2023-06-26 13:50:19 +02:00
Florian Bruhin e15223211c Fix :print --pdf with subdirectories
Fixes #5160
2023-06-26 13:50:19 +02:00
toofar f1d4f248b3
Merge pull request #7758 from qutebrowser/update-dependencies
Update dependencies
2023-06-26 18:56:18 +12:00
toofar 937cfa41ad Pin for 3.8 and changelog URL for jaraco.functools 2023-06-26 18:01:15 +12:00
qutebrowser bot faa8091c65 Update dependencies 2023-06-26 04:22:20 +00:00
Florian Bruhin 48ea86fcb5 Rename some qt6 FIXMEs
Not relevant for v3 and qt6
2023-06-25 23:32:59 +02:00
Florian Bruhin 036af85199 Revert "Work around Python 3.12 test issues"
Fixed with newest PyQt snapshot.
This reverts commit c62e9aba5b.
2023-06-25 21:48:12 +02:00
Florian Bruhin 28f437c214 Revert "tests: Add a test for implicit Qt init"
This reverts commit 220337f870.
Has various side-effects during tests due to global state.
2023-06-24 20:44:53 +02:00
Florian Bruhin 408e16917e ci: Kill remaining qt6-v2 references 2023-06-24 01:05:25 +02:00
Florian Bruhin 220337f870 tests: Add a test for implicit Qt init 2023-06-23 23:28:57 +02:00
Florian Bruhin ef3d5084e8
Merge pull request #7749 from qutebrowser/update-dependencies
Update dependencies
2023-06-19 17:35:24 +02:00
Florian Bruhin a7e6242fd6 Update changelog URLs 2023-06-19 17:35:10 +02:00
qutebrowser bot a7282f6235 Update dependencies 2023-06-19 04:22:17 +00:00
Florian Bruhin 080ce36451 tests: Update warning ignores 2023-06-16 11:50:07 +02:00
Florian Bruhin e97bcff9dc scripts: Allow --pyqt-version in mkvenv with --pyqt-type wheels
To adjust which version to use for the smoketest
2023-06-15 16:30:24 +02:00
Florian Bruhin 89b81c4b3a tests: Widen xfail range for ELF to Qt 6.6+ 2023-06-15 16:24:21 +02:00
Florian Bruhin 665cbfc45a scripts: Check if PyQt wheels directory exists 2023-06-15 15:41:59 +02:00
Florian Bruhin 336da49aa8 Update docs 2023-06-15 00:43:37 +02:00
Florian Bruhin e8ed81d9e5
Merge pull request #7741 from qutebrowser/better-qt-wrappers
Resolve remaining Qt wrapper selection UX issues
2023-06-14 20:04:52 +02:00
Florian Bruhin d6af539454 qt: Use warning instead if Qt was already imported 2023-06-14 19:09:58 +02:00
Florian Bruhin 69c21a5751 qt: Use outcomes dict instead of attributes for SelectionInfo 2023-06-14 19:03:34 +02:00
Florian Bruhin 54aef75a29 qt: Sort wrappers in SelectionInfo correctly 2023-06-14 19:03:34 +02:00
Florian Bruhin 9b34a165f5 qt: Improve backendproblem messages 2023-06-14 19:03:34 +02:00
Florian Bruhin 5be71197d1 qt: Allow opt-in to autoselection and enable tests 2023-06-14 19:03:34 +02:00
Florian Bruhin 030712b36a qt: Don't call _set_globals if wrapper is None 2023-06-13 20:19:38 +02:00
Florian Bruhin b9253c90fe qt: Improve SelectionInfo.__str__() 2023-06-13 20:13:06 +02:00
Florian Bruhin ca4cd3a24f qt: Refactor SelectionInfo.set_module_error 2023-06-13 19:56:21 +02:00
Florian Bruhin 92243041c2 qt: Stop trying other wrappers on ImportError 2023-06-13 19:51:22 +02:00
Florian Bruhin 1313704802 qt: Add wrapper info to backendproblem messages 2023-06-13 19:32:50 +02:00
Florian Bruhin 0175c00d0f qt: Make sure to undo all global state changes 2023-06-13 18:53:00 +02:00
Florian Bruhin 13c412f13e qt: Fix lint 2023-06-13 18:53:00 +02:00
Florian Bruhin d9543de98c qt: Fix test_version 2023-06-13 17:02:54 +02:00
Florian Bruhin 63e96fa3fe qt: Split machinery.init() and init_explicit() into two functions
This also moves the checking for sys.modules into _select_wrapper.
2023-06-13 17:01:15 +02:00
Florian Bruhin 322834d0e6 qt: Integrate machinery into earlyinit properly
This means we will now get errors via the usual mechanisms
(e.g. a Tk error dialog) when all Qt wrappers failed to import.

We also add information about the picked Qt wrapper (and any errors)
to the error message.
2023-06-13 16:36:03 +02:00
Florian Bruhin 7691556ea1 qt: Fix tests for SelectionInfo changes 2023-06-13 15:21:41 +02:00
Florian Bruhin 1cf9d68aba qt: Fix lint 2023-06-13 15:21:28 +02:00
Florian Bruhin 9588e0aec0 qt: Treat empty QUTE_QT_WRAPPER as unset 2023-06-13 12:18:44 +02:00
Florian Bruhin a25e8a0987 qt: Less stringly-typed API for SelectionInfo 2023-06-13 12:18:39 +02:00
Florian Bruhin 83bef2ad4b qt: Add machinery.SelectionInfo 2023-06-13 12:09:48 +02:00
Florian Bruhin fe994ef149 qt: Update mypy constants 2023-06-13 00:02:32 +02:00
Florian Bruhin 8fdb5b09be qt: Fix typing/lint 2023-06-12 23:59:11 +02:00
Florian Bruhin eeb39d6330 qt: Add tests for machinery 2023-06-12 23:34:27 +02:00
Florian Bruhin 7fb2a2568e qt: Small machinery fixups 2023-06-12 23:16:17 +02:00
Florian Bruhin 89322cd9ad qt: Remove duplicate machine.PACKAGE
Contains the exact same string we have in .WRAPPER already anyways.
2023-06-12 21:42:16 +02:00
Florian Bruhin eaf71c8e41 qt: Add docstring for constants 2023-06-12 21:42:16 +02:00
Florian Bruhin 9aaf08e329 qt: Simplify qt.sip 2023-06-12 21:42:16 +02:00
Florian Bruhin 1bd60385eb qt: Add module docstrings and update lint ignores 2023-06-12 21:42:16 +02:00
Florian Bruhin cbea801781 qt: Call machinery.init() in qt packages 2023-06-12 21:42:16 +02:00
Florian Bruhin f65a692320 qt: Initial support for a --qt-wrapper argument 2023-06-12 21:42:16 +02:00
Florian Bruhin 4bf1e69783
Merge pull request #7740 from qutebrowser/update-dependencies
Update dependencies
2023-06-12 10:35:52 +02:00
qutebrowser bot e502663fe3 Update dependencies 2023-06-12 04:23:46 +00:00
Florian Bruhin 70e8dc63e8 Revert "Revert "ci: Remove Python 3.12 for now""
This reverts commit ded43c57c8.

Still segfaults on exit...
2023-06-09 20:25:49 +02:00
Florian Bruhin ded43c57c8 Revert "ci: Remove Python 3.12 for now"
This reverts commit a5d6e41005.

See #7727
2023-06-09 20:06:56 +02:00
Florian Bruhin c62e9aba5b Work around Python 3.12 test issues
See #7727
2023-06-09 20:06:40 +02:00
Florian Bruhin 52c7ec57c1 Fix lint 2023-06-09 17:20:20 +02:00
Florian Bruhin 15e7d5c6b1 py312: Ignore pytest-benchmark deprecation warning
See #7727 and https://github.com/ionelmc/pytest-benchmark/issues/240
2023-06-09 15:02:30 +02:00
Florian Bruhin 0fe03ae475 Inline misc.MinimalLineEdit into statusbar.command.Command
Ever since 33088588d9,
misc.MinimalLineEdit is only used in statusbar.command.Command.

Having it separated into a mixin makes a lot of things more complicated,
and also needs pylint ignores and a hand-written superclass __init__.

This commit inlines it into statusbar.command.Command, which makes
everything a lot simpler.

It also avoids triggering a segfault in Python 3.12.0b2:
https://github.com/qutebrowser/qutebrowser/issues/7727#issuecomment-1583144545
https://www.riverbankcomputing.com/pipermail/pyqt/2023-June/045325.html
2023-06-09 14:19:38 +02:00
Florian Bruhin 2c61ec38b8 py312: Ignore pytest ast warnings
See https://github.com/pytest-dev/pytest/issues/10977
and #7727
2023-06-08 17:41:10 +02:00
Florian Bruhin 0b0401f8bb py312: Tell tox/virtualenv to upgrade pip
Otherwise we run into a Python 3.12 incompatibility with pkg_resources:
https://github.com/pypa/pip/issues/11501

Also needs PIP_REQUIRE_VIRTUALENV=0 because otherwise pip seems to
falsely assume it's installing things system-wide, weirdly.

Should probably be removed once there is a newer virtualenv, which
vendors a newer pip, which vendors a newer pkg_resources...

See #7727
2023-06-08 17:40:45 +02:00
Florian Bruhin e1d0b3c543 tests: Adjust urlmatch exception message patterns for Python 3.11.4 2023-06-08 17:17:40 +02:00
Florian Bruhin 8b058389b7 test: Adjust test_nul_bytes version check
Python 3.11.4 also got the fix backported which turns this into a SyntaxError:
https://github.com/python/cpython/pull/104195
2023-06-08 16:59:19 +02:00
Florian Bruhin f80f454704 keyutils: Work around broken Python 3.11.4 enum.Flag inversion
Take a detour via .value if on Qt 6, because Python 3.11.4 seems to be
unable to invert enum.Flag values with a mask set.

Fixes #7735

See:
- https://github.com/python/cpython/issues/105497
- https://www.riverbankcomputing.com/pipermail/pyqt/2023-June/045323.html
2023-06-08 16:47:26 +02:00
Florian Bruhin 65c14730e3 mypy: Improve Qt 5 typing in keyutils
Adjust _ModifierType to consider PyQt5's separate enum/flag classes,
which lets us get rid of some type ignores
2023-06-08 16:37:26 +02:00
Florian Bruhin 63b4b95fd3 Fix vulture 2023-06-08 14:57:10 +02:00
Florian Bruhin d4a4a9d904 nativeeventfilter: Fix lint 2023-06-08 13:09:56 +02:00
Florian Bruhin dfeebb3d24 nativeeventfilter: Improve error handling 2023-06-08 12:39:52 +02:00
Florian Bruhin 37e1fff42f nativeeventfilter: Only activate after hierarchy change 2023-06-08 12:37:29 +02:00
Florian Bruhin 9380c10f23 nativeeventfilter: Use IntEnum 2023-06-08 12:26:18 +02:00
Florian Bruhin 1af5a63bdf nativeeventfilter: Run black 2023-06-08 12:19:03 +02:00
Florian Bruhin bda7da04ff nativeeventfilter: First refinements 2023-06-08 12:18:47 +02:00
Florian Bruhin 27887e8157 nativeeventfilter: Simplify 2023-06-08 11:44:01 +02:00
Florian Bruhin 30bfd90e59 Add initial nativeeventfilter
See #7732
2023-06-08 11:39:28 +02:00
Florian Bruhin 16093eaf98 Add debug flag to log all Qt events 2023-06-07 22:02:11 +02:00
Florian Bruhin a71c25c2a0 Make herbe process error non-fatal 2023-06-05 13:02:42 +02:00
Florian Bruhin a7ad16daef notifications: Fix invalid version number construction
File "/usr/lib/python3.11/site-packages/qutebrowser/browser/webengine/notification.py", line 859, in _find_quirks
        if utils.VersionNumber.parse(ver) < utils.VersionNumber(2, 0):
                                            ^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.11/site-packages/qutebrowser/utils/utils.py", line 96, in __init__
        raise ValueError(
    ValueError: Refusing to construct non-normalized version from (2, 0) (normalized: (2,)).
2023-06-05 12:58:35 +02:00
Florian Bruhin 648d990a6c
Merge pull request #7733 from qutebrowser/update-dependencies
Update dependencies
2023-06-05 10:03:08 +02:00
qutebrowser bot daee26c7a7 Update dependencies 2023-06-05 04:22:14 +00:00
toofar 1f6621533f Update changelog for #7723 2023-06-04 12:08:27 +12:00
toofar 5dd637f444 Merge pull request #7723 from ralsina/use-netloc-in-qute-pass
Use url netloc as a candidate key for qute-pass
2023-06-04 12:04:08 +12:00
Florian Bruhin a73fee8045 Add settings to customize tooltips
See #7706
2023-06-04 00:57:36 +02:00
Florian Bruhin 368061dc3d Merge branch 'update-dependencies' 2023-05-31 15:49:46 +02:00
Florian Bruhin e7723c9f25 Fix regex 2023-05-31 15:49:41 +02:00
Florian Bruhin 818a133d91 tests: Make sure QNetworkDiskCacheMetadata has a header set
Qt 6.5.1 started treating the absence of a header as the cache entry
being corrupted...

https://bugreports.qt.io/browse/QTBUG-111397
https://codereview.qt-project.org/c/qt/qtbase/+/465547
2023-05-31 14:08:50 +02:00
Florian Bruhin e65325ae4d Also skip ELF test on Qt 6.5.1
See #7624
2023-05-31 13:07:34 +02:00
Florian Bruhin a5d6e41005 ci: Remove Python 3.12 for now
See #7727
2023-05-31 13:00:24 +02:00
Florian Bruhin c247634066 ci: Fix broken Docker condition 2023-05-31 12:56:33 +02:00
Florian Bruhin e70f5b0318 Merge branch 'process-message-improvements' 2023-05-31 12:23:33 +02:00
Florian Bruhin feae08cbc2 Skip process message test on Windows 2023-05-31 12:23:09 +02:00
Florian Bruhin d7d1293569 ci: Fix pip installs for docker 2023-05-31 12:18:57 +02:00
Florian Bruhin 68e61a239d ci: Ignore spurious QPainter messages 2023-05-31 12:08:10 +02:00
Florian Bruhin 839c8b6fe9 ci: Keep QtWebKit on life support, part 2
Since Archlinux upgraded to Python 3.11, we need to downgrade Python
to 3.10 too, and install tox via pip instead.

This starts becoming somewhat questionable, but if this approach still
does indeed work, let's go for it.
2023-05-31 11:22:14 +02:00
Roberto Alsina a31b654252 Use url netloc as a candidate key for qute-pass 2023-05-30 19:13:59 -03:00
Florian Bruhin 58436a2955 Fix lint/tests 2023-05-29 13:56:04 +02:00
qutebrowser bot d907ac795b Update dependencies 2023-05-29 04:23:35 +00:00
Florian Bruhin 5cef49ff30 Improve process output in case of signals
See https://www.reddit.com/r/qutebrowser/comments/13tqp55/command_crashed_see_process_for_details/
2023-05-28 18:29:19 +02:00
Florian Bruhin c41f152fa5 Show PID in :process error message
See https://www.reddit.com/r/qutebrowser/comments/13tqp55/command_crashed_see_process_for_details/
2023-05-28 13:02:48 +02:00
toofar f26ea37c41
Merge pull request #7712 from qutebrowser/update-dependencies
Update dependencies
2023-05-22 19:35:35 +12:00
qutebrowser bot 6d574f7a4e Update dependencies 2023-05-22 04:22:20 +00:00
Florian Bruhin 04c64b7430
Merge pull request #7700 from qutebrowser/update-dependencies
Update dependencies
2023-05-15 10:08:29 +02:00
qutebrowser bot 38dff9ab79 Update dependencies 2023-05-15 04:22:29 +00:00
toofar bb302db71d
Merge pull request #7694 from qutebrowser/update-dependencies
Update dependencies
2023-05-08 17:21:20 +12:00
qutebrowser bot 076a6fcb90 Update dependencies 2023-05-08 04:24:55 +00:00
Florian Bruhin 0e41c1efb4
Merge pull request #7687 from qutebrowser/update-dependencies
Update dependencies
2023-05-08 00:17:13 +02:00
toofar 64811478a3 Manually bump flask and werkzeug to fix cookie issue
These tests were failing on webkit due to cookies not getting set (they
made a change recently to fix a security issue around cookies and must
have messed something up)

  tests/end2end/test_invocations.py::test_cookies_store
  tests/end2end/features/test_private_bdd.py::test_make_sure_private_data_is_not_cleared_when_closing_a_private_window_but_another_remains
2023-05-07 14:56:50 +12:00
toofar 8168fb983e update link_pyqt for tox 4
Although we updated the tox requirements files for tox4 in December, it
looks like the docker containers (or at least the one(s) that call this
script) are still using tox3. `.tox-config1` isn't written anymore with
tox4 (although my git-fu isn't strong enough to find the commit that
removed it).

The "Rebuild Docker CI images" run 912 was the last to have tox 3.26.0-2
and run 913 had version 4.4.12-1.

I'm not sure the new change does the same thing as whatever the old code
did. I honestly have no idea why we can't just follow the python symlink
and have to go to a config file. In what case does the python binary not
link to the system one?

In addition to this `.tox-info.json` file there is also the more
standard `pyvenv.cfg` file. I would prefer to use that over the tox
thing as generally I find tox to be a high barrier of entry for
contributors. But in that case the pyvenv one doesn't seem to be well
documented either...

Anyway, if anyone knows any cases where following the symlink of the
python in the venv isn't reliable that would be great. Because that
seems like the simpler method.
2023-05-07 13:49:19 +12:00
toofar 8b2b4fc61e Flask updates, pin for py37 and add blinker
Pin Flask and Werkzeug for py3.7
They've removed compatibility upstream.
Added example to readme file because I had to go dig for one in the
commit history.
Add blinker to changelog URLs as it's a required dependency of Flask
now.
2023-05-07 12:29:15 +12:00
qutebrowser bot 8a59762e04 Update dependencies 2023-05-01 04:23:51 +00:00
Florian Bruhin 346a39ba14
Merge pull request #7674 from qutebrowser/update-dependencies
Update dependencies
2023-04-24 13:12:50 +02:00
qutebrowser bot 120e1efed5 Update dependencies 2023-04-24 04:24:26 +00:00
Florian Bruhin 059c6fdc75 Update docs 2023-04-22 22:45:50 +02:00
toofar caee222ceb
Merge pull request #7670 from qutebrowser/update-dependencies
Update dependencies
2023-04-22 16:36:56 +12:00
toofar d4cafc0019
Merge pull request #7672 from illfygli/master
Add `utm_name` to URL params that are stripped
2023-04-18 22:22:08 +12:00
ugla d568ce4c72
Add `utm_name` to URL params that are stripped 2023-04-18 11:24:41 +02:00
qutebrowser bot 88985aeaa0 Update dependencies 2023-04-17 04:21:54 +00:00
Florian Bruhin 5c7741a403
Merge pull request #7665 from qutebrowser/update-dependencies
Update dependencies
2023-04-14 21:34:18 +02:00
Florian Bruhin 06c5de554b ci: Decrease time limit again
Was due to https://github.com/pytest-dev/pytest/issues/10896
2023-04-14 21:04:12 +02:00
Florian Bruhin 49048489c3 Revert "pytest: Ignore Python 3.12 addDuration warning"
This reverts commit ee40046faf.
2023-04-14 21:02:47 +02:00
qutebrowser bot b169ace4d2 Update dependencies 2023-04-14 18:57:08 +00:00
Florian Bruhin ee40046faf pytest: Ignore Python 3.12 addDuration warning
See https://github.com/pytest-dev/pytest/issues/10875
2023-04-11 16:29:50 +02:00
Florian Bruhin e7295740ee tests: Fix broken mock assertions
Uncovered in Python 3.12
2023-04-11 15:29:41 +02:00
Florian Bruhin 5d890f14d0 tests: Handle Python 3.12 with NUL bytes config.py 2023-04-11 15:29:25 +02:00
Florian Bruhin 6e018fe2ab ci: Test a bigger sample of Python versions
- Make sure we still test Python 3.7 and 3.8 after dropping old PyQt
  versions in c5a51eb0bc
- Keep a modern Python version (3.11) with Qt 5 around, however
- Make sure we still test Python 3.10 too
- Also start testing the Python 3.12 alpha
2023-04-11 15:21:40 +02:00
Florian Bruhin 6f5de192e0 ci: Install libxcb-cursor
See https://codereview.qt-project.org/c/qt/qtbase/+/325414
2023-04-11 14:53:17 +02:00
Florian Bruhin 986348acb9 Revert "ci: Disable broken Qt 6.5"
This reverts commit 681f7ffc57.
2023-04-11 14:53:02 +02:00
Florian Bruhin 681f7ffc57 ci: Disable broken Qt 6.5
See #7624
2023-04-11 13:55:06 +02:00
Florian Bruhin 950d55002e ci: Raise time limit even more
Apparently Windows CI is real slow on GitHub currently...
2023-04-10 23:28:22 +02:00
Florian Bruhin 30e70803d0 ci: Add PyQt 6.5
See #7624
2023-04-10 23:25:15 +02:00
Florian Bruhin 39b6a1e946 ci: Properly raise time limits
CodeQL only needs about 7 minutes, but Windows needs >45
2023-04-10 22:20:19 +02:00
Florian Bruhin 764dbfd008
Merge pull request #7660 from qutebrowser/dependabot/github_actions/peter-evans/create-pull-request-5
build(deps): bump peter-evans/create-pull-request from 4 to 5
2023-04-10 21:09:18 +02:00
Florian Bruhin f6f29692e4 Revert "Ignore pylint invalid-name false-positives"
This reverts commit 485f1c5fbc.
2023-04-10 21:07:57 +02:00
Florian Bruhin 98f25a6dbb
Merge pull request #7655 from qutebrowser/update-dependencies
Update dependencies
2023-04-10 21:07:18 +02:00
Florian Bruhin 055224cb8d ci: Bump tests timeout once again
Looks like 45mins is too tight for GHA on Windows with heavy load...
2023-04-10 21:05:53 +02:00
dependabot[bot] 106a71f314
build(deps): bump peter-evans/create-pull-request from 4 to 5
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 4 to 5.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v4...v5)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-10 19:01:49 +00:00
qutebrowser bot 734ff1c176 Update dependencies 2023-04-10 04:21:37 +00:00
Florian Bruhin 3e4d021070 tests: Fix relative URL for caret test
Similar issue as with ab7245732e
2023-04-07 15:45:20 +02:00
Florian Bruhin 3e4833da6e Update chromium version info 2023-04-07 15:36:03 +02:00
Florian Bruhin 54026a3217 tests: Ignore another Qt 6.5 debug message
See https://github.com/qutebrowser/qutebrowser/issues/7624
2023-04-06 22:55:53 +02:00
Florian Bruhin 04dad0c789
Merge pull request #7640 from qutebrowser/update-dependencies
Update dependencies
2023-04-04 08:33:38 +02:00
Florian Bruhin 72c38a8e19 tests: Remove old pytest-instafail/hypothesis filterwarnings 2023-04-03 08:22:45 +02:00
qutebrowser bot 9ff100f0d5 Update dependencies 2023-04-03 04:24:13 +00:00
Florian Bruhin fd4217ffd2 tests: Make download error more forgiving
For unknown reasons, on nightly CI we now get TWO errors:

<qutebrowser.browser.webkit.certificateerror.CertificateErrorWrapper errors=['NoPeerCertificate', 'SelfSignedCertificate'] string='The peer did not present any certificate\nThe certificate is self-signed, and untrusted'>
2023-03-29 15:15:11 +02:00
Florian Bruhin 293a993b6b build_release: Also ignore GpuChannelMsg_CreateCommandBuffer for Qt 5
Looks like we have some failing smoke tests with:

[6636:16643:0329/041427.206197:ERROR:command_buffer_proxy_impl.cc(141)] ContextResult::kTransientFailure: Failed to send GpuChannelMsg_CreateCommandBuffer.
2023-03-29 10:28:30 +02:00
toofar c5803587c1 tests: Add text content to another HTML file
I saw this test fail on windows at some point with what looked like the
same issue. (Couldn't find an element to click.)

ref; #7621
2023-03-25 18:38:27 +13:00
toofar cb0b51c094 tests: wait for flaky iframes to load via JS
TL;DR: I think I stabilized a couple of hinting iframe tests and applied
that change to all the iframe usages in the end2end tests in the hopes
that it would resolve some other flaky tests.

I was facing some tests that hinted elements in iframes failing
intermittently recently. They were most consistently failing on the
windows runner. This is similar to the trend described in the comment
linked from #1525.

The tests failing recently where:

    tests (py39-pyqt515, windows-2019, 3.9)
    test_using_hintfollow_inside_an_iframe
    test_using_hintfollow_inside_an_iframe_button

    tests (py311-pyqt515, ubuntu-20.04, 3.11)
    test_using_hintfollow_inside_an_iframe
    test_using_hintfollow_inside_an_iframe_button

They are failing because hints don't get generated for the elements in
the iframe. I can see hints do get generated for the iframe itself
though.
Examining the logs in 5.15 it seems that there is a
`cur_load_finished(True) (tab *)` log line after we run :hint. I suspect
that this is the load finished signal for the iframe.
I attempted to change the bdd open_path function to wait for the current
message it's looking for and then additionally look for that
cur_load_finished signal, but then it starts failing locally when the
iframe load signal actually comes before the parent frame one. Just
looking for the cur_load_finished signal itself also always found it
immediately ("already found"), probably from the parent frame.

So instead of trying to deal with that indeterminate ordering or
trying to change the signals to say what frame they are coming from, I
added javascript to all the pages used in iframes that run on load, and
changed all the tests to watch for log messages from the JS.

It's not the most maintainable solution, perhaps if we generated our
test files with jinja we could have some "subframe loaded" boilerplate,
get a message to log from a query param, look at metadata from test
files for the open_path checking etc.

I then searched for all the iframe usages in the test data and applied
that change to all of those files and all the tests that used them. A
few of those tests also had `flaky` annotations on them. I removed those
annotations for now in the hopes that there were affected by the same
problem. And that I actually managed to work around it correctly.

ref: #7621
2023-03-25 18:37:58 +13:00
Florian Bruhin e03b81cb35 doc: Add more changelog entries for Qt 6 stuff 2023-03-24 12:56:27 +01:00
Florian Bruhin 41ebbc0d73 scripts: Fix indent 2023-03-23 22:17:17 +01:00
Florian Bruhin dabd8ede86 scripts: Use proper Qt version for smoke test
See https://github.com/qutebrowser/qutebrowser/issues/7202#issuecomment-1481877459
2023-03-23 22:01:48 +01:00
Florian Bruhin fe6687f2ea tests: Stabilize "Hinting an input after undoing a tab close"
Without this wait, the test is flaky, because sometimes the keys are pressed
before qutebrowser has entered insert mode.

When running:

    tox -e py311-pyqt64 -- tests/end2end/features/test_hints_bdd.py -k undoing --count 100

around 30% of the runs, we get:

============================== :click-element id qute-input-existing ==============================

[...]

----> Waiting for 'command called: *' in the log
[...]
17:56:54.042 DEBUG    commands   command:run:549 Calling qutebrowser.components.misccommands.click_element(<qutebrowser.browser.webengine.webenginetab.WebEngineTab tab_id=197 url='http://localhost:50977/data/hints/link_input.html'>, 'id', 'qute-input-existing', target=<ClickTarget.normal: 1>, force_event=False, select_first=False)
17:56:54.043 DEBUG    ipc        ipc:_get_socket:373 In _get_socket with None socket!
----> found it

============================== :fake-key -g something ==============================

[...]

----> Waiting for '[*] contents: existingsomething' in the log
17:56:54.062 DEBUG    modes      modeman:_handle_keypress:290 got keypress in mode KeyMode.normal - delegating to <qutebrowser.keyinput.modeparsers.NormalKeyParser>
[...]
17:56:54.111 DEBUG    modes      modeman:_handle_keypress:290 got keypress in mode KeyMode.normal - delegating to <qutebrowser.keyinput.modeparsers.NormalKeyParser>
[...]
17:56:54.112 DEBUG    modes      modeman:_handle_keypress:290 got keypress in mode KeyMode.normal - delegating to <qutebrowser.keyinput.modeparsers.NormalKeyParser>
[...]
17:56:54.113 DEBUG    commands   command:run:535 command called: quickmark-save
[...]
17:56:54.143 DEBUG    webview    webenginetab:_js_cb_single:766 Got element from JS: {'attributes': {'id': 'qute-input-existing', 'value': 'existing'}, 'caret_position': 0, 'class_name': '', 'id': 0, 'is_content_editable': False, 'outer_xml': '<input id="qute-input-existing" value="existing">', 'rects': [{'bottom': 143, 'height': 21, 'left': 8, 'right': 166, 'top': 122, 'width': 158}], 'tag_name': 'INPUT', 'text': '', 'value': 'existing'}
17:56:54.143 DEBUG    webelem    webelem:click:422 Clicking <qutebrowser.browser.webengine.webengineelem.WebEngineElement html='<input id="qute-input-existing" value="existing">'> with click_target ClickTarget.normal, force_event False
17:56:54.143 DEBUG    webelem    webelem:is_editable:257 Checking if element is editable: <qutebrowser.browser.webengine.webengineelem.WebEngineElement html='<input id="qute-input-existing" value="existing">'>
17:56:54.143 DEBUG    webelem    webelem:click:434 Clicking via JS focus()
17:56:54.144 DEBUG    webelem    webelem:is_editable:257 Checking if element is editable: <qutebrowser.browser.webengine.webengineelem.WebEngineElement html='<input id="qute-input-existing" value="existing">'>
17:56:54.144 DEBUG    modes      modeman:enter:366 Entering mode KeyMode.insert (reason: clicking input)

With the change, the test passes 100/100 times.
2023-03-23 18:10:22 +01:00
Florian Bruhin 7c222c5b19 Merge branch 'update-dependencies' 2023-03-23 17:34:39 +01:00
Florian Bruhin dbc7871b47 Update changelog URLs 2023-03-23 17:32:39 +01:00
Florian Bruhin 55a72095cd mypy: Update to new ignore name 2023-03-23 17:32:39 +01:00
Florian Bruhin 485f1c5fbc Ignore pylint invalid-name false-positives
See https://github.com/PyCQA/pylint/issues/8487
2023-03-23 17:32:39 +01:00
Florian Bruhin 0510ffcfa9 tests: Remove before_first_request for webserver_sub_ssl
This was first introduced in adbdfcbad3,
most likely because we got logging from the built-in Werkzeug webserver.

It doesn't seem to be needed anymore, possibly since
41c4ee3e2f where we started using CherryPy
for the SSL server too.

This should fix nighly bleeding tests, because the before_first_request
decorator got removed in Flask:

https://github.com/pallets/flask/pull/4621
https://github.com/pallets/flask/pull/4995
2023-03-20 17:23:55 +01:00
Florian Bruhin e16eebc975 docs: Add Matrix theme
See https://www.reddit.com/r/qutebrowser/comments/11w1agq/matrix_theme/
2023-03-20 17:08:20 +01:00
qutebrowser bot 397818cfa3 Update dependencies 2023-03-20 04:23:50 +00:00
toofar 294e73660c Re-focus tabs created from :undo
There's some weird issue with Qt6.4 and 6.5 where a webengine view gets
its widget swapped out when it gets history deserialized into it. While
it's swapping widgets it has no so the focus gets passed to some other
widget should never even have focus.

There's probably more comprehensive ways we could handle this, by
overriding the WebEngineView layout, or by overriding focusNextPrevChild
on the parent to put out own logic into the "child is going, pass focus
to parent" logic chain.

But all that seems like a bit too much of a headache for this very
focussed issue. We want the new tab to get focus, so lets re-focus it.
Technically we could just focus the last tab that we open, if we are
undoing multiple, but the existing logic is to open each of them in turn
as foreground tabs and this reinforces that.

Closes: #7623
2023-03-19 13:23:18 +13:00
toofar cb9f3fa141 tests: skip special URL deserializing tests on win
Not sure why its failing on windows, but it only really needs to run in
one environment anyway.
Previously this was using chrome://gpu but that was failing on CI due to
it invoking some vulkan stuff the didn't work without a GPU. I changed
it to chrome://sandbox/ for no good reason, but it seems to be working
fine on ubuntu at least.

Follow up to 151d808940
2023-03-18 19:13:26 +13:00
toofar c55f899c83 tests: add some text to another test HTML file
This one is for 6.5. Interesting that it was fine on 6.4.

I haven't gone and added text to all the test file because I'm hoping
it'll be something that upstream addresses in short order. So I'm only
adding text to files used by failing tests.

See d413b87c3f #7621 and #7624
2023-03-18 17:32:48 +13:00
toofar 2d6d602f29 ci: update cov test run but keep it disabled
Error: qutebrowser/browser/webengine/certificateerror.py has 90.91% line and 50.00% branch coverage!
    Error: qutebrowser/browser/webengine/darkmode.py has 96.88% line and 100.00% branch coverage!
    Error: qutebrowser/keyinput/basekeyparser.py has 97.59% line and 100.00% branch coverage!
    Error: qutebrowser/keyinput/keyutils.py has 92.64% line and 96.30% branch coverage!
    Error: qutebrowser/utils/debug.py has 94.51% line and 92.19% branch coverage!
    Error: qutebrowser/utils/qtutils.py has 98.67% line and 96.74% branch coverage!
    Error: qutebrowser/utils/usertypes.py has 99.20% line and 96.30% branch coverage!
    Error: qutebrowser/utils/version.py has 97.66% line and 97.83% branch coverage!

Maybe we should open an issue to get them back up.
2023-03-18 17:30:26 +13:00
toofar fa70b4a319 tests: ignore new blink "message rejected" log 2023-03-18 17:29:25 +13:00
toofar f68798a081 ci: attempt to make the qt6 docker run work
On CI were were getting "Could not import sip" because link_pyqt was
looking for PyQt5.sip.
I made that look at QUTE_QT_WRAPPER since that's being set already on
tox.ini
There are probably a few other changes around link_pyqt and the makefile
etc we need to change when we switch the default wrapper.

I overrode the default `py` tox environment with py-qt6 to override
those wrapper related variables. I probably could have done something
sneaky with curly braces to make it so we don't have to add a few more
lines to the file. But in my opinion in config file is far to obfuscated
and hard to maintain already.

I changed the docker file to call the new py-qt6 env if it's a qt6
container. I'm not 100% sure that is required though since there is also
a tox invocation in the GH action definition, maybe that overrides the
container entrypoint? Also changed the indentation in the dockerfile
template a bit to make it easier to see where the conditionals start and
end.

Speaking of which I changed the matrix definition and tox invocation to
match a later one to hopefully make it so we can invoke different tox
environments in the containers without having to rebuild the containers.
Not sure I did that right, I'll see soon.

I added the unstable-qt6 container generation line so we can use it in
the future, and to match the not-qt6 one. I'm not switching to that in
CI though because the pyqt used by that is broken at the moment
(ref https://www.riverbankcomputing.com/pipermail/pyqt/2023-March/045214.html)

Also fixed the vim modeline in generate.py so my syntax highlighting
works.
2023-03-18 17:29:25 +13:00
toofar 151d808940 change "special url" in tests to avoid vulkan error
On GH actions I'm seeing an "unexpected line" failure around creating a
vulkan context when loading chrome://gpu

    ERROR tests/end2end/features/test_tabs_bdd.py::test_cloning_a_tab_with_a_special_url - end2end.fixtures.testprocess.InvalidLine:
    1829
    Error: vkCreateInstance failed with VK_ERROR_INCOMPATIBLE_DRIVER
    1830
        at CheckVkSuccessImpl (../../../3rdparty/chromium/third_party/dawn/src/dawn/native/vulkan/VulkanError.cpp:88)
    1831
        at CreateVkInstance (../../../3rdparty/chromium/third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:360)
    1832
        at Initialize (../../../3rdparty/chromium/third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:235)
    1833
        at Create (../../../3rdparty/chromium/third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:165)
    1834
        at operator() (../../../3rdparty/chromium/third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:420)

I'm not sure its actually failing the test, we are just seeing the error
in the logs and flagging it.
Instead of adding the logs to an ignore list I'm going to switch the
page we use so that if the error comes up for real we'll be sure to see
the logs.
2023-03-18 16:47:12 +13:00
toofar d413b87c3f Add some text to test HTML pages.
With 6.4 and 6.5 it looks like pages without text on them only render
after a delay (on the order of hundreds of milliseconds).

ref: #7621
2023-03-18 16:47:12 +13:00
toofar 2b67070d16 ci: enable pyqt6.4 and py3.11 test matrix entries
6.4 tests should be passing now. 6.5 is still waiting on PyQt on PyPI
getting fixed. That goes for kde-unstable-qt6 too as that's pulling down
6.5.

We should take the opportunity to revisit the test matrix configuration
again when we add 6.5 in there. For example py3.11 on ubuntu 20.04 is a
bit odd as it only got released last year.
2023-03-18 16:37:02 +13:00
toofar 856fe781a1 Merge remote-tracking branch 'upstream/qt6-v2' into master-qt6 2023-03-18 16:24:58 +13:00
Florian Bruhin 1c4b5cc3d2 Make vulture happy 2023-03-17 21:28:07 +01:00
Florian Bruhin de82e1a0e9 qt: Still default to PyQt5 for now
See #7202
2023-03-17 21:25:39 +01:00
Florian Bruhin 4793070db3 Merge branch 'qt6-v2' into master-qt6 2023-03-17 20:30:13 +01:00
Florian Bruhin cd5624f50a tests: Fix QApplication arguments
With Qt 6.5, QtWebEngine complains and aborts when it gets an empty argv:
https://bugreports.qt.io/browse/QTBUG-110157
https://codereview.qt-project.org/c/qt/qtwebengine/+/455347
https://codereview.qt-project.org/c/qt/qtwebengine/+/457045
https://www.riverbankcomputing.com/pipermail/pyqt/2023-March/045216.html

However, our custom qapp_args override for pytest-qt *does* return [] as
argv, causing all tests using QtWebEngine to fail.

We might decide to add sys.argv[0] to the given qapp_args in pytest-qt:
https://github.com/pytest-dev/pytest-qt/issues/483

But probably this should be fixed on the application-side, so let's do
exactly that.

See #7624
2023-03-17 20:09:26 +01:00
Florian Bruhin 8227b91d28 tests: Update FIXME comment
PyQt insists using the deprecated signal overload, seemingly nothing we can do
to change that:
https://www.riverbankcomputing.com/pipermail/pyqt/2023-March/045215.html

See #7624
2023-03-17 20:08:54 +01:00
Florian Bruhin 9cb54b2099 Qt 6.5: Skip elf tests
The ELF file structure changed in a way that it seems impossible to
support reliably. Given that we have an API to get the version nowadays,
let's not bother with this. We might need to figure this out for PySide6
support, but not now.

See #7624, #3625
2023-03-17 18:07:13 +01:00
Florian Bruhin ab7245732e scripts: Patch relative links for correct doc generation
In doc/help/index.asciidoc, we have links like this:
    * link:../quickstart{outfilesuffix}[Quick start guide]

That is correct in e.g. the GitHub file structure, as those files are
stored in e.g. doc/quickstart.asciidoc indeed.

It's *no* longer true when we view the built files via qute://help,
however: There, this turns into a flat file structure, with those pages
being at qute://help/index.html and qute://help/quickstart.html,
respectively.

It looks like QtWebEngine < 6.5 did just ignore the
<a href="../quicktart.html"> and pointed from qute://help/index.html to
qute://help/quickstart.html anyways, weirdly.

With QtWebEngine 6.5, however, this is now interpreted as a link
pointing to qute://quickstart.html instead, which is clearly wrong.

Until we have a less messy doc generation (probably as part of #345),
let's just patch the link to be correct.

See #7624
2023-03-17 17:44:38 +01:00
Florian Bruhin e3d5367493 Update settings docs 2023-03-17 17:32:26 +01:00
Florian Bruhin 9b7348a880 Qt 6.5: Always use new dark mode values for newer Qt's
I don't quite understand why the value changed from #00000 to #121212
there with Qt 6.3, but it looks like the change is here to stay.

Instead of keeping #000000 the default and adding an override for every
new Qt release, let's just switch over and add an override for the old
versions (5.15 and 6.2), so this won't break again for every new release.

See #7624
2023-03-17 17:27:37 +01:00
Florian Bruhin 2d45f6f002 tests: Ignore more Qt 6.5 / debug build messages
See #7624
2023-03-17 17:27:29 +01:00
toofar 0f01027570 Override QTabBar text eilding
The fontMetrics().elidedText(...) call is copied from the base QTabBar
implementation of initStyleOption(). But here we are calling it with a
text_rect from our custom style class. In Qt6 QStyleSheetStyle no longer
calls into our custom Style class for the SE_TabBarTabText SubElement so
it ends up getting a text width from QCommonStyle which is wrong for
vertical tabs (`QCommonStylePrivate::tabLayout()` seems to transpose the
rect, maybe it thinks vertical tabs should have the text running
vertically too).

Also resolves the issue that when tabs.title.alignment is set to center
the leftmost character or two of titles wouldn't be visible when tabs
where small enough that the text got elided. Not 100% sure why but
presumably it wasn't picking up the padding etc logic in our custom
style class.

In the test I don't test the exact elided text when we don't have much
room because it might differ based on what monospace font is picked up
in the tests. So the amount elided might change. Also in the not-elided
one I'm only testing endswith() because the index should be at the start
of the string which I don't really care about.

Fixes: #7313
Fixes: #7205
2023-03-15 17:07:31 +13:00
Florian Bruhin 30125a2e2e tox: Install doc requirements for tests too
Needed so that tests generating :help docs run properly.

Follow-up to af176f749f and
bbdc83f638

(cherry picked from commit 3d56f57e50)
2023-03-14 16:36:06 +01:00
Florian Bruhin 3d56f57e50 tox: Install doc requirements for tests too
Needed so that tests generating :help docs run properly.

Follow-up to af176f749f and
bbdc83f638
2023-03-14 16:35:09 +01:00
Florian Bruhin 5149fcda2a PDF.js: Update to newer API to avoid deprecation warnings
A quick tour through the PDF.js API:

v1.0.1040 introduced the ability to pass an object to PDFView.open()
instead of passing an URL:
https://github.com/mozilla/pdf.js/pull/5254

v1.6.210 (?) renamed PDFView to PDFViewerApplication:
ffa276a182

v3.3.122 made it mandatory to pass an object (and also made originalURL
optional when doing so):
https://github.com/mozilla/pdf.js/pull/15972

We should probably properly get rid of old version support at some point
(see #7619), but until then, I *think* this approach should work with
older versions still.

Fixes #7618

(cherry picked from commit 924a7a5907)
2023-03-14 15:58:03 +01:00
Florian Bruhin 924a7a5907 PDF.js: Update to newer API to avoid deprecation warnings
A quick tour through the PDF.js API:

v1.0.1040 introduced the ability to pass an object to PDFView.open()
instead of passing an URL:
https://github.com/mozilla/pdf.js/pull/5254

v1.6.210 (?) renamed PDFView to PDFViewerApplication:
ffa276a182

v3.3.122 made it mandatory to pass an object (and also made originalURL
optional when doing so):
https://github.com/mozilla/pdf.js/pull/15972

We should probably properly get rid of old version support at some point
(see #7619), but until then, I *think* this approach should work with
older versions still.

Fixes #7618
2023-03-14 15:00:39 +01:00
Florian Bruhin 9fdd737966 ci: Fix syntax 2023-03-14 12:10:45 +01:00
Florian Bruhin 72692f1580 ci: Switch branches for qt 6 image
Follow-up to 9d9a7b3b84 hopefully fixing CI on master
2023-03-14 12:08:37 +01:00
Florian Bruhin d2c135f031 lint: Disable B028 for tests 2023-03-14 11:59:20 +01:00
Florian Bruhin 6e48c9f1a9 Revert "lint: add stacklevel kwarg to warnings"
This reverts commit 47be6f3aeb.

This doesn't really make sense in test files, as the warning would point
inside some internal pytest code, which is not helpful.

Instead, let's just disable the corresponding flake8 warning in tests.
2023-03-14 11:57:24 +01:00
toofar 9d9a7b3b84 CI: generate archlinux-webengine-qt6 docker image
I'm not 100% sure we need this. But there is an existing test matrix
that I want to active for now. We can review all the configuration later
I guess?
2023-03-14 11:20:54 +13:00
toofar 09761e2556 CI: generate archlinux-webengine-qt6 docker image
I'm not 100% sure we need this. But there is an existing test matrix
that I want to active for now. We can review all the configuration later
I guess?
2023-03-14 11:07:31 +13:00
Florian Bruhin da7bde4f1b Release v2.5.4 2023-03-13 22:07:16 +01:00
toofar a8d58a8b72 Update docs/changelog 2023-03-13 11:13:14 +13:00
toofar 72d8e0bf3a Merge pull request #7612 from novel/novel-fix-sqlite-quotes
browser: history: fix queries for when DQS disabled

SQLite in FreeBSD no longer support double quotes around values in SQL queries.

ref: #7596
2023-03-13 11:12:53 +13:00
Roman Bogorodskiy d7e9a51153 browser: history: fix queries for when DQS disabled
Recently the FreeBSD port of sqlite has DQS feature disabled by default.
Without this feature enabled, it's not allowed to use double quotes
for string literals. As such quoting is used in the history.py module,
qutebrowser fails to work on such configurations.

The fix is to use single quotes instead.

ref: #7596
2023-03-12 15:42:29 +01:00
toofar b65984f920
Merge pull request #7600 from qutebrowser/update-dependencies
Update dependencies
2023-03-06 20:38:23 +13:00
qutebrowser bot 5f9bf903ec Update dependencies 2023-03-06 04:20:42 +00:00
toofar 0595d8b99f
Merge pull request #7593 from qutebrowser/update-dependencies
Update dependencies
2023-03-05 20:18:58 +13:00
toofar f069d1188b Remove pep517 changelog entry
It got split to pyproject-hooks and build. Most of our requirements
switched a while ago, pyorama was the last to do so.

ref: #7593
2023-03-05 18:32:00 +13:00
qutebrowser bot a70868a8cc Update dependencies 2023-02-27 04:20:42 +00:00
Eolien55 faf692657c misc/userscripts/ripbang: Use lite.duckduckgo
The previous way of obtaining the Bang's URL was using the
response's body, using the url atrribute of a meta tag. The way
this was handled was a bit problematic: some URLs were of the format
/l/?uddg=<URL>&<some-other-query-arguments>, while others (such as google)
is simply <URL>. This could have been fixed by using an if-else, but I
preferred another approach. Lite DuckDuckGo sends a 303 response when
using Bangs, instead of a 200 response which makes the redirect. The
location header of the 303 response is the search engine's URL, so it's
easy to implement this function, working for both afformentioned URL
templates.
2023-02-26 15:47:13 +01:00
toofar 8faa40dd29
Merge pull request #7588 from qutebrowser/update-dependencies
Update dependencies
2023-02-26 14:23:09 +13:00
toofar 47be6f3aeb lint: add stacklevel kwarg to warnings
flake8-bugbear B028 No explicit stacklevel keyword argument found. The
warn method from the warnings module uses a stacklevel of 1 by default.
This will only show a stack trace for the line on which the warn method
is called. It is therefore recommended to use a stacklevel of 2 or
greater to provide more information to the user.

Semgrep helped:

    semgrep --lang=py -e 'warnings.warn($ARG)' --replacement 'warnings.warn($ARG, stacklevel=2)' $FILES -a
    semgrep --lang=py -e 'warnings.warn($ARG1, $ARG2)' --replacement 'warnings.warn($ARG1, $ARG2, stacklevel=2)' $FILES -a

Although it did lose the f-string on one of them.
2023-02-26 13:39:35 +13:00
qutebrowser bot c3f09f61b8 Update dependencies 2023-02-20 04:21:03 +00:00
Florian Bruhin f8c4a6ac3f Release v2.5.3 2023-02-17 11:13:45 +01:00
Florian Bruhin bb97af74fb Update user agent completions 2023-02-17 10:55:03 +01:00
Florian Bruhin efb0cbb4a7 Add missing return after PAC parsing exception
Otherwise, 'pacscript' in the line below would cause a NameError
2023-02-14 19:12:54 +01:00
Florian Bruhin 934e87c133 Update changelog URLs 2023-02-14 18:57:33 +01:00
Florian Bruhin d3c16d993f mypy: Remove now-unneeded ignores 2023-02-14 18:57:20 +01:00
qutebrowser bot 6b095720f5 Update dependencies 2023-02-13 04:21:48 +00:00
toofar 1e67b26df1
Merge pull request #7576 from qutebrowser/update-dependencies
Update dependencies
2023-02-07 20:16:21 +13:00
Florian Bruhin 6e491f23cd
Merge pull request #7577 from qutebrowser/dependabot/github_actions/docker/build-push-action-4
build(deps): bump docker/build-push-action from 3 to 4
2023-02-06 19:12:35 +01:00
dependabot[bot] 370b191615
build(deps): bump docker/build-push-action from 3 to 4
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3 to 4.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-06 18:09:26 +00:00
Florian Bruhin 2c4f662513 pylint: Enable new extensions
See https://pylint.pycqa.org/en/latest/whatsnew/2/2.16/index.html#extensions
2023-02-06 11:44:13 +01:00
Florian Bruhin 3d3e4dc554 Update changelog URLs 2023-02-06 11:33:14 +01:00
toofar 86f7554a7a lint: pointless-exception-statement
It does actually raise an AssertionError as a side effect
2023-02-06 19:50:22 +13:00
toofar ce134c9662 lint: superfluous-parens and useless-suppression
Unnecessary parens after '=' keyword
2023-02-06 19:50:22 +13:00
toofar 9ec6d44910 lint: consider-using-augmented-assign
Not a huge fan of this suggestion. I don't think it adds anything apart
from a reliance on a language feature that isn't used much in this
codebase. I don't want to have to explain to inexperienced devs that
they have to play a bit of code golf instead of focussing on what
actually matters.
2023-02-06 19:50:22 +13:00
toofar bbaffa3e34 lint: no-else-raise
Unnecessary "else" after "raise", remove the "else" and de-indent the code inside it
2023-02-06 19:50:22 +13:00
toofar ff8dbc4580 lint: broad-exception-raised
Mostly pretty lazy fixes. Most of the places in the tests we were
already matching on error message, a couple of places we weren't. The
tick-tock one was the only one that wasn't being used right where it was
raised.

Some of them I just changed to RuntimeError because it was shorter than
adding the pylint directive.
2023-02-06 18:53:56 +13:00
qutebrowser bot 7dacc89d2a Update dependencies 2023-02-06 04:22:25 +00:00
toofar ad24727854
Merge pull request #7567 from qutebrowser/update-dependencies
Update dependencies
2023-02-05 19:43:08 +13:00
toofar 560f3ab756 unpin astroid
Looks like the upstream bug is fixed now.

I didn't run recompile-requirements because it requires py3.7 for the
pylint file and I don't have that. The robot will run overnight anyway
(and pick up a new pylint release)

ref: 085a7956eb
2023-02-05 18:48:59 +13:00
toofar 35daf8e783 update changelog for sphinxcontrib-applehelp again 2023-02-03 07:38:50 +13:00
qutebrowser bot 059b806109 Update dependencies 2023-01-30 04:22:10 +00:00
Florian Bruhin f4f5ca2663 Fix missing raw string prefix 2023-01-29 15:43:08 +01:00
Florian Bruhin 7b53f64814 Update homebrew instructions 2023-01-27 09:27:52 +01:00
Florian Bruhin b8b18ce51a Update donation infos, add Liberapay
See #7264 and https://listi.jpberlin.de/pipermail/qutebrowser/2023-January/000925.html
2023-01-25 11:57:56 +01:00
toofar f220fd2744
Merge pull request #7553 from qutebrowser/update-dependencies
Update dependencies
2023-01-24 00:22:00 +13:00
toofar a5a30aef9f Reduce hypothesis iterations for test_invariants
The text strategy doesn't perform well with long strings.

Not really related to this PR but pushing to a branch and merging is
less stressful than pushing to master.

ref: #7553#issuecomment-1399918153
2023-01-23 22:19:45 +13:00
toofar b3caf7eeeb Remove some broad exception assertions
Flake8-bugbear points out some places where we use
pytest.raises(Exception). That can swallow errors with the tests that
aren't the intended ones. I most cases we are also passing
match="some-regex" to limit the exceptions that it matches against.
There is one case where that didn't look easy to do so I subclassed
exception.

ref: #7553
2023-01-23 19:53:35 +13:00
toofar 62245cbd98 Add changelog entries for markdown-it-py for rich
Apparently commonmark is unmaintained: https://github.com/Textualize/rich/pull/2439
2023-01-23 19:36:04 +13:00
toofar 89744a9e70 Add changelog url for pyproject_hooks
This is actually the renamed pep517, but I'm not removing that as
pyorama still depends on it. Even though pyproject_hooks got added to
the pyorama requirements file, huh???
2023-01-23 19:17:28 +13:00
qutebrowser bot afc89c7f72 Update dependencies 2023-01-23 04:23:15 +00:00
Florian Bruhin bc29043853
Merge pull request #7559 from tkna91/patch-1
Fix: Add `-p` to examples
2023-01-20 18:08:22 +01:00
Takahashi, Naoki 77a5eec4eb
Fix: Add `-p` to examples
Usage of the following example is not available unless `-p` is added.

    `usage: tor_identity [-h] [-c CONTROL_PORT] [-p PASSWORD]`
2023-01-21 02:04:46 +09:00
Florian Bruhin 391623d5ec tox: Don't use environment names ending in digits
This fails now with 'failed with env name pyinstaller-32 conflicting with base python C:\hostedtoolcache\windows\Python\3.10.9\x86\python.exe'

See https://github.com/tox-dev/tox/pull/2824
2023-01-19 09:58:06 +01:00
Florian Bruhin ab258e7aab ci: Bump timeouts to 45m
Looks like 30m is a bit tight when GHA is exceptionally busy
2023-01-19 09:51:51 +01:00
Florian Bruhin 7391217594 Update changelog 2023-01-17 20:36:33 +01:00
Florian Bruhin 94a642f455 notifications: Handle UnknownObject as known error
Seems to happen instead of NoReply with some notification servers after them quitting
2023-01-17 20:36:07 +01:00
Florian Bruhin 1730fb06a8
Merge pull request #7549 from qutebrowser/update-dependencies
Update dependencies
2023-01-10 16:01:46 +01:00
Florian Bruhin d2e31aa1e6 Update changelog URLs 2023-01-10 11:31:09 +01:00
Florian Bruhin 085a7956eb requirements: Avoid astroid 2.13
See https://github.com/PyCQA/astroid/issues/1958
2023-01-10 11:30:34 +01:00
qutebrowser bot 8a4fa5b17d Update dependencies 2023-01-09 04:23:27 +00:00
Florian Bruhin e753974cb7
Merge pull request #7539 from qutebrowser/update-dependencies
Update dependencies
2023-01-02 10:24:08 +01:00
qutebrowser bot 90d79e20de Update dependencies 2023-01-02 04:21:53 +00:00
Florian Bruhin 1d81c6521c doc: Add link to Catppuccin 2023-01-01 16:40:41 +01:00
Florian Bruhin f77ccd022b Fix gathering info for nightly builds on Windows
Not quite sure why this worked with 0ff0eaa703 honestly...
2022-12-27 12:40:08 +01:00
toofar cdde18b27b
Merge pull request #7535 from qutebrowser/update-dependencies
Update dependencies
2022-12-27 09:28:39 +13:00
toofar e53aca8f2a make configtype from_str hypothesis check skip subclasses too
We are already skipping round trip tests for partial functions made in
gen_classes from compound classes (list, dict, ...). This change makes it so
we skip trying it for subclasses of those compound classes too (eg FlagList
and Padding). This is due to the test failing with the input "- A" to
FlagList.

Also switches the Dict example in the comment to be the same order as the
other two.

Some questions I don't know the answers to:

* Why are List and Dict using `json.dumps()` in `to_str()` instead of `yaml_dump()`?
* Is `to_str()` used anywhere apart from tests?
* Should we have a `to_yaml()` or just use `yaml_dump()` in the test to get back
  the original value?
2022-12-26 19:14:15 +13:00
qutebrowser bot 07272a8d01 Update dependencies 2022-12-26 04:22:30 +00:00
Florian Bruhin 57cc93da89 scripts: Fix isort changelog URL 2022-12-19 10:37:50 +01:00
qutebrowser bot 73278cc0a4 Update dependencies 2022-12-19 04:22:21 +00:00
Florian Bruhin 5ea48c6e78 scripts: Ignore CreateCommandBuffer warning for release smoketest 2022-12-16 21:05:35 +01:00
Florian Bruhin 253789d8c0 Revert "bleeding tests: Downgrade broken mesa"
This reverts commit 3f5febf227.

ec144824e8
Fixes #7509
2022-12-15 14:44:35 +01:00
Florian Bruhin 78f7784331 docker: Init archlinux keyring 2022-12-15 08:20:07 +01:00
Florian Bruhin cdef889b4c docker: Make sure to upgrade archlinux-keyring first 2022-12-15 08:16:16 +01:00
Florian Bruhin ea800ead6d doc: Add city lights theme 2022-12-14 21:36:00 +01:00
Florian Bruhin 9bf258c8f8 doc: Improve security reporting guidelines
See #7524
2022-12-13 14:24:32 +01:00
Florian Bruhin 0941c59c3b tests: Ignore another spurious Chromium error 2022-12-13 09:43:08 +01:00
Florian Bruhin fb50b8f829 Fix duplicate testcase after merge 2022-12-13 09:40:24 +01:00
Florian Bruhin b4d32e04f4 Merge branch 'master' into qt6-v2 2022-12-13 09:05:32 +01:00
Florian Bruhin 5afc8a6819 Make shellcheck happy again about password_fill
v0.9.0 seems to add SC2317 ("Command appears to be unreachable."):
https://www.shellcheck.net/wiki/SC2317

This adds various false-positives in password_fill, let's just ignore
those...

Also see: https://github.com/koalaman/shellcheck/issues/2613
2022-12-13 08:59:48 +01:00
Florian Bruhin 65440f3f1e ci: I shouldn't push changes before my first coffee 2022-12-13 08:49:06 +01:00
Florian Bruhin 549aec3100 ci: Adjust for asciidoc changes 2022-12-13 08:38:23 +01:00
Florian Bruhin 3c2d114e67
Merge pull request #7521 from qutebrowser/update-dependencies
Update dependencies
2022-12-12 14:27:36 +01:00
Florian Bruhin ac761234c9
Merge pull request #7510 from qutebrowser/qt6-delay-window-show
qt6: Delay showing windows
2022-12-12 14:23:09 +01:00
Florian Bruhin 2d7f1b6595 Update changelog URLs for tox 4 2022-12-12 13:56:30 +01:00
qutebrowser bot 7ef74dc82d Update dependencies 2022-12-12 12:52:23 +00:00
Florian Bruhin 21ac559a65 More adjustments for tox 4 subtleties 2022-12-12 13:42:32 +01:00
Florian Bruhin bbdc83f638 Fix lint/ci 2022-12-12 13:37:07 +01:00
Florian Bruhin af176f749f scripts: Use pip-installed asciidoc
Fixes #7352, closes #6793
2022-12-12 11:06:28 +01:00
Florian Bruhin b63cdf19f4 scripts: Show asciidoc errors while discovering 2022-12-12 09:51:22 +01:00
Florian Bruhin 4c9050d4be Update tox.ini syntax for tox 4 compat
See https://tox.wiki/en/4.0.3/faq.html#tox-4-changed-ini-rules
2022-12-12 09:29:56 +01:00
Florian Bruhin a00a14c87c Fix lint 2022-12-06 19:19:33 +01:00
Florian Bruhin cafbf96fdd Use QProxyStyle for TabBarStyle
Closes #812

This does *not* seem to help with the crashes in #5385 or #5124, weirdly
enough, but it still seems simpler, so why not do it.
2022-12-06 18:55:23 +01:00
Florian Bruhin 6373959824 Always delay stage 2 shutdown, not only with prompts
If we shut down qutebrowser directly, in some rare situations, we seem
to get into some trouble related to a QWidget trying to call into a
Q(Common|StyleSheet)Style at shutdown (checking the style hint
SH_Widget_ShareActivation, to figure out the palette to use when the
window is hidden, or somesuch?).

With the recent changes for #7504, those crashes suddenly started
happening much more often. After staring at the related changes and gdb
for over a day, I still have no idea what actually causes them and why
it's crashing - it smells like some kind of PyQt/Qt cleanup order bug...

However, what I *did* find out (after a lot of painful debugging and
messing around with things) is that delaying the shutdown done from
:quit seems to reliably get rid of the issue. I don't know *why*, but
I haven't seen it happen anymore with the latest changes...

Fixes #5385 and #5124, both speculatively.

Closes #7504 since this was the last change required to make it all
work.
2022-12-06 18:44:01 +01:00
Florian Bruhin 7fb15312d0 quitter: Simplify :quit implementation
None is the default value for instance.shutdown()'s "session", so we can
simplify this a bit.
2022-12-06 18:43:05 +01:00
Florian Bruhin f396c6fe67 tests: Make sure we close history database connections
With pytest main, pytest now reuses temporary directories...
2022-12-06 17:06:56 +01:00
Florian Bruhin 7b90fd3737 Use a proper @pyqtSlot for FilenamePrompt
In bleeding tests, we started to get a segfault on the second test in
tests/unit/mainwindow/test_prompt.py, with a stacktrace like:

    Thread 1 "python" received signal SIGSEGV, Segmentation fault.
    0x00007ffff7b55912 in _PyFunction_Vectorcall (func=<function at remote 0x7fffc4368ca0>, stack=0x7fffd74656a8, nargsf=<optimized out>, kwnames=0x0) at Objects/call.c:341
    341	   if (((PyCodeObject *)f->fc_code)->co_flags & CO_OPTIMIZED) {
    (gdb) bt
    #0  0x00007ffff7b55912 in _PyFunction_Vectorcall (func=<function at remote 0x7fffc4368ca0>, stack=0x7fffd74656a8, nargsf=<optimized out>, kwnames=0x0) at Objects/call.c:341
    #1  0x00007ffff4e0b3f1 in PyQtSlot::call(_object*, _object*) const (this=0x555556c759c0, args=('/tmp/pytest-of-florian/pytest-70/test_simple_completion_1_next_0/test',), callable=<function at remote 0x7fffc4368ca0>)
        at ../../qpy/QtCore/qpycore_pyqtslot.cpp:247
    #2  PyQtSlot::invoke(void**, _object*, void*, bool) const (this=0x555556c759c0, qargs=<optimized out>, qargs@entry=0x7fffffff86c0, self=<optimized out>, self@entry=0x0, result=result@entry=0x0, no_receiver_check=<optimized out>)
        at ../../qpy/QtCore/qpycore_pyqtslot.cpp:159
    #3  0x00007ffff4e12213 in PyQtSlot::invoke(void**, bool) const (no_receiver_check=<optimized out>, qargs=0x7fffffff86c0, this=<optimized out>) at ../../qpy/QtCore/qpycore_pyqtslot.cpp:78
    #4  PyQtSlotProxy::unislot(void**) (qargs=0x7fffffff86c0, this=0x555557193e20) at ../../qpy/QtCore/qpycore_pyqtslotproxy.cpp:205
    #5  PyQtSlotProxy::unislot(void**) (qargs=0x7fffffff86c0, this=0x555557193e20) at ../../qpy/QtCore/qpycore_pyqtslotproxy.cpp:186
    #6  PyQtSlotProxy::qt_metacall(QMetaObject::Call, int, void**) (this=0x555557193e20, _c=<optimized out>, _id=0, _a=0x7fffffff86c0) at ../../qpy/QtCore/qpycore_pyqtslotproxy.cpp:170
    #7  0x00007ffff48bd91d in doActivate<false>(QObject*, int, void**) (sender=0x555556b3d680, signal_index=28, argv=0x7fffffff86c0) at kernel/qobject.cpp:3945
    #8  0x00007fffeff96aca in QFileSystemModel::directoryLoaded(QString const&) (this=<optimized out>, _t1=<optimized out>) at .moc/moc_qfilesystemmodel.cpp:272
    #9  0x00007ffff48b0be0 in QObject::event(QEvent*) (this=this@entry=0x555556b3d680, e=e@entry=0x7fff0c004af0) at kernel/qobject.cpp:1347
    #10 0x00007fffeff962ab in QFileSystemModel::event(QEvent*) (this=this@entry=0x555556b3d680, event=event@entry=0x7fff0c004af0) at dialogs/qfilesystemmodel.cpp:1748
    #11 0x00007ffff070995c in sipQFileSystemModel::event(QEvent*) (this=0x555556b3d680, a0=0x7fff0c004af0) at /usr/src/debug/pyqt5/PyQt5-5.15.7/build/QtWidgets/sipQtWidgetsQFileSystemModel.cpp:376
    [...]
    #23 0x00007ffff4da94ce in meth_QCoreApplication_processEvents(PyObject*, PyObject*, PyObject*) (sipArgs=<optimized out>, sipKwds=0x0) at /usr/src/debug/pyqt5/PyQt5-5.15.7/build/QtCore/sipQtCoreQCoreApplication.cpp:590
    [...]

from pytest-qt in Python:

    Current thread 0x00007fb366207740 (most recent call first):
    File ".../pytestqt/plugin.py", line 209 in _process_events
    File ".../pytestqt/plugin.py", line 171 in pytest_runtest_setup
    [...]
    File ".../pytest/src/_pytest/runner.py", line 115 in pytest_runtest_protocol
    [...]
    File ".../pytest/src/_pytest/main.py", line 317 in pytest_cmdline_main
    [...]

Introduced by this change in pytest, which now deletes the temporary
directory after the test by default:

https://github.com/pytest-dev/pytest/pull/10517

It sounds like something odd like the directory removal causing (Py)Qt
to call the lambda, but the underlying Python object already being gone
or something along those lines. With a proper Qt slot (@pyqtSlot),
PyQt seems to do the right thing, so let's just use that instead...
2022-12-06 12:22:09 +01:00
Florian Bruhin 3f5febf227 bleeding tests: Downgrade broken mesa
See https://archlinux.org/packages/extra/x86_64/mesa/download/
2022-12-06 10:38:53 +01:00
Florian Bruhin c4bfd848f9 app/mainwindow: Delay .show() calls until after tabs are added
With Qt 6.4, QtWebEngine closes/reopens the main window to switch the
RHI rendering mode when a QWebEngineView gets added:
https://github.com/qt/qtbase/blob/v6.4.1/src/widgets/kernel/qwidget.cpp#L10706-L10709

To avoid this, we need to make sure we only call .show() *after* adding
a tab, similarly to what Qt did too:
https://code.qt.io/cgit/qt/qtwebengine.git/commit/?id=d7e0fd5304ebdb12c6f809cdbcf8193b49b9ecd2

See #7504

----

This commit handles changes around app.py/mainwindow.py, which was
probably the most complex one of the whole set (and also involving the
oldest code I bet...).

This changes a couple of intertwined things:

- app._process_args() now needs to take track of the window it opened
  (if any), so that it can call .show() on it *after* opening pages.
  * If a session was loaded instead, sessions.py takes care of showing
    it.
  * The setActiveWindow call was also moved for simplicitly. Before, it
    was called even with --nowindow given, but that doesn't really make
    much sense.
  * I'm not actually sure why the .setActiveWindow() call is there. Qt
    docs say "Warning: This function does not set the keyboard focus to
    the active widget. Call QWidget::activateWindow() instead.".
    It was added back in 2014: ae44aa01a6
    ("Set initial focused window correctly."). It's possible it's not
    needed anymore, but that's for a separate commit.

- app.process_pos_args() now gets a MainWindow (rather than win_id)
  from mainwindow.get_window(), and is responsible for calling .show()
  and .maybe_raise() on it when nothing else does (like open_url called
  from it).
  * To preserve existing behavior (and not fail tests), it also still
    calls .maybe_raise() when a command was given. Maybe we should get
    rid of this to fix #5094, but that's for a separate commit.
  * Note it does *not* call .show(). That's taken care of later in
    _process_args() already.

- app.open_url() can directly show the window, because it already opens
  a URL. It now still returns the MainWindow object for consistency.
  Also gets rid of some questionable objreg usage just to access a
  tabbed browser, as a tiny step towards #640.

- Similarly, app._open_startpage() could have stayed, but now also
  takes a MainWindow and uses objreg a bit less.

- open_desktopservices_url also takes care of the show/raise (as this
  gets called isolated from Qt), and also avoids objreg stuff where an
  attribute access would have sufficed...

- mainwindow.get_window() now doesn't show the window anymore, and
  returns the mainwindow object instead of a window ID.
  * However, this means it can't actually raise the window anymore
    (it needs to be shown first).

- To keep the decision about whether to raise the window in a central
  place, MainWindow now has a new should_raise attribute and
  maybe_raise() method. mainwindow.get_window() sets should_raise
  accordingly, and the caller is responsible to call .maybe_raise()
  after showing.
2022-12-05 19:45:13 +01:00
Florian Bruhin 563f3a4c60 mainwindow: Don't call qapp.alert on deleted windows
I got an exception there while running tests with the refactored code.
I don't quite understand how/why it changed, but it seems sensible to
skip this too if we skipped calling calling .activateWindow() due to
it being deleted.

See 2fd21bb16b
2022-12-05 19:37:34 +01:00
Florian Bruhin c207c8db10 Delay browser.commands .show() calls until after tabs are added
With Qt 6.4, QtWebEngine closes/reopens the main window to switch the
RHI rendering mode when a QWebEngineView gets added:
https://github.com/qt/qtbase/blob/v6.4.1/src/widgets/kernel/qwidget.cpp#L10706-L10709

To avoid this, we need to make sure we only call .show() *after* adding
a tab, similarly to what Qt did too:
https://code.qt.io/cgit/qt/qtwebengine.git/commit/?id=d7e0fd5304ebdb12c6f809cdbcf8193b49b9ecd2

See #7504

----

This commit handles browser.commands, in particular the
"_new_tabbed_browser" convenience method (which is now, sadly, likely
less convenient).
2022-12-05 18:36:34 +01:00
Florian Bruhin c76e1004a3 Delay various .show() calls until after tabs are added
With Qt 6.4, QtWebEngine closes/reopens the main window to switch the
RHI rendering mode when a QWebEngineView gets added:
https://github.com/qt/qtbase/blob/v6.4.1/src/widgets/kernel/qwidget.cpp#L10706-L10709

To avoid this, we need to make sure we only call .show() *after* adding
a tab, similarly to what Qt did too:
https://code.qt.io/cgit/qt/qtwebengine.git/commit/?id=d7e0fd5304ebdb12c6f809cdbcf8193b49b9ecd2

See #7504

----

This commit handles various simple and isolated cases. Things requiring
a bit more refactoring are handled in a separate commit.
2022-12-05 18:32:50 +01:00
Florian Bruhin 5f0cb13951 browser.command: Fix some type annotations 2022-12-05 18:05:48 +01:00
Florian Bruhin 381c84b14d
Merge pull request #7508 from qutebrowser/update-dependencies
Update dependencies
2022-12-05 12:08:23 +01:00
qutebrowser bot dc5ef397c9 Update dependencies 2022-12-05 04:22:56 +00:00
Florian Bruhin ce51fc5226 Fix minimum version for Array.at quirk 2022-12-01 21:24:12 +01:00
Florian Bruhin 20139061ae tests: Use set comprehensions 2022-12-01 20:50:29 +01:00
Florian Bruhin c43bc3b445 ci: Deactivate Qt 6.4 for now
Still some stuff broken sadly, see #7314
2022-11-29 09:30:47 +01:00
Florian Bruhin d016ca1da7 Add missing setting entry for array-at quirk
(cherry picked from commit 39e577c36e)
2022-11-29 09:29:26 +01:00
Florian Bruhin 39e577c36e Add missing setting entry for array-at quirk 2022-11-29 09:28:24 +01:00
Florian Bruhin eb5c019d07 Add tests to make sure quirk files/declaration/settings match 2022-11-29 09:26:49 +01:00
Florian Bruhin f837da40f2 qt 6: Remove old JS quirks
We don't support Qt 5.12 anymore, so those can go.
2022-11-29 09:21:34 +01:00
Florian Bruhin 68dbde61fd Add a quirk for Array.at
Trivial to polyfill, needed by various pages in the wild,
and only natively available with Qt 6.2.

Closes #7501
Also see #7237 and 726d5e614b

(cherry picked from commit ce64e5d899)
2022-11-29 08:57:29 +01:00
Florian Bruhin 100e654fd7 tests: Replace class-level pytestmark by decorators 2022-11-29 08:56:53 +01:00
Florian Bruhin c1dcb1164f Update changelog 2022-11-29 08:49:50 +01:00
Florian Bruhin ce64e5d899 Add a quirk for Array.at
Trivial to polyfill, needed by various pages in the wild,
and only natively available with Qt 6.2.

Closes #7501
Also see #7237 and 726d5e614b
2022-11-29 08:31:05 +01:00
Florian Bruhin 8ac1cb6867 Merge remote-tracking branch 'origin/pr/7479' 2022-11-28 11:07:33 +01:00
Florian Bruhin 63d852f57f
Merge pull request #7499 from qutebrowser/update-dependencies
Update dependencies
2022-11-28 11:05:59 +01:00
Florian Bruhin 02274b7641 scripts: Add trove-classifiers changelog URL 2022-11-28 10:41:47 +01:00
Florian Bruhin 938392f93d requirements: Drop flake8-copyright for now
See #7499, #7104 and https://github.com/savoirfairelinux/flake8-copyright/issues/19
2022-11-28 10:40:48 +01:00
qutebrowser bot 4c9ea9fb7d Update dependencies 2022-11-28 04:21:58 +00:00
Florian Bruhin 725ed95d8a tests: Fix downloads.feature flakiness
The "Answering a question for a cancelled download" test was flaky,
due to the preceding PDF.js test sometimes not waiting properly for its
download to finish: "I wait until the download is finished" waited for
the initial PDF download above (which causes PDF.js to open), but not
for the real download after clicking the save button.

See #5390

TODO: Cherry-pick to master?
2022-11-24 14:56:52 +01:00
Florian Bruhin e11f899b41 tests: Ignore new QtWebEngine 6.4 message
See #7314
2022-11-24 14:19:38 +01:00
Florian Bruhin 66e2729cd2 Update Chromium version information
See #7314
2022-11-24 14:19:25 +01:00
Florian Bruhin f6e4ba3d6f Make skipping broken PDF.js work properly
Fixup for c7ea2f705f
See #7135
2022-11-24 14:12:38 +01:00
Florian Bruhin 9ad13fa508 Update Qt doc links to Qt 6 2022-11-24 14:12:38 +01:00
Florian Bruhin 714bf5f261 Add WebSocket resource type for Qt 6.4
See #7314
2022-11-24 14:12:28 +01:00
Florian Bruhin a497ce69be tox/ci: Add PyQt 6.4 2022-11-24 09:26:30 +01:00
Florian Bruhin 77c1480bf6
Merge pull request #7487 from qutebrowser/update-dependencies
Update dependencies
2022-11-21 09:46:07 +01:00
qutebrowser bot 6cf333c33a Update dependencies 2022-11-21 04:22:59 +00:00
Florian Bruhin b831e1283d bleeding requirements: Switch back to pytest-instafail master 2022-11-20 10:35:21 +01:00
toofar ca667d6429 Fixup dockerfile template for qt6 configurations
The merge resolution I did in 2d66466194 was a bit hasty. Hopefully
all supported configurations should work now.
2022-11-20 16:15:06 +13:00
toofar 2d66466194 Merge branch 'master' into qt6-v2
Just a few conflicts around CI and dependencies.
2022-11-20 15:48:00 +13:00
Florian Bruhin 1417ffa519 Update changelog 2022-11-19 16:01:12 +01:00
Florian Bruhin f277876ce0 dictcli: Switch from master to main
Fixes #7481
2022-11-19 16:00:15 +01:00
Kian-Meng Ang d77b0fb8a3 Fix typos
Found via `codespell -S *.js -L
technik,gir,nam,ans,wih,wil,ro,nowe,te,datas,qutie,ned,fo,clude,alph,crashers,nd,wasn,cros,ue,possition`

Co-authored-by: Marcel Schilling <marcel.schilling@uni-luebeck.de>
2022-11-19 13:03:39 +08:00
Florian Bruhin a03109dad2 ci: Fix docker build and add sanity check 2022-11-16 09:42:19 +01:00
Florian Bruhin f0489cb6a5 ci: Keep QtWebKit on live support a bit longer
See #7478, #4039
2022-11-16 09:28:38 +01:00
Florian Bruhin 0cd682afbd Revert "ci: Drop QtWebKit"
This reverts commit 00ee3fad34.
2022-11-16 09:10:42 +01:00
Florian Bruhin d4397b6b63 Update changelog URL 2022-11-16 09:10:16 +01:00
Florian Bruhin 1217fc18b4
Merge pull request #7478 from qutebrowser/update-dependencies
Update dependencies
2022-11-15 10:21:33 +01:00
Florian Bruhin 00ee3fad34 ci: Drop QtWebKit
See #7478, #4039
2022-11-14 21:24:03 +01:00
Florian Bruhin b8ddaef967 Adjust ignores/settings after mypy upgrade
See #7478, #7098
2022-11-14 21:21:01 +01:00
qutebrowser bot 7bf1b4af5d Update dependencies 2022-11-14 04:28:37 +00:00
Florian Bruhin 4e39f9a8ce tests: Use snake-case wait_until 2022-11-08 18:27:39 +01:00
Florian Bruhin 6e54962fe4 pylint: Remove now-unneeded suppressions
The recent pytest 7.2 upgrade leads pylint to complain:

    ************* Module unit.browser.test_qutescheme
    tests/unit/browser/test_qutescheme.py:26:0: I0021: Useless suppression of 'no-name-in-module' (useless-suppression)
    tests/unit/browser/test_qutescheme.py:226:0: I0021: Useless suppression of 'no-member' (useless-suppression)

    ************* Module helpers.fixtures
    tests/helpers/fixtures.py:39:0: I0021: Useless suppression of 'no-name-in-module' (useless-suppression)
    tests/helpers/fixtures.py:639:0: I0021: Useless suppression of 'no-member' (useless-suppression)

possibly due to it not being able to infer 'py' anymore with the weird
shenanigans pytest does now?

Also, what weird glitch in the matrix is it that those just happen to be
on lines [2]26 and [6]39 for *both* files? 🤯
2022-11-08 18:27:21 +01:00
Florian Bruhin 2b86f66e48 tests: Try to fix Windows flakiness in userscript runner test 2022-11-08 18:02:57 +01:00
Florian Bruhin 1f5ad8abfb Remove pytest-bdd deprecation ignore 2022-11-08 16:20:46 +01:00
Florian Bruhin 113da710d3 Merge remote-tracking branch 'origin/update-dependencies' 2022-11-08 16:20:42 +01:00
Florian Bruhin 1387c999fa Skip problematic QtWebKit tests with OpenSSL 3
See https://github.com/cherrypy/cheroot/issues/517 and #7467
2022-11-08 16:17:31 +01:00
toofar 756e23f57b remove glob2 from changelog urls
Got dropped from pytest-bdd: https://github.com/pytest-dev/pytest-bdd/pull/570
2022-11-07 18:10:52 +13:00
qutebrowser bot 28d9ae821c Update dependencies 2022-11-07 04:33:30 +00:00
Florian Bruhin 8431ba43ff
Merge pull request #7464 from qutebrowser/dependabot/github_actions/peter-evans/create-pull-request-4
build(deps): bump peter-evans/create-pull-request from 3 to 4
2022-11-04 19:15:04 +01:00
dependabot[bot] e8179d455f
build(deps): bump peter-evans/create-pull-request from 3 to 4
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 3 to 4.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v3...v4)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-04 18:13:23 +00:00
Florian Bruhin 7e7eaaee7c Retry dependabot for GitHub Actions
See 78709ce2b9
and fa5e04fdaf

Hoping this will work better nowadays?

Tenatively closes #7299
2022-11-04 19:12:54 +01:00
Florian Bruhin 438f38a88f
Merge pull request #7459 from qutebrowser/update-dependencies
Update dependencies
2022-11-03 15:01:06 +01:00
Florian Bruhin 80cf0c5bdd Revert to recompile_requirements.py with set-output
Newlines don't work anymore, see #7459

Partially reverts 0ff0eaa, see #7439
2022-11-03 14:58:27 +01:00
qutebrowser bot 39f817d57b Update dependencies 2022-11-03 11:04:19 +00:00
Florian Bruhin 0ff0eaa703 ci: Get rid of set-output
Fixes #7439
2022-11-03 11:53:28 +01:00
Florian Bruhin fd3d23270e
Merge pull request #7455 from qutebrowser/update-dependencies
Update dependencies
2022-11-03 09:02:04 +01:00
Florian Bruhin bc225557a5 Adjust warnings and changelog URLs for new pytest 2022-10-31 08:19:25 +01:00
qutebrowser bot 1dc5b97547 Update dependencies 2022-10-31 04:37:38 +00:00
toofar d9a46b1a62 explicitly exclude pyright config from manifest 2022-10-29 15:14:16 +13:00
toofar 97920c8271 Configure pyright to look at PyQt5 imports.
Define some constants for pyright to control how it handles the imports
in qutebrowser.qt.*

This is mainly for autocompletion and definitions with VS Code, which
uses pyright via the pylance extension. If you have multiple possible
places something could be imported from, and one of them isn't
installed, the type of the thing being imported will fall back to Any,
and you wont get nice things.
So we use this file to make sure only certain imports are configured.

The most important thing to remember about this file is it'll control
where type definitions come from in VS Code. You can have multiple
backends defined as true, generally the last import will win in that
case. If any of the enabled imports aren't installed though you may not
get any type hints at all.

PyQt5 has been configured for now to match the type checking configured
in CI.
Personally I would be fine with PyQt6 configured here anyway since
that's generally what we are developing against these days.

See #7370 for more info.
2022-10-29 15:08:48 +13:00
Florian Bruhin dbcc0e2514 userscripts: Fix scammy link
See #6516
2022-10-26 22:38:08 +02:00
Florian Bruhin 9c17f9d9b3
Merge pull request #7406 from qutebrowser/chore/docs_about_mypy
doc: add some contributor notes about mypy
2022-10-26 09:26:19 +02:00
Florian Bruhin c2f56a753b doc: Add mister_monster userscripts 2022-10-24 17:13:11 +02:00
Florian Bruhin c610579885 scripts: Remove changelog URL for types-cryptography 2022-10-24 09:29:44 +02:00
qutebrowser bot b4283be06c Update dependencies 2022-10-24 04:59:10 +00:00
Florian Bruhin 93b81f2e2e Fix crashe with no current tab in _run_userscript
Not sure why this was a FIXME instead of handling it properly in the first place...
2022-10-21 10:31:18 +02:00
Florian Bruhin a4083e005a
Merge pull request #7437 from qutebrowser/update-dependencies
Update dependencies
2022-10-17 08:23:59 +02:00
Florian Bruhin e62d34c5aa Revert "Disallow setting input.mode_override via autoconfig.yml"
Breaks tests...
This reverts commit fc933ae1d3.
2022-10-17 07:59:23 +02:00
Florian Bruhin fc933ae1d3 Disallow setting input.mode_override via autoconfig.yml
Closes #7436
2022-10-17 07:29:02 +02:00
qutebrowser bot a8d7f7540e Update dependencies 2022-10-17 04:58:45 +00:00
Florian Bruhin 5a10c62554 doc: Mention fileselect.foler.command in fileselect.handler 2022-10-15 18:29:53 +02:00
toofar 819d56043b doc: add some contributor notes about mypy
also update the default tox env list which I forgot to do when changing
the mypy targets.
2022-10-14 15:49:28 +13:00
Florian Bruhin f6d5f79197 Update changelog 2022-10-10 09:51:13 +02:00
Florian Bruhin 8d2ed00731 Merge remote-tracking branch 'origin/pr/7426' 2022-10-10 09:50:32 +02:00
Florian Bruhin 9751864c13
Merge pull request #7428 from qutebrowser/update-dependencies
Update dependencies
2022-10-10 09:46:21 +02:00
Florian Bruhin 661b3e0ab5 requirements: Skip flake8-deprecated 2.0.0
See https://github.com/gforcada/flake8-deprecated/issues/19
2022-10-10 09:41:48 +02:00
qutebrowser bot a7c2a690e4 Update dependencies 2022-10-10 04:51:44 +00:00
Florian Bruhin c596dae600 bleeding tests: Switch back to pytest-benchmark master
https://github.com/ionelmc/pytest-benchmark/pull/224 was merged
2022-10-09 10:57:47 +02:00
Jon Higgs 5a88094435 Send source URL to Breadability
Used to construct fully-qualified URLs from relative links. Without it
you get broken images and links.
2022-10-08 12:44:01 +11:00
Florian Bruhin 208be25da4 bleeding tests: Use forks of pytest-benchmark and -instafail
See https://github.com/pytest-dev/pytest/pull/9118
2022-10-07 12:26:30 +02:00
Florian Bruhin 645c6c6ea7 Remove now unneeded type ignore
Looks like https://github.com/python/typeshed/issues/2093 was fixed
2022-10-03 14:47:48 +02:00
qutebrowser bot ed4615eb44 Update dependencies 2022-10-03 04:36:58 +00:00
Florian Bruhin 00afbad426 doc: Add link to another emacs-like config 2022-10-01 10:25:56 +02:00
Florian Bruhin fa62360357 Remove unneeded str
Only needed in Python 3.5 times
2022-09-30 20:23:38 +02:00
Florian Bruhin 8c02ef69ec Add extra logging for calling into fusion style
See https://github.com/qutebrowser/qutebrowser/issues/5124
2022-09-27 11:01:58 +02:00
Florian Bruhin f39f6bc0a9 doc: Also disable DNS prefetch for mail leak prevention via proxy
Looks like it's required there as well
2022-09-26 18:24:10 +02:00
Florian Bruhin 63d97aa69e doc: Expand FAQ on email usage
See https://www.reddit.com/r/qutebrowser/comments/o7stdc/comment/ipritx9/?context=3
2022-09-26 18:12:32 +02:00
Florian Bruhin 8fa7e2fc6d
Merge pull request #7415 from qutebrowser/update-dependencies
Update dependencies
2022-09-26 07:07:05 -07:00
Florian Bruhin 31878b4b7b Speculatively stabilize :history-clear tests
See #7415, #5390. Similar to ad429d9552a9f169a1122cb5784424848d4805e2.
2022-09-26 16:06:30 +02:00
qutebrowser bot 1d90b8d95b Update dependencies 2022-09-26 04:55:52 +00:00
toofar ce2fa13398 Update changelog for #7390 2022-09-22 07:13:52 +12:00
toofar 260e23f102 Merge pull request #7390 from tomiesz/master
Fix reappearing widgets progress and backfoward widgets.

Closes: #7390
2022-09-22 07:06:14 +12:00
Tomasz Cebula 64f6284375
Merge branch 'qutebrowser:master' into master 2022-09-20 11:17:46 +02:00
Florian Bruhin 03e510acff Update pylint ignores 2022-09-19 11:21:11 +02:00
Florian Bruhin 3f542636af Update changelog URLs 2022-09-19 11:16:03 +02:00
qutebrowser bot 2f9ba78852 Update dependencies 2022-09-19 09:03:18 +00:00
Florian Bruhin ecd7565aff requirements: Work around limitations for macOS-specific deps
Also see #3526
2022-09-19 10:51:27 +02:00
Florian Bruhin 5e11e6c7d4 mypy: Remove unneeded int(...)
Follow-up to 377bdf736f - less confusing
that way IMHO, as the value now is already an int in that branch.
2022-09-16 15:00:19 +02:00
Florian Bruhin 8164157072 mypy: Make VENDORED_SIP private
Follow-up to 76ca4a9dd6.
2022-09-16 15:00:19 +02:00
Florian Bruhin fc4fd5f6b0 mypy: Use cast instead of ignore for QKeySequence
Follow-up to 3d93e15378
2022-09-16 15:00:19 +02:00
Florian Bruhin 77facc8001 mypy: Use Union instead of ignore 2022-09-16 15:00:19 +02:00
Florian Bruhin 2d4fe87075 mypy: Use annotation instead of assert
Follow-up to 9c193c18f0
2022-09-16 15:00:19 +02:00
Florian Bruhin 6ef015bfd8 mypy: Move around some comments 2022-09-16 15:00:19 +02:00
Florian Bruhin 6f9fda9b6e mypy: Make type for _PREFERRED_COLOR_SCHEME_DEFINITIONS more concrete
Follow-up to b0e3dcef81.
2022-09-16 15:00:14 +02:00
Florian Bruhin 74027d3395 Drop certificateerror.create factory function
Now that the two implementations are in the same class, there's no need
for the indirection anymore.

Follow-up to 647b74197a.
2022-09-16 14:34:27 +02:00
Florian Bruhin 91672cc822 mypy: Simplify handling in show_dialog
The problem here is that mypy (correctly) complains that self._dialog
could be None again at the point that the lambda runs, which is a
different variable scope.

The assert can be dropped (in the show_dialog locals scope, mypy *knows*
it's never None, as we just assigned it!).

Follow-up to 1bbf75ae7d.
2022-09-16 14:29:34 +02:00
Florian Bruhin 8dd2bd5b54 tox: Use more unique env var name
(Ab)using an environment variable indeed seems like the easiest way
forward here, but since it is exposed in the environment for the called
processes, let's give it a name which is less likely to clash, and more
easily identifyable.

Follow-up to c1738ca550.
2022-09-16 14:26:33 +02:00
Florian Bruhin 46ebef5644 mypy: Use tox.ini to install PyQt6 conditionally
The changes in requirements-mypy.txt would get overwritten on the next
dependency update. Also, it looks like we don't actually need PyQt6 (or
the PyQt6 stubs) available for checking PyQt 5 code if all Qt 6 imports
are appropriately gated by conditionals mypy knows about.

Follow-up to c1738ca550.
2022-09-16 14:13:50 +02:00
toofar f0bfc9aab2 Document how to set the backend for the tests.
I only had the old way save in my bash history and this one was only
mentioned in the changelog.

Also changed the heading above the new entry to be title case, which
seems to be more consistent with the other headinfs in the file.

Also remove the one remaining mention of `QUTE_BDD_WEBENGINE` since it
does nothing anymore.
2022-09-16 17:13:52 +12:00
toofar e50bc92e9a remove leftover compiled requirements files
Leftover from 62515fecf0a64f ref #7091
2022-09-16 17:13:05 +12:00
toofar be5b4c5dd0
Merge pull request #7392 from qutebrowser/feat/turn_on_mypy_pyqt5
Get mypy working, with pyqt5, on qt6-v2 branch
2022-09-16 16:58:49 +12:00
toofar 79bb6670d8 bar: Test enabled attribute on progress and backforward
There is now some code in statusbar relying on the enabled attribute
stopping events from being processed (or at least stopping them from
showing the widget again). So add tests to make sure that behaviour
keeps working.

Also split the big test in test_backforward into a couple of smaller
ones and pull some common lines out to a (still clunky) fixture.
2022-09-16 16:51:41 +12:00
toofar 71e9b9d854 fix lint: qt5 vs qt6 confusion 2022-09-11 17:31:52 +12:00
toofar 4b3ec40eb0 mypy: re-enable CI jobs for pyqt5
We'll be going forward with type checking on PyQt5 for now while
figuring out what to do with PyQt6 type checking.

See https://github.com/qutebrowser/qutebrowser/discussions/7372#discussioncomment-3502200
2022-09-11 17:31:52 +12:00
toofar 377bdf736f mypy: fix qenum debug type hints?
1. stop pretending to propagate None to the qt/python debug methods
2. handle simplewrapper in extract_enum_val

I think this stuff will need a little more cleaning up when we get to
sorting out type checking on PyQt6.

The whole key debug module seems to be a bit fuzzy about when it's going
to be passing around a simplewrapper, int and enum.

I believe we are using sip.simplerwapper as a common parent type of all
the Qt Flag/Enum values. I think it gets better on PyQt6, don't remember
though. It might just change to be sip.wrapper instead.
2022-09-11 17:22:51 +12:00
toofar 3d93e15378 mypy: add hints and comments around QKeySequence
Mypy doesn't seem to know that QKeySequence is an iterable, so it
complains about itertools not handling it. And since we lose type
information there we have to add it back in a couple of places.
2022-09-11 17:22:50 +12:00
toofar 2eacf0456a mypy: defer to machinery for conditional: QKeyCombination
That wasn't so hard, just put everything behind compile time constants,
even the type definition.
2022-09-11 17:22:50 +12:00
toofar ed13c3c734 mypy: ignores for another enum: KeyboardModifier
There are several cases where PyQt5 methods expects the plural flags version but
we've got the singular Enum version from accessing enum members directly.
It's not easy to turn those enums into flags and the flags don't even
exist in PyQt6.
2022-09-11 17:22:50 +12:00
toofar baeb05d6a2 mypy: handle none case in Optional: downloads.reply
I'm not sure how theoretical this case is. There is a comment somewhere
else indicating the reply can "disappear".
2022-09-11 17:22:50 +12:00
toofar b0e3dcef81 mypy: add type hint for defs in darkmode.py
Not sure why mypy was failing to see the inner dicts in
_PREFERRED_COLOR_SCHEME_DEFINITIONS where being seen as "object" by mypy
and not dict, I think the syntax is correct.
Add some basic type hints to help it.
They Any is because usertype.UNSET() is a sentinal object
2022-09-11 17:22:50 +12:00
toofar 9c193c18f0 mypy: cast to subtype: WebEnginePrinting 2022-09-11 17:22:50 +12:00
toofar 046244b54d mypy: defer to machinery for conditional: QWebEngineScripts 2022-09-11 17:22:50 +12:00
toofar 3e9fd4ed7e mypy: defer to machinery for conditional: printing 2022-09-11 17:22:50 +12:00
toofar 52c3caaa05 mypy: Add Optional hint to inspector._settings 2022-09-11 17:22:50 +12:00
toofar 802dc459dc mypy: defer to machinery for conditional: inspector API 2022-09-11 17:22:50 +12:00
toofar aef684cbff mypy: defer to machinery for conditional: webview.certError 2022-09-11 17:22:50 +12:00
toofar 7a2c41c785 mypy: access our tab_bar implementation, not tabBar
Apparently this got changed by the scripts/dev/rewrite_enums.py script?
Strange. 0877fb0d78
2022-09-11 17:22:50 +12:00
toofar b64fdfc584 mypy: ignore enum argument type: UrlFormattingOption
The docs say:

> The options from QUrl::ComponentFormattingOptions are also possible.

> The FormattingOptions type is a typedef for QFlags<UrlFormattingOption>. It stores an OR combination of UrlFormattingOption values.

Maybe we should be should be definining out own types for some of the
enums that include both the QFlag, enum and any child enums.
2022-09-11 17:22:50 +12:00
toofar 1bbf75ae7d mypy: add Optional hint to QPrintDialog 2022-09-11 17:22:50 +12:00
toofar 77a90cab1e mypy: ignore enum binary operator: Qt.WindowType
They are the same damn thing: https://doc.qt.io/qt-6/qt.html#WindowType-enum
2022-09-11 17:22:50 +12:00
toofar 3fae736777 mypy: fix exec() type hints?: prompt
PyQt5 stubs require a flags object that doesn't exist in PyQt6
2022-09-11 17:22:50 +12:00
toofar 5be5b6bb41 mypy: defer to machinery for conditional: QDownloadItem 2022-09-11 17:22:50 +12:00
toofar db8cb25bd3 mypy: ignore enum binary operator: UrlFormattingOption
Yet another case of confusion between flags and enum objects.
2022-09-11 17:22:50 +12:00
toofar a70954a65f mypy: fix KeyboardModifier type in webelem?
Conditionally define a type so it can work with PyQt5s mismatch of enums
and flags and PyQt6s enums.
2022-09-11 17:22:50 +12:00
toofar 5293009413 mypy: defer to machinery for conditional: QOpenGLVersionProfile 2022-09-11 17:22:50 +12:00
toofar 04f1ae74bd mypy: defer to machinery for conditional: qWebEngineVersion 2022-09-11 17:22:50 +12:00
toofar fda08527f1 mypy: defer to machinery for conditional: QVariant 2022-09-11 17:22:50 +12:00
toofar 647b74197a mypy: move conditionals for CertificateErrorWrapper into class
Get rid of the per-backend classes and move the backend specific
conditionals into a common class.

Sadly it seems mypy isn't clever enough to reason ignore a class it should
know is never used. Possibly it looks at them at parse time. Probably putting
the whole class definitions into conditionals would do it but I'm not sure if
I want to go down that route for such a small example. Hopefully there aren't
too many more of these.
2022-09-11 17:22:50 +12:00
toofar 9e1dfacef7 mypy: defer to machinery for conditional: QtSql bound values
Also turn the qt5 value into a list instead of a dict_values, for the
sake of mypy
2022-09-11 17:22:50 +12:00
toofar 42d3cca794 mypy: fallback sqlite error code can be str 2022-09-11 17:22:50 +12:00
toofar e76a063e63 mypy: defer to machinery for conditional: QLibraryInfo 2022-09-11 17:22:50 +12:00
toofar 56822836c5 mypy: fix exec() type hints?
PyQt5 exposes Enums and their corresponding QtFlags objects seperately,
and for some reason they aren't interchangeable. ref https://github.com/python-qt-tools/PyQt5-stubs/issues/142

We could handle this by casting values back and forth between the enum
value (for working with) and the flags value (for passing to methods),
but this situation doesn't even exist with PyQt6, you can use everything
as enums just fine.
So I'm just adding ignore comments and making type definitions
conditional.

Not sure if this is the right thing to be doing or not.

for b3cdb28d044
2022-09-11 17:22:50 +12:00
toofar 4647125172 mypy: fix hints for abstract cert error wrapper 2022-09-11 10:32:07 +12:00
toofar 76ca4a9dd6 mypy: handle sip conditional imports
Putting ignore[type] on the second import works fine. But if we have it
on both the pyqt5 and pyqt6 branch it'll complain about the other branch
on each run. So pull it out to a common place we can ignore.
2022-09-11 10:27:11 +12:00
toofar c1738ca550 tox: split mypy env into mypy-{qt5,qt6}
Would be nice to have a bare `mypy` env which ran both the more specific ones
in sequence but I don't know how to do that.

Not sure if there is a way to pull the CONSTANTS_ARGS stuff out to a non-env
parameter and pass it into commands but I couldn't figure out a way. So via
the environment it is.

TODO: compare PyQt6 as-is with the WIP PyQt6-Stub
2022-09-11 10:19:44 +12:00
toofar 8decafefbe fix lint
I prefer consistency of import over this complaint which doesn't even
apply here (the conditionals are mutually exclusive).
2022-09-10 21:11:27 +12:00
toofar 4cf6aa8cef Adjust import order in machinery for pyright/vscode
When pyright tags an object as "Unknown" (even if that is just one part of a
union of possible definitions) then VS code doesn't provide autocompletion for
that objects. Additionally, if you import that same object from multiple
modules in a file pyright (or VS Code?) will go through them in order and
prefer the last one.

1. if you import an object by name from two modules and that latter module
   isn't installed the object will be marked as "Unknown"

    if machinery.USE_PYQT5:  # installed
      from PyQt5.QtWebEngineWidgets import QWebEngineHistory
    elif machinery.USE_PYSIDE2:  # not installed
      from PySide2.QtWebEngineWidgets import QWebEngineHistory

    reveal_type(QWebEngineHistory)  # class(QWebEngineHistory) | Unknown

2. if you import an object by name from a module that isn't installed and that
   module isn't later overridden it'll be marked as "Unknown"

     if machinery.USE_PYQT6:  # installed
       from from PyQt6.QtWebEngineCore import *
     elif machinery.USE_PYQT5:  # not installed
       from PyQt5.QtWebEngineWidgets import QWebEngineHistory

     reveal_type(QWebEngineHistory)  # class(QWebEngineHistory) | Unknown

     if machinery.USE_PYQT5:  # not installed
       from PyQt5.QtWebEngineWidgets import QWebEngineHistory
     elif machinery.USE_PYQT6:  # installed
       from from PyQt6.QtWebEngineCore import *

     reveal_type(QWebEngineHistory)  # class(QWebEngineHistory)

So in general we want to put modules most likely to be installed at the
bottom. Except if it imports an object by name and there is a possibility it
won't be installed we want to bump it up.

So now we have:
1. PySide6: not currently supported
2. PyQt5: main supported type checking language, but not guaranteed to be
   installed
3. PyQt6: quite likely to be installed but not yet supported for type checking

This means that if you have both PyQt6 and PyQt5 installed you will get
autocompletion from PyQt6. It might be better to get it from PyQt5 instead,
since that's what we will be type checking with on CI for now, but getting no
autocompletion because you only have PyQt6 installed and not PyQt5 is not
ideal.

You can confirm this by using the "go to definition" feature.

Hopefully we can use the defineConstant configuration parameter for
pyright to make this ordering less important in the future by using that
to set the proffered bindings for type checking.
2022-09-10 20:48:39 +12:00
toofar 6f8d7a7fbc Remove PySide2 imports.
We never supported PySide2 and by the time we get around to looking at
any PySide version we'll likely be near to dropping Qt5 anyway.

The main motivation however is avoiding, or being able to make use of, a
quirk of pyright. When you import the same object from two different
modules to the same attribute, and you don't have one of those modules
installed, then pyright will tag the attribute with "Unknown".

This affects us with the classes that got moved around between Qt5 and
Qt6. Since we are importing them by name for both Qt5 backends then if
you don't have one of them installed pyright will tag all those move
classes as Unkown and you won't get autocompletion with them in VS Code.

See https://github.com/qutebrowser/qutebrowser/issues/7370 for more
details.

mypy also has this issue (actually it's even worse there) but you can
shortcut the ambiguouty by setting so called "compiled time constants"
with the --always-true and --always-false command line arguments to make
it not even consider some imports. pyright has a `defineConstant`
setting for that too but it doesn't seem to apply to imports. I'll have
to raise an issue with them...
2022-09-10 20:48:39 +12:00
Tomasz Cebula 9c460903c5 Another style fix 2022-09-10 09:53:05 +02:00
Tomasz Cebula de7bb2791f Style and type adjustment for the widget fix
Added proper whitespace and mypy type ignore
2022-09-10 09:44:17 +02:00
Tomasz Cebula 7c573bcc7e Fix for dissapearing Widgets 2022-09-09 10:21:14 +02:00
Florian Bruhin 6f934d4a98 Relax errors shown in the UI
- Hide CSP error even if it's prefixed by [Report only]
- Always hide errors from Greasemonkey scripts

(cherry picked from commit 47ef2ca41d)
2022-08-29 20:04:34 +02:00
Florian Bruhin 47ef2ca41d Relax errors shown in the UI
- Hide CSP error even if it's prefixed by [Report only]
- Always hide errors from Greasemonkey scripts
2022-08-29 20:03:37 +02:00
Florian Bruhin 038361d8aa Improve error message on unresolved executables
No more confusing 'No program defined'
2022-08-29 09:37:49 +02:00
Florian Bruhin 00b1e6c153 Fix lint
(cherry picked from commit dd1cc314d0)
2022-08-26 22:32:10 +02:00
Florian Bruhin 87f58a30b7 Fix half-finished test
(cherry picked from commit 40125ca73b)
2022-08-26 22:32:10 +02:00
Florian Bruhin ee4d6e0396 sql: Add *all* primary sqlite result codes
For three reasons:

- There are only 31 of them, and we don't really expect any more to
  turn up (last happened in 2013, and we have a test for it happening)
- It makes for nicer debug output
- It always felt strange to only have a small subset in the enum
2022-08-26 19:11:15 +02:00
Florian Bruhin 6ffc5174ea sql: Handle sqlite extended error codes
Qt 6.1 switched to using extended sqlite error codes:
https://codereview.qt-project.org/c/qt/qtbase/+/329472

This is neat because it gives us more granularity for errors, but it
also means that we now need to account for that by masking the error
codes accordingly for checking their category.

See unhandled I/O error here:
https://crashes.qutebrowser.org/view/d9b26c2f
2022-08-26 19:08:49 +02:00
Florian Bruhin dd1cc314d0 Fix lint 2022-08-23 22:56:06 +02:00
Florian Bruhin 40125ca73b Fix half-finished test 2022-08-23 22:21:40 +02:00
Florian Bruhin 0c68fe7c89 js: Eschew the extraenous else 2022-08-23 20:16:12 +02:00
Florian Bruhin 815374c6b6 js: Handle stylesheets in cross-origin frames gracefully
Otherwise the exception gets shown since the recent message change.

(cherry picked from commit 73e30e4738)
2022-08-23 20:10:57 +02:00
Florian Bruhin 1886eac297 js: Be more precise about webelem exception 2022-08-23 20:10:38 +02:00
Florian Bruhin 73e30e4738 js: Handle stylesheets in cross-origin frames gracefully
Otherwise the exception gets shown since the recent message change.
2022-08-23 20:07:53 +02:00
Florian Bruhin 1963caa7c7 Make PyObjC/AppKit optional with Qt 6.3+ 2022-08-23 18:31:42 +02:00
Florian Bruhin bb19aea7c9 Add missing copyright blurbs 2022-08-23 18:31:42 +02:00
Florian Bruhin 0a6448bcb3 Fix changelog URLs 2022-08-23 18:31:42 +02:00
Florian Bruhin 72c8609ad5 requirements: Switch back to PyInstaller release
macOS fix landed in PyInstaller 5.3
2022-08-23 18:31:42 +02:00
Florian Bruhin 496c14bc9e quteprocess: Add --qute-delay-start
Allows for some rudimentary debugging of subprocesses.
2022-08-23 18:31:42 +02:00
Florian Bruhin d31b2e2016 Qt 6.4: Adjust dark mode tests
See #7314 and #6097
2022-08-23 18:31:42 +02:00
Florian Bruhin e39b48b12a Qt 6.4: Hide bogus 'GL format 0 is not supported' message
See https://bugreports.qt.io/browse/QTBUG-104741 and #7314
2022-08-23 18:31:42 +02:00
Florian Bruhin 68f01b9072 Qt 6.4: Ignore new Chromium cert errors in tests
See #7314
2022-08-23 18:31:42 +02:00
Florian Bruhin 479aa075ac Qt 6.4: elf: More hacks to get version
With Qt 6.4, it looks like the full UA disappeared from the ELF string
table - see previosly: db1382f75c

However, the full Chromium version string is still stored separately,
most likely for qWebEngineChromiumVersion() - so let's go hunt for that.

Note that this code won't be used for most situations, as with an up-to-
date PyQt, we finally have an API to access this information properly.
But it's still useful as a fallback in strange situations like running
an older PyQt against a newer Qt.

See #7314
2022-08-23 18:31:42 +02:00
Florian Bruhin 34db7a1ef4 Qt 6.4: Add --webEngineArgs
See #7314
2022-08-23 18:31:42 +02:00
Florian Bruhin ce32159b08 Qt 6.4: Add initial version info
Doesn't fix the issue in #7314 as we are on PyQt 6.3
2022-08-23 18:31:42 +02:00
Florian Bruhin a516ad98fd tox: Simplify tox syntax
We can use negative factors now, and Qt 6.2/6.3 can be simplified too.

See https://tox.wiki/en/latest/config.html#complex-factor-conditions
2022-08-23 18:31:42 +02:00
Florian Bruhin f7753550f2 keyutils: Move public functions to KeyInfo
This avoids the temptation of creating a Qt.Key() manually, which needs
to be checked for ValueError with PyQt 6.2 due to its handling of unknown enum
values.

This is exactly what happened in RegisterKeyParser, which caused such a
ValueError:
https://github.com/qutebrowser/qutebrowser/issues/7047#issuecomment-1163288560

Closes #7047
2022-08-23 18:31:42 +02:00
Florian Bruhin a7e6a3a178 Avoid deprecated QProcess.pid()
processId() got introduced in Qt 5.3

FIXME: pick to master?
2022-08-23 18:31:42 +02:00
Florian Bruhin 05fdb6ca7c Adjust test_notification for Qt 6 2022-08-23 18:31:42 +02:00
Florian Bruhin 8715263c75 qt6: Add macOS sandboxing warning
See #7278
2022-08-23 18:31:42 +02:00
Florian Bruhin 03e383a18f build-release: Add suffixes for Qt 6 2022-08-23 18:31:42 +02:00
Florian Bruhin 8c8f05d538 build-release: Make whitelist more fine-grained 2022-08-23 18:31:42 +02:00
Florian Bruhin 76456e6bd9 tests: Ignore another Chromium line 2022-08-23 18:31:42 +02:00
Florian Bruhin b4b5c1d755 build-release: Reenable partial macOS symlinking
See #7252
2022-08-23 18:31:42 +02:00
Florian Bruhin 7f4f072629 build-release: Ignore sandboxing disabled message
See #7278
2022-08-23 18:31:42 +02:00
Florian Bruhin 96dfd2bbf9 tests: Disable word wrap for rich text tests
Fixes #7267
2022-08-23 18:31:42 +02:00
Florian Bruhin c8378d0872 Switch to PyInstaller master branch
Closes #7258
2022-08-23 18:31:42 +02:00
Florian Bruhin 5b3585805e Revert "wip: Work around PyQt snapshot enum weirdness"
This reverts commit 400dbc8de3139d2a7015bcf58f14e56c46f3bdb9.
2022-08-23 18:31:42 +02:00
Florian Bruhin a46b09f9bc Upgrade to PyQt6 6.3.1 2022-08-23 18:31:42 +02:00
Florian Bruhin a6becca540 scripts: Add check for direct PyQt imports 2022-08-23 18:31:42 +02:00
Florian Bruhin 7623875a18 mkvenv: Work around QT_DEBUG_PLUGINS crash
Fixes https://github.com/qutebrowser/qutebrowser/issues/7257
2022-08-23 18:31:42 +02:00
Florian Bruhin e956e7b8c7 build-release: Ignore new macOS warnings temporarily
See #7255 and #7256
2022-08-23 18:31:42 +02:00
Florian Bruhin 2baa590043 build-release: Increase macOS template size once again
See #7252
2022-08-23 18:31:42 +02:00
Florian Bruhin 6ff6ce23e5 pyinstaller: Disable symlink patching for now
See #7252
2022-08-23 18:31:42 +02:00
Florian Bruhin 42ab19b63b macOS: Use patched PyInstaller
See #7258
2022-08-23 18:31:42 +02:00
Florian Bruhin 9746b508e8 Update font table comment 2022-08-23 18:31:42 +02:00
Florian Bruhin c64a43d44d scripts: Adjust supported architectures for PyQt6
32-bit Windows support got dropped, macOS arm64 (M1) support added.
2022-08-23 18:31:42 +02:00
Florian Bruhin 66b210ea7d scripts: Add _is_qt6_version to mkvenv 2022-08-23 18:31:42 +02:00
Florian Bruhin 867dace9fb Remove extra int() for drawing focus rect
Seems to be called rather infrequently (when focusing some other window
even?) but then crash with:

    Traceback (most recent call last):
    File ".../qutebrowser/completion/completiondelegate.py", line 323, in paint
        self._draw_focus_rect()
    File ".../qutebrowser/completion/completiondelegate.py", line 263, in _draw_focus_rect
        o.state |= int(QStyle.StateFlag.State_KeyboardFocusChange | QStyle.StateFlag.State_Item)
    TypeError: int() argument must be a string, a bytes-like object or a real number, not 'StateFlag'
2022-08-23 18:31:42 +02:00
Florian Bruhin 0dbad34b39 Revert "Patch PyQt6 QUrl flag behavior for Python 3.11"
This reverts commit 14c1593de2abd9f24a223805a4740d8d9fd93622.
Fixed in Python 3.11b2: https://github.com/python/cpython/pull/93302
2022-08-23 18:31:42 +02:00
Florian Bruhin 9e99400d8f Set content.local_content_can_access_file_urls to False for userscripts dir
See #7220
2022-08-23 18:31:42 +02:00
Florian Bruhin 9c1be06cb6 Allow remote content access from userscript html files
Fixes #7206
2022-08-23 18:31:42 +02:00
Florian Bruhin ed19d7f58b Add --include-hidden for :config-diff
Needed it for debugging, so why not implement it properly.
TODO: Changelog, pick to master?
2022-08-23 18:31:42 +02:00
Florian Bruhin 836221ecaf Update Qt version test 2022-08-23 18:31:42 +02:00
Florian Bruhin 07434241ef Reintroduce skipped tests 2022-08-23 18:31:42 +02:00
Florian Bruhin 38f6de4b0c mkvenv: Apply workaround with --pyqt-version 5 2022-08-23 18:31:42 +02:00
Florian Bruhin 7ab16cccc1 Improve version detection for software rendering workaround 2022-08-23 18:31:42 +02:00
Florian Bruhin 769ef6859f Adjust some fixme comments 2022-08-23 18:31:42 +02:00
Florian Bruhin 541d49d08b test that enums match their Qt equivalents
Also changes reloaded -> reload for consistency
(both to Qt and between the names).
2022-08-23 18:31:42 +02:00
Florian Bruhin 96fedff22a old qt: Remove workaround
Fixed in sip 5.3.0 (May 31st, 2020), so should not be a problem
since Qt 5.15.0 (June 1st, 2020).
2022-08-23 18:31:42 +02:00
Florian Bruhin 344fcb6918 Ignore additional chromium message
See https://github.com/qutebrowser/qutebrowser/runs/6658849317?check_suite_focus=true
2022-08-23 18:31:41 +02:00
Florian Bruhin c29419b86a Adjust PyInstaller hiddenimports
_QOpenGLFunctions_2_0 was added in 2df9508e44 but
doesn't seem to be needed anymore. PyQt 6 doesn't seem to need any hiddenimports
at all.
2022-08-23 18:31:41 +02:00
Florian Bruhin e0bf66a191 Adjust _create_module_info for Qt 6 2022-08-23 18:31:41 +02:00
Florian Bruhin f6aeb11f34 Move creating version.MODULE_INFO to a function 2022-08-23 18:31:41 +02:00
Florian Bruhin 006010ecce Remove setting Pulseaudio properties
The icon change doesn't seem to have any effect anymore (those environment
variables might be isolated from Chromium rendering processes since some Qt
update). The name change isn't needed anymore with QtWebEngine 5.15.2
which is now the oldest supported version.

See #3832
2022-08-23 18:31:41 +02:00
Florian Bruhin 42f5902ba6 Adjust Qt/PyQt version ranges 2022-08-23 18:31:41 +02:00
Florian Bruhin 4de0e90fd0 Patch PyQt6 QUrl flag behavior for Python 3.11
See https://www.riverbankcomputing.com/pipermail/pyqt/2022-May/044668.html
and https://github.com/python/cpython/issues/93250

TODO: Revert again?
2022-08-23 18:31:41 +02:00
Florian Bruhin f4cb011432 mkvenv: Remove sip packages from binary args
e.g. not available for Python 3.11 yet
2022-08-23 18:31:41 +02:00
Florian Bruhin 6c1ba9281f Workaround for clicking links in local URLs
Closes #7194
2022-08-23 18:31:41 +02:00
Florian Bruhin 0cf7453fc3 ci: Prepare Qt 6 dockerfiles 2022-08-23 18:31:41 +02:00
Florian Bruhin 46933168fe qt 6: Fix getting importlib PyQtWebEngine versions
Needed for e.g. Windows and PyQt < 6.3.1
2022-08-23 18:31:41 +02:00
Florian Bruhin c0ffd6d327 scripts: Pass through Qt 6 to PyInstaller 2022-08-23 18:31:41 +02:00
Florian Bruhin a5a824f234 scripts: Initial Qt 6 support for build_release.py 2022-08-23 18:31:41 +02:00
Florian Bruhin 5d671a1d2b tox: Add a build-release-qt6 environment
This raises our minimum tox version from 3.15 to 3.20 to properly
support the environment name with empty factors:
https://github.com/tox-dev/tox/issues/1636

Distribution-wise, this hopefully isn't a problem: Debian Buster
(oldstable) had tox 3.7, Debian bullseye (stable) has 3.21. Similar
story for Ubuntu: 20.04 LTS has 3.13, 21.10 (and thus 22.04 LTS) has
3.21.
2022-08-23 18:31:41 +02:00
Florian Bruhin 3ba56bcc6e old qt: Remove unneeded multimedia key names
Those were added to Qt 5.14:
https://codereview.qt-project.org/c/qt/qtbase/+/278803

TODO: Changelog for different names for "To-do list" and
"Adjust contrast"?
2022-08-23 18:31:41 +02:00
Florian Bruhin 34beacf19b Adjust keyutils._NIL_KEY for PyQt enum changes
Follow-up for f3291130d13ae0dae01e57dd5b55d72688cd9a07.
2022-08-23 18:31:41 +02:00
Florian Bruhin 18a7a5fc74 WIP: CI: Disable failing checks
To catch regressions... TODO: fix and reenable
2022-08-23 18:31:41 +02:00
Florian Bruhin ec8eebf996 lint: Fix remaining pylint issues 2022-08-23 18:31:41 +02:00
Florian Bruhin d3c1a50598 lint: Fix rewrite scripts 2022-08-23 18:31:41 +02:00
Florian Bruhin f9eb4fb04d lint: Ignore pylint import order for now 2022-08-23 18:31:41 +02:00
Florian Bruhin 21d9c9a585 lint: Fix various small flake8 issues 2022-08-23 18:31:41 +02:00
Florian Bruhin 52f2b430e9 lint: Fix flake8 docstring issues 2022-08-23 18:31:41 +02:00
Florian Bruhin f021abd980 lint: Split up debug.qenum_key 2022-08-23 18:31:41 +02:00
Florian Bruhin 80961cee6b lint: Fix flake8 whitespace issues 2022-08-23 18:31:41 +02:00
Florian Bruhin cf314aeb3a lint: Fix flake8 QtCore imports 2022-08-23 18:31:41 +02:00
Florian Bruhin e2298966b4 lint: Fix flake8 around key handling 2022-08-23 18:31:41 +02:00
Florian Bruhin e658ce6acf lint: Remove unused imports
Via autoflake and git add -p
2022-08-23 18:31:41 +02:00
Florian Bruhin 805e43cf97 WIP: Avoid line-too-long
TODO: Revert once we use black
2022-08-23 18:31:41 +02:00
Florian Bruhin ebdf248e44 WIP: Avoid linter issues with temporary Qt wrappers 2022-08-23 18:31:41 +02:00
Florian Bruhin 5aa9cb7401 Fix misc checks 2022-08-23 18:31:41 +02:00
Florian Bruhin 39ea85645b Fix vulture 2022-08-23 18:31:41 +02:00
Florian Bruhin 218f490484 Warn on QtWebEngine downgrade and Qt 5 -> 6 upgrade 2022-08-23 18:31:41 +02:00
Florian Bruhin 6ed0e1a370 version: Make sure QUTE_QTWEBENGINE_VERSION_OVERRIDE always wins
TODO: Pick to master?

TODO: changelog
2022-08-23 18:31:41 +02:00
Florian Bruhin 34c17a2d9d Fix qenum_key() for PyQt missing enum support
Context:
https://www.riverbankcomputing.com/pipermail/pyqt/2022-May/044647.html
2022-08-23 18:31:41 +02:00
Florian Bruhin e6497f8ae5 wip: Work around PyQt snapshot enum weirdness
TODO: Revert?

Context:
https://www.riverbankcomputing.com/pipermail/pyqt/2022-May/044653.html
https://www.riverbankcomputing.com/pipermail/pyqt/2022-May/044654.html
2022-08-23 18:31:41 +02:00
Florian Bruhin b44abce26e scripts: Add --pyqt-snapshot to mkvenv.py 2022-08-23 18:31:41 +02:00
Florian Bruhin 9212ba94d6 scripts: Allow linking/installing pyqt-5 or pyqt-6 2022-08-23 18:31:41 +02:00
Florian Bruhin ff1e165be1 mkvenv: Fix comparison
TODO: pick to master?
2022-08-23 18:31:41 +02:00
Florian Bruhin b5aa728c30 qt6: Use new API to get Chromium/QtWebEngine versions 2022-08-23 18:31:41 +02:00
Florian Bruhin 2b1ba1fbb8 backendproblem: Add check for qt-quick software rendering 2022-08-23 18:31:41 +02:00
Florian Bruhin f079c2ebf4 backendproblem: Allow not suggesting alternate backend
TODO: cherry-pick to master?
2022-08-23 18:31:41 +02:00
Florian Bruhin a7d276e0da printing: Save dialog
We need to call .deleteLater() on the dialog when printing is done.
Otherwise, it sticks around, as confirmed by :debug-all-objects.

This might also fix the macOS segfault issue.
TODO: Verify this.
2022-08-23 18:31:41 +02:00
Florian Bruhin 377749c76f Refactor and fix printing
QWebEnginePage::print() changed to QWebEngineView with Qt 6, and emits a new
printFinished() signal instead of taking a callback. Adjust our API accordingly.

There also is a pdfPrintingFinished signal which we now use to get a bit more
feedback to the user.

TODO: Changelog entry for PDF feedback?
2022-08-23 18:31:41 +02:00
Florian Bruhin c7ea2f705f tests: Skip broken PDF.js installations
See #7135

TODO: cherry-pick to master?
2022-08-23 18:31:41 +02:00
Florian Bruhin ee7b283afb Fix sandboxing tests on Flatpak
See https://github.com/flathub/org.qutebrowser.qutebrowser/issues/193

TODO: Cherry-pick to master?
2022-08-23 18:31:41 +02:00
Florian Bruhin ef486aa263 Remove unneeded old log ignores 2022-08-23 18:31:41 +02:00
Florian Bruhin 0ace4a5fee Disable loadFinished workaround on unaffected versions
With QtWebEngine 5.15.5+, we shouldn't need the workaround anymore.

This also seems to fix flakiness in
tests/end2end/features/test_navigate_bdd.py::test_navigating_up_in_qutehelp
where sometimes no loadFinished signal was found.

Relevant commits: git log -G 65223
Partially reverts 1106d82591.

TODO: Changelog
TODO: Pick to master?
2022-08-23 18:31:41 +02:00
Florian Bruhin e4bc609ff4 Update dark mode tests for Qt 6 and ARM
Thanks to tinywrkb for running them on Flatpak infrastructure!
2022-08-23 18:31:41 +02:00
Florian Bruhin e391c76430 darkmode: Restructure _PREFERRED_COLOR_SCHEME_DEFINITIONS
This way, a missing variant is a loud failure rather than a silent one.
2022-08-23 18:31:41 +02:00
Florian Bruhin 23099495f7 Fix preferred color scheme with Qt 6.3 2022-08-23 18:31:41 +02:00
Florian Bruhin 242ce99fc9 tests: Fix test_from_str_hypothesis for FlagList
TODO: cherry-pick to master
2022-08-23 18:31:41 +02:00
Florian Bruhin fceb363a21 Regenerate docs 2022-08-23 18:31:41 +02:00
Florian Bruhin dd0f30cdbb Add colors.webpage.darkmode.increase_text_contrast
TODO: changelog
2022-08-23 18:31:41 +02:00
Florian Bruhin 29d1096e8e Adjust test_preferred_colorscheme_with_dark_mode for Qt 6 2022-08-23 18:31:41 +02:00
Florian Bruhin 803aeb9223 Also apply MathML dark mode workaround with Chromium 90 (Qt 6.2) 2022-08-23 18:31:41 +02:00
Florian Bruhin 634cbc2d5f Adjust dark mode tests for Qt 6 2022-08-23 18:31:41 +02:00
Florian Bruhin 81a67a9201 Adjust referrer handling for Qt 6
As suspected in a comment, ReducedReferrerGranularity does not exist anymore
with Chromium 90, and neither does an option for getting the full referrer back:

https://chromium-review.googlesource.com/c/chromium/src/+/2545444
https://bugs.chromium.org/p/chromium/issues/detail?id=1150018
2022-08-23 18:31:41 +02:00
Florian Bruhin c151183e9d Update mkvenv.py for Qt 6 2022-08-23 18:31:41 +02:00
Florian Bruhin 473f048041 downloads: Bump up maximum redirects
TODO: Cherry-pick to master?
TODO: Changelog
2022-08-23 18:31:41 +02:00
Florian Bruhin 59922dfe4e Delete empty files after download errors
It's debatable whether we should keep non-empty files, but surely empty
ones are useless.

TODO: Add changelog entry
TODO: Pick to master?
2022-08-23 18:31:41 +02:00
Florian Bruhin 4812c8e30e Add a test for insecure download redirects
TODO: Pick to master?
TODO: Changelog entry
2022-08-23 18:31:41 +02:00
Florian Bruhin 556d6cbdc2 Let Qt handle QtNetwork redirects
With Qt 6, the default changed to Qt handling network redirects instead of us
doing so manually. This seems like a good thing, so instead of setting the
redirect policy back to QNetworkRequest.RedirectPolicy.ManualRedirectPolicy,
let's just let Qt handle everything.

By default, Qt allows 50 redirects before giving up. That seems a tad much, so
we set it back to our former default.

This change comes with a few changes in behavior:

- Redirects to the same URL now fail (too many redirects) rather than being
  ignored. I'm not sure how the previous behavior was useful. We added it in the
  initial implemetation in 6856c49be9 (later
  refactored a bit in 70e390a2e8) and added a test
  in d13f88f0ac. But it doesn't make sense...

- We use QNetworkRequest.RedirectPolicy.NoLessSafeRedirectPolicy (no HTTPS ->
  HTTP redirects allowed), while the former behavior didn't validate redirects
  at all. Interestingly enough, I can't get Chromium to error out in that case
  for downloads (though I only tried on localhost with a self-signed
  certificate). However, it seems like a reasonable default.
  Test will be added in a follow-up commit.

- Partially downloaded files aren't deleted anymore on a "too many redirect"
  error. This should be solved in a more generic way, will do so in a follow-up
  commit.

TODO: Pick to master?

Fixes #2679.
2022-08-23 18:31:41 +02:00
Florian Bruhin e5d632edf2 tests: Add initial unit tests for browsertab.py 2022-08-23 18:31:41 +02:00
Florian Bruhin 6ce8ff1e71 Adjust :debug-webaction for new-style enums
With scoped enums, we don't need to check whether the member belongs to the enum
class anymore, we just get it directly from there.

Also needed for PyQt 6 because we can't access the members unscoped anymore.

TODO: Pick to master?
2022-08-23 18:31:41 +02:00
Florian Bruhin 76514547cf qt6 tests: Update ignored messages
On Qt 6.3: 'ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.'
2022-08-23 18:31:41 +02:00
Florian Bruhin 7bc01145cc tests: Update QUrl tests for Qt 6.3
See https://bugreports.qt.io/browse/QTBUG-85371 and
https://bugreports.qt.io/browse/QTBUG-60364
2022-08-23 18:31:41 +02:00
Florian Bruhin 4a799c15e7 Skip urlutils.same_domain tests on Qt 6
We never really use its functionality with QtWebEngine.
2022-08-23 18:31:41 +02:00
Florian Bruhin f7897e9842 Don't call QIODevice.readLine with -1 maxSize
Not possible anymore with Qt 6.2:
https://codereview.qt-project.org/c/qt/qtbase/+/362330
2022-08-23 18:31:41 +02:00
Florian Bruhin 995629eec3 Fix qenum_key with invalid flag values 2022-08-23 18:31:41 +02:00
Florian Bruhin b7eb182e74 debug: Use existing qflags_key logic for Qt 6
The existing logic seems to work fine now (with some adjustments) and results in
better output compared to the repr.

Partially reverts 111e0c7f3dcccb4d0ff807854cacb6506a93e1f2.
2022-08-23 18:31:41 +02:00
Florian Bruhin de593e6a8c tests: Add some marks for Qt 5 / Qt 6 2022-08-23 18:31:41 +02:00
Florian Bruhin ab56389100 debug: Handle int values with PyQt6 2022-08-23 18:31:41 +02:00
Florian Bruhin 5f92cc6d76 ipc: Use qenum_key instead of int error codes
TODO: Pick to master?

This is mostly to align the output on Qt 5 and Qt 6, but also for better
error messages.
2022-08-23 18:31:41 +02:00
Florian Bruhin c13bf667d9 qt6 tests: Also apply pyqt_enum_workaround() for modeparsers 2022-08-23 18:31:41 +02:00
Florian Bruhin 6534e2d899 Fix return value for FakeKeyParser.handle
TODO: Pick to master?

In 42e2438efb, we changed "_handle_key" to return
a QKeySequence.SequenceMatch instead of a bool.

Later in b85fe8f678, that change propagated to
"handle" too.

However, the FakeKeyParser introduced in
c1d3a94936 still returned a bool.

This wasn't a problem because we still just checked "if match:".
However, with 756db287ac4c65350aaf53d6f93b6a0a2b356a77, we now check
"if match != QKeySequence.SequenceMatch.NoMatch:", thus the comparsison
with the FakeKeyParser is now the wrong way around.
2022-08-23 18:31:41 +02:00
Florian Bruhin e555c2e0a0 keyutils: Make sure KeyInfo has separate key/mod
If we test for this in KeyInfo() directly (via __post_init__), all code using a
KeyInfo can be sure it has a properly split key/modifier. This is especially
important on Qt 5, where lots of Qt internals use a split value (Qt 6 introduced
QKeyCombination instead).

This however leads to different behaviour when -1 is passed as a key, that now
fails with an AssertionError. However, I believe that to be more correct:

- Testing for -1 was originally introduced in
  866c758660, expecting an AssertionError.
- It was updated in d1854eddaf, still
  expecting an AssertionError
- In 0ee7fac727, we changed that to KeyParseError
  (in the tests only), probably in response to
  78f6ad14c2.

Now that we properly check for this, it's fine to expect an AssertionError
again. I don't think we can ever get -1 from Qt anyways.
2022-08-23 18:31:41 +02:00
Florian Bruhin 1f3e7e19f8 Make keyutils._assert_plain_* work on Qt 6 2022-08-23 18:31:41 +02:00
Florian Bruhin 7f7fe5eca2 WIP: Add additional validation for KeyInfo 2022-08-23 18:31:41 +02:00
Florian Bruhin fe4c2d278d qt6: Handle invalid Qt.Key members in more places
Everything in keyutils constructing a Qt.Key should catch ValueError and reraise
it as InvalidKeyError (low-level). Anything in KeySequence that calls such
methods should re-raise that as a KeyParseError to user code (high-level).

The tests skip anything that relies on constructing things with "strange" keys.
Maybe some of them could be gotten to work, but most probably won't work until
PyQt gets fixed, see e.g.:
https://www.riverbankcomputing.com/pipermail/pyqt/2022-April/044607.html
2022-08-23 18:31:41 +02:00
Florian Bruhin df69af1e32 Clear existing keystring on invalid keys 2022-08-23 18:31:41 +02:00
Florian Bruhin 232bea57e3 Add a KeyInfo.__repr__ 2022-08-23 18:31:41 +02:00
Florian Bruhin 6d08deac40 Refine handling of invalid keys
Introduce an InvalidKeyError to KeyInfo which can then also be turned
into an error in other places.

This was mainly needed to correctly handle config validation for key strings
containing characters not in Qt.Key.

Also, reduce loglevel for the message to debug, as those seem to mostly happen
with keys qutebrowser shouldn't be concerned about anyways (see #7047).
2022-08-23 18:31:41 +02:00
Florian Bruhin f3c60b829b Simplify _next_category_idx condition 2022-08-23 18:31:41 +02:00
Florian Bruhin 9b802975cb Avoid deprecated QModelIndex::child()
TODO: Cherry-pick to master?

Was deprecated in Qt 5.8 because a top-level QModelIndex() does not know which
model it belongs to, making .child() useless on most (flat) models:
https://codereview.qt-project.org/c/qt/qtbase/+/166180
2022-08-23 18:31:41 +02:00
Florian Bruhin e5340c449f Refactor certificate error handling
- Make CertificateErrorWrapper responsible for accepting/rejecting certs
- Try to avoid dealing with unclear booleans
- Implement support for deferred errors (#4616) - disabled due to PyQt bug
- Implement support for Qt 6 API (#7086)
2022-08-23 18:31:41 +02:00
Florian Bruhin ae910113a7 tests: Validate some places with declarative stringly-typed settings 2022-08-23 18:31:41 +02:00
Florian Bruhin c327e33d31 qt 6: Update client certificate selection 2022-08-23 18:31:41 +02:00
Florian Bruhin c5a51eb0bc Drop Qt < 5.15
Fixes #7091

TODO: Add changelog
2022-08-23 18:31:41 +02:00
Florian Bruhin 5e5044e033 Update Chromium version list 2022-08-23 18:31:41 +02:00
Florian Bruhin c6ef1b7d8c qt 6: Fix handling of machinery.Unavailable 2022-08-23 18:31:41 +02:00
Florian Bruhin 8ab6f4c2d7 tests: Fix and improve QLibraryInfo testing 2022-08-23 18:31:41 +02:00
Florian Bruhin 7966afb4c2 tests: Adjust expected qflags_key values
Turns out passing the enum type instead of flags type (like we need to with Qt 6) actually yields better results.
2022-08-23 18:31:41 +02:00
Florian Bruhin 9cf9cfde71 qt6: Fix debug.log_events 2022-08-23 18:31:41 +02:00
Florian Bruhin 60df8fcbb0 debug: Remove add_base for qenum_key
It makes the Qt 5 code more complex and would need changes for Qt 6, yet
isn't actually used anywhere (except in a repr for a test class)
2022-08-23 18:31:41 +02:00
Florian Bruhin 7107e6deb5 sql: Small changes to placeholder handling
I find a dict comprehension easier to grasp, even if we need to repeat the key string.
2022-08-23 18:31:41 +02:00
Florian Bruhin a726c99e68 qt 6: Fix validation of bound values
With the new approach from 54b817898f, we only
look at the values which have actually been bound by the user of the API -
however, we will miss values which have *not* been bound. Thus, we will need to
check for those seperately, with a tiny bit of version dependent code.

See https://codereview.qt-project.org/c/qt/qtbase/+/303955 for some discussion.
2022-08-23 18:31:41 +02:00
Florian Bruhin dba9dff33d tests: Copy enums properly for ipc mocks 2022-08-23 18:31:41 +02:00
Florian Bruhin 51f1420ef5 qt 6: Comprehensive core moves
According to docs, even for stuff we don't use so far
2022-08-23 18:31:41 +02:00
Florian Bruhin 437caf4516 qt 6: Fix getting enum members in tests 2022-08-23 18:31:41 +02:00
Florian Bruhin aa71f8f64f tests: Drop view.setPage(None)
This was added in e6ae8797e7 and it's unclear
whether it's still needed.

In any case, it won't work on Qt 6, as QWebEngineView::setPage does some more
work there:

https://github.com/qt/qtwebengine/blob/v5.15.9-lts/src/webenginewidgets/api/qwebengineview.cpp#L207-L210
https://github.com/qt/qtwebengine/blob/v6.3.0/src/webenginewidgets/api/qwebengineview.cpp#L659-L672

The connect() call there causes a segfault with:
QObject::connect(QWebEnginePage, QWebEngineView): invalid nullptr parameter

If we really still need this, we will either need to skip it with Qt 6, or
perhaps try sip.delete(view.page()) instead.
2022-08-23 18:31:41 +02:00
Florian Bruhin 916adc9ebe qt 6: Avoid QNetworkAccessManager::setNetworkAccessible 2022-08-23 18:31:41 +02:00
Florian Bruhin 71d1be9812 testbrowser: Support PyQt6 2022-08-23 18:31:41 +02:00
Florian Bruhin 9d87bf3329 qt 6: Force debug level for webenginecontext message 2022-08-23 18:31:40 +02:00
Florian Bruhin deb21acdeb qt6 tests: Fix remaining PyQt5 references 2022-08-23 18:31:40 +02:00
Florian Bruhin be42bfb88c qt 6: Adjust getting OpenGL version info 2022-08-23 18:31:40 +02:00
Florian Bruhin a512d6527b qt6 tests: Fix some enum issues around test_keyutils.py 2022-08-23 18:31:40 +02:00
Florian Bruhin 623b06bc3d Fix remaining enum/flag issues 2022-08-23 18:31:40 +02:00
Florian Bruhin ded275dd93 scripts: Add rewrite_find_flags.py 2022-08-23 18:31:40 +02:00
Florian Bruhin 0def1b02bc qt 6: Show error message if no wrappers were found 2022-08-23 18:31:40 +02:00
Florian Bruhin d8a66ca825 scripts: Detect PyQt location 2022-08-23 18:31:40 +02:00
Florian Bruhin 73b73f49c2 scripts: Use builtin ast parser 2022-08-23 18:31:40 +02:00
Florian Bruhin d30afc3b0d scripts: Add rewrite_find_enums.py from issue 2022-08-23 18:31:40 +02:00
Florian Bruhin ef9e4a6663 qt6 tests: Small collection fixes 2022-08-23 18:31:40 +02:00
Florian Bruhin 0428ede31e Add test environments for Qt 6.2 and 6.3 2022-08-23 18:31:40 +02:00
Florian Bruhin fdec8e489c qt6: Don't claim to support PySide yet 2022-08-23 18:31:40 +02:00
Florian Bruhin cf3b3e0594 Let Qt handle back/forward mousepresses
Based on 87b31406e9
2022-08-23 18:31:40 +02:00
Florian Bruhin d387b1a108 tests: Adjust most imports 2022-08-23 18:31:40 +02:00
Jimmy 6f26341874 Support fullscreen requests on Qt6
QApplication.desktop() (And the QDesktopWidget that returns) has been
deprecated since 5.11, we only support Qt 5.12+ (ref #3839).

The recommended alternative is to use
`QGuiApplication::screenAt(QPoint)`, but that doesn't support passing a
widget.

Stackoverflow [points out](https://stackoverflow.com/a/53490851) that
you can get to the current screen of a widget, so that's what I'm using
here.

Once you get the screen there is both `geometry()` and
`availableGeometry()` available. The later, sometimes, excludes window
manager status bars and such, which fullscreen apps should cover.

This approach works on both 5.15 and 6.2, so no version checks
necessary.

The tests now need real parent widget so that .window.WindowHandle()
works.

(cherry picked from commit 2866cae6b3)
2022-08-23 18:31:40 +02:00
Florian Bruhin 1e99e37e1a Store raw key in modeman.KeyEvent
We don't know if this is a valid Qt.Key at this point.

See #7045 and #7047

(cherry picked from commit 71c9500ea8780ec79d93667c43b40aa2a85a4ccc)
2022-08-23 18:31:40 +02:00
Florian Bruhin a746c227af Ignore invalid keys
Workaround for #7047, supersedes #7045

(cherry picked from commit c9d76675eb197ab88ad3b88073cb11a3a3b9bb18)
2022-08-23 18:31:40 +02:00
Florian Bruhin 11a77d4bff qt 6: Adjust to new createWindow() API
Based on cc03029de1 and
93da6b9f8b
See #7049
2022-08-23 18:31:40 +02:00
Jimmy 5716e7adf1 Make default webengineprofile persistent again.
Qt6 has switched to the global default profile being off-the-record,
which is not the default for qutebrowser.

Restore the previous default object name (although we always point it
elsewhere anyway so that name should appear in any file paths).

ref https://bugreports.qt.io/browse/QTBUG-66068

On Qt 5, .defaultProfile() is still used, to ensure the same behavior.
It's not entirely clear from the Qt 5 source what the differences are
between the two.

(cherry picked from commit b961c3b820)
2022-08-23 18:31:40 +02:00
Jimmy 2857bd9708 Let inspector know about on-the-record profiles.
The developer tools only saves preferences to disk, and reads them from
disk, if the profile of the page they are drawing to isn't
off-the-record. So if you want it to remember your dark mode preference
the page hosting the inspector needs to be linked to an on-the-record
profile. So we need to create a new page linked to a specific profile
and then set that on the view.

Options at this point:
1. (in `__init__()` always make a new page linked to the qute default
   profile and add that to the view
2. delay creating the view and page until `inspect()` is called and get
   a pointer to the profile of the page being inspected

(1) is actually what we have done on previous Qt versions because there
the inspector was started with WebEngine's default, global, profile,
which used to be on-the-record. I'm not sure if there are any specific
ramifications to having the inspector data persistent when the page it
is attached to isn't, but there might be stuff like per-domain
preferences saved in that case which would be an information leak.

So I've went with (2) even though it is probably going to be more
disruptive to the tests. In the future if we re-use inspectors across
different tabs/windows again we can make a new page on demand if the
profile of the inspected page differs form the initial one. For now I've
put an assert there because I am lazy.

It's a bit awkward having most of the setup in `inspect()` and not
`__init__()`. `_init_inspector()` and `inspect()` are only ever called
once right beside each other though (now) so we could just pass the page
to `__init__()` and get rid of `inspect()`.

(cherry picked from commit ec200c3486)
2022-08-23 18:31:40 +02:00
Florian Bruhin b56d604cfe Make notifications work
Based on d1eecf8b97.

Relevant parts from that commit message:

    `QVariant.Type` has moved to `QMetaType.Type`[1][] and QMeta.Type
    doesn't work with int().

    `QtWebEngineCore.QWebEnginePage.Feature` doesn't work with int(), so add
    it to the maps twice.

    [1]: https://www.qt.io/blog/whats-new-in-qmetatype-qvariant

Also:

    `QImage(':/icons/qutebrowser-64x64.png')` yields and empty QImage. This
    is not fixed but things don't crash because of it anymore. For instance
    the "Title & Body" test on https://web-push-book.gauntface.com/demos/notification-examples/

but that part seems to work fine now. I don't quite understand why the original
commit added an "or bool(icon.rect())", but I can't find anything breaking
things without.
2022-08-23 18:31:40 +02:00
Florian Bruhin 4f464abd3b Move extract_enum_val to qtutils
Needs to be used elsewhere too.
2022-08-23 18:31:40 +02:00
Florian Bruhin 5635247919 qt6: Use QPointF for QMouseEvent
Based on 8749729bd2, also works on Qt 5
2022-08-23 18:31:40 +02:00
Florian Bruhin a2fca3b019 qt6: Use new download progress API
Based on 82c68b6120 and
3115aa1cf5.
2022-08-23 18:31:40 +02:00
Florian Bruhin 9cd011e2b3 qt6: Use Qt 5.14 API for download filename
Based on 8a068d91e5 and
a0cf3ffcf3.
2022-08-23 18:31:40 +02:00
Florian Bruhin c620b8d39f qt6: Make :search work
Based on b4d49deac7, but changed to call the
callback with a bool like before.

FindFlag change based on c349fbd180.
2022-08-23 18:31:40 +02:00
Florian Bruhin 0833b5f6f1 Use new errorOccurred signals
Based on:
654110c985
1168a6a13b
bb3cbdaa65
2022-08-23 18:31:40 +02:00
Florian Bruhin def864adc8 Fix QKeySequence match comparison
Picked from ab447bd396 and f1f1eec3fa
2022-08-23 18:31:40 +02:00
Florian Bruhin ec8e5af4dd qt6: Initial support for debug.qenum/qflags_key 2022-08-23 18:31:40 +02:00
Florian Bruhin f8520b0a76 Simplify KeyInfo.to_qt 2022-08-23 18:31:40 +02:00
Florian Bruhin f6e1235421 Fix extracting KeyboardModifiers 2022-08-23 18:31:40 +02:00
Florian Bruhin 3e21c8214a Store KeyInfo in KeySequence 2022-08-23 18:31:40 +02:00
Florian Bruhin fce306d5f1 qt6: Remove some int() on KeyboardModifier types 2022-08-23 18:31:40 +02:00
Florian Bruhin aced2c47ae Fix _assert_plain_key on Qt 6 2022-08-23 18:31:40 +02:00
Florian Bruhin fcd1a7bbb1 qt6: Adjust elf.py 2022-08-23 18:31:40 +02:00
Florian Bruhin 3ef3bac01d Basic configurability for Qt wrapper 2022-08-23 18:31:40 +02:00
Florian Bruhin bcfa99d1e6 Fix QWebEngineScript finding
See 9a6856175d
and 6bee12155fc82d2042fcf1024df642c3c171cbf2
2022-08-23 18:31:40 +02:00
Florian Bruhin 49d840a923 More QtWebEngineCore moves 2022-08-23 18:31:40 +02:00
Florian Bruhin 96c303823f Initial proper QKeyboardCombination handling
See 735f1774e4
2022-08-23 18:31:40 +02:00
Florian Bruhin 76f9262def Fix missed enum scope changes
For some reason, QtMsgType was not included and missing.
(cherry picked from commit 6afa00c465)

For completiondelegate.py, we accessed the enum members via self instead of
properly using the class.
(cherry picked from commit d37cc4ac73)

For interceptor.py, line breaks broke our script.

QKeyEvent.KeyPress was used inherited from QEvent.KeyPress, thus not
renamed.
2022-08-23 18:31:40 +02:00
Jimmy cedca47370 sql: Make Query.bound_values() return a dict again
SqlQuery.boundValues() changed in Qt6 from returning a map of
placeholders -> values to just providing a list of values.

We can either:

1. follow that change and always return a list
    * this has the effect of making the return value have more items if
      the caller uses a placeholder more than once in a query, like
      histcategory does
2. maintain the current return type

Here I have chosen to do (2). Although (1) is an option since it looks
like no caller actually cares about the contents of the response at this
point (apart from tests), just that it is Truthy/Falsy and the right
length (if Truthy). And callers should know how many times they re-used
placeholders so should be able to adjust their length comparison themselves.

There is no API for enumerating placeholder labels anymore, if we
want to maintain our API we must either 1) store the placeholders so we
can look them up based on label later, 2) guess what they are (eg assume
the caller always used sequential integers starting at 0), or 3) always
return the dict keys as the positional indexes instead of labels (and
return a larger dict if the caller used single placeholders multiple
times).

I've chosen to do 3 which should have the same result as the 5.15
implementation, at the cost of some more list allocations.
So now we store the placeholders so we can query for them directly
later.
And the existing tests should all pass, if you can get them to run.

This approach works on both 5.15 and 6.2, so no version checks
necessary.

(cherry picked from commit 54b817898f)
2022-08-23 18:31:40 +02:00
Florian Bruhin 236371cb1d Fix up various webkit/webengine imports 2022-08-23 18:31:40 +02:00
Florian Bruhin 75188fb257 First earlyinit adjustments 2022-08-23 18:31:40 +02:00
Florian Bruhin 5e26fa922b Make AA_UseHighDpiPixmaps optional 2022-08-23 18:31:40 +02:00
Florian Bruhin 894acbd6f7 Add QLibraryInfo wrapper 2022-08-23 18:31:40 +02:00
Florian Bruhin 8011eb4b49 QWebEngineDownloadItem/Request move 2022-08-23 18:31:40 +02:00
Florian Bruhin 8031abd5ad QWebEngine{Settings,Profile} move 2022-08-23 18:31:40 +02:00
Florian Bruhin f0972704a7 Initial _NIL_KEY fix 2022-08-23 18:31:40 +02:00
Florian Bruhin d734101d9a Qt 6: Handle QtOpenGL/QFileSystemModel moves 2022-08-23 18:31:40 +02:00
Florian Bruhin e2537e4ed1 Adjust flag types for PyQt6
With PyQt6, flags are only accessible via their flag names, not via
their enum names.

This also removes lots of cast() calls we added for mypy a while back.
We'll need to see if/how to deal with them once we can run mypy against
PyQt6.

Also fix creating empty KeyboardModifiers.

See b8f323d6a4 and
e61597ca81.
2022-08-23 18:31:40 +02:00
Florian Bruhin 0877fb0d78 Run scripts/dev/rewrite_enums.py 2022-08-23 18:31:38 +02:00
Florian Bruhin a11f1d34d3 Add rewrite_enums.py 2022-08-23 18:09:11 +02:00
Florian Bruhin 5ebfee1f42 Remove enableoverflowchecking for Qt 6 2022-08-23 18:09:11 +02:00
Florian Bruhin d47cfd99d7 Run scripts/dev/rewrite_qt_imports.sh 2022-08-23 18:09:11 +02:00
Florian Bruhin 6cac151ad9 Add basic qt wrapper stuff 2022-08-23 18:09:11 +02:00
Florian Bruhin 9724644322 Update changelog 2022-08-23 18:07:05 +02:00
Florian Bruhin 3dd969e731 Merge remote-tracking branch 'origin/pr/7293' 2022-08-23 17:58:09 +02:00
Florian Bruhin 6195cfabdb Update docs 2022-08-23 17:46:56 +02:00
kt programs 0c3aa86c07 Make elide position in truncated tab title configurable 2022-08-23 20:01:59 +08:00
Florian Bruhin 21c82b029b doc: Add qute-containers to README 2022-08-22 15:19:29 +02:00
Florian Bruhin a90d2ba580 Remove unused imports 2022-08-22 14:29:14 +02:00
Florian Bruhin 6379553774 Revert "Ignore flask development warnings."
This reverts commit d6b7d51307.

We switched to CherryPy for the SSL server in the previous commit, so
this won't be needed anymore.
2022-08-22 14:21:20 +02:00
Florian Bruhin 41c4ee3e2f tests: Use CherryPy for HTTPS server
Not sure why we didn't do this initially, maybe it wasn't possible: https://webpy.org/cookbook/ssl

This means we don't need to (ab)use the Flask development server anymore.
2022-08-22 14:21:08 +02:00
Florian Bruhin 0dda1d41be ci: Fix regex for macOS log
The smoke test runs without debug logging, so the format is different.
2022-08-22 14:19:55 +02:00
Florian Bruhin e8cc163d84 scripts: Ignore new macOS 11 warning
Not sure where it's coming from, but it happened after swiching CI to macOS 11, and nobody has complained about it.
2022-08-22 13:59:23 +02:00
Florian Bruhin 18d73114ce Update docs 2022-08-22 13:56:59 +02:00
Florian Bruhin 3f875e3b27 Add --quiet for :back and :forward 2022-08-22 11:44:31 +02:00
Florian Bruhin b8cc8588f5 Update changelog URLs 2022-08-22 10:47:21 +02:00
Florian Bruhin ce293525af
Merge pull request #7355 from qutebrowser/update-dependencies
Update dependencies
2022-08-22 01:25:03 -07:00
qutebrowser bot 696be85892 Update dependencies 2022-08-22 04:48:16 +00:00
Florian Bruhin 9f4e26186e Fix notification unit tests after GetServerInformation was added 2022-08-18 11:42:44 +02:00
Florian Bruhin 55b2fb6c9c
Merge pull request #7344 from qutebrowser/update-dependencies
Update dependencies
2022-08-18 02:24:38 -07:00
Florian Bruhin 62d3a80026 tests: Support GetServerInformation for test notification server
Huge thanks to u/SomethingOfAGirl on Reddit for finding out how to make this work!

See https://www.riverbankcomputing.com/pipermail/pyqt/2021-March/043724.html
2022-08-18 11:09:33 +02:00
toofar d6b7d51307 Ignore flask development warnings.
We used to dodge these by listening on 0.0.0.0. Now they are on to us
and always show the warnings. Running flask in development mode here is
intended, so lets not have the warnings fail the tests.

Ref: https://github.com/pallets/werkzeug/issues/2480
2022-08-18 19:18:09 +12:00
Florian Bruhin c9613e09e5 ci: Drop Ubuntu 18.04, add 22.04
See https://github.com/actions/runner-images/issues/6002
2022-08-16 18:59:27 +02:00
Florian Bruhin 2b2682f14c ci: Update to macOS 11, add 12
See https://github.com/actions/runner-images/issues/5583
2022-08-16 18:59:27 +02:00
Florian Bruhin 65aa61f33f Fixup content.javascript.log_messages.excludes issues 2022-08-15 18:53:35 +02:00
Florian Bruhin 0573d3b11c Update changelog 2022-08-15 18:24:30 +02:00
Florian Bruhin d9e20f6b30 config: Handle config.py errors while updating mutables
Fixes #3580
2022-08-15 18:24:30 +02:00
Florian Bruhin 78454983e0 config: Use a single argument for _handle_error()
Needed for the next commit. Done in both config.py and configfiles.py
for consistency.
2022-08-15 18:24:30 +02:00
Florian Bruhin 28f171d1bb config: Properly convert values for list/dict commands
Those commands use the config interface expecting Python objects (via
update_mutables), but we always used the raw user-supplied string as
input.

Thus far, it was very hard to trigger this bug: It would only
trigger with a List or Dict config option, with a value type which does
*not* accept a string type in to_py(). That means:

- List / FlagList / ConfirmQuit / ShellCommand
- Bool / BoolAsk
- Int
- Float
- Dict / Padding

(Notably, Perc, PercOrInt and Regex all *do* accept a string.)

That leaves only a couple of candidates:

- hints.selectors, but that's "no_autoconfig: true"
- bindings.default, ditto
- bindings.commands, but no reason to use :config-dict-* on it,
  especially with fixed keys

Therefore, this got only uncovered now, after adding
content.javascript.log_message.levels, which is a Dict with FlagList
values.

Note that we still don't have any config definition with an affected
List type, thus currently making it impossible to test the changes for
:config-list-{add,remove}.

Also note the adjusted test_{dict,list}_add_invalid_value tests - they
were just plain wrong. The command functions are never going to be
called by a Python object from the user (only with a str).

Finally, test_list_remove_no_value also needed an adjustment because
the value validation now happens *before* the other validation done
by the command.
2022-08-15 18:23:29 +02:00
Florian Bruhin 8eecf3af83 config: Discard prior mutables before applying
If we only clear existing mutables *after* applying, we get into an
inconsistent state if there was an error in one of the config values:

The improper value lingers around in self._mutables, and then gets
returned when get_mutable_obj() (or update_mutables()) gets called the
next time.

Reproducer:

    qutebrowser --debug --temp-basedir \
        ':config-dict-add content.javascript.log_message.levels example.org bla' \
        ':later 1000 config-dict-add content.javascript.log_message.levels example.org bla'

Results in:

    ERROR: Invalid value 'bla' - expected a value of type list but got str.
    ERROR: example.org already exists in content.javascript.log_message - use --replace to overwrite!

Fixes the second part of #7343.

nb: As before, the mutable updating actually gets interrupted by a
failing update, instead of it e.g. collecting all errors but carrying
on. With this change, the remaining updates will thus also be discarded,
but that does not seem to be a problem with how mutables are currently
used. Ideally, we should get rid of the mutable handling entirely
anyways, at least for qutebrowser internal code - see #4344.
2022-08-15 16:15:15 +02:00
Florian Bruhin ec2dcfce9e Add content.javascript.log_messages.excludes
Fixes #7342
2022-08-15 15:07:24 +02:00
Florian Bruhin b9920503db Add utils.match_globs
Needed for the next commit.
2022-08-15 13:55:37 +02:00
Florian Bruhin 8fdf5efe32 js: Add some newlines 2022-08-15 11:37:19 +02:00
qutebrowser bot b731fb49d7 Update dependencies 2022-08-15 04:45:36 +00:00
Florian Bruhin 52ae8c77da Fix type annotation 2022-08-12 16:06:52 +02:00
Florian Bruhin 662fa69912 Surface internal/userscript JS errors as messages
Configurable via a new content.javascript.log_message setting.
Closes #7173, driven by #7335.
2022-08-12 11:54:57 +02:00
Florian Bruhin 3161a5b7e6 Merge remote-tracking branch 'origin/pr/7337' 2022-08-08 09:20:17 +02:00
Florian Bruhin 1c984ec080 Update changelog URLs 2022-08-08 09:20:06 +02:00
qutebrowser bot b51c416869 Update dependencies 2022-08-08 04:28:07 +00:00
Florian Bruhin 5e370a80c0 Re-add missing changelog URLs 2022-08-06 11:28:11 +02:00
Florian Bruhin ea077cece9 flake8: Reenable flake8-copyright and flake8-future-import
Partial revert of faf04f3791
2022-08-03 15:21:26 +02:00
Florian Bruhin ea22d74b9b Update changelog URLs 2022-08-03 15:15:26 +02:00
Florian Bruhin 643210f328
Merge pull request #7326 from qutebrowser/update-dependencies
Update dependencies
2022-08-01 06:12:31 -07:00
Florian Bruhin faf04f3791 flake8: Remove broken plugins
https://github.com/PyCQA/flake8/issues/325
https://github.com/savoirfairelinux/flake8-copyright/pull/9
https://github.com/xZise/flake8-future-import/issues/25
https://github.com/aleGpereira/flake8-mock/issues/10
2022-08-01 13:35:45 +02:00
toofar 45c585bf65 revert accidental .flake8 change 2022-08-01 21:01:53 +12:00
toofar c9aadef488 mypy: Remove no longer needed ignore comments
Came through with 0.961	-> 0.971.
Not entirely sure why what change caused them not to be needed but oh
well.
2022-08-01 20:19:03 +12:00
qutebrowser bot 2d04e37a9f Update dependencies 2022-08-01 04:48:27 +00:00
Florian Bruhin fb383a6881
Merge pull request #7329 from youtux/patch-1
Use pytest-bdd:master again in bleeding-edge CI runs
2022-07-27 12:52:59 -07:00
Alessio Bogon 33d7af52c0
Use pytest-bdd:master again
https://github.com/pytest-dev/pytest-bdd/issues/542 should be fixed now
2022-07-27 21:35:26 +02:00
Florian Bruhin 488d33dd1b
Merge pull request #7321 from qutebrowser/update-dependencies
Update dependencies
2022-07-18 00:09:00 -07:00
qutebrowser bot 1838f87f75 Update dependencies 2022-07-18 04:37:01 +00:00
Florian Bruhin 820d81374b bleeding requirements: Back to pytest-bdd release
See https://github.com/pytest-dev/pytest-bdd/issues/542

Reverts 99f65a13e7
2022-07-17 12:42:13 +02:00
Florian Bruhin 418f91dfcd tests: Remove trailing periods in feature files
Breaks after https://github.com/pytest-dev/pytest-bdd/pull/539
2022-07-17 11:51:21 +02:00
Florian Bruhin 8f3011e261 Revert "Revert "ci: Re-add Python 3.11""
This reverts commit 70fa33f52d.
2022-07-13 12:45:03 +02:00
Florian Bruhin 70fa33f52d Revert "ci: Re-add Python 3.11"
This reverts commit d1e653115b.
2022-07-12 23:08:52 +02:00
Florian Bruhin d1e653115b ci: Re-add Python 3.11
Fixes #7143
2022-07-12 17:29:57 +02:00
Florian Bruhin 6d3182edf5
Merge pull request #7311 from qutebrowser/update-dependencies
Update dependencies
2022-07-12 08:28:41 -07:00
qutebrowser bot d7fa17e5e3 Update dependencies 2022-07-12 14:57:00 +00:00
Florian Bruhin d78e6759b7 ci: Get libxcb-shape0 in for normal runs too
Those seem to fail in weird ways as well...
2022-07-12 16:19:34 +02:00
Florian Bruhin 8c29f22b93 ci: Add missing libxcb-shape0
Not sure why this is needed out of the sudden...
2022-07-12 16:03:03 +02:00
Florian Bruhin 63caa39a2a qute-pass: Remove feedback line
Closes #7301
2022-07-11 11:29:19 +02:00
Florian Bruhin d9f0ad1949 Update changelog 2022-07-11 11:16:20 +02:00
Florian Bruhin 10e4429f1e Merge remote-tracking branch 'origin/pr/7304' 2022-07-11 11:15:30 +02:00
Florian Bruhin aaeed45480 ci: Remove TERM=ansi again
Doesn't seem to actually work.
2022-07-11 10:37:50 +02:00
Florian Bruhin df9abc5c23 ci: More colored output 2022-07-11 10:36:23 +02:00
Florian Bruhin 774f24933d ci: Fix wget 2022-07-11 10:27:51 +02:00
Florian Bruhin bb88b91997
Merge pull request #7305 from qutebrowser/update-dependencies
Update dependencies
2022-07-11 01:25:42 -07:00
Florian Bruhin 57be330ff6 Update changelog URLs 2022-07-11 10:25:32 +02:00
Florian Bruhin dc7dad5de8 ci: Add actionlint 2022-07-11 10:23:27 +02:00
qutebrowser bot d16bbdbdc3 Update dependencies 2022-07-11 04:29:18 +00:00
kt programs c6f326b95b macOS: add MHTML file type to handled files 2022-07-10 22:21:38 +08:00
Florian Bruhin 65b10d944a
Merge pull request #7298 from gsaker/master
Fixed #7156: Added zoom keyboard shortcuts to quick start guide
2022-07-06 12:29:57 -07:00
George Saker 42ade4c172 Fixed #7156 2022-07-06 12:12:19 -07:00
George Saker 83f6850bb8 Fixed #7156 2022-07-06 12:02:00 -07:00
Florian Bruhin b3e7be5784 Fix coverage 2022-07-05 17:07:21 +02:00
Florian Bruhin 2839ca7d6d Adjust importlib.abc imports
Available in Python 3.11, old location deprecated in 3.12, removed in 3.14
2022-07-05 16:35:25 +02:00
Florian Bruhin 991cf1e8ba Handle OSError from adblock
When the file is e.g. unreadable, .is_file() will work, but this step will fail.
2022-07-05 16:07:50 +02:00
Florian Bruhin a16aa959bb tests: Fix broken BDD definition
This happened to work before this commit:
7cd7b40df3

Because the "command" argument was still defined from the previous
"And I run ..." step.
2022-07-05 12:27:06 +02:00
Florian Bruhin ed35a2c277 requirements: Upgrade to pytest-bdd 6.0.0
https://github.com/pytest-dev/pytest-bdd/issues/447 has been fixed
2022-07-05 11:16:07 +02:00
kt programs 389eac1bb3 macOS: fix hide_decoration making window nonresizable
Use PyObjC to call `setWindowMask:` with resizable flag on the
underlying NSWindow.

Fixes #4067
2022-07-05 17:14:05 +08:00
Florian Bruhin 99f65a13e7 bleeding requirements: Back to pytest-bdd master
See https://github.com/pytest-dev/pytest-bdd/pull/524
2022-07-05 11:08:12 +02:00
Florian Bruhin e78ddee519 Update changelog URLs 2022-07-04 11:56:27 +02:00
Florian Bruhin b23dbcac58
Merge pull request #7294 from qutebrowser/update-dependencies
Update dependencies
2022-07-04 02:56:21 -07:00
qutebrowser bot 33505fb6bc Update dependencies 2022-07-04 04:39:06 +00:00
Florian Bruhin 0607c1f7cf Add link to flatpak docs 2022-06-28 11:51:04 +02:00
Florian Bruhin 98c1b3e308
Merge pull request #7288 from emanuele6/patch-1
docs: fix asciidoc syntax in install.asciidoc
2022-06-27 13:56:51 -07:00
Emanuele Torre d78b32e1f4
docs: fix asciidoc syntax in install.asciidoc 2022-06-27 22:53:03 +02:00
Florian Bruhin 5fc38aaf22
Merge pull request #7287 from qutebrowser/update-dependencies
Update dependencies
2022-06-26 22:13:24 -07:00
qutebrowser bot 2d487be5b9 Update dependencies 2022-06-27 04:40:19 +00:00
Florian Bruhin 52d98ad9aa build-release: Fix f-string, take 2 2022-06-22 16:02:57 +02:00
Florian Bruhin 208e56f0e9 build-release: Fix handling of Windows .zip suffix 2022-06-22 15:56:17 +02:00
Florian Bruhin 4e5b1d287d build-release: Fix f-string 2022-06-22 15:35:26 +02:00
Florian Bruhin 98990715a6 Release v2.5.2 2022-06-22 15:31:18 +02:00
Florian Bruhin 5d75fcf1db Update changelog 2022-06-22 15:30:14 +02:00
Florian Bruhin 47ef35fb31 ci: Update dependendicies 2022-06-22 12:50:28 +02:00
Florian Bruhin f72dc50aa9 Update changelog 2022-06-22 11:57:09 +02:00
Florian Bruhin dd68a84bc9 Correctly set initial content.{javascript.clipboard,default_encoding}
Those are handled separately from the other settings, but were never initialized
properly in init_settings().

For content.javascript.clipboard, this is a recent regression introduced in
4a6df3a8e8. For content.default_encoding, this has
been around since 2018: 3956f81e73.

Fixes #7281
2022-06-22 11:52:41 +02:00
Florian Bruhin 9648e79645 doc: Update install 2022-06-22 11:16:36 +02:00
Florian Bruhin 8fd5e81ff1 doc: Update install 2022-06-22 10:31:58 +02:00
Florian Bruhin a96aa25a60 ci: Adjust artifact names 2022-06-22 10:30:50 +02:00
Florian Bruhin 8bbf897107 ci: Try to improve nightly artifact upload 2022-06-22 10:11:03 +02:00
Florian Bruhin e0dc588d7a Update docs 2022-06-22 09:43:57 +02:00
Florian Bruhin 7a5eac4165 ci: Actually build Qt 6 for Qt 6 builds 2022-06-22 09:42:05 +02:00
Florian Bruhin aec6014242 Revert "Add LinkedIn array.at quirk"
This reverts commit 5e0d6dc148.

This seems to have been fixed on LinkedIn's side in the meantime.
Also removes the associated changelog entry.
2022-06-22 09:37:26 +02:00
Florian Bruhin c0b6942c8c Update nightly build install instructions 2022-06-21 21:15:00 +02:00
Florian Bruhin ff31bf8da2 ci: Add qt6-v2 to nightly builds 2022-06-21 20:48:26 +02:00
Florian Bruhin 3ac1c8a7a3 ci: Split bleeding CI and nightly builds into two 2022-06-21 20:45:20 +02:00
Florian Bruhin cf58c694e3 notification: Skip on QtWebKit, try 2 2022-06-21 14:57:24 +02:00
Florian Bruhin 2fec76fc1f Update changelog 2022-06-21 14:16:07 +02:00
Florian Bruhin ce7443219c notification: Skip on QtWebKit 2022-06-21 14:14:03 +02:00
Florian Bruhin 8067c0979f notification: Fix marks in tests 2022-06-21 13:02:05 +02:00
Florian Bruhin 4dc3380cdc notification: Improve error case tests 2022-06-21 12:32:21 +02:00
Florian Bruhin 7ba16857a5 notification: Split up present() 2022-06-21 12:29:32 +02:00
Florian Bruhin 56a5a9340b notification: Refactor selecting candidates 2022-06-21 12:29:28 +02:00
Florian Bruhin 5f0e3e9877 notification: Add unit tests for error cases
Those require a lot of patching (and other efforts), but it does not
seem possible to write this kind of thing as an integration test:

https://www.riverbankcomputing.com/pipermail/pyqt/2022-June/044733.html
https://www.riverbankcomputing.com/pipermail/pyqt/2022-June/044734.html
2022-06-21 12:29:28 +02:00
Florian Bruhin cd43614a62 notificatio: Rethink error handling
The decision in a64c3d0dfc to return from
_verify_message() when there is a non-fatal error (later expanded to
more than just NoReply) was a poor one:

While the error signal indeed takes care of swapping out the faulty
adapter, the direct caller of _verify_message generally expects the
message to be in the verified shape (e.g. having 4 arguments, or an int
as argument, etc.). Thus, every caller would have to handle this
situation, yet none of them did!

With the restructured code, we now *always* raise an exception. It's
still the callers responsibility to deal with that happening, but that's
much less tricky than just pretending we validated the data when we did
not.

Thankfully, most caller already handle the situation, or don't need to:

- _get_server_info() and _fetch_capabilities() get called from __init__,
  where any notification.Error is already handled by
  NotificationBridgePresenter.
- _handle_close() and _handle_action() get called as DBus signals by Qt.
  It's hard to imagine how they would ever get an error reply, as the
  caller is the other side (the notification server), not us!

This only leaves present(), which now handles this case: If it gets a
fatal exception it still gets raised, but for any non-fatal ones, we now
emit the error signal there and return a dummy value.

Fixes #6931
2022-06-21 12:29:14 +02:00
Florian Bruhin a7625bf924 notification: Fix wrong return type annotation 2022-06-21 12:29:10 +02:00
Florian Bruhin 124fc717d1 notification: Add PID to DBus test notification service
Fixes #7160
2022-06-21 12:29:06 +02:00
Florian Bruhin c457183d04 notifications: Update quirks 2022-06-21 12:26:40 +02:00
Florian Bruhin e9ecc0b762 Regenerate docs 2022-06-21 10:21:17 +02:00
Florian Bruhin f8f346a077 Update changelog 2022-06-20 17:26:55 +02:00
Florian Bruhin 5e0d6dc148 Add LinkedIn array.at quirk
Closes #7237
2022-06-20 17:25:52 +02:00
Florian Bruhin 4df7aedf2b tests: Improve greasemonkey tests 2022-06-20 16:44:24 +02:00
Florian Bruhin d286b2aa47 Merge remote-tracking branch 'origin/pr/7272' 2022-06-20 09:35:16 +02:00
Florian Bruhin 3f4a3efdf1 pylint: remove now unneeded suppressions 2022-06-20 09:07:40 +02:00
qutebrowser bot 0f8fc3b9df Update dependencies 2022-06-20 04:26:13 +00:00
Florian Bruhin e5d091bbab greasemonkey: Add some more tests 2022-06-18 15:27:59 +02:00
Florian Bruhin 1e8d278902 Fix lint 2022-06-17 23:02:47 +02:00
Florian Bruhin c8d6b264ae greasemonkey: Add error handling
See #7245
2022-06-17 17:27:52 +02:00
Florian Bruhin 9b681292ed greasemonkey: Add LoadResult data class
Needed for #7245
2022-06-17 17:21:15 +02:00
Florian Bruhin 21419c9ef5 greasemonkey: Don't implicitly load scripts
Needed for #7245 and also seems like cleaner code.
2022-06-17 17:05:17 +02:00
Florian Bruhin a6c2a33197 crashdialog: Add QTWEBENGINE_* to crash info 2022-06-17 16:45:18 +02:00
Florian Bruhin f13af68cac build-release: Fix wrong path on Windows 2022-06-17 15:41:25 +02:00
Florian Bruhin 9be162e331 Merge remote-tracking branch 'origin/pr/7261' 2022-06-17 11:45:16 +02:00
Mohammed Anas db288550ac Remove repeated item in list 2022-06-17 12:41:04 +03:00
Florian Bruhin 47e849f61a Update changelog 2022-06-17 11:21:40 +02:00
Florian Bruhin 3b81525826 Fix lint 2022-06-16 21:06:38 +02:00
Florian Bruhin 660e776a15 build-release: Sign macOS .app properly
Based on https://github.com/pyinstaller/pyinstaller/issues/6612
Might help with #6771.
2022-06-16 21:03:20 +02:00
Florian Bruhin 611a6d5cb2 build-release: Modernize
pathlib, type annotations, modern syntax, dataclasses
2022-06-16 19:47:27 +02:00
Florian Bruhin 46de10722c build-release: Move macOS Info.plist back to PyInstaller .spec
The patching was originally introduced back in 2017 in #3055, when
PyInstaller only supported very basic Info.plist operations.

This changed in 2018 (!) however, with PyInstaller 3.4:
https://pyinstaller.org/en/stable/CHANGES-3.html#id8
https://github.com/pyinstaller/pyinstaller/pull/3532

Thus, let's move this back to PyInstaller. This produces exactly the
same Info.plist as before.

Fixes #7251
2022-06-16 17:52:35 +02:00
Florian Bruhin 9e2c5d493b build-release: Accept --skip-packaging on macOS 2022-06-16 16:23:07 +02:00
Florian Bruhin 23cc4d186c build-release: Add pre-dmg smoke test for macOS
Fixes #7254
2022-06-16 15:15:55 +02:00
Florian Bruhin 9cc91a0499 Fix coverage pragmas for Content-Disposition parsing
https://github.com/python/cpython/issues/93010 has now been fixed, but https://github.com/python/cpython/issues/87112 is still broken.
2022-06-16 14:24:03 +02:00
Florian Bruhin d021582aa7 Update changelog 2022-06-16 13:36:30 +02:00
Florian Bruhin 655e522ca0 Merge remote-tracking branch 'origin/pr/7217' 2022-06-16 13:35:15 +02:00
Ingrid Budau ed01767d49 Change background color for light color scheme
- Added a nuance of blue instead of white, as a background for light
  color scheme
- Deleted some unused CSS
2022-06-16 12:35:02 +02:00
Florian Bruhin 51539023c0
Merge pull request #7248 from emanuele6/patch-1
README.asciidoc: avoid HTML redirect for luakit website
2022-06-15 14:27:37 +02:00
Emanuele Torre 17a84062eb
README.asciidoc: avoid HTML redirect for luakit website
It seems that, now, the luakit homepage is at https://luakit.github.io/
and https://luakit.github.io/luakit/ is just an HTML redirect to it.
Let's avoid the annoying redirect.
2022-06-15 14:26:15 +02:00
Florian Bruhin f1c63a4a21 Update changelog 2022-06-14 18:04:31 +02:00
Florian Bruhin cc7b76a467 Fix lint 2022-06-14 17:12:21 +02:00
Florian Bruhin 1d8d987db6 Update changelog 2022-06-14 17:05:46 +02:00
Florian Bruhin 676e016771 Only replace the exact same message
If we have a error message followed by an info message with the same text, they
should both be shown, not replaced automatically.
2022-06-14 17:05:46 +02:00
Florian Bruhin 1d7b89fd00 Add --rich to :message-* commands
See #7246
2022-06-14 17:05:40 +02:00
Florian Bruhin d576a8d88f Don't render messages at Qt rich text by default
Closes #7246
2022-06-14 17:05:40 +02:00
Florian Bruhin 5616a99eff Add a MessageInfo data class
Preparation for #7246
2022-06-14 17:05:23 +02:00
Florian Bruhin 733585a8cd Update changelog 2022-06-14 14:17:56 +02:00
Florian Bruhin 7fc4a3da62 Merge remote-tracking branch 'origin/pr/6456' 2022-06-14 14:17:07 +02:00
Florian Bruhin 942effc635 Update docs 2022-06-14 13:36:42 +02:00
Florian Bruhin 3832d9b8ed Use with_history instead of no_history in API
Better to have positive rather than negated names. Still keeping the user-facing part though, to keep the default.
2022-06-14 13:35:55 +02:00
Florian Bruhin db7bc2c6ff Add tests for :session-save --no-history 2022-06-14 13:31:26 +02:00
Ingrid Budau 32fa3b5817 Center logo
As well as:
- replace external links with internal links for changelog and
  quickstart
- remove unused class names
- use already existing logo
- replace `url` with `_url` to mark it unused
2022-06-14 13:30:53 +02:00
Florian Bruhin 27ca9af77f Add test for :session-save with --no-history 2022-06-14 13:28:43 +02:00
Florian Bruhin 70697b8d97 tests: Make it possible to pass flags when saving session 2022-06-14 13:25:11 +02:00
Florian Bruhin e43a34f370 Merge remote-tracking branch 'origin/pr/7184' 2022-06-14 13:15:20 +02:00
Florian Bruhin 05c62c9532 Restore search match debug logging
Needed for tests...
Partially reverts 8137f2a6d9.
2022-06-14 11:20:08 +02:00
Florian Bruhin 24c3da0006 Merge branch 'dev' 2022-06-14 10:46:09 +02:00
Florian Bruhin ede1981ccb Unify duplicated prev/next search code 2022-06-14 10:46:02 +02:00
Florian Bruhin f2ee683a08 Update docs 2022-06-14 10:23:15 +02:00
Florian Bruhin 8137f2a6d9 Add a SearchMatch.is_null() 2022-06-14 10:23:15 +02:00
Florian Bruhin 77269f789a Fix lint 2022-06-14 10:03:06 +02:00
Florian Bruhin 4a2001dd2c Remove now-unneeded lint ignore 2022-06-14 10:01:23 +02:00
Florian Bruhin a8d7e91e17 Slightly clean up _draw_widgets 2022-06-14 09:43:14 +02:00
Florian Bruhin 1bca8f2763 Update changelog 2022-06-14 09:36:19 +02:00
Florian Bruhin ea140b0333 Use 'continue', not 'return'
Otherwise, any following widget in the for loop would not be added.
2022-06-14 09:35:26 +02:00
Florian Bruhin 2cb20dbf5b Skip test broken on QtWebKit
(cherry picked from commit d01dd9be07bd1591b1ecda298a2bf84b41ea280c)
2022-06-13 21:46:49 +02:00
Florian Bruhin cd1be710de Fix lint with FindFlags change 2022-06-13 19:37:05 +02:00
Florian Bruhin f81bc8a53f Fix prev_result/next_result with None callbacks 2022-06-13 18:40:08 +02:00
Florian Bruhin bf045f7ec7 Add a helper dataclass for find flags
When e.g. doing:
- '?foo' (search with reverse=True -> FindBackwards)
- 'N' (prev_result -> no FindBackwards)
- 'n' (next_result -> FindBackwards again)

we need to take a copy of the flags so that we can temporarily clear
FindBackwards when pressing 'N'.

Relevant history:

- We originally did int(self._flags) in
  d450257485.
- In f0da508c21, we used
  QWebPage.FindFlags(int(self._flags)) instead.
- With 97bdcb8e674c8ff27ab92448effef263880ab3aa (picked from
  c349fbd180) we instead do:
  flags = QWebEnginePage.FindFlag(self._flags)

Using FindFlag instead of FindFlags seemed to work fine with PyQt6 and
enum.Flag. With PyQt5, however, later clearing a flag bit ends up with us
getting 0 as an integer, thus losing the type information about this being a
FindFlag instance, and resulting in a TypeError when calling into Qt.

We could use FindFlags() with PyQt 6 but FindFlag() with PyQt 5 to copy the
original flags, but that's getting rather cumbersome. Instead, let's have a
helper dataclass of bools, do away with the bit-twiddling, and only convert it
to a Qt flags when we actually need them. This solves the copying issue nicely,
and also makes the code a lot nicer.

Finally, this also adds a test case which fails when the flags are mutated in
place instead of copied.

We could do the same kind of change for QtWebKit as well, but given that it's
somewhat dead - and perhaps more importantly, won't run with Qt 6 - let's not
bother. To not break the end2end tests with QtWebKit, the output still is the
same as before.

(cherry picked from commit 96a0cc39512753445bc7a01b218b2f1290819ddd)
2022-06-13 18:40:08 +02:00
Florian Bruhin e15bda307e search: Split navigation/search callbacks
This way, we can move more logic (checking wrapping, etc.) into the API,
thus making the commands much more simple and stateless.
2022-06-13 18:40:08 +02:00
Florian Bruhin 8ed08eb213 search: Move wrap argument to next/prev_result
The fact that we need to specify this while searching rather than when
"zapping" through the results make no sense. It makes both the API as
well as our own code more complex.
2022-06-13 18:05:37 +02:00
Florian Bruhin f326e0d969 Get rid of _WebEngineSearchWrapHandler 2022-06-13 18:05:37 +02:00
Florian Bruhin 265b018c17 Add a SearchMatch helper class 2022-06-13 18:05:37 +02:00
Florian Bruhin 583354d524 Merge remote-tracking branch 'origin/pr/6670' into dev 2022-06-13 15:47:31 +02:00
Florian Bruhin 06587ea43a Fix lint 2022-06-13 15:01:09 +02:00
Florian Bruhin c4fb367c6e click-element: Fix typing 2022-06-13 14:51:16 +02:00
Florian Bruhin f8433aa85a click-element: Unpack lambda dict into if
Easier to do assertions, and seems cleaner than storing lambdas.
2022-06-13 14:47:06 +02:00
Florian Bruhin f4e899e2af Add setting reference 2022-06-13 14:42:54 +02:00
Florian Bruhin fc17602f79 Add test for using :prompt-fileselect-external on wrong prompt 2022-06-13 14:37:27 +02:00
Florian Bruhin 581b665653 Update docs 2022-06-13 14:29:03 +02:00
Florian Bruhin 435e880477 Fix test 2022-06-13 14:25:03 +02:00
Florian Bruhin fe2a5529e6 Merge remote-tracking branch 'origin/pr/7003' 2022-06-13 14:06:51 +02:00
Florian Bruhin 525cdd3478 Update docs 2022-06-13 13:20:04 +02:00
Florian Bruhin ce27831740 Merge remote-tracking branch 'origin/pr/6448' 2022-06-13 13:15:27 +02:00
Florian Bruhin 803866666f Update changelog 2022-06-13 12:40:14 +02:00
Florian Bruhin d45e35d581 Minor fixes 2022-06-13 12:37:50 +02:00
Florian Bruhin 85b867fe8d Merge remote-tracking branch 'origin/pr/7096' 2022-06-13 12:34:33 +02:00
Florian Bruhin c97257cac0 Update changelog 2022-06-13 12:26:01 +02:00
Florian Bruhin 8c887bdba3 Merge remote-tracking branch 'origin/pr/7124' 2022-06-13 12:24:16 +02:00
Florian Bruhin 7ff0bdb6e2 Update changelog 2022-06-13 11:28:32 +02:00
Florian Bruhin 870fccb366 Merge remote-tracking branch 'origin/pr/7196' 2022-06-13 11:26:43 +02:00
Florian Bruhin 609a862e01 Update changelog 2022-06-13 11:20:16 +02:00
Florian Bruhin 91d01f1393 Merge remote-tracking branch 'origin/pr/7168' 2022-06-13 11:19:46 +02:00
Florian Bruhin dc673b89a0 Update changelog URLs 2022-06-13 10:29:35 +02:00
Florian Bruhin 1887635d1b Merge remote-tracking branch 'origin/update-dependencies' 2022-06-13 10:28:57 +02:00
Jimmy 0aa31ef120 Update docs 2022-06-13 19:21:02 +12:00
Jimmy 07fa7d4b13 Merge pull request #7241 from emanuele6/doc
asciidoc2html.py: also install qute://install.html and qute://stacktrace.html
2022-06-13 18:57:06 +12:00
qutebrowser bot 29bcae5409 Update dependencies 2022-06-13 04:32:43 +00:00
Emanuele Torre 51ab91c1aa asciidoc2html.py: also install qute://{install,stacktrace}.html
Closes #6900
2022-06-10 20:20:53 +02:00
Florian Bruhin 153f52d3aa Simplify callback default 2022-06-08 16:06:27 +02:00
Florian Bruhin 6c99fe7b30 pylint: Ignore new false-positives 2022-06-08 12:43:09 +02:00
Florian Bruhin 6c4e281028 pylint: Fix new unnecessary-lambda-assignment 2022-06-08 12:25:12 +02:00
Florian Bruhin 6347d71d5c pylint: Remove outdated disables
Looks like 2.14 added bad-option-value:
https://pylint.pycqa.org/en/latest/whatsnew/2/2.14/full.html

locally-enabled is long gone:
https://github.com/PyCQA/pylint/issues/2442

and so is bad-continuation:
https://github.com/PyCQA/pylint/pull/3571

no-self-use was moved to an extension in this release:
https://github.com/PyCQA/pylint/pull/6448
2022-06-08 12:02:12 +02:00
Florian Bruhin 5aa89662e3 Update changelog URLs 2022-06-08 11:56:39 +02:00
mkonig 9538cbe9e7
Merge branch 'qutebrowser:master' into master 2022-06-07 13:16:55 +02:00
qutebrowser bot 066bc4fe1c Update dependencies 2022-06-06 04:26:30 +00:00
toofar 2091459f01
Merge pull request #7224 from rien333/patch-1
[readability-js] Remove superfluous css

Using the GH UI this time because I don't think this needs a changelog entry 🤞
2022-06-05 16:40:52 +12:00
Rijnder Wever 12fcff9fe8
Remove superfluous css
It makes no sense to force text to be white, especially for users that already use a white background. I probably included this line by mistake.
2022-06-03 16:46:05 +02:00
mkonig cb800234ed
Merge branch 'qutebrowser:master' into master 2022-06-03 07:43:07 +02:00
Florian Bruhin 95e3c7f966
Merge pull request #7219 from possibilities/update-docs-for-debian
Update docs for debian, include `libasound`
2022-05-31 14:27:17 +02:00
Mike Bannister 74c92e19a7 Show dependency list for Buster venv installs 2022-05-31 08:25:33 -04:00
Mike Bannister 30ea708d57 Add `libasound-dev` to venv on debian docs 2022-05-31 08:24:52 -04:00
Florian Bruhin 60f1b7d396 Update changelog 2022-05-30 17:02:08 +02:00
Florian Bruhin 3d953009ba Respect input.insert_mode.auto_enter for inspector
Fixes #7165
2022-05-30 17:01:23 +02:00
Ingrid Budau 2750c13324 New design for a startpage, based on the work of #6420 2022-05-30 15:49:26 +02:00
Florian Bruhin 9b840e22bc Avoid new mypy false-positive 2022-05-30 10:10:23 +02:00
qutebrowser bot d66dc0141c Update dependencies 2022-05-30 04:29:05 +00:00
Florian Bruhin a5c67bbf3f Update changelog 2022-05-28 10:38:54 +02:00
Jimmy 48922167a7 Update docs/changelog 2022-05-28 11:10:24 +12:00
Jimmy 703abcde8f Merge pull request #7203 from illfygli/master
Add `[role="treeitem"]` to hintable elements

This is an Aria role for an interactible element https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/treeitem_role
2022-05-28 10:10:24 +12:00
ugla bb9f15056f
Add `[role="treeitem"]` to hintable elements
This makes e.g. channels in Slack's channel list hintable.
2022-05-27 10:38:49 +02:00
Florian Bruhin 8f21b6fd9f Release v2.5.1 2022-05-26 14:06:03 +02:00
Florian Bruhin 5349ddd33c Update changelog 2022-05-24 16:47:52 +02:00
Florian Bruhin bd8ca51df4 herbe: Make sure finished processes are treated as closed
When a herbe notification was right-clicked ("accepted" according to
the herbe readme), it signals that by exiting with exit status 2.

So far, we've only signalled that by emitting click_id to the bridge
(thus letting the website know about it being clicked), but we never
communicated that it was also closed by the same action.

When right-clicking a Discord notification, this meant that the
following happened:

- herbe exits with status 2
- We emit click_id, thus communicating to Discord that the notification
  was clicked.
- Discord calls .close() (in JS) on the notification.
- Our on_web_closed gets called and tries to send a SIGUSR1 to herbe to dismiss
  the notification.
- However, the herbe process already exited at this point, thus leading
  to:

  Traceback (most recent call last):
    File ".../qutebrowser/browser/webengine/notification.py", line 639, in on_web_closed
      os.kill(notification_id, signal.SIGUSR1)
  ProcessLookupError: [Errno 3] No such process

If we make it clear that the notification is already gone, and
on_web_closed does not seem to be called at all anymore.
2022-05-24 16:23:29 +02:00
Florian Bruhin e68cc87228 Revert "coverage: Show contexts by default"
This reverts commit 65345eab95.
Coverage shows warnings when no contexts were recorded.
2022-05-24 11:53:24 +02:00
Florian Bruhin 9afcad1224 Update content-disposition parsing workaround
Also adds workaround for https://github.com/python/cpython/issues/93010
2022-05-24 11:53:11 +02:00
mkonig cfbbd59ce4
Merge branch 'qutebrowser:master' into master 2022-05-23 09:50:37 +02:00
Florian Bruhin 14bcdc86a2
Merge pull request #7198 from qutebrowser/update-dependencies
Update dependencies
2022-05-23 09:38:21 +02:00
qutebrowser bot 1dbe9c7f62 Update dependencies 2022-05-23 04:27:15 +00:00
Markus Blöchl 6c1d6dd2c5 qute-keepassxc: Add support for TOTP 2022-05-21 22:45:27 +02:00
Markus Blöchl f738ca3b0c qute-keepassxc: Use rofi to select from multiple matching accounts 2022-05-21 22:45:27 +02:00
Markus Blöchl 885081d4e4 qute-keepassxc: Trigger database unlock when querying credentials 2022-05-21 22:45:27 +02:00
Florian Bruhin 8ac522cf55 Fix lint 2022-05-20 12:39:52 +02:00
Florian Bruhin 15dc5e81f7 tests: Improve TestSanitizeFilename
Those special cases were only tested by Hypothesis before
2022-05-20 11:01:46 +02:00
Florian Bruhin 409a2990a8 Revert "Workaround PyInstaller 5.0 icon finding"
This reverts commit 07ce034983.

Should be fixed in PyInstaller 5.1 now.
2022-05-19 15:48:28 +02:00
qutebrowser bot 5ef10e2f92 Update dependencies 2022-05-19 13:45:28 +00:00
Florian Bruhin 20b0f16671 ci: Upgrade codeql-action
See https://github.blog/changelog/2022-04-27-code-scanning-deprecation-of-codeql-action-v1/
2022-05-19 12:10:14 +02:00
Florian Bruhin 4bb10a4c0c Update changelog 2022-05-19 08:57:14 +02:00
Florian Bruhin db1382f75c elf: Ignore garbage data
With qt5-webengine 5.15.9-3 on Arch Linux, there only was a rebuild:
70aa541b4f

but somehow, we now have some kind of garbage data in the .data section:

    ...
    \x00QtWebEngine/5.15.9 Chrome/87.0.4xternalclearkey
    \x00ernalclearkey.diy.differentguid
    \x00Portable Documen/usr/src/debug/qtwebengine/src/core/net/proxying_restricted_cookie_manager_qt.cpp
    \x00
    ...

the *actual* string table only seems to follow much later:

    ...
    \x00display
    \x00\x00dispatchCallbackOnIOThread
    \x00/Cache
    \x00DownloadInterruptReason
    \x00General network failure
    \x00The server has gone down
    \x00General server failure
    \x00Unexpected server response
    \x00Download canceled by the user
    \x00shutdownOnUIThread
    \x00qrc://
    \x00RequestQuotaPermission
    \x00\x00\x00\x00/usr/src/debug/qtwebengine/src/core/quota_permission_context_qt.cpp
    \x00\x00\x00\x00\x00QtWebEngine/5.15.9 Chrome/87.0.4280.144
    \x00 - %04d-%02d-%02dT%0"
    ...

So let's include the NUL bytes in our regex, to make sure we get the full
variant, not the garbage.

(cherry picked from commit 511df8af21ed18a65c49881175814efa72329754)
2022-05-19 08:56:16 +02:00
Florian Bruhin 4fa602d238 Update changelog 2022-05-18 20:41:08 +02:00
Florian Bruhin 72763b3ea0 settings: Don't show buttons for content.proxy
See https://www.reddit.com/r/qutebrowser/comments/usj5jr/how_do_i_specify_proxy_address_and_port/
2022-05-18 20:40:31 +02:00
toofar bd99d2eaab
Merge pull request #7186 from qutebrowser/update-dependencies
Update dependencies
2022-05-18 20:25:42 +12:00
Florian Bruhin dafddad1d4 Remove icdiff remains 2022-05-17 15:43:58 +02:00
mkonig b6c3c73998
Merge branch 'qutebrowser:master' into master 2022-05-17 13:57:45 +02:00
qutebrowser bot 2f5b058e85 Update dependencies 2022-05-16 04:21:56 +00:00
shirenn 7706ce7f1a [squash] Renames --minimal to --no-history 2022-05-14 08:20:38 +02:00
shirenn c338feb524 [squash] Defines current_item for webkit 2022-05-14 08:20:32 +02:00
Lars Rustand d6f343cfd4
Add window and private options for qutedmenu 2022-05-13 21:41:50 +02:00
shirenn 4026854f45 Add --minimal option to session-save command
Currently the session-save commande make a dump of all tabs history and stores
them in the session file. --minimal flag adds the option to store only the last
item of the history.

Signed-off-by: shirenn <shirenn@crans.org>
2022-05-13 17:10:04 +02:00
Florian Bruhin e739da9698 doc: Fix link 2022-05-13 16:03:23 +02:00
Florian Bruhin 87c2c945c9 doc: Update Archlinux debugging instructions 2022-05-13 16:01:11 +02:00
Florian Bruhin 46694ffd8b Update changelog 2022-05-12 10:10:55 +02:00
Florian Bruhin 5e2fe7924e Apply MathML darkmode workaround for display math
See e.g. https://en.wikipedia.org/wiki/Gradient#General_coordinates
2022-05-12 10:10:49 +02:00
Florian Bruhin 047a44c4c1 requirements: Remove icdiff
The native pytest output often seems better
2022-05-12 08:38:05 +02:00
Florian Bruhin f2c969da58 Merge branch 'update-dependencies' 2022-05-10 14:47:46 +02:00
Florian Bruhin b6c16f11f2 Update pylint ignores
See https://github.com/PyCQA/astroid/pull/1550 for the signal
disconnect.

Not reporting the gen_classes() one, as we have another ignore for that,
and doing something a bit unorthodox there anyways.
2022-05-10 14:46:39 +02:00
Florian Bruhin a4faea260c Revert "Skip astroid 2.11.3"
This reverts commit 39fa36e223.
2022-05-10 13:44:02 +02:00
Florian Bruhin 781743789d Remove remaining setting tracking bits
This is a follow-up to 0d08e70de2. Apparently
there were some bits remaining after that, which are rather confusing.

The return values don't get read anywhere, so we can just yank it all out.
2022-05-10 10:37:15 +02:00
Florian Bruhin 4a6df3a8e8 Add setting to allow pasting from clipboard
Closes #5256
Supersedes and closes #6315
2022-05-10 10:37:15 +02:00
mkonig 1ee1e37b29
Merge branch 'qutebrowser:master' into master 2022-05-10 07:34:17 +02:00
Florian Bruhin 838c435896 docs: Add qute-1password 2022-05-09 18:11:11 +02:00
Florian Bruhin dea188d184 Fix lint and coverage 2022-05-09 12:26:23 +02:00
Florian Bruhin 633d3f67b5 Update changelog 2022-05-09 11:48:41 +02:00
Florian Bruhin a84ecfb80a Display close matches for invalid commands 2022-05-09 11:48:41 +02:00
Florian Bruhin c9380605a1 Display close matches for invalid settings 2022-05-09 11:48:41 +02:00
qutebrowser bot a58e2e6362 Update dependencies 2022-05-09 04:26:26 +00:00
Florian Bruhin b76104da79 Fix lint 2022-05-02 17:14:31 +02:00
Florian Bruhin 49f19a50a5 Update changelog 2022-05-02 17:12:10 +02:00
Florian Bruhin 70ff0def34 notifications: Fix Budgie name checking 2022-05-02 17:06:56 +02:00
Florian Bruhin a2f7786e70 Adjust notification quirks for Budgie
See https://github.com/BuddiesOfBudgie/budgie-desktop/issues/118
2022-05-02 17:01:01 +02:00
Florian Bruhin ed52fc4b28 Clarify content.pdfjs description
See https://www.reddit.com/r/qutebrowser/comments/ufcnhu/opening_pdf_documents_in_pdfjs_by_default/
2022-05-02 16:38:06 +02:00
Florian Bruhin bd27b0b665 notifications: Handle more non-fatal notification errors 2022-05-02 15:54:51 +02:00
Florian Bruhin 3a09126e2e notifications: Make invalid IDs non-fatal
Also only check for them for DBus notifications. Fixes #7153.
2022-05-02 15:52:05 +02:00
Florian Bruhin 3eeb095448
Merge pull request #7151 from qutebrowser/update-dependencies
Update dependencies
2022-05-02 09:56:34 +02:00
qutebrowser bot 2cb168294e Update dependencies 2022-05-02 04:37:49 +00:00
Florian Bruhin 6cee2fa8e4
Merge pull request #7149 from bschnitz/userscript_pseudo_per_domain_stylesheets
pseudo per domain stylesheets via userscript
2022-04-29 10:10:50 +02:00
mkonig 55d1c9bb8b
Merge branch 'qutebrowser:master' into master 2022-04-29 09:06:29 +02:00
Benjamin Schnitzler 9c9d7defc8 link to "pseudo per domain stylesheets" userscript in userscripts readme 2022-04-28 23:13:38 +02:00
Florian Bruhin 4cb44752a8 Merge remote-tracking branch 'origin/pr/7131' 2022-04-28 12:16:25 +02:00
Florian Bruhin 5a4ae369a5 ci: Comment out Python 3.11 entirely for now
Still reflected in commit status

See #7143
2022-04-28 12:15:50 +02:00
Florian Bruhin 75fd787d06 Update changelog 2022-04-28 12:14:47 +02:00
Florian Bruhin 1ab05050b0 Remove redundant quotes 2022-04-28 12:08:02 +02:00
Florian Bruhin 9154f02cae Merge remote-tracking branch 'origin/pr/7138' 2022-04-28 12:04:30 +02:00
Florian Bruhin 6fc30a1e85 ci: Mark Python 3.11 as experimental
end2end tests seem flaky, no clue why
2022-04-26 17:14:38 +02:00
Florian Bruhin 323b64c669 ignore hypothesis warnings 2022-04-26 17:14:38 +02:00
Florian Bruhin fc57a80ac8 Update YAML C extension check 2022-04-26 17:14:38 +02:00
Florian Bruhin 9fbaba228c Ignore certifi deprecation warning
See https://github.com/certifi/python-certifi/issues/170
2022-04-26 17:14:38 +02:00
Florian Bruhin de0aa69b9a ci: Update Python versions 2022-04-26 17:14:38 +02:00
code-review-doctor b9cd8efe70
Update sql.py 2022-04-26 11:19:41 +01:00
Florian Bruhin 7a523a6618 Update babel changelog URL 2022-04-25 19:02:11 +02:00
qutebrowser bot 5d5f009753 Update dependencies 2022-04-25 16:07:51 +00:00
Florian Bruhin 7932d44dab Fix lint 2022-04-25 17:57:57 +02:00
Florian Bruhin 39fa36e223 Skip astroid 2.11.3
See https://github.com/PyCQA/pylint/issues/6438#issuecomment-1108747642
2022-04-25 17:55:36 +02:00
Florian Bruhin 737fafd313 mypy: Fix inspector typing
The previous solution with making AbstractInspector know about the concrete
inspector types results in Liskov issues for the backend-specific overrides:
https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides

So, for now, let's just declare them as Any. Perhaps we should have a
typing.Protocol to unify the two, as they don't share a common base class.
See #7098.
2022-04-25 17:23:16 +02:00
Florian Bruhin a20bb67a87 mypy: Upgrade to PyQt5-stubs 5.15.6.0
For some unknown reason, those new stubs cause a *lot* of things now to be
checked by mypy which formerly probably got skipped due to Any being implied
somewhere.

The stubs themselves mainly improved, with a couple of regressions too.

In total, there were some 337 (!) new mypy errors. This commit fixes almost all
of them, and the next commit improves a fix to get things down to 0 errors
again.

Overview of the changes:

==== qutebrowser/app.py

- Drop type ignore due to improved stubs.

==== qutebrowser/browser/browsertab.py

- Specify the type of _widget members more closely than just QWidget.
  This is debatable: I suppose the abstract stuff shouldn't need to know
  anything about the concrete backends at all. But it seems like we cut some
  corners when initially implementing things, and put some code in browsertab.py
  just because the APIs of both backends happened to be compatible. Perhaps
  something to reconsider once we drop QtWebKit and hopefully implement a dummy
  backend.

- Add an additional assertion in AbstractAction.run_string. This is already
  covered by the isinstance(member, self.action_base) above it, but that's too
  dynamic for mypy to understand.

- Fix the return type of AbstractScroller.pos_px, which is a QPoint (with x
  and y components), not a single int.

- Fix the return type of AbstractScroller.pos_perc, which is a Tuple (with x
  and y components), not a single int.

- Fix the argument types of AbstractScroller.to_perc, as it's possible to pass
  fractional percentages too.

- Specify the type for AbstractHistoryPrivate._history. See above (_widget) re
  this being debatable.

- Fix the return type of AbstractTabPrivate.event_target(), which can be None
  (see #3888).

- Fix the return type of AbstractTabPrivate.run_js_sync, which is Any (the JS
  return value), not None.

- Fix the argument type for AbstractTabPrivate.toggle_inspector: position can
  be None to use the last used position.

- Declare the type of sub-objects of AbstractTab.

- Fix the return value of AbstractTab.icon(), which is the QIcon, not None.

==== qutebrowser/browser/commands.py

- Make sure the active window is a MainWindow (with a .win_id attribute).

==== qutebrowser/browser/downloadview.py

- Add _model() which makes sure that self.model() is a DownloadModel, not None
  or any other model. This is needed because other methods access a variety of
  custom attributes on it, e.g. last_index().

==== qutebrowser/browser/greasemonkey.py

- Add an ignore for AbstractDownload.requested_url which we patch onto the
  downloads. Probably would be nicer to add it as a proper attribute which always
  gets set by the DownloadManager.

==== qutebrowser/browser/hints.py

- Remove type ignores for QUrl.toString().
- Add a new type ignore for combining different URL flags (which works, but is
  not exactly type safe... still probably a regression in the stubs).
- Make sure the things we get back from self._get_keyparser are what we actually
  expect. Probably should introduce a TypedDict (and/or overloads for
  _get_keyparser with typing.Literal) to teach mypy about the exact return value.
  See #7098.
  This is needed because we access Hint/NormalKeyParser-specific attributes such
  as .set_inhibited_timout() or .update_bindings().

==== qutebrowser/browser/inspector.py

- Similar changes than in browsertab.py to make some types where we share API
  (e.g. .setPage()) more concrete. Didn't work out unfortunately, see next
  commit.

==== qutebrowser/browser/network/pac.py

- Remove now unneeded type ignore for signal.

==== qutebrowser/browser/qtnetworkdownloads.py

- Make sure that downloads is a qtnetworkdownloads.DownloadItem (rather than an
  AbstractDownload), so that we can call ._uses_nam() on it.

==== qutebrowser/browser/qutescheme.py

- Remove now unneeded type ignore for QUrl flags.

==== qutebrowser/browser/urlmarks.py

- Specify the type of UrlMarkManager._lineparser, as those only get initialized
  in _init_lineparser of subclasses, so mypy doesn't know it's supposed to exist.

==== qutebrowser/browser/webelem.py

- New casts to turn single KeyboardModifier (enum) entries into
  KeyboardModifiers (flags). Might not be needed anymore with Qt 6.
- With that, casting the final value is now unneeded.

==== qutebrowser/browser/webengine/notification.py

- Remove now unneeded type ignore for signal.
- Make sure the self.sender() we get in HerbeNotificationAdapter._on_finished()
  is a QProcess, not just any QObject.

==== qutebrowser/browser/webengine/webenginedownloads.py

- Remove now unneeded type ignores for signals.

==== qutebrowser/browser/webengine/webengineelem.py

- Specify the type of WebEngineElement._tab.
- Remove now unneeded type ignore for mixed flags.

==== qutebrowser/browser/webengine/webengineinspector.py

- See changes to inspector.py and next commit.
- Remove now unneeded type ignore for signal.

==== qutebrowser/browser/webengine/webenginequtescheme.py

- Remove now unneeded type ignore for mixed flags.

==== qutebrowser/browser/webengine/webenginesettings.py

- Ignore access of .setter attribute which we patch onto QWebEngineProfile.
  Would be nice to have a subclass or wrapper-class instead.

==== qutebrowser/browser/webengine/webenginetab.py

- Specified the type of _widget members more closely than just QWidget.
  See browsertab.py changes for details.
- Remove some now-unneeded type ignores for creating FindFlags.
- Specify more concrete types for WebEngineTab members where we actually need to
  access WebEngine-specific attributes.
- Make sure the page we get is our custom WebEnginePage subclass, not just any
  QWebEnginePage. This is needed because we access custom attributes on it.

==== qutebrowser/browser/webengine/webview.py

- Make sure the page we get is our custom WebEnginePage subclass, not just any
  QWebEnginePage. This is needed because we access custom attributes on it.

==== qutebrowser/browser/webkit/network/networkreply.py

- Remove now unneeded type ignores for signals.

==== qutebrowser/browser/webkit/webkitinspector.py

- See changes to inspector.py and next commit.

==== qutebrowser/browser/webkit/webkittab.py

- Specify the type of _widget members more closely than just QWidget.
  See browsertab.py changes for details.
- Add a type ignore for WebKitAction because our workaround needs to
  treat them as ints (which is allowed by PyQt, even if not type-safe).
- Add new ignores for findText calls: The text is a QString and can be None; the
  flags are valid despite mypy thinking they aren't (stubs regression?).
- Specify the type for WebKitHistoryPrivate._history, because we access
  WebKit-specific attributes. See above (_widget) re this being debatable.
- Make mypy aware that .currentFrame() and .frameAt() can return None (stubs
  regression?).
- Make sure the .page() and .page().networkAccessManager() are our subclasses
  rather than the more generic QtWebKit objects, as we use custom attributes.
- Add new type ignores for signals (stubs regression!)

==== qutebrowser/browser/webkit/webpage.py

- Make sure the .networkAccessManager() is our subclass rather than the more
  generic QtWebKit object, as we use custom attributes.
- Replace a cast by a type ignore. The cast didn't work anymore.

==== qutebrowser/browser/webkit/webview.py

- Make sure the .page() is our subclass rather than the more generic QtWebKit
  object, as we use custom attributes.

==== qutebrowser/commands/userscripts.py

- Remove now unneeded type ignore for signal.

==== qutebrowser/completion/completer.py

- Add a new _completion() getter (which ensures it actually gets the completion
  view) rather than accessing the .parent() directly (which could be any QObject).

==== qutebrowser/completion/completiondelegate.py

- Make sure self.parent() is a CompletionView (no helper method as there is only
  one instance).
- Remove a now-unneeded type ignore for adding QSizes.

==== qutebrowser/completion/completionwidget.py

- Add a ._model() getter which ensures that we get a CompletionModel (with
  custom attributes) rather than Qt's .model() which can be any QAbstractItemModel
  (or None).
- Removed a now-unneeded type ignore for OR-ing flags.

==== qutebrowser/completion/models/completionmodel.py

- Remove now unneeded type ignores for signals.
- Ignore a complaint about .set_pattern() not being defined. Completion
  categories don't share any common parent class, so it would be good to introduce
  a typing.Protocol for this. See #7098.

==== qutebrowser/components/misccommands.py

- Removed a now-unneeded type ignore for OR-ing flags.

==== qutebrowser/components/readlinecommands.py

- Make sure QApplication.instance() is a QApplication (and not just a
  QCoreApplication). This includes the former "not None" check.

==== qutebrowser/components/scrollcommands.py

- Add basic annotation for "funcs" dict. Could have a callable protocol to
  specify it needs a count kwarg, see #7098.

==== qutebrowser/config/stylesheet.py

- Correctly specify that stylesheet apply to QWidgets, not any QObject.
- Ignore an attr-defined for obj.STYLESHEET. Perhaps could somehow teach mypy
  about this with overloads and protocols (stylesheet for set_register being None
  => STYLESHEET needs to be defined, otherwise anything goes), but perhaps not
  worth the troble. See #7098.

==== qutebrowser/keyinput/keyutils.py

- Remove some now-unneeded type ignores and add a cast for using a single enum
  value as flags. Might need to look at this again with Qt 6 support.

==== qutebrowser/keyinput/modeman.py

- Add a FIXME for using a TypedDict, see comments for hints.py above.

==== qutebrowser/mainwindow/mainwindow.py

- Remove now-unneeded type ignores for calling with OR-ed flags.
- Improve where we cast from WindowType to WindowFlags, no int needed
- Use new .tab_bar() getter, see below.

==== qutebrowser/mainwindow/prompt.py

- Remove now-unneeded type ignores for calling with OR-ed flags.

==== qutebrowser/mainwindow/statusbar/bar.py

- Adjust type ignores around @pyqtProperty. The fact one is still needed seems
  like a stub regression.

==== qutebrowser/mainwindow/statusbar/command.py

- Fix type for setText() override (from QLineEdit): text can be None
  (QString in C++).

==== qutebrowser/mainwindow/statusbar/url.py

- Adjust type ignores around @pyqtProperty. The fact one is still needed seems
  like a stub regression.

==== qutebrowser/mainwindow/tabbedbrowser.py

- Specify that TabDeque manages browser tabs, not any QWidgets. It accesses
  AbstractTab-specific attributes.
- Make sure that the .tabBar() we get is a tabwidget.TabBar, as we access
  .maybe_hide.
- Fix the annotations for stored marks: Scroll positions are a QPoint, not int.
- Add _current_tab() and _tab_by_idx() wrappers for .currentWidget() and
  .widget(), which ensures that the return values are valid AbstractTabs (or None
  for _tab_by_idx). This is needed because we access AbstractTab-specific
  attributes.
- For some places, where the tab can be None, continue using .currentTab() but
  add asserts.
- Remove some now-unneeded [unreachable] ignores, as mypy knows about the None
  possibility now.

==== qutebrowser/mainwindow/tabwidget.py

- Add new tab_bar() and _tab_by_idx() helpers which check that the .tabBar() and
  .widget() are of type TabBar and AbstractTab, respectively.
- Add additional assertions where we expect ._tab_by_idx() to never be None.
- Remove dead code in get_tab_fields for handling a None y scroll position. I
  was unable to find any place in the code where this could be set to None.
- Remove some now-unneeded type ignores and casts, as mypy now knows that
  _type_by_idx() could be None.
- Work around a strange instance where mypy complains about not being able to
  find the type of TabBar.drag_in_progress from TabWidget._toggle_visibility,
  despite it clearly being shown as a bool *inside* that class without any
  annotation.
- Add a ._tab_widget() getter in TabBar which ensures that the .parent() is in
  fact a TabWidget.

==== qutebrowser/misc/crashsignal.py

- Remove now unneeded type ignores for signals.

==== qutebrowser/misc/editor.py

- Remove now unneeded type ignores for signals.

==== qutebrowser/misc/ipc.py

- Remove now unneeded type ignores for signals.
- Add new type ignores for .error() which is both a signal and a getter
  (stub regression?). Won't be relevant for Qt 6 anymore, as the signal was
  renamed to errorOccurred in 5.15.

==== qutebrowser/misc/objects.py

- Make sure mypy knows that objects.app is our custom Application (with custom
  attributes) rather than any QApplication.

==== qutebrowser/utils/objreg.py

- Ignore attr-defined for .win_id attributes. Maybe could add a typing.Protocol,
  but ideally, the whole objreg stuff should die one day anyways.

==== tests/unit/completion/test_completer.py

- Make CompletionWidgetStub inherit from CompletionView so that it passes the
  new isinstance() asserts in completer.py (see above).
2022-04-25 17:23:16 +02:00
Jimmy d1c7f94826 Update docs/changelog 2022-04-25 14:47:13 +12:00
Jimmy 6250cda2e1 Merge pull request #7123 from pylbrecht/bitwarden-userscript-url-matching
Fix qute-bitwarden userscript URL matching for multi level subdomains

The qute-bitwarden userscript is not able to autofill for a multi-level subdomain URLs (e.g. `http://my.sub.domain.local/`).
qute-bitwarden exits with status code 2 and returns the following on stderr:
```
No pass candidates for URL 'http://my.sub.domain.local/' found!
```
Joining the extracted subdomain and domain with a `.` solves the issue.
2022-04-25 14:37:11 +12:00
code-review-doctor 357e644b68 Fix issue probably-meant-fstring found at https://codereview.doctor 2022-04-24 01:09:57 +01:00
Florian Bruhin 65345eab95 coverage: Show contexts by default
We don't pass --cov-context=test by default though, as it slows dowh the test run by 2.5min and results in a 325 MB htmlcov/
2022-04-22 09:04:33 +02:00
Florian Bruhin 07ce034983 Workaround PyInstaller 5.0 icon finding
See https://github.com/pyinstaller/pyinstaller/issues/6759

Fixes #7132, see #7129
2022-04-19 15:51:59 +02:00
Florian Bruhin 4617361a45 Revert "Avoid PyInstaller 5.0"
This reverts commit d98314799a.
2022-04-19 15:49:29 +02:00
Florian Bruhin d98314799a Avoid PyInstaller 5.0
See https://github.com/pyinstaller/pyinstaller/issues/6759
Follow-up to #7129
2022-04-19 15:10:23 +02:00
toofar 1333bc90d6
Merge pull request #7129 from qutebrowser/update-dependencies
Update dependencies
2022-04-19 15:32:05 +12:00
Tom Hu 7281af35ab
Update .codecov.yml 2022-04-18 10:11:01 -04:00
Tom Hu 0b12ed8beb
ci: add informational Codecov status checks
Hi, Tom from Codecov here. I noticed that you were using Codecov but weren't actually getting any notifications on pull requests. I figured it would be useful to get some idea if code being changed is being tested, but also not blocking CI/merging. Let me know if this makes sense or if we can do something that would be helpful.
2022-04-18 10:05:41 -04:00
Jimmy d37945fd0b add ply changelog
Although this is just the version published to pypi. I don't know what
version sip is using. The version published on pypi is apparently stable
and mature and any further changes on github are simplifications that
the author doesn't particularly want to support.

I don't know if we actually hit the parsing code in our workflows but it
is published as a dependancy.

The latest version talks about removing optional stuff from the API a
bunch. But sip just uses `from ply import lex, yacc` so hopefully that
is a stable part of the API. Even if sip is using the newer one.
2022-04-18 18:19:58 +12:00
qutebrowser bot 171750c7e7 Update dependencies 2022-04-18 04:23:01 +00:00
Florian Bruhin 488dc175e0 doc: Adjust some PyQt5 references 2022-04-14 13:40:31 +02:00
Florian Bruhin 16d3a99a6b Fix lint 2022-04-13 23:46:35 +02:00
Florian Bruhin ac84cbaad9 Use QFontMetrics::boundingRect()
.width() was deprecated in Qt 5.11 because what it actually does is better
described as .horizontalAdvance():

https://codereview.qt-project.org/c/qt/qtbase/+/201397
(ee2ad9df701b27790e2ab72e99111d255fde42ed in qtbase)

Docs:
https://doc.qt.io/qt-6/qfontmetrics.html#horizontalAdvance-2

What we actually want for the size hint is the bounding box.

(originally cherry picked from commit 78838338c331d74931da31acd2306550721ef121)
2022-04-13 23:19:22 +02:00
Florian Bruhin 3bced54404 Switch to new API for SSL ciphers
This got moved to QSslConfiguration in Qt 5.5:
https://codereview.qt-project.org/c/qt/qtbase/+/113886
(92cda9474245c79b635c21cd140c5d0a3a6d2e5b in qtbase)

(cherry picked from commit 317da1e3cf23bf40d24d186cd6d06b6bc9a09958)
2022-04-13 23:03:43 +02:00
Florian Bruhin ca4d25b203 Remove old resources.py
(cherry picked from commit 18d7e400cd7f61647953f1f1b5e74006246d4276)
2022-04-13 23:01:19 +02:00
bitraid 6bf7907c19
NSIS: Base icon choices on previous install
Closes #7109
2022-04-13 12:54:26 +03:00
bitraid a97ffe0bd0
NSIS: Get interface colors from system.
Fixes #7112
2022-04-13 12:43:54 +03:00
Philipp Albrecht dc83634e1a Join subdomain and domain with a dot 2022-04-13 10:14:49 +02:00
Florian Bruhin 991d300a08
Merge pull request #7120 from qutebrowser/update-dependencies
Update dependencies
2022-04-11 15:32:10 +02:00
Florian Bruhin 3e9203b829 tests: Update bs4 argument name 2022-04-11 10:29:44 +02:00
qutebrowser bot ec49047f12 Update dependencies 2022-04-11 04:22:43 +00:00
Nicholas Schwab d1bc60edb8 Adapte errors on click-element to filter. 2022-04-08 14:28:17 +02:00
Nicholas Schwab 39dbf2266f Remove duplicate value in error message for invalid point. 2022-04-08 14:25:07 +02:00
Nicholas Schwab bf562a74fa Added missing Then in test case for click-element. 2022-04-08 14:05:16 +02:00
Nicholas Schwab e7cf3e41bc Add more unit tests. 2022-04-08 14:00:57 +02:00
Nicholas Schwab c48719f014 Fix missing conversion to str in unit test hypothesis. 2022-04-08 14:00:39 +02:00
Nicholas42 d8af9617d9
Simplify unit test for click-element.
Co-authored-by: Florian Bruhin <me@the-compiler.org>
2022-04-08 13:54:30 +02:00
Axel Dahlberg 55303587b8 test(download) no folder chosen 2022-04-08 09:27:26 +02:00
Nicholas Schwab 9a706b4995 Make linters happy. 2022-04-06 22:17:58 +02:00
Nicholas Schwab f1b6fdf9a3 Make docstring conformant. 2022-04-06 22:17:39 +02:00
Nicholas Schwab 27313ed355 Remove unused import. 2022-04-06 22:17:22 +02:00
Nicholas Schwab da9c56ed03 Remove unused variable. 2022-04-06 20:13:44 +02:00
Nicholas Schwab 3f989a4868 Simplified code for click-element switching between backend-functions. 2022-04-06 20:09:37 +02:00
Nicholas Schwab 709592b46a Adapted expected errors in end2end test for click-element. 2022-04-06 20:09:03 +02:00
Nicholas Schwab e6083ac7eb Update asciidoc. 2022-04-06 19:40:16 +02:00
Nicholas42 9b85619177
Change documentation of click-element as suggested.
Co-authored-by: Florian Bruhin <me@the-compiler.org>
2022-04-06 19:39:24 +02:00
Nicholas Schwab ea5b9dbdc5 Use parse_point in click-element parsing. 2022-04-06 19:38:13 +02:00
Nicholas Schwab ae61f02831 Add parse_point utility and tests for it. 2022-04-06 19:37:54 +02:00
Axel Dahlberg bf34f18f09 style(prompt) fix 2022-04-06 16:06:08 +02:00
Axel Dahlberg 4019eb5379 fix(prompt) correct accept of prompt 2022-04-06 15:57:40 +02:00
Axel Dahlberg 6411db1228 test(downloads) fix fixture replacements 2022-04-06 15:54:30 +02:00
Axel Dahlberg 6462133477
Apply suggestions from code review
Co-authored-by: Florian Bruhin <me@the-compiler.org>
2022-04-06 15:38:35 +02:00
Florian Bruhin 3f31e36bc7 Merge remote-tracking branch 'origin/feat/remove_pyqt_resources_for_importlib' 2022-04-05 12:18:48 +02:00
Florian Bruhin d8fea0155f Update changelog 2022-04-05 12:17:00 +02:00
Florian Bruhin 96425c93bf Merge remote-tracking branch 'origin/pr/7103' 2022-04-05 12:14:53 +02:00
Florian Bruhin f6a365172a Use legacy PDF.js build for macOS/Windows releases
Fixes #7108
2022-04-05 11:33:19 +02:00
Jimmy 78043bc4f8 fix more moved icons/ references
For Makefile installs (broke while copying stuff over) and pyinstaller
installs (broke on launch).
2022-04-05 08:45:15 +12:00
Florian Bruhin ac8d2949a2 Fix qute-lastpass tests 2022-04-04 17:30:41 +02:00
Florian Bruhin ab7a2ee558 Switch to Python 3.7 subprocess API
Follow-up for #6905
2022-04-04 16:58:31 +02:00
Florian Bruhin ade2a9ffdf Merge branch 'update-dependencies' 2022-04-04 16:35:13 +02:00
Florian Bruhin 0d3af197d9 Revert "pylint: Disable unnecessary-ellipsis for tests"
This reverts commit 2b76b61640.
2022-04-04 11:27:16 +02:00
Florian Bruhin 65fd458833 Update changelog URLs 2022-04-04 11:12:13 +02:00
qutebrowser bot 5efd72470b Update dependencies 2022-04-04 09:09:33 +00:00
Florian Bruhin b29c13c0a5 scripts: Handle root requirements.txt properly
Regressed in ac2cb6bb30
2022-04-04 10:51:35 +02:00
Florian Bruhin dc5dceece5 Update changelog 2022-04-04 10:51:35 +02:00
Florian Bruhin da280df809 Clean up some remaining Python version references 2022-04-04 10:51:34 +02:00
Florian Bruhin 1033913276 Update flake8 config for Python 3.6
The 'generator_stop' future import is default in Python 3.7:
https://docs.python.org/3/library/__future__.html

While we do want 'annotations' eventually, it doesn't bring us any gain
right now, see #7098.
2022-04-04 10:51:24 +02:00
Florian Bruhin 0b0be06e54 Drop types-dataclasses
There is https://github.com/python/typeshed/blob/master/stdlib/dataclasses.pyi for the stdlib one
2022-04-04 09:33:18 +02:00
Florian Bruhin 8f66fc3a4d Merge remote-tracking branch 'origin/pr/7102' 2022-04-04 09:27:59 +02:00
Jimmy e9ed6456fd Load icons via importlib.resources
The PyQt resources system is gone in 6.2 and deprecated before that. This
should be the last usage of it.

Switches icons to be read with `utils.resources.read_file_binary()` in
`notification.py` (fallback desktop notification icon) and `app.py` (icon for
the desktop window).

importlib only loads resources under a package, so the icons are moved under
the `qutebrowser/` directory.

Closes: #6062
2022-04-04 18:03:54 +12:00
Jimmy f15d6e88a9 Add back empty header indexerror workaround
The test case on the bug works for me on py37 but CI is failing on 3.10,
maybe this isn't quite the same issue. Anyway, we are getting rid of
webkit soon.
2022-04-04 12:08:19 +12:00
Jimmy cd4429db25 Remove 3.6 pins from requirements files.
Then regenerate the relevant files.
Also drop dataclasses from requirements files.
TODO: should we drop the dataclasses-types requirement for mypy too?
2022-04-04 12:08:19 +12:00
Jimmy 060e4fbf80 Drop python3.6 support.
Commits for dropping 3.5 support to copy from:

c245b7d855ccd "Initial drop of Python 3.5"
ccdfb44b85 "Drop support for Python 3.6.0"

Anything needed to update regarding OS version support in
doc/install.asciidoc?
TODO: remove 3.6/7 annotations in requirements files and
  rebuild

workflows: not sure I updated it right (run 5.12 with 3.7, same 18.04 OS) but
18.04 seems to have 3.7 on it too so it should work. It'll all change when we
drop <5.15 anyway. Not sure what the minimum ubuntu version will be going
forward.

Regarding mimetype overrides (ebb3046822) the doctring says they can all go
in 3.7 but .h5 is still missing on py39, not sure if we should care.

There are a bunch of old(?) warning messages still ignored in tests/end2end/fixtures/quteprocess.py.
2022-04-04 12:08:19 +12:00
Florian Bruhin d0c1d1ff94 Adjust broken link 2022-04-03 22:15:04 +02:00
Florian Bruhin 0a2940622c Fix some userscript syntax issues
Thanks to (a hacked) pyupgrade
2022-04-03 21:04:33 +02:00
Florian Bruhin bd8c940320 Simplify some syntax
Found via pyupgrade
2022-04-03 12:18:09 +02:00
Florian Bruhin 7580eca147 Actually mark qute-pass executable 2022-04-02 12:50:10 +02:00
Florian Bruhin 3c7d0879a4 Update changelog 2022-04-02 12:47:51 +02:00
Florian Bruhin f7bf9d0c33 Mark qute-pass as executable and add checker
Regressed in #7068
2022-04-02 12:45:40 +02:00
Nicholas Schwab eb1e49c468 Fixed spaces at line end. 2022-04-01 20:45:16 +02:00
Nicholas Schwab de351a8ac1 Fixed too long line. 2022-04-01 20:32:21 +02:00
Nicholas Schwab 93e548eccf Added tests for click-element focused. 2022-04-01 20:32:21 +02:00
Nicholas Schwab 08bba7ac77 Simplified click-element method. 2022-04-01 20:32:21 +02:00
Nicholas Schwab f79778710c Make value argument optional when clicking focused element. 2022-04-01 20:32:21 +02:00
Nicholas Schwab effeb9869c Add focused filter to click-element. 2022-04-01 20:32:21 +02:00
Nicholas Schwab b56dfdc139 Make calling of click-element handlers more versatile. 2022-04-01 20:32:21 +02:00
Nicholas Schwab 061542808b Added some tests for click-element with position filter. 2022-04-01 20:27:07 +02:00
Nicholas Schwab 16ea760900 Made error messages more uniform in click_element. 2022-04-01 20:27:07 +02:00
Nicholas Schwab d48ccd3020 Fixed typo in find_at_pos. 2022-04-01 20:27:07 +02:00
Nicholas Schwab 2c0470d098 Add tests for click-element with CSS filter. 2022-04-01 20:27:07 +02:00
Nicholas Schwab 82e7a9f2ec Specify type of callback in click_element. 2022-04-01 20:27:07 +02:00
Nicholas Schwab 1045f57f09 Added type annotations. 2022-04-01 20:27:07 +02:00
Nicholas42 ef0db5918f Apply suggestions from code review
Co-authored-by: Florian Bruhin <me@the-compiler.org>
2022-04-01 20:27:07 +02:00
Nicholas Schwab dbc9e0d41b Added new filters to documentation of click-elements. 2022-04-01 20:27:07 +02:00
Nicholas Schwab b60939104a Add position as filter for click-element. 2022-04-01 20:27:07 +02:00
Nicholas Schwab 53b87f024c Adapt tests to new error output. 2022-04-01 20:27:07 +02:00
Nicholas Schwab 47de400b0b Split handling of single and multiple elements in click_element. 2022-04-01 20:27:07 +02:00
Nicholas Schwab e5b17bf3b0 Add argument to select first match to click-element. 2022-04-01 20:27:07 +02:00
Nicholas Schwab 1478a5c276 Added target css for click-element. 2022-04-01 20:27:07 +02:00
Florian Bruhin 01a402dcfc Release v2.5.0 2022-04-01 16:59:20 +02:00
Florian Bruhin 45d1662607 Update changelog 2022-04-01 16:51:53 +02:00
Florian Bruhin 16a7487f36 Update content.headers.user_agent completions 2022-04-01 16:33:40 +02:00
Florian Bruhin 7270753ed9 Update changelog 2022-04-01 16:29:07 +02:00
Florian Bruhin 18a88c4e87 Update changelog 2022-03-31 21:16:05 +02:00
Florian Bruhin 3f58605ad1 Merge remote-tracking branch 'origin/pr/6543' 2022-03-31 21:14:40 +02:00
Florian Bruhin 8a69226912 Fix spelling 2022-03-31 21:07:24 +02:00
Florian Bruhin ecf63880dc Fix lint / changelog 2022-03-31 20:38:33 +02:00
Florian Bruhin 1af602b258 readline: Properly delete first character 2022-03-31 19:54:19 +02:00
Florian Bruhin ab65c542a0 Add :rl-rubout and :rl-filename-rubout
Closes #4561
2022-03-31 17:46:34 +02:00
Axel Dahlberg 3656345076 test(downloads) wip test for external fileselect 2022-03-31 17:30:17 +02:00
Axel Dahlberg 65c3007fc0 feat(download) changes after feedback 2022-03-31 17:24:12 +02:00
Axel Dahlberg 89045a8ad7 feat(download) support external location picker 2022-03-31 16:50:05 +02:00
Florian Bruhin ebdd791b74 readline: Allow passing args to cmdutils.register 2022-03-31 16:43:33 +02:00
Florian Bruhin 6210870322 Restore deleted test 2022-03-31 15:42:10 +02:00
Florian Bruhin af85f7e6c9 Merge remote-tracking branch 'origin/pr/6599' 2022-03-31 15:41:10 +02:00
Florian Bruhin 605a575a76 Update changelog 2022-03-31 15:05:18 +02:00
Florian Bruhin 3c26abd09a Test system-data dir with flatpak 2022-03-31 15:04:09 +02:00
Florian Bruhin c6e9565daf Merge remote-tracking branch 'origin/pr/6946' 2022-03-31 15:00:06 +02:00
Florian Bruhin 7cbd66586c Update changelog 2022-03-31 14:44:31 +02:00
Florian Bruhin 50922bf620 Merge remote-tracking branch 'origin/pr/6957' 2022-03-31 14:40:33 +02:00
Florian Bruhin 887253f70c Add missing space 2022-03-31 14:37:20 +02:00
Florian Bruhin c832be9b95 Merge remote-tracking branch 'origin/pr/6996' 2022-03-31 14:37:01 +02:00
Florian Bruhin afadc1cf14 Update docs 2022-03-31 13:27:40 +02:00
Florian Bruhin d68357f16c Merge remote-tracking branch 'origin/pr/7010' 2022-03-31 13:26:31 +02:00
Florian Bruhin 3646d13300 Update changelog 2022-03-31 13:15:23 +02:00
Florian Bruhin 860b7dc102 Remove double if 2022-03-31 13:14:32 +02:00
Florian Bruhin 3ec04380b0 Merge remote-tracking branch 'origin/pr/7014' 2022-03-31 13:14:12 +02:00
Florian Bruhin 4d65a8a388 Update changelog 2022-03-31 12:07:12 +02:00
Florian Bruhin d671887777 Merge remote-tracking branch 'origin/pr/7048' 2022-03-31 12:06:13 +02:00
Florian Bruhin ee052106fa Update changelog 2022-03-31 11:51:36 +02:00
Florian Bruhin 0489f6a090 Merge remote-tracking branch 'origin/pr/7068' 2022-03-31 11:50:43 +02:00
Florian Bruhin a381b3fd54 Update changelog 2022-03-31 11:43:54 +02:00
Florian Bruhin f654c0fdfc cast userscript: Fix error message
Avoid SC2140 shellcheck false-positive: https://github.com/koalaman/shellcheck/issues/2479

Also remove extra quoting
2022-03-31 11:41:30 +02:00
Florian Bruhin 08fa205560 Merge remote-tracking branch 'origin/pr/7074' 2022-03-31 11:27:36 +02:00
Florian Bruhin 4786e1edfa Restore lost coverage pragma 2022-03-30 19:01:32 +02:00
Florian Bruhin 0d1e90e3f4 Fix test_editor 2022-03-30 18:24:42 +02:00
Florian Bruhin ced9d59de2 Update changelog 2022-03-30 18:22:57 +02:00
Florian Bruhin 982c3f1fbd Pre-resolve guiprocess paths (work around Qt's CVE-2022-25255) 2022-03-30 17:52:44 +02:00
Florian Bruhin f8f3ae6c5d Adjust mailinglist URLs to new provider
See https://listi.jpberlin.de/pipermail/qutebrowser/2022-March/000885.html
2022-03-30 16:44:31 +02:00
Florian Bruhin 85158357f0 Update importlib.resources annotation comments
A zipfile.Path *is* a Traversable
2022-03-30 14:21:23 +02:00
Florian Bruhin 757532e568 Fix version specifiers for importlib-metadata 2022-03-30 13:57:56 +02:00
Florian Bruhin 4094e15bcb version: Always prefer builtin importlib.metadata
If we have a builtin importlib.metadata (Python 3.8+) and the importlib_metadata
backport installed, we preferred the backport. However, the version.py tests do
the opposite: They only mock the builtin if it is available. This did lead to
failing tests if the backport was installed in an environment where the builtin
was available too.

Since we don't need any specialized functionality (only reading the version), we
can prefer the builtin no matter whether a backport is available or not.
2022-03-30 13:51:35 +02:00
Florian Bruhin ab3fb74bb3 Do the Python 3.6 dance for pallets 2022-03-30 12:59:24 +02:00
qutebrowser bot da9ef56fa6 Update dependencies 2022-03-30 10:31:43 +00:00
Florian Bruhin 0c38f6b78f scripts: Improve ordering 2022-03-30 12:22:47 +02:00
Florian Bruhin f4ddea2fef Add docstring 2022-03-30 12:01:57 +02:00
Florian Bruhin 485b22a6ef requirements: Remove --use-feature=in-tree-build
This is the default now according to pip output
2022-03-30 11:56:34 +02:00
Florian Bruhin ac2cb6bb30 scripts: Show requirement name in table output 2022-03-30 11:55:57 +02:00
Florian Bruhin 9a5e9b328e Merge branch 'update-dependencies' 2022-03-30 11:17:12 +02:00
Florian Bruhin 151b0209e8 pylint: Enable private_import extension 2022-03-30 10:22:00 +02:00
Florian Bruhin 7f847e44e9 scripts: Update pyroma changelog URL 2022-03-30 10:11:25 +02:00
Florian Bruhin e494100582 ci: Switch to FORCE_COLOR
pytest understands that since a while: https://pytest.org/en/7.0.x/reference/reference.html#environment-variables and other tools are adopting it: https://github.com/sphinx-doc/sphinx/pull/10260
2022-03-30 09:57:53 +02:00
Florian Bruhin c0677c0f6f Do the Python 3.6 dance for Jinja2 2022-03-30 09:52:13 +02:00
Florian Bruhin 396442a7cd Do the Python 3.6 dance for importlib-resources 2022-03-29 22:16:20 +02:00
Florian Bruhin 60c310f7bd Fix mypy 2022-03-29 21:43:10 +02:00
Florian Bruhin 562f358050 mypy: Fix typing around importlib.resources
mypy was correct here: _path doesn't always return a pathlib.Path, it's why we need to handle that in _glob().
2022-03-29 21:29:49 +02:00
Florian Bruhin b6800acf48 scripts: Add changelog URL for dill 2022-03-29 18:12:02 +02:00
Florian Bruhin 735ec65865 pylint: Work around Python 3.10 pathlib issue
See https://github.com/PyCQA/pylint/issues/5783
2022-03-29 18:11:32 +02:00
Florian Bruhin 2b76b61640 pylint: Disable unnecessary-ellipsis for tests
See https://github.com/PyCQA/pylint/issues/6036 and https://github.com/PyCQA/pylint/issues/6037
2022-03-29 17:57:03 +02:00
Florian Bruhin 2957c5ccb8 Switch to newer Python for linters
We originally used Python 3.8 for pylint for https://github.com/PyCQA/pylint/issues/3760 which is long fixed... See 214dd63441
2022-03-29 17:52:21 +02:00
Florian Bruhin f45dcb1aba pylint: Work around used-before-assignment issues
See https://github.com/PyCQA/pylint/issues/6035
2022-03-29 17:22:56 +02:00
Florian Bruhin e93cb0a00d Show unbound prompt bindings
This makes new commands more discoverable for people with custom bindings, and helps in situations like https://www.reddit.com/r/qutebrowser/comments/tq7628/prompt_trap_closing_the_application_is_the_only/
2022-03-29 11:33:56 +02:00
qutebrowser bot fe22b2b0b0 Update dependencies 2022-03-28 04:23:33 +00:00
Florian Bruhin 70d83cb627 Make mypy happy
It seems to only check the true condition based on the given Python version in the config...

See https://github.com/python/mypy/issues/12286
2022-03-26 11:10:07 +01:00
Florian Bruhin cedc3d2f28 Minor style changes 2022-03-26 10:44:14 +01:00
Florian Bruhin 0a835ecd92 Use a weakref.WeakValueDictionary 2022-03-26 10:42:43 +01:00
Jimmy 6341154aeb Skip debucachestats test on python < 3.9
Refactor the magic tag creation thing to add python version checking support.
Makes `_check_version()` support checking plain tuples to so that I don't have
to copy the operator dict.

Now most of the branches of the if/else are the same, meh.
2022-03-26 16:06:42 +13:00
Jimmy a546c5fcfc Disable debugcachestats on python < 3.9
Since I added weakrefs into the cache stats debug registry thing it no longer
works on python version 3.5 to 3.8, since lru_cache doesn't support weak refs
for those versions. It should be possible to do some
conditional stuff and get some functionality working on all supported versions
but I don't think there is any great need to for a debug command.

Links:
https://bugs.python.org/issue14373
https://bugs.python.org/issue40504
https://github.com/qutebrowser/qutebrowser/pull/7079#issuecomment-1079539046
2022-03-26 16:06:42 +13:00
Jimmy 7e3f8f5984 ignore lru_cache flake8 warning
The warning says the `self` reference will get cached forever. In this
case though the cache is cleared on every page load (9b0395db08).
2022-03-26 13:01:10 +13:00
Jimmy 56a370b971 debugcachestats: wrap cached functions in weakref
In 4b93da6c69 I moved a cache that was registered with the
debugcache module to be per-window. Which means they may be deleted at
some point and we shouldn't hold strong references to them.
2022-03-26 13:00:55 +13:00
Jimmy b830c13c0b move tabbar lru_caches to instance level
Flake8-bugbear correctly pointed out that TabBar instances would not be
reliably cleaned up because the `self` reference would be cached in the
lru_caches on a couple of the methods. And the caches are on the class
so they last for the whole lifetime of the process.

This commit move the caches to be created per instance, instead of on
the class.

Other options:

1. get rid of the caches

From running the benchmark tests (eg `python3 -m pytest --benchmark-columns Min,Max,Median,Rounds -k test_update_tab_titles_benchmark`)
it seems like the caches can still be helpful (even though when they
were introduced in #3122 we didn't have the config cache either)

2. use cachetools to manage our own cache instead of using lru_cache in
   a non-standard way

I don't feel like introducing a new dependency given this change didn't
end up being too offensive.

3. clear the cache whenever a window get closed

That would solve the "not getting deleted issue" but flake8 would still
complain :)

Possibly the cache size could be reduced now that there is going to be
one per window. But the aren't caching large objects anyway.

Flake8-bugbear change: https://github.com/PyCQA/flake8-bugbear/pull/218
Video that pointed out this way of using lru_cache: https://youtu.be/sVjtp6tGo0g
2022-03-26 13:00:54 +13:00
David Vaughan 0321577cc3 Fix a couple tab lengths (cast) 2022-03-21 21:13:56 -07:00
David Vaughan 065edd67fa Change cast configuration to use an env var
Also some other small improvements / fixes.
2022-03-21 21:06:36 -07:00
qutebrowser bot 87b9dab1d8 Update dependencies 2022-03-21 04:23:12 +00:00
Jimmy 4c745a298a ci: update package list before installing asciidoc
On the last two runs we've been getting errors install lxml2-utils (a
dependency of asciidoc) because the version in the packages list isn't
available anymore. A new point build has been pushed.

The base image will be updated eventually but [the docs][] say to run
apt update before installing. That is already done once in this file
too. Yay for longer build times.

Last two runs:

https://github.com/qutebrowser/qutebrowser/runs/5578546699?check_suite_focus=true
https://github.com/qutebrowser/qutebrowser/runs/5581525862?check_suite_focus=true

[the docs]: https://docs.github.com/en/actions/using-github-hosted-runners/customizing-github-hosted-runners#installing-software-on-ubuntu-runners
2022-03-17 20:53:34 +13:00
Jimmy 77ca56666c Merge pull request #6999 from twigleingrid/hide-long-description
Hide long description of settings
2022-03-17 19:07:10 +13:00
David Vaughan 88aa165d48 Disable shellcheck on source line (cast) 2022-03-16 16:46:12 -07:00
David Vaughan e38b31af0b Make cast dl program configurable (default yt-dlp)
I am making the yt-dl program used in the `cast` userscript
configurable, via a pattern borrowed from some of the other
userscripts here (e.g. `password_fill` and `kodi`): we look for an
optional "cast_rc" file in the qutebrowser config directory and source
it if it exists.

(Technically this allows for overriding any variables used in `cast`,
but this is in line with how the pattern works in the other scripts
already.)

If the config file is not found, we default to yt-dlp, and if that
doesn't exist then youtube-dl. If after all this no program is
available, we emit an error message

(note, the error messaging function as currently written in the cast script
seems broken and doesn't display the full error message, but fixing this
existing bug is outside of the scope of this change. May be good for a
followup).

I recognize there's some danger of breakage for some users by switching
the default to yt-dlp, but I think it's reasonable to assume that almost
everybody who has yt-dlp installed would prefer it to be used anyway.
Those who don't will experience no difference.
2022-03-16 16:39:57 -07:00
DavidRV00 3ba49366d1
Switch `cast` userscript from youtube-dl to yt-dlp
The `cast` userscript hasn't worked for me in a while, because it attempts to launch youtube-dl which has been replaced by yt-dlp for some time. Switching this one command gets `cast` working for me.
2022-03-15 23:30:36 -07:00
Joakim Hansen 3b54d45cd9 qute-pass: Support folder prefixes in gopass-mode 2022-03-14 12:36:11 +01:00
Florian Bruhin b8c2c8d381 Simplify socket usage 2022-03-14 11:27:41 +01:00
Florian Bruhin db720b1454 Let mypy check for blanket ignores 2022-03-14 10:04:36 +01:00
Florian Bruhin b2a8088626 Remove redundant check
We already have 'if only_one_tab_open' above.
2022-03-14 10:01:23 +01:00
Florian Bruhin 60de9523ba Update code for latest mypy 2022-03-14 09:50:00 +01:00
Florian Bruhin d4304511f3 requirements: Do the Python 3.6 dance 2022-03-14 09:14:58 +01:00
qutebrowser bot eb132a5830 Update dependencies 2022-03-14 04:20:38 +00:00
Florian Bruhin 283bbcfba2 Update spatial navigation description 2022-03-12 18:17:32 +01:00
Florian Bruhin 4a7e87e645 Fix bindings.commands docs 2022-03-11 19:43:05 +01:00
Ingrid Budau 7e0a999a27 Make short description part of the summary in the details tag
This way the text of the description is not interrupted
when expanded.
2022-03-10 16:51:37 +01:00
mkonig 75a714e7f0
Merge branch 'qutebrowser:master' into master 2022-03-09 09:19:41 +01:00
Florian Bruhin 22d2c2960c
Merge pull request #7056 from qutebrowser/update-dependencies
Update dependencies
2022-03-07 18:10:46 +01:00
Florian Bruhin 1a737b8bc1 tests: Catch async ERR_INVALID_URL 2022-03-07 14:24:43 +01:00
Florian Bruhin 4c0eea93d6 Fix inconsistent doc generation 2022-03-07 12:02:23 +01:00
Florian Bruhin a855831e24 Merge branch 'new-chromium-args' 2022-03-07 11:15:00 +01:00
Florian Bruhin 0b412ffb74 Update docs 2022-03-07 11:01:04 +01:00
qutebrowser bot d50d9e8019 Update dependencies 2022-03-07 04:21:14 +00:00
Florian Bruhin 7f1d92b596 Fix sandboxing test on Qt 5.12/QtWebKit/Windows 2022-03-06 23:05:13 +01:00
Florian Bruhin 2e5eab3dcc Fix lint 2022-03-06 22:56:50 +01:00
Florian Bruhin 44c7578bb2 tests: Disable seccomp BPF sandbox on older Chromiums
Seems to be necessary with newer libc (?) and Qt 5.12 plus 5.15.0/.1/.2.
2022-03-06 22:56:19 +01:00
toofar 0924631cdc
Merge pull request #7046 from qutebrowser/update-dependencies
Update dependencies
2022-03-05 16:51:19 +13:00
Ingrid Budau 3db9c99aea Show long description by using `details` tag
Replace button and JavaScript functionality with
HTML `details` tag for showing or hiding long settings' descriptions.
2022-03-04 12:10:33 +01:00
Florian Bruhin 44e00c5992 Handle missing support in sandbox test 2022-03-04 09:44:29 +01:00
Florian Bruhin 941627d778 Refactor tests to use new sandbox setting 2022-03-04 09:39:06 +01:00
Florian Bruhin 8fe1de2fdc Add qt.chromium.sandboxing setting and sandboxing test 2022-03-03 21:16:04 +01:00
Florian Bruhin 38acd8f44a Rename Chromium settings 2022-03-03 13:49:41 +01:00
Daniel Dimijian 68f683a8ad make url grabbing more robust 2022-03-02 10:59:30 -05:00
Daniel Dimijian 5eb57f4354 remove python 2 compatibility imports 2022-03-02 10:58:03 -05:00
Ingrid Budau 14c00108bc Fix input buttons
I am reverting these changes, as they are causing the input buttons
to not work properly anymore.
I am adding a pointer cursor for the hidden radio button as well.
2022-03-02 13:56:51 +01:00
Ingrid Budau 0fc4fe322e Add pointer cursor and fix indentation
I am only adding a pointer cursor.
I tried to fix the broken indentation, that is why it seems that I am changing
everything.
2022-03-02 11:15:11 +01:00
Jetfrog28 b6c658a958
include qutebrowser in user agent
Co-authored-by: Florian Bruhin <me@the-compiler.org>
2022-03-02 03:35:32 -05:00
Daniel Dimijian ed61390bde change user agent to ripbang 2022-03-02 02:24:22 -05:00
Daniel Dimijian b5c1cf9144 fix ripbang url snipping and set command 2022-03-02 01:54:18 -05:00
Daniel Dimijian dc50793d2d fix ripbang userscript for command line (not spawned) 2022-03-02 01:54:18 -05:00
Florian Bruhin ac4ca6bfe2 doc: Add pywalQute 2022-03-01 20:40:28 +01:00
qutebrowser bot bf16444389 Update dependencies 2022-02-28 04:21:34 +00:00
toofar e832e3e6d0
Merge pull request #7040 from qutebrowser/update-dependencies
Update dependencies
2022-02-27 11:04:28 +13:00
Jimmy 273973bcb5 update changelogs
mostly due to itsdangerous dropping jwcrypto

a bit of python3.6 churn this week

github3.py link was out of date
2022-02-21 22:15:14 +13:00
Jimmy 6e119a8508 pin tldextract for 3.6
I'm almost tempted to get pyenv working, almost.
2022-02-21 21:49:09 +13:00
Jimmy 0aa5558888 pin itsdangerous for python3.6
I wonder how many else will fail.
Also it would be nice if the compiled requirements files said where the
requirements come from, as in what they are dependencies of, if
anything. Like pip-compile does.
2022-02-21 21:32:08 +13:00
Jimmy fa232daa10 try to pin markupsafe for 3.6
Hopefully that works. This was confusing. Grepping for 3.6 to see how
other places pin it there were a bunch of normal pins in .txt files and
then some comment-but-actually-instruction comments in the -raw files.
There is a readme in the requirements folder but it just says what
instructions are allowed. Not why you would want to add them, seems to
very high cognitive load setup.
Trying to run the recompile_requirements.py script it did some stuff
then quit because it couldn't find python3.7. Yeah I don't have that
installed. It doesn't try to use pyenv or anything, just runs venv
expecting you have everything installed?
Turns out you take the name of the requirements file you added the
instructions to (eq requirements-test.txt-raw -> test) and run it with
that as argument. The requirements file you modify should be the highest
level one that mentions the requirement you want to pin.

Anyway I edited the qutebrowser.text-raw one because that seems like the
main one and it mentions MarkupSafe (because of jinja2?) and ran
`scripts/dev/recompile_requirements qutebrowser` in my existing venv.
Lets see what the CI thinks.

Also got lots of `pkg_resources==0.0.0` in a bunch of requirements files
which seems problematic.
2022-02-21 21:16:41 +13:00
qutebrowser bot 1d75436b7f Update dependencies 2022-02-21 04:20:20 +00:00
Jimmy f640940ddc Update docs/changelog 2022-02-20 10:30:23 +13:00
Jimmy 133856e5ca Merge pull request #7000 from AckslD/mode-autocmd 2022-02-20 10:20:15 +13:00
Axel Dahlberg caaa6b6fda feat(tabbedbrowser) add option to select mode based on url pattern 2022-02-19 12:32:28 +01:00
Florian Bruhin a22f60e385 scripts: Remove EasyProcess changelog URL 2022-02-14 16:18:18 +01:00
Florian Bruhin 21cf983501 Merge remote-tracking branch 'origin/update-dependencies' 2022-02-14 16:17:57 +01:00
Florian Bruhin 9624685703 Fix other license typo
See #7027
2022-02-14 16:17:04 +01:00
Florian Bruhin b0194dd258
Merge pull request #7027 from marco-parillo/master
Fix typo in license
2022-02-14 16:15:03 +01:00
Marco A Parillo 1c1a32f9ac Fix typo in license 2022-02-14 10:02:08 -05:00
mkonig 1b9f04a908
Merge branch 'qutebrowser:master' into master 2022-02-14 11:49:29 +01:00
qutebrowser bot 8318f68ba9 Update dependencies 2022-02-14 04:22:19 +00:00
Florian Bruhin a10049402b doc: Remove dead link
Fixes #7005

[ci skip]
2022-02-12 10:38:39 +01:00
Florian Bruhin 9c4169c7b7 tests: Remove some unused imports 2022-02-11 13:12:43 +01:00
Will Ruggiano f5b6b426e2
feat: pass QUTE_TAB_INDEX to userscripts 2022-02-10 13:44:17 -07:00
inwit 3cbb7194b0 Apply the requested changes 2022-02-10 18:09:52 +01:00
Florian Bruhin 02e23ef124 Remove unneeded pylint suppression 2022-02-08 20:31:15 +01:00
inwit 514a4a05ff External editor: add an option to never remove the file upon closing 2022-02-07 22:23:01 +01:00
mkonig f9a1cef97b
Merge branch 'qutebrowser:master' into master 2022-02-07 10:52:35 +01:00
Florian Bruhin 43a5b71257
Merge pull request #7006 from qutebrowser/update-dependencies
Update dependencies
2022-02-07 08:48:27 +01:00
qutebrowser bot 729a857887 Update dependencies 2022-02-07 04:18:33 +00:00
Florian Bruhin 6598914969
Merge pull request #7001 from qutebrowser/update-dependencies
Update dependencies
2022-02-04 18:12:04 +01:00
qutebrowser bot 1228ea2c8c Update dependencies 2022-02-04 16:47:03 +00:00
Ingrid Budau f8ce97c80b Change color of "Show more" button 2022-02-04 15:20:05 +01:00
mkonig e001d845b4
Merge branch 'qutebrowser:master' into master 2022-02-03 19:11:19 +01:00
Pierre-Albéric TROUPLIN 3f4f9649d9 Add link to personal userscripts 2022-02-03 14:27:37 +01:00
Florian Bruhin 387e165a7b requirements: Do the Python 3.6 dance 2022-02-02 22:12:01 +01:00
Ingrid Budau d8e35c5ab1 Add CSS to the description section 2022-02-01 15:32:42 +01:00
mkonig b9834afd69
Merge branch 'qutebrowser:master' into master 2022-02-01 09:30:35 +01:00
Ingrid Budau ae8f5565dc Show/hide long descriptions
Show only the first line of the description of the setting. This makes all the settings the same size,
giving a better overview. Display or hide the description according to
the button click.
2022-01-31 16:25:48 +01:00
Florian Bruhin e45ece7227 Remove old requirements-pip.txt
The reason stated in ac0409c60d to keep it does not apply anymore, we have it in requirements-tox.txt now.
2022-01-31 09:16:07 +01:00
qutebrowser bot 9e80ff0a5c Update dependencies 2022-01-31 04:21:21 +00:00
Florian Bruhin 86b5bed388 Partially re-revert _error_page_workaround changes
The logging part removed in 438b8b4609 is still needed for some tests, and debugging too.
2022-01-29 13:31:04 +01:00
Florian Bruhin 2dc11c128a Update docs/changelog 2022-01-29 11:38:14 +01:00
Florian Bruhin 7b92d9b207 Merge remote-tracking branch 'origin/pr/6972' 2022-01-29 11:35:31 +01:00
Florian Bruhin 438b8b4609 Drop old Debian error page workaround
Manual revert of d741bdf2f9

See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=882805

See #5078, #3773
2022-01-29 11:31:58 +01:00
Florian Bruhin fd277275f4 Handle UnicodeDecodeError when reading faulthandler log 2022-01-29 10:26:23 +01:00
Florian Bruhin 02f331b89c tests: Update webserver started regex
Needed for webserver_sub_ssl.py with bleeding edge CI as it excludes the trailing slash, probably recent Flask/Werkzeug change.
2022-01-29 09:37:53 +01:00
Florian Bruhin 81e1fb2cc2
Merge pull request #6973 from qutebrowser/update-dependencies
Update dependencies
2022-01-25 23:27:06 +01:00
mkonig aec86e3366
Merge branch 'qutebrowser:master' into master 2022-01-25 21:42:05 +01:00
mohite-abhi ef87b5df72 Add tests for tab focus completion delete 2022-01-25 04:22:50 +05:30
qutebrowser bot 7395a43e53 Update dependencies 2022-01-24 04:21:13 +00:00
mohite-abhi d89d5853d3 Fix linter errors 2022-01-23 23:43:20 +05:30
mohite-abhi 426b280b1b fix more linter issues 2022-01-23 22:33:27 +05:30
mohite-abhi 3b27bf9fb7 Fixed linter errors 2022-01-23 21:49:33 +05:30
mohite-abhi 57155e329a Fixes qutebrowser/qutebrowser#6967 by adding win id param in _tabs & using it in delete_tabs
As delete_tab was assuming that completion column contains window ID, it was showing
exception in case of tab-focus, as it doesn't have the window ID in completion column.
So instead a new parameter named current_win_id is used in _tabs which is also passed
in all uses of the function.
2022-01-23 19:14:47 +05:30
Florian Bruhin 945e338573 Actually handle empty header strings correctly
Whooops...
2022-01-20 12:25:29 +01:00
Florian Bruhin f1d8dc59d7 Allow empty strings for content.headers.custom 2022-01-20 12:22:32 +01:00
mkonig 761352ff6c
Merge branch 'qutebrowser:master' into master 2022-01-18 08:54:49 +01:00
Florian Bruhin 6d3dde74d8
Merge pull request #6964 from qutebrowser/update-dependencies
Update dependencies
2022-01-17 08:25:45 +01:00
qutebrowser bot fc894c798a Update dependencies 2022-01-17 04:20:25 +00:00
Florian Bruhin 5212a09984
Merge pull request #6961 from potamides/master
Add yomichad to userscripts
2022-01-16 20:30:35 +01:00
Jonas Belouadi 1256d013f0 Add yomichad to userscripts README.md 2022-01-15 15:00:02 +01:00
tinywrkb 2d44db28e2 userscripts/open_download: Wait for xdg-open exit code 2022-01-12 15:23:23 +02:00
tinywrkb d7a4c3a24d userscripts/open_download: Flatpak compatibility 2022-01-12 15:23:02 +02:00
Florian Bruhin 5c37937ad9 Don't install PyYAML from git for bleeding CI
Workaround for https://github.com/yaml/pyyaml/issues/601
2022-01-12 11:42:03 +01:00
mkonig 1888164f5a
Merge branch 'qutebrowser:master' into master 2022-01-12 10:25:15 +01:00
tinywrkb e165668ba1 standarddir: Set correct system data dir for Flatpak 2022-01-10 15:03:22 +02:00
Florian Bruhin 10267f70e3 scripts: Move changelog URLs to JSON 2022-01-10 10:01:29 +01:00
Florian Bruhin d491da13cc scripts: Update cheroot changelog URL 2022-01-10 09:55:24 +01:00
Florian Bruhin 63d62682e6
Merge pull request #6950 from qutebrowser/update-dependencies
Update dependencies
2022-01-10 09:54:06 +01:00
qutebrowser bot f5e91cb06e Update dependencies 2022-01-10 04:20:20 +00:00
Florian Bruhin 3a2aaaacbf Update changelog 2022-01-09 19:06:02 +01:00
Florian Bruhin 40c30dcd72 Merge remote-tracking branch 'origin/pr/6932' 2022-01-09 19:04:41 +01:00
Florian Bruhin 19bbb8dc67 Update related projects list 2022-01-08 00:59:16 +01:00
Florian Bruhin 4cfb20843b Fix minor typo 2022-01-07 11:08:12 +01:00
Florian Bruhin bb265dc712 Update changelog 2022-01-05 16:35:04 +01:00
Florian Bruhin 9ce7b48f46 Merge remote-tracking branch 'origin/pr/6626' 2022-01-05 16:33:20 +01:00
Florian Bruhin 74d0d4d957 Update changelog 2022-01-05 16:30:39 +01:00
Florian Bruhin a0a4359df6 Adjust argument name 2022-01-05 16:23:41 +01:00
Florian Bruhin 0903d9879a Merge remote-tracking branch 'origin/pr/6619' 2022-01-05 16:22:44 +01:00
mkonig 681151ac88
Merge branch 'qutebrowser:master' into master 2022-01-05 10:48:01 +01:00
Florian Bruhin f4714a9300 Use flake8-pytest-style 2022-01-04 10:30:24 +01:00
Florian Bruhin e1af0ff74d
Merge pull request #6933 from qutebrowser/update-dependencies
Update dependencies
2022-01-03 10:50:11 +01:00
Florian Bruhin f60d340d16 requirements: Python 3.6 for zipp 2022-01-03 09:58:14 +01:00
Florian Bruhin 11880a96f5 scripts: Update changelog URLs 2022-01-03 09:47:06 +01:00
qutebrowser bot 88b9fb83b9 Update dependencies 2022-01-03 04:20:17 +00:00
Eric Engestrom 5d0071b19c qute-bitwarden: let the user specify their password prompt
This allows it to work on Wayland (my use case), but also opens up the
possibility of using the system keychain to manage the password, or any
other method the user might want.
2022-01-02 17:46:15 +00:00
mkonig 01ced0af21
Merge branch 'qutebrowser:master' into master 2021-12-29 20:36:12 +01:00
Florian Bruhin 955c6fb763
Merge pull request #6917 from qutebrowser/update-dependencies
Update dependencies
2021-12-29 11:52:21 +01:00
Florian Bruhin ad9ccabdd7 Update type annotations 2021-12-29 11:25:06 +01:00
Florian Bruhin 71833bbe06 requirements: More Python 3.6 stuff 2021-12-29 11:15:21 +01:00
qutebrowser bot cf99fa9bc9 Update dependencies 2021-12-27 11:08:26 +00:00
Florian Bruhin e8bbcf3382 Add additional tests 2021-12-23 13:57:30 +01:00
Florian Bruhin 7f87ecc1c1 Interpret --mode for :bind without key 2021-12-23 12:38:07 +01:00
Florian Bruhin 2ebcbb63c4
Merge pull request #6901 from qutebrowser/update-dependencies
Update dependencies
2021-12-20 16:46:54 +01:00
Florian Bruhin e78c6699a0 scripts: More version parsing in recompile_requirements
Required for misc_checks.py
2021-12-20 15:08:02 +01:00
Florian Bruhin 450619e25a Update annotations for new mypy 2021-12-20 12:14:19 +01:00
Florian Bruhin 1d0787f852 requirements: Do the Python 3.6 dance 2021-12-20 11:36:48 +01:00
Florian Bruhin 6b66221dea scripts: Handle lines with == in marker correctly 2021-12-20 11:36:26 +01:00
qutebrowser bot 00b0ef3c1f Update dependencies 2021-12-20 04:21:35 +00:00
mkonig e53fb51e47
Merge branch 'qutebrowser:master' into master 2021-12-17 09:57:23 +01:00
Florian Bruhin 35616345bb
Merge pull request #6887 from qutebrowser/update-dependencies
Update dependencies
2021-12-13 15:08:10 +01:00
Florian Bruhin 1ba9ab9ce4 Update changelog URLs 2021-12-13 15:07:41 +01:00
qutebrowser bot 6b679d6362 Update dependencies 2021-12-13 04:22:18 +00:00
Florian Bruhin 297b33928a Update changelog 2021-12-12 11:12:16 +01:00
Florian Bruhin 5d9dfc3b47 Apply globalThis quirk for stackexchange pages
Closes #6885
2021-12-12 11:10:41 +01:00
mkonig f045ef48b6
Merge branch 'qutebrowser:master' into master 2021-12-07 09:00:30 +01:00
Florian Bruhin b500d40281 Drop unnecessary .keys() 2021-12-06 08:29:52 +01:00
Florian Bruhin 72eec211cc Revert "pylint: Work around used-before-assignment regression"
This reverts commit 49eddbe34c.
2021-12-06 08:15:32 +01:00
mkonig 3027adc26b
Merge branch 'qutebrowser:master' into master 2021-12-06 08:05:58 +01:00
qutebrowser bot c792913c68 Update dependencies 2021-12-06 04:19:29 +00:00
Florian Bruhin 7c6b041906 Update changelog 2021-12-03 18:27:02 +01:00
Florian Bruhin f60e4719e5 Merge remote-tracking branch 'origin/pr/6715' 2021-12-03 18:25:59 +01:00
Florian Bruhin 679f60eed0 Update changelog 2021-12-03 18:23:33 +01:00
Florian Bruhin 88072e234b Rename audio_muted_timer to silence_timer 2021-12-03 18:05:23 +01:00
Florian Bruhin 9280314d39 Merge remote-tracking branch 'origin/pr/6750' 2021-12-03 18:03:40 +01:00
Florian Bruhin b8b394f71d Update docs/changelog 2021-12-03 17:44:46 +01:00
Florian Bruhin b828e49c50 Add more webelement selector unit tests 2021-12-03 17:42:51 +01:00
Florian Bruhin e84460e86e Merge remote-tracking branch 'origin/pr/6757' 2021-12-03 17:41:57 +01:00
Florian Bruhin 5e6bae3983 Merge branch 'packaging-update'
# Conflicts:
#	misc/requirements/requirements-dev.txt
2021-12-03 15:58:48 +01:00
Florian Bruhin 2378ba7886 scripts: Use 'build' to build sdist
See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html
2021-12-03 15:52:03 +01:00
Florian Bruhin 733868ff87 scripts: Run 'twine check' 2021-12-03 15:42:14 +01:00
Florian Bruhin 42fac2a5c1 Update changelog URLs 2021-12-03 15:34:22 +01:00
qutebrowser bot de84f1dca2 Update dependencies 2021-12-03 14:30:13 +00:00
Florian Bruhin a580079206 scripts: Handle packaging dependencies via tox 2021-12-03 15:28:04 +01:00
Florian Bruhin 04c71c4d44 pylint: Avoid conflicting message IDs 2021-12-03 14:11:18 +01:00
Florian Bruhin bbb44f6e50 Add some missing docstring params 2021-12-03 13:50:57 +01:00
Florian Bruhin 26d308d95d pylint: Enable docparams checker 2021-12-03 13:36:20 +01:00
Florian Bruhin 4435ef9287 pylint: Enable else-if-used 2021-12-03 12:04:59 +01:00
Florian Bruhin b84d68e8ee pylint: Enable for_any_all extension 2021-12-03 12:04:59 +01:00
Florian Bruhin 083148ea38 pylint: Enable more extensions with no new messages 2021-12-03 12:04:59 +01:00
Florian Bruhin b806dc714b pylint: Enable code_style extension
All messages disabled right now, but sounds useful for future updates
2021-12-03 12:04:59 +01:00
Florian Bruhin 410a234b2a pylint: Set py-version 2021-12-03 12:04:59 +01:00
Florian Bruhin f30df9c959 pylint: Remove open encoding checker
Now built into pylint
2021-12-03 12:04:59 +01:00
Florian Bruhin 59cc72b052 pylint: Remove broad-try-clause entirely for now
See #6857
2021-12-03 12:04:59 +01:00
Florian Bruhin e4a667e06e pylint: Disable use-implicit-booleaness-not-comparison in tests 2021-12-03 12:04:59 +01:00
Florian Bruhin 543390c47a pylint: Work around some minor false-positives
See #6857
2021-12-03 12:04:59 +01:00
Florian Bruhin 4d13280994 pylint: Fix some legitimate issues 2021-12-03 12:04:59 +01:00
Florian Bruhin 1ca68e6280 pylint: Remove bad-continuation supressions
Removed in https://github.com/PyCQA/pylint/pull/3571 - should use black instead
2021-12-02 17:55:32 +01:00
Florian Bruhin d04c8e62d9 pylint: Ignore some minor issues 2021-12-02 17:54:50 +01:00
Florian Bruhin 49eddbe34c pylint: Work around used-before-assignment regression
See #6857 and https://github.com/PyCQA/pylint/issues/5342
2021-12-02 17:54:38 +01:00
Florian Bruhin 100e87ff0e pylint: Remove now-useless suppressions 2021-12-02 17:43:45 +01:00
Florian Bruhin 42d41096bc pylint: Disable too-many-try-statements
See #6857
2021-12-02 17:41:28 +01:00
Florian Bruhin 2f69664c2a pylint: Disable wrong-import-order for tests 2021-12-02 17:38:29 +01:00
Florian Bruhin ed2342a430 pylint: Handle consider-using-with 2021-12-02 17:30:47 +01:00
Florian Bruhin b9d58034d1 pylint: Disable raise-missing-from 2021-12-02 16:36:56 +01:00
Florian Bruhin 636c4cac4d pylint: Set class-const-naming-style
See #6857
2021-12-02 16:29:58 +01:00
Florian Bruhin b9530b313f pylint: Disable logging-fstring-interpolation for now
See #6197
2021-12-02 16:18:43 +01:00
Florian Bruhin cb9eecc87e pylint: Disable consider-using-f-string
Too big code churn right now, will do this for qutebrowser v3.0.0:
See #3020
2021-12-02 16:16:34 +01:00
Florian Bruhin d35839b16a requirements: Upgrade to pylint 2.12
We pinned pylint to < 2.5 due to this issue:
https://github.com/PyCQA/astroid/issues/772

...but then for some reaosn never unpinned it after the issue was fixed.
2021-12-02 16:15:12 +01:00
Florian Bruhin aef42047b7 Add hint test for tabindex-negative 2021-12-01 21:35:39 +01:00
Florian Bruhin a3fe21ee0d Update docs 2021-12-01 21:35:13 +01:00
Florian Bruhin 506df6d503 Merge remote-tracking branch 'origin/pr/6758' 2021-12-01 17:23:31 +01:00
Florian Bruhin 470fede771 tests: Move invisible.html to hints/html 2021-12-01 17:21:31 +01:00
Florian Bruhin ee79ea6532 Update changelog 2021-12-01 16:46:32 +01:00
Florian Bruhin 546caffcba Merge remote-tracking branch 'origin/pr/6798' 2021-12-01 16:44:55 +01:00
Florian Bruhin 5d31f93e5e Update changelog 2021-12-01 16:25:16 +01:00
Florian Bruhin e192c929cc Merge remote-tracking branch 'origin/pr/6818' 2021-12-01 16:24:39 +01:00
Ingrid Budau 3ace60c93b Hide radio button using CSS `appearance` property
- Hide radio button using the property `-webkit-appearance: none;`
  instead of `opacity`
- It is also supported on older QtWebEngine version 5.12
2021-11-30 12:15:17 +01:00
Florian Bruhin 68d44814c2 Update docs/changelog 2021-11-30 07:51:39 +01:00
Florian Bruhin f7b6fb50ea Merge remote-tracking branch 'origin/pr/6846' 2021-11-30 07:49:32 +01:00
Florian Bruhin 39b7f7dba0 Update charset_normalizer changelog URL 2021-11-30 07:48:28 +01:00
qutebrowser bot 75216f0e4a Update dependencies 2021-11-29 04:21:26 +00:00
Philipp Albrecht b900f1dd30 Make interpreting number keys as counts configurable
By default numbers are interpreted as counts for bindings. Making this
behavior configurable allows for emacs-like bindings, where number keys
are passed through.
2021-11-28 15:50:04 +01:00
Florian Bruhin a4213a4bb6 Update changelog 2021-11-26 16:25:22 +01:00
Florian Bruhin 3686b958b2 Catch rect parsing exceptions in :screenshot 2021-11-26 16:24:48 +01:00
Florian Bruhin 5e475f4151 ci: Thanks YAML 2021-11-22 18:09:17 +01:00
Florian Bruhin 3c50b57850 Update changelog 2021-11-22 18:07:29 +01:00
Florian Bruhin 568b1e253a Merge remote-tracking branch 'origin/pr/6796' 2021-11-22 18:05:36 +01:00
Florian Bruhin cac9e3e049 ci: Use Python 3.10 for bleeding CI 2021-11-22 17:53:51 +01:00
Tim Gadanidis 73aed03a7f Skip failing tests on Windows 2021-11-22 11:32:43 -05:00
Florian Bruhin a751204f97
Merge pull request #6839 from qutebrowser/update-dependencies
Update dependencies
2021-11-22 14:11:14 +01:00
Ingrid Budau 2dea331ac0 Change color of unselected buttons to grey
- Replace JS function with Jinja `if` statement
- Delete string displaying current setting
2021-11-22 10:54:35 +01:00
qutebrowser bot c3f93b3e4f Update dependencies 2021-11-22 04:21:11 +00:00
Tim Gadanidis a50f6dc2ea Add tests for closing last tab when giving/taking 2021-11-21 00:00:22 -05:00
Florian Bruhin 829b6ba43f Merge remote-tracking branch 'origin/update-dependencies' 2021-11-17 10:28:41 +01:00
Florian Bruhin b655f56101 scripts: Adjust for new typing_extensions name 2021-11-17 10:25:12 +01:00
Florian Bruhin 8ee510a082 tests: Fix test_real_git with different core.abbrev
Fixes #6825
2021-11-17 09:14:20 +01:00
qutebrowser bot 67b9b6f8a5 Update dependencies 2021-11-15 04:21:28 +00:00
Tim Gadanidis 47f6bd85af Simplify logic 2021-11-13 15:50:26 -05:00
Florian Bruhin c69cb057bc Rename --qute-bdd-backend and QUTE_BDD_BACKEND 2021-11-13 19:05:22 +01:00
Florian Bruhin 4ace7502c5 Update docs/changelog 2021-11-13 19:04:45 +01:00
Florian Bruhin 60f281eb30 Merge remote-tracking branch 'origin/pr/6810' 2021-11-13 19:01:54 +01:00
Philipp Albrecht 437438d242 Add docstring to _select_backend() 2021-11-12 16:37:25 +01:00
Philipp Albrecht 256900b87a Extract backend selection into functions
In order to fix the issue of silently using QtWebEngine when e.g.
--qute-bdd-backend=webkit is given, even though QtWebEngine is not
available, I moved the selection logic into separate functions to
clear things up a little.

I tried to avoid the duplicate imports, in case the backend is
auto-selected, but after a while of thinking I abandoned that idea in
favor of moving forward with this.
2021-11-12 16:19:22 +01:00
Philipp Albrecht 59054e48b9 Use config.webengine in pytest_report_header() 2021-11-12 16:13:33 +01:00
Philipp Albrecht 5ea946277e Rename variable
Co-authored-by: Florian Bruhin <me@the-compiler.org>
2021-11-12 14:48:28 +01:00
Philipp Albrecht a697e25094
Fix spelling
Co-authored-by: Florian Bruhin <me@the-compiler.org>
2021-11-12 06:47:48 +01:00
Florian Bruhin 2a18eeb558 Update docs/changelog 2021-11-11 16:30:14 +01:00
harish3124 f0757198c0 Fix Tests 2021-11-11 15:50:07 +05:30
harish3124 b2bddd9f39 Added Tests and Docs 📰 2021-11-11 15:27:05 +05:30
harish3124 aba0ee5c2e Added Start/End arguments to :tab-move 2021-11-11 11:44:24 +05:30
Ingrid Budau 68fc0eddf4 CSS changes in the appearance of the radio buttons. 2021-11-10 13:47:49 +01:00
Ingrid Budau 2599071589 Format CSS 2021-11-09 14:45:30 +01:00
Ingrid Budau 793d29e05f Merge branch 'settings-frontend-new-css' of github.com:twigleingrid/qutebrowser into settings-frontend-new-css 2021-11-09 10:19:02 +01:00
Ingrid Budau 5b2926fe1f Merge github.com:twigleingrid/qutebrowser into settings-frontend-new-css 2021-11-09 09:29:05 +01:00
Ingrid Budau d379bebafd Refactore JS function which checks the input with the configured value 2021-11-09 08:49:46 +01:00
Philipp Albrecht 8bb782332f Additionally report backend's version
To give more information we report the version additionally to the
backend's name.
2021-11-08 15:01:00 +01:00
Florian Bruhin 1f641c8c45 Remove redundant backend assert
Not needed after e2a07148e1.
2021-11-08 10:00:44 +01:00
Florian Bruhin b04f7ec2f7 scripts: Better lxml changelog URL 2021-11-08 08:27:34 +01:00
Florian Bruhin fa806ad667 password_fill: Fix quoting for variable expansions
See https://github.com/koalaman/shellcheck/wiki/SC2295
2021-11-08 08:27:34 +01:00
Florian Bruhin fe3861b386
Merge pull request #6814 from qutebrowser/update-dependencies
Update dependencies
2021-11-08 08:27:28 +01:00
qutebrowser bot 633efe85ac Update dependencies 2021-11-08 04:19:31 +00:00
Ingrid df31ffd570
Merge branch 'qutebrowser:master' into settings-frontend-new-css 2021-11-05 16:07:21 +01:00
Ingrid Budau 2767bc1a54 Initial PoC of new settings design.
The following commit contains updates of CSS and a bit of JS:

- font update
- lists are represented as buttons
- color update
- buttons work with f hint search
2021-11-05 16:01:45 +01:00
Philipp Albrecht 7fcfb9b635 Enable overriding of backend auto-detection
One can override the auto-detection mechanism by passing
the backend via --qute-bdd-backend=<backend> or by setting the
environment variable QUTE_BDD_BACKEND=<backend>.
2021-11-05 15:50:41 +01:00
Philipp Albrecht afd78ad248 Enable backend auto-detection
Setting QUTE_BDD_WEBENGINE=true overrides the auto-detection mechanism.
2021-11-05 15:33:53 +01:00
Philipp Albrecht 572ecd7fb1 Report backend in pytest_report_header() 2021-11-05 15:33:53 +01:00
Philipp Albrecht 53a1d45dd3 Consider auto-detection when setting config.webengine
Since config.webengine is widely used in the codebase, I decided to keep
it instead of replacing it entirely by using config.backend.
2021-11-05 15:33:53 +01:00
Philipp Albrecht 21055a39fc Set config.backend in pytest_configure()
For now this just serves the purpose of making the information available
to the pytest_report_header() hook, where we want to report, which
backend is used when running tests.
2021-11-05 15:30:02 +01:00
Florian Bruhin dafe9f6966 Fix lint 2021-11-05 15:03:22 +01:00
Tim Gadanidis 087c84c0d5 Fix back-to-forward test search direction test
Test originally expected "Baz" instead of "baz", which is what should
actually be found if starting at the bottom and then searching forward
(wrapping around).
2021-11-04 17:15:17 -04:00
Tim Gadanidis 29a0980c5b Send correct arguments to _args_to_flags
Correctly send the 'wrap' argument to the helper method
WebKitSearch._args_to_flags() instead of sending 'reverse' for a second
time.
2021-11-04 16:33:19 -04:00
Florian Bruhin 5adb053e77 Fix lint 2021-11-04 21:26:17 +01:00
Tim Gadanidis 437141ddea Test resetting direction on duplicate searches 2021-11-04 16:10:53 -04:00
Tim Gadanidis 7c5eb1e22c Use a helper method to (re)set search flags 2021-11-04 13:36:40 -04:00
Florian Bruhin 81080aaffd tests: Set IDs for urlmatch tests
This works around a VS Code bug with weird node IDs:
https://github.com/microsoft/vscode-python/issues/17676
2021-11-04 09:51:20 +01:00
Tim Gadanidis 0b1d9ed3bc Reset flags on duplicate search with WebKit 2021-11-02 18:29:45 -04:00
Tim Gadanidis 4899cf269e Update duplicate search test 2021-11-02 12:16:07 -04:00
Tim Gadanidis 5f2367739e Reset flags on duplicate search
Reset flags when the user searches for the same text multiple times,
instead of completely ignoring it.

This fixes an issue where searching forward, and then searching backward
for the same text, would not reset the search direction.
2021-11-02 12:13:24 -04:00
Tim Gadanidis 5e5c778b4a Always close tabs when given or taken
Add an optional boolean argument to `tabbed_browser.close_tab()` called
`transfer` which indicates whether the tab is closing as a result of
being given to another window (`tab-give`) or taken by another window
(`tab-take`). If so, the tab will always close, even if it is the last
tab in the window and `tabs.last_close` is not set to 'close'.
2021-11-01 22:18:46 -04:00
lyeoh 73908d46f6 Port logic and timer to WebEngineAudio 2021-11-01 15:13:58 -05:00
lyeoh 07a334b3da Fix type hint 2021-11-01 15:13:58 -05:00
lyeoh 928840acdc Refactor _delayed_recently_audible_changed
- to use a generic QTimer instead of a Throttle
- to work with multiple tabs intermittently dropping audio
2021-11-01 15:13:58 -05:00
lyeoh d0e7732fcc Add comment about intended 2s delay 2021-11-01 15:13:58 -05:00
lyeoh a3af87958e Add keyword for time delay argument 2021-11-01 15:13:58 -05:00
lyeoh adff7f95a4 Delay changing audible status
Closes #6168
2021-11-01 15:13:58 -05:00
Mirko König 13c6134e12 Fixed shellcheck issue 2021-11-01 12:17:37 +01:00
Mirko König cf9ad69a04 Token is stored with read write permissions for user only. 2021-11-01 12:13:53 +01:00
Florian Bruhin f2881c7e30 Merge branch 'remove-frozen' 2021-11-01 10:42:41 +01:00
Florian Bruhin c3f77d40eb Bring back PyInstaller resource handling
Seems to be still needed, at least on macOS. Otherwise, we get a
NotADirectoryError trying to load resources from a weird path under the
qutebrowser executable.

See #6792
2021-11-01 10:41:44 +01:00
Florian Bruhin c8092499ec Remove old PyInstaller handling
See #6792 and https://github.com/pyinstaller/pyinstaller/issues/1905 (fixed in
PyInstaller 4.4)
2021-11-01 10:41:44 +01:00
Florian Bruhin d4c1391a70
Merge pull request #6791 from qutebrowser/update-dependencies
Update dependencies
2021-11-01 08:50:36 +01:00
qutebrowser bot 389ccdc339 Update dependencies 2021-11-01 04:22:01 +00:00
Florian Bruhin 4558798043 Avoid pytest-bdd 5 for now
See https://github.com/pytest-dev/pytest-bdd/issues/447
2021-10-30 13:23:07 +02:00
Florian Bruhin ccf624365c Add flatpak hint to :spawn message
See https://www.reddit.com/r/qutebrowser/comments/qirb5k/editor_gvim_failed_to_start_execpv_no_such_file/
2021-10-30 13:19:36 +02:00
Florian Bruhin d43529e276 earlyinit: Remove unnecessary 'as e:' too 2021-10-29 21:10:13 +02:00
Florian Bruhin be5e8abc5a Fix accessing log in earlyinit 2021-10-29 20:41:53 +02:00
Florian Bruhin af56b285b4
Merge pull request #6768 from qutebrowser/update-dependencies
Update dependencies
2021-10-25 15:29:02 +02:00
Florian Bruhin 1cff4c4223 Update changelog 2021-10-25 13:03:43 +02:00
Florian Bruhin ce070a23a9 Don't crash on notification daemon crash 2021-10-25 13:03:18 +02:00
Florian Bruhin 5c33d1fdef Update changelog 2021-10-25 12:59:12 +02:00
Florian Bruhin ed5af1fcd2 Improve error handling with early faulthandler enable
Speculative fix for issue reported by a macOS user: https://crashes.qutebrowser.org/lists?search=NullWriter

See https://github.com/pyinstaller/pyinstaller/issues/4481
2021-10-25 12:58:52 +02:00
qutebrowser bot 0e06d8db7b Update dependencies 2021-10-25 08:04:42 +00:00
Florian Bruhin 7a83b15d6d Add pylint_checkers build dir to .gitignore 2021-10-25 09:53:21 +02:00
Florian Bruhin 540f40d17b doc: Add breath theme 2021-10-22 22:14:35 +02:00
Florian Bruhin 36ffff2f6b Release v2.4.0 2021-10-21 18:50:06 +02:00
Florian Bruhin 89cb4cfdd8 Merge remote-tracking branch 'origin/update-dependencies' 2021-10-21 18:50:00 +02:00
Florian Bruhin 1e1aa4e891 Update changelog 2021-10-21 18:48:46 +02:00
Florian Bruhin bcd91f3d4a Fix typo 2021-10-21 18:37:26 +02:00
Florian Bruhin 2d85e41006 utils: Fix coverage pragma location 2021-10-21 18:35:50 +02:00
qutebrowser bot 62958e54e0 Update dependencies 2021-10-21 16:34:33 +00:00
Florian Bruhin ca114a0766 scripts: Fix changelog URLs for real 2021-10-21 18:26:57 +02:00
Florian Bruhin e6e7e95013 scripts: Use new Qt path in build_release 2021-10-21 18:18:36 +02:00
Florian Bruhin 51972fa4e2 Revert "scripts: Remove macOS symlinking"
This reverts commit a0bfb7c824.

It *is* required, just used the wrong path...

gg
2021-10-21 18:18:03 +02:00
Florian Bruhin a8dacd98fb scripts: Remove old -Qt5 PyQt packages 2021-10-21 18:03:21 +02:00
Florian Bruhin 9989bf223f requirements: PyQt 5.15.5 2021-10-21 18:02:49 +02:00
Florian Bruhin 337ad04fd4 utils: Don't require coverage for old PyYAML workaround 2021-10-21 18:02:36 +02:00
Florian Bruhin a0bfb7c824 scripts: Remove macOS symlinking
Seems to be fixed in PyInstaller 4.4? See #6611.
2021-10-21 17:07:53 +02:00
Florian Bruhin 959c388984 tox: Use newest PyQt for pyinstaller
See #6611
2021-10-21 16:51:55 +02:00
Florian Bruhin 8326ea0e9d scripts: Adjust changelog URLs 2021-10-21 16:49:33 +02:00
Florian Bruhin 5fb7d337fa Merge remote-tracking branch 'origin/update-dependencies' 2021-10-21 16:48:37 +02:00
Florian Bruhin 777d82fce4 Update docs 2021-10-21 16:44:20 +02:00
Florian Bruhin c1c0f0f801 Update UA completions 2021-10-21 16:22:24 +02:00
Florian Bruhin 58e64d28c4 Don't register qutebrowserurl: as URL protocol
This was originally intended as a fix for CVE-2021-41146, but it turned out the
same exploit works via e.g. https:// just as well. Still, it makes sense to
remove it.
2021-10-21 16:01:54 +02:00
Florian Bruhin 8f46ba3f6d CVE-2021-41146: Add --untrusted-args to avoid argument injection
On Windows, if an application is registered as an URL handler like this:

    HKEY_CLASSES_ROOT
        https
            URL Protocol = ""
            [...]
            shell
                open
                    command
                    (Default) = ".../qutebrowser.exe" "%1"

one would think that Windows takes care of making sure URLs can't inject
arguments by containing a quote. However, this is not the case, as
stated by the Microsoft docs:
https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa767914(v=vs.85)

    Security Warning: Applications that handle URI schemes must consider how to
    respond to malicious data. Because handler applications can receive data
    from untrusted sources, the URI and other parameter values passed to the
    application may contain malicious data that attempts to exploit the handling
    application.

and

    As noted above, the string that is passed to a pluggable protocol handler
    might be broken across multiple parameters. Malicious parties could use
    additional quote or backslash characters to pass additional command line
    parameters. For this reason, pluggable protocol handlers should assume that
    any parameters on the command line could come from malicious parties, and
    carefully validate them. Applications that could initiate dangerous actions
    based on external data must first confirm those actions with the user. In
    addition, handling applications should be tested with URIs that are overly
    long or contain unexpected (or undesirable) character sequences.

Indeed it's trivial to pass a command to qutebrowser this way - given how
trivial the exploit is to recreate given the information above, here's a PoC:

    https:x" ":spawn calc

(or qutebrowserurl: instead of https: if qutebrowser isn't registered as a
default browser)

Some applications do escape the quote characters before calling
qutebrowser - but others, like Outlook Desktop or .url files, do not.

As a fix, we add an --untrusted-args flag and some early validation of the raw
sys.argv, before parsing any arguments or e.g. creating a QApplication (which
might already allow injecting Qt flags there).

We assume that there's no way for an attacker to inject flags *before* the %1
placeholder in the registry, and add --untrusted-args as the last argument of
the registry entry. This way, it'd still be possible for users to customize
their invocation flags without having to remove --untrusted-args.

After --untrusted-args, however, we have some rather strict checks:

- There should be zero or one arguments, but not two (or more)
- Any argument may not start with - (flag) or : (qutebrowser command)

We also add the --untrusted-args flag to the Linux .desktop file, though it
should not be needed there, as the specification there is sane:

https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#exec-variables

    Implementations must take care not to expand field codes into multiple
    arguments unless explicitly instructed by this specification. This means
    that name fields, filenames and other replacements that can contain spaces
    must be passed as a single argument to the executable program after
    expansion.

There is no comparable mechanism on macOS, which opens the application without
arguments and then sends an "open" event to it:
https://doc.qt.io/qt-5/qfileopenevent.html

This issue was introduced in qutebrowser v1.7.0 which started registering it as
URL handler: baee288890 / #4086

This is by no means an issue isolated to qutebrowser. Many other projects have
had similar trouble with Windows' rather unexpected behavior:

Electron / Exodus Bitcoin wallet:
- http://web.archive.org/web/20190702112128/https://medium.com/0xcc/electrons-bug-shellexecute-to-blame-cacb433d0d62
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-1000006
- https://medium.com/hackernoon/exploiting-electron-rce-in-exodus-wallet-d9e6db13c374

IE/Firefox:

- https://bugzilla.mozilla.org/show_bug.cgi?id=384384
- https://bugzilla.mozilla.org/show_bug.cgi?id=1572838

Others:
- http://web.archive.org/web/20210930203632/https://www.vdoo.com/blog/exploiting-custom-protocol-handlers-in-windows
- https://parsiya.net/blog/2021-03-17-attack-surface-analysis-part-2-custom-protocol-handlers/
- etc. etc.

See CVE-2021-41146 / GHSA-vw27-fwjf-5qxm:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-41146
https://github.com/qutebrowser/qutebrowser/security/advisories/GHSA-vw27-fwjf-5qxm

Thanks to Ping Fan (Zetta) Ke of Valkyrie-X Security Research Group
(VXRL/@vxresearch) for finding and responsibly disclosing this issue.
2021-10-21 16:01:04 +02:00
Eric Bower 4d67edfc8e
ignore -1 tabindex 2021-10-21 00:43:40 -04:00
Eric Bower b896cb63a2
add more roles to default hint selectors 2021-10-21 00:30:41 -04:00
qutebrowser bot 07cf1ff356 Update dependencies 2021-10-18 04:19:35 +00:00
Florian Bruhin 1547a48e6f tests: Adjust for PyYAML 6.0 2021-10-14 09:05:25 +02:00
Florian Bruhin 4b86ae07eb
Merge pull request #6737 from qutebrowser/update-dependencies
Update dependencies
2021-10-14 09:05:20 +02:00
Florian Bruhin 82ee43a56a scripts: Update path to flake8 release notes 2021-10-11 14:38:38 +02:00
Florian Bruhin b75786560d scripts: Add cached-property changelog URL 2021-10-11 14:33:00 +02:00
qutebrowser bot a16951ca67 Update dependencies 2021-10-11 04:21:27 +00:00
Florian Bruhin d9dc87d43e doc: Clarify SOCKS auth support 2021-10-09 18:55:30 +02:00
Charlotte Van Petegem 887488f870
Move focus call to avoid crash 2021-10-09 14:00:32 +02:00
Charlotte Van Petegem d775300917
Log message if no matching tab was found 2021-10-09 14:00:32 +02:00
Charlotte Van Petegem 69ebc6b9e6
Move focus out of except 2021-10-09 14:00:32 +02:00
Charlotte Van Petegem 6121673c1a
Switch to tab when clicking on notification 2021-10-09 14:00:30 +02:00
Mirko König 3373bda4b9 Added token handling to make use of the cache. 2021-10-08 19:49:19 +02:00
Florian Bruhin 0f38c94197
Merge pull request #6725 from qutebrowser/update-dependencies
Update dependencies
2021-10-04 11:03:49 +02:00
Florian Bruhin 247e77fa10 scripts: Adjust py-filelock changelog URL 2021-10-04 11:02:51 +02:00
qutebrowser bot a58bb22388 Update dependencies 2021-10-04 04:20:38 +00:00
Florian Bruhin efd002dae3 requirements: Revert to pytest-bdd release for bleeding
See https://github.com/pytest-dev/pytest-bdd/issues/447
2021-10-01 14:58:38 +02:00
Florian Bruhin 9e5d8609b1
Merge pull request #6720 from haztecaso/patch-1
Add userscript bitwarden-rofi to the list of userscripts
2021-09-29 18:04:15 +02:00
Adrián Lattes 002db2c6b8
Add userscript bitwarden-rofi 2021-09-29 15:04:18 +02:00
Reto Schnyder 3902394be3 Make confirm_quit=downloads only ask when closing the last window
Fixes #3615
2021-09-28 11:12:15 +02:00
Florian Bruhin 9e4ab225f2
Merge pull request #6711 from mhmdanas/fix-minor-mistakes
Fix a couple of minor mistakes
2021-09-27 20:30:28 +02:00
mhmdanas b7f14d3bfb Fix a couple of minor mistakes 2021-09-27 20:46:22 +03:00
Florian Bruhin 4f7d14849b
Merge pull request #6706 from qutebrowser/update-dependencies
Update dependencies
2021-09-27 07:59:54 +02:00
qutebrowser bot 4ddb008a27 Update dependencies 2021-09-27 04:20:00 +00:00
Florian Bruhin 9683c2cf97 Update changelog
(partially cherry picked from commit 957c8bc312)
2021-09-26 16:26:21 +02:00
Florian Bruhin 7ef6647a38 Add GM_setClipboard
Based on the Greasemonkey implementation:
https://github.com/greasemonkey/greasemonkey/blob/4.11/src/bg/api-provider-source.js#L232-L249

Needed by e.g. this script to work at all:
https://greasyfork.org/en/scripts/394820-mouseover-popup-image-viewer

(cherry picked from commit 1bea826981)
2021-09-26 16:26:21 +02:00
Florian Bruhin b4b7b3699e
Update Nyxt description in README
Closes #6705
2021-09-24 11:40:33 +02:00
Florian Bruhin 1f5e8ca54c
Merge pull request #6697 from qutebrowser/update-dependencies
Update dependencies
2021-09-20 10:59:04 +02:00
qutebrowser bot 7c98cc981d Update dependencies 2021-09-20 08:19:52 +00:00
Florian Bruhin 2b28ab015d Revert "requirements: Use older pluggy"
This reverts commit 41febf9475.

diff_cover now requires pluggy >=1.0.0.
2021-09-20 10:00:18 +02:00
Mirko König b5815e6113 Prevent pasting secrets to the wrong page. 2021-09-14 08:22:33 +02:00
Florian Bruhin 4c1334b3b9
Merge pull request #6682 from qutebrowser/update-dependencies
Update dependencies
2021-09-13 10:08:00 +02:00
qutebrowser bot 9a210fcef4 Update dependencies 2021-09-13 07:40:03 +00:00
Florian Bruhin 3527f21121 scripts: Clean up pylint build files 2021-09-13 09:29:35 +02:00
Florian Bruhin caf6345251 requirements: Test --use-feature=in-tree-build 2021-09-13 08:38:45 +02:00
Florian Bruhin 41febf9475 requirements: Use older pluggy
See https://github.com/Bachmann1234/diff_cover/issues/249
2021-09-13 08:30:52 +02:00
Florian Bruhin 39ff01ca64 Update docs 2021-09-12 09:45:32 +02:00
Florian Bruhin a68aaef320 Update changelog 2021-09-12 08:49:59 +02:00
Nicholas Boyd Isacsson 1892831255 Try to fix :tab-clone --private test 2021-09-10 17:19:11 +02:00
Nicholas Boyd Isacsson 484a80cbb9
Update doc for tab-clone's --private flag
Co-authored-by: Florian Bruhin <me@the-compiler.org>
2021-09-10 16:03:08 +02:00
Nicholas Boyd Isacsson 2e0549fe9f Update test cases for :tab-clone --private 2021-09-10 15:53:54 +02:00
Nicholas Boyd Isacsson daecf903a4 Add --private flag to :tab-clone 2021-09-10 15:49:44 +02:00
phesch 57f0155fa0 Match counter: fix lints, implement suggestions 2021-09-08 21:19:32 +02:00
Florian Bruhin 9a8d37216c Fix lint 2021-09-08 16:45:37 +02:00
Florian Bruhin 8a61bd635a Improve docs for URL patterns
Closes #6454, see #5069
2021-09-08 16:18:28 +02:00
Florian Bruhin 95cd5255f2 tests: Skip problematic parts of test_system_default_rendering 2021-09-08 14:33:44 +02:00
Florian Bruhin ffa29dd204 doc: Add wyeb to alternatives 2021-09-08 14:02:24 +02:00
Florian Bruhin 30784d5946 Regenerate cheatsheet PNGs
Follow-up for 7961cf7355
2021-09-06 21:33:20 +02:00
Florian Bruhin ca73c1519e Bind Shift-Escape in insert mode 2021-09-06 21:26:00 +02:00
Mirko König 1ad1771e64 : Added double quotes to fix error reported by shellcheck. 2021-09-06 07:08:58 +02:00
Florian Bruhin 650d9e4c34 Fix paths for scripts/dev/gen_resources.py 2021-09-04 17:39:58 +02:00
phesch 9cea6ade95 Add setting to disable wrap messages, fix lints 2021-09-03 10:06:30 +02:00
phesch dab1a76b05 Add documentation for statusbar match counter 2021-09-02 21:07:19 +02:00
phesch 183156b5c2 Add statusbar search_match widget 2021-09-02 20:08:20 +02:00
Florian Bruhin ba2a8a862c
Merge pull request #6661 from qutebrowser/update-dependencies
Update dependencies
2021-08-30 10:51:37 +02:00
qutebrowser bot 280fa01091 Update dependencies 2021-08-30 04:21:44 +00:00
Florian Bruhin 2d9e924126 Remove unused var/import 2021-08-25 10:07:54 +02:00
Florian Bruhin d6306783d0 Move download origin handling to DownloadItem 2021-08-25 10:05:28 +02:00
Florian Bruhin c022893a76 Prevent mixed content downloading by default
https://blog.chromium.org/2020/02/protecting-users-from-insecure.html
https://therecord.media/firefox-follows-chrome-and-prepares-to-block-insecure-downloads/
2021-08-25 10:05:28 +02:00
Florian Bruhin 65af6b2125
Merge pull request #6650 from qutebrowser/update-dependencies
Update dependencies
2021-08-23 11:23:44 +02:00
qutebrowser bot e015483639 Update dependencies 2021-08-23 04:20:14 +00:00
Florian Bruhin 7cd6c17318 Update changelog 2021-08-21 16:37:04 +02:00
Florian Bruhin 5dec8e13c5 Merge remote-tracking branch 'origin/pr/6633' 2021-08-21 16:35:58 +02:00
Florian Bruhin 222755d0e9 Merge remote-tracking branch 'origin/pr/6634' 2021-08-21 16:33:19 +02:00
Florian Bruhin 7c733e8e3e Don't try to hide deleted systray icon 2021-08-21 16:28:42 +02:00
Florian Bruhin 178e377867
Merge pull request #6646 from qutebrowser/doc-update
Update CONTRIBUTING.asciidoc
2021-08-20 21:42:03 +02:00
arza 3653be86f2
Update CONTRIBUTING.asciidoc 2021-08-20 16:03:11 +03:00
André Keller bc0fd73450 Optionally provide unfiltered selection of secrets
Add an option to show all secrets, whether they match the current url
or not.
2021-08-18 10:50:15 +02:00
Florian Bruhin 5b28fba7cd Update changelog 2021-08-17 12:12:02 +02:00
Florian Bruhin e8d9b1772f Further simplify rapid hint target check 2021-08-17 12:12:02 +02:00
Florian Bruhin 6b30806ebc Clean up target list for hinting 2021-08-17 12:12:02 +02:00
Florian Bruhin fea2216200
Merge pull request #6639 from qutebrowser/update-dependencies
Update dependencies
2021-08-16 13:00:46 +02:00
qutebrowser bot b16568ebae Update dependencies 2021-08-16 04:20:00 +00:00
Florian Bruhin ddcd11ff4e Clarify referer docs
Closes #6640
2021-08-10 22:01:15 +02:00
Mirko König 7f2e3bcd4a Listing all possible entries when website
could not be found is fixed.
2021-08-09 10:44:26 +02:00
phesch b416e998fa Move search messages into callback
Also add the necessary functions and arguments to facilitate this.
2021-08-04 20:49:56 +02:00
Florian Bruhin 987becaa0b doc: Clarify opening search terms 2021-08-03 16:53:44 +02:00
André Keller 6ba917d5ec Optionally ask for confirmation before inserting a password
The default behaviour of qute-pass userscript will insert a password
automatically if there is only a single candidate found. This option will
force the selection prompt (i.e. dmenu) to show regardless of how many
password candidates are found.
2021-08-03 14:54:21 +02:00
Florian Bruhin 08fdc1fdc5 Update changelog 2021-08-02 22:01:39 +02:00
Florian Bruhin cbea7d2f2b Merge remote-tracking branch 'origin/pr/6629' 2021-08-02 22:00:43 +02:00
Florian Bruhin 4b4ecc48d7
Merge pull request #6630 from qutebrowser/update-dependencies
Update dependencies
2021-08-02 07:38:52 +02:00
qutebrowser bot 1bb597cf6b Update dependencies 2021-08-02 04:21:39 +00:00
jcromero 9d109f96e3
Add support for overrideMimeType in Greasemonkey scripts 2021-08-02 00:49:21 +02:00
Florian Bruhin e715744ea1 opengl-info: Rename to opengl_info 2021-08-01 14:01:56 +02:00
Florian Bruhin 3d41b39930 opengl-info: Fix lint 2021-08-01 13:50:39 +02:00
Florian Bruhin 9d22923ce9 Add opengl-info.py
I've been needing this for various issues now, see #5730, #5313, #1476
2021-08-01 13:40:13 +02:00
Florian Bruhin 26de32045b Release v2.3.1 2021-07-28 14:34:24 +02:00
Florian Bruhin ca9da22d8c Update changelog 2021-07-28 12:47:44 +02:00
Florian Bruhin 83dc7537b4 Switch back to Firefox UA for Google Account quirk
Looks like the Edge one doesn't work anymore.

Reverts db13e5283e and reintroduces the Firefox UA
removed in e010afd3a2 (but updated).

Closes #5182.
2021-07-28 12:47:44 +02:00
Florian Bruhin 5f39187121
Merge pull request #6620 from qutebrowser/update-dependencies
Update dependencies
2021-07-26 08:07:50 +02:00
Leo S 4b5b4ee129 add relative_index for tab title format field (#6616) 2021-07-25 21:28:09 -07:00
qutebrowser bot 107cae6fae Update dependencies 2021-07-26 04:18:36 +00:00
Florian Bruhin f1f67088c8
Merge pull request #6613 from leosolid/patch-1
add link to 'leosolid/qutebrowser-themes' in docs under 'Pre-built colorschemes'
2021-07-22 10:00:24 +02:00
Leo 44f4417c0f
add link to 'leosolid/qutebrowser-themes' in docs 2021-07-21 20:21:39 -07:00
Florian Bruhin a9e4aeeb46 Update docs 2021-07-20 08:08:28 +02:00
Florian Bruhin 6c26f2a161 Merge remote-tracking branch 'origin/pr/6610' 2021-07-20 08:06:48 +02:00
Ander Punnar 036be4e410
parametrize test_subdomain_blocking 2021-07-20 00:15:40 +03:00
Ander Punnar 57f24e7d43
the backslash is redundant between brackets 2021-07-19 20:52:26 +03:00
Ander Punnar eb57af8c2c
fix pylint C0301 2021-07-19 20:50:25 +03:00
Florian Bruhin e1d164d813 Merge branch 'update-dependencies' 2021-07-19 19:45:09 +02:00
Florian Bruhin ba7f2dec0c Adjust changelog URLs 2021-07-19 19:45:00 +02:00
Ander Punnar 38ec7f61c8
make blocking subdomains configurable 2021-07-19 20:38:27 +03:00
Nicholas42 9a7a905f8f
Merge branch 'qutebrowser:master' into master 2021-07-19 13:55:22 +02:00
Florian Bruhin 5b0365ddee Add note about Qt 6
See #6604
2021-07-19 10:37:04 +02:00
qutebrowser bot ce5b377093 Update dependencies 2021-07-19 04:19:54 +00:00
Jason Rosenzweig 6223a41a3c
Fixed failing tests 2021-07-15 22:06:52 +08:00
Jason Rosenzweig 29dc1f636d
No more '..' in the file prompt (#2104) 2021-07-15 16:49:37 +08:00
Florian Bruhin d0ae710f66 tests: Ignore some more Chromium outputs 2021-07-13 18:14:25 +02:00
Florian Bruhin 52d551875d Simplify exception catching 2021-07-13 18:12:22 +02:00
Florian Bruhin 676c9db2fe Handle and test more file path corner cases 2021-07-13 16:23:40 +02:00
Florian Bruhin effc5b5638 Update changelog 2021-07-13 16:14:36 +02:00
Jason Rosenzweig c75f1a66ed
Fixed infinite loop (tested it too) 2021-07-13 21:50:09 +08:00
Jason Rosenzweig 32f6896773
Took suggestions 2021-07-13 21:07:46 +08:00
Jason Rosenzweig 8b73ee2333
Added back question code which was accidentally removed 2021-07-13 20:56:33 +08:00
Jason Rosenzweig c7b48deea8
Made implementation simpler, removed unrelated change 2021-07-13 20:52:06 +08:00
Jason Rosenzweig 025e6110a9
Removed code that I put in a comment to save it and fixed the styles of that comment 2021-07-13 20:05:39 +08:00
Jason Rosenzweig f2cc3fa731
Initial commit of fix for issue 6549 2021-07-13 18:56:20 +08:00
Florian Bruhin cc8e67962b qute-keepass: Add missing exit
Closes #6592
2021-07-13 10:50:38 +02:00
Florian Bruhin 84f9e9f863 Fix lint/docs 2021-07-13 10:29:26 +02:00
Florian Bruhin 3809289581 Merge remote-tracking branch 'origin/pr/6507' 2021-07-13 10:25:46 +02:00
Florian Bruhin 0001d4fe20 Handle UnicodeEncodeError in path completion 2021-07-13 10:23:25 +02:00
Florian Bruhin b78fc716a9 Fix lint 2021-07-12 18:22:01 +02:00
Florian Bruhin 3950aafe8a Log debug information on adblock error
See #6436
2021-07-12 17:27:54 +02:00
Florian Bruhin 2047218361 Revert "Fix enum stringification for Python 3.10 a7+"
This reverts commit e2c5fe6262.
See https://mail.python.org/archives/list/python-dev@python.org/thread/ZMC67QA2JVQJSWSFWRS6IM6ZX4EK277G/#LSTMFAPSPD3BGZ4D6HQFODXZVB3PLYKF
2021-07-12 16:03:41 +02:00
Florian Bruhin bf373e0ff6 flake8: Disable new N818 2021-07-12 14:29:34 +02:00
Florian Bruhin 34a6b495ef Merge remote-tracking branch 'origin/update-dependencies' 2021-07-12 14:27:55 +02:00
Florian Bruhin f822cb84cd Add fff and lf as file selectors 2021-07-12 10:52:30 +02:00
qutebrowser bot 0b05d7f3ef Update dependencies 2021-07-12 04:19:50 +00:00
Florian Bruhin ae6d900971
Merge pull request #6567 from lufte/issue6039
Database class
2021-07-09 17:06:23 +02:00
lufte 71a7674a70 Remove unused parameter and rename db 2021-07-09 10:06:24 -03:00
lufte 0c7b746a4e Restore the sql fixture to close DBs after testing 2021-07-09 01:10:36 -03:00
Florian Bruhin 8bdab79011 Update changelog 2021-07-06 16:33:49 +02:00
Florian Bruhin ac849d186e Merge remote-tracking branch 'origin/pr/6580' 2021-07-06 16:32:13 +02:00
Florian Bruhin efeeaa2826
Merge pull request #6582 from qutebrowser/update-dependencies
Update dependencies
2021-07-06 16:31:40 +02:00
Florian Bruhin 71d2f46f2b doc: Add userscript repo link 2021-07-06 11:47:04 +02:00
Florian Bruhin 4fe3f8c471 Fix check_coverage.py tests with pytest 7.0
See https://github.com/pytest-dev/pytest/pull/8247
2021-07-06 10:20:43 +02:00
Florian Bruhin 7c3771f0b1 Add glibc check to mkvenv.py 2021-07-05 09:58:50 +02:00
qutebrowser bot fd537691d8 Update dependencies 2021-07-05 04:19:02 +00:00
Naleo Hyde a6a7691f28
Update qutebrowser/mainwindow/tabwidget.py
Co-authored-by: Florian Bruhin <me@the-compiler.org>
2021-07-04 10:00:11 -10:00
Florian Bruhin b272fbb0e5 scripts: Add arch check to mkvenv 2021-07-04 11:31:31 +02:00
lufte 9aa6a76471 Cosmetic changes 2021-07-03 21:11:09 -03:00
Naleo d980dcb757 added logic for scrolling in both directions 2021-07-03 07:39:06 -10:00
Naleo Hyde f63359e25a
Apply suggestions from code review
Co-authored-by: Florian Bruhin <me@the-compiler.org>
2021-07-03 07:29:28 -10:00
Naleo Hyde 1e1216a34f
Update qutebrowser/mainwindow/tabwidget.py
Co-authored-by: Florian Bruhin <me@the-compiler.org>
2021-07-03 07:12:07 -10:00
lufte 484ac43cf1 Fix function name too short 2021-07-03 01:00:32 -03:00
lufte fae662a3c9 Refactor tests that needed the Database class 2021-07-03 00:51:20 -03:00
lufte 9949b4c5d6 No need to create new databases each time 2021-07-02 23:35:20 -03:00
lufte 082916b45d Add unit tests for the Transaction class 2021-07-02 23:25:59 -03:00
lufte 03b8a26645 The database of a table shouldn't be private 2021-07-02 22:18:12 -03:00
Naleo 6094f003bf fix mac scrolling through tabbar (issue #6148) 2021-07-02 15:04:59 -10:00
lufte b75d23e0b1 Fix histcategory unit tests 2021-07-02 21:48:34 -03:00
lufte 748c686bf0 Fix history unit tests 2021-06-30 21:00:43 -03:00
lufte f7cc5ff3fc No better type than Any for these 2021-06-30 20:12:58 -03:00
lufte a39cc251ca Ensure in memory db closes after retuning version 2021-06-30 20:11:21 -03:00
lufte f8a95e3300 The old code is now safe to remove 2021-06-30 01:16:27 -03:00
lufte 7843f5ad0e Isort and issing type annotations 2021-06-30 01:15:12 -03:00
lufte 86364c1e8f Pave the way for pathlib migration 2021-06-30 01:14:36 -03:00
lufte 3b87db9059 Make version() a plain function 2021-06-30 01:13:54 -03:00
lufte 80b910a52c No camel-case method names 2021-06-29 23:48:56 -03:00
lufte 6223a6b30b Annotate return types of __init__ methods 2021-06-29 23:44:27 -03:00
Javier Ayres b122e8f19e
No type parameters for generics yet
Co-authored-by: Florian Bruhin <me@the-compiler.org>
2021-06-29 23:26:05 -03:00
lufte d7457283bb Adjustments in typing 2021-06-28 23:06:47 -03:00
lufte b6e45b49db Missing periods at the end of the docstrings 2021-06-28 23:02:13 -03:00
lufte 038d64b901 Update test_sql unit tests 2021-06-28 22:58:15 -03:00
lufte 90db69a7d4 Add (almost) all missing types and docstrings 2021-06-28 22:10:04 -03:00
Florian Bruhin 4c479bb4ab Fix lint 2021-06-28 19:27:30 +02:00
Florian Bruhin 553e2035eb Update changelog 2021-06-28 19:16:11 +02:00
Florian Bruhin 6dd402c0d0 Adjust exception handling for adblock 0.5.0
See https://github.com/ArniDagur/python-adblock/issues/44
2021-06-28 19:15:13 +02:00
Florian Bruhin d6a3d1fe60 Merge remote-tracking branch 'origin/pr/6574' 2021-06-28 17:55:53 +02:00
Florian Bruhin a55355eaa6 Release v2.3.0 2021-06-28 17:29:52 +02:00
Florian Bruhin 7a9c6cad76 Update UA completions 2021-06-28 17:28:52 +02:00
qutebrowser bot 395f80ed77 Update dependencies 2021-06-28 04:20:03 +00:00
lufte dfed3cecaf Replace missing .formats with f-strings 2021-06-27 17:55:26 -03:00
lufte 5a522e9c97 Avoid running migrations partially 2021-06-27 17:40:04 -03:00
lufte 779fcb13ec Upgrade user_version after migrations have run 2021-06-27 16:20:28 -03:00
lufte d806c2f224 These are also no longer needed 2021-06-27 13:16:30 -03:00
lufte 2b7bb24a0c Remove old comment 2021-06-26 21:25:31 -03:00
lufte 26d68737cc Fix linter errors 2021-06-26 21:17:51 -03:00
lufte bff9e6f4dd Update usages of sql module to use the new class. 2021-06-26 21:00:25 -03:00
lufte 39c831a989 Don't store database reference and use path as connection name 2021-06-26 00:15:03 -03:00
Florian Bruhin 631c8d43a3 tests: Ignore another Chromium message 2021-06-24 23:37:51 +02:00
Florian Bruhin 714df8a15f More history test stabilization 2021-06-24 20:41:15 +02:00
Florian Bruhin 4899d1d10f Use any 2021-06-24 20:03:56 +02:00
Florian Bruhin 224c3591ee Update changelog 2021-06-24 19:59:37 +02:00
Florian Bruhin c580ebf080 Merge remote-tracking branch 'origin/pr/6372' 2021-06-24 19:57:03 +02:00
Florian Bruhin 0b8cc812fd doc: Update macOS cask install
Supersedes #6441
2021-06-24 17:38:10 +02:00
Florian Bruhin 10cc9e13b6 Fix up f-string 2021-06-24 15:55:46 +02:00
Florian Bruhin a9a39096cc Add colors.prompts.selected.fg
Closes #6559
2021-06-24 15:51:45 +02:00
Javier Ayres 16b39d79be
Update module's stringdoc
Co-authored-by: Florian Bruhin <me@the-compiler.org>
2021-06-24 09:22:34 -03:00
lufte ff4f186286 Missing self 2021-06-22 21:57:00 -03:00
lufte 31bb1f9501 Initial work for Database class 2021-06-22 21:50:38 -03:00
Florian Bruhin e3e0fbc355 scripts: Fix distutils deprecation in link_pyqt
$ .../.tox/py310/bin/python scripts/link_pyqt.py --tox .tox/py310
<string>:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
<string>:1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead

See https://bugs.python.org/issue41282
2021-06-23 00:05:18 +02:00
Florian Bruhin ae4520884c doc: Add untrack-url
See #6555
2021-06-21 11:32:26 +02:00
Florian Bruhin 1f5695d001
Merge pull request #6566 from qutebrowser/update-dependencies
Update dependencies
2021-06-21 10:29:55 +02:00
qutebrowser bot 0198148989 Update dependencies 2021-06-21 04:21:09 +00:00
Mirko König 8653a1d37d : Added qute-1pass to README. 2021-06-18 14:03:51 +02:00
Mirko König 468401eecc : Fixed some issues reported by the CI checks. Some change in jq query. 2021-06-17 14:14:57 +02:00
Florian Bruhin fc5aae8a71 Fix spelling 2021-06-15 23:03:17 +02:00
Florian Bruhin cf58283b64 Update docs 2021-06-15 17:06:23 +02:00
Florian Bruhin 3fd7c403d1 Make mypy happy 2021-06-15 17:03:44 +02:00
Florian Bruhin f981c2918e Merge remote-tracking branch 'origin/pr/6547' 2021-06-15 17:02:45 +02:00
Florian Bruhin 1dddbe697e tests: Speculatively stabilize history tests
If we're not waiting for the async INSERT in the SQL database, it can happen
that :debug-dump-history gets called before the history entry was addeded to the
actual database.

See #5390
2021-06-15 16:53:58 +02:00
Florian Bruhin 2782b750ae scripts: Add bluetooth permission for macOS
Apple documentation claims this is for iOS/watchOS/tvOS only:
https://developer.apple.com/documentation/bundleresources/information_property_list/nsbluetoothalwaysusagedescription

However, reality tells a different story - according to Console.app, when
visiting accounts.google.com, qutebrowser/Chromium needs this permission.

Reproducible as well using the following demo page:
https://googlechrome.github.io/samples/web-bluetooth/battery-level.html

Finally, Google Chrome has the key declared as well. Note that it has
NSBluetoothPeripheralUsageDescription as well:
https://developer.apple.com/documentation/bundleresources/information_property_list/nsbluetoothperipheralusagedescription

...but that is deprecated, and according to my tests on macOS 10.14 and 10.15,
it's not needed.

Thanks to Apple for their wonderful documentation.... not.

Fixes #6475, hopefully for real this time.
2021-06-15 15:22:26 +02:00
Yasser Kaddoura 58cb86ad06 feat: expose 'currently open URL' variable via hints to userscripts 2021-06-14 14:52:14 +02:00
Florian Bruhin 698d2d6b8b Add new types packages for mypy
See http://mypy-lang.blogspot.com/2021/05/the-upcoming-switch-to-modular-typeshed.html
2021-06-14 12:19:25 +02:00
Florian Bruhin 41d488e11a scripts: Remove apipkg from requirements 2021-06-14 12:15:18 +02:00
Florian Bruhin 5cc182132a Merge remote-tracking branch 'origin/update-dependencies' 2021-06-14 12:13:53 +02:00
qutebrowser bot f411c7c769 Update dependencies 2021-06-14 04:21:35 +00:00
Ander Punnar d5433702a5
Merge remote-tracking branch 'origin/master' into 4nd3r/hostblock_subdomains 2021-06-13 21:00:40 +03:00
zocker-160 7f73b20e34 fix bug in keepassxc user script when using --insecure 2021-06-12 13:11:55 +02:00
Florian Bruhin b0d3c8eee3 Greasemonkey: Make sure script names are unique
Fixes #6353
2021-06-11 19:14:14 +02:00
Florian Bruhin c6cdd3f844 doc: Add some ii.com article links 2021-06-10 13:25:51 +02:00
Mirko König d2e2c8a8b3 Removed old line that was commented. 2021-06-10 09:39:48 +02:00
Florian Bruhin fbd4737464 greasemonkey: Remove uneeded name logic
This is already done in GreasemonkeyScript.__init__.
2021-06-09 18:37:22 +02:00
Florian Bruhin 02f136238b Add GreasemonkeyScript.__str__ 2021-06-09 18:32:43 +02:00
Florian Bruhin e328b08616 Add output to :greasemonkey-reload 2021-06-09 18:27:41 +02:00
Florian Bruhin 83fb5fef86 Fix prefers_reduced_motion on Windows
See #6530
2021-06-09 11:08:04 +02:00
Florian Bruhin 96149c7e28 Add content.prefers_reduced_motion
Closes #6530
2021-06-09 10:22:17 +02:00
Florian Bruhin e6261ad92e tests: Fix flakiness in test_invocations.py
We don't need to check the log inside the test, as the quteproc fixture does
that for us anyways.

Also, looks like a new harmless message turned up.
2021-06-07 11:11:45 +02:00
Florian Bruhin bb33d145a4 scripts: Add changelog URL for Deprecated 2021-06-07 10:05:28 +02:00
Florian Bruhin b4abf72902 Merge remote-tracking branch 'origin/update-dependencies' 2021-06-07 10:04:59 +02:00
Florian Bruhin 3c86d44921 mkvenv: Ignore another harmless ldconfig output 2021-06-07 10:04:06 +02:00
qutebrowser bot 7348d4b538 Update dependencies 2021-06-07 04:46:39 +00:00
Jason Rosenzweig d638e14b49
Removed redundant if statement 2021-06-05 13:56:21 +08:00
Jason Rosenzweig c39cb14c62
Merged upstream 2021-06-05 13:36:10 +08:00
Jason Rosenzweig 68cdae184a
Less redundant code 2021-06-05 13:34:45 +08:00
jso8910 6c4216d607
Update tests/unit/mainwindow/test_prompt.py
Co-authored-by: Florian Bruhin <me@the-compiler.org>
2021-06-05 08:53:54 +08:00
jso8910 67e16a5a0c
Update tests/unit/mainwindow/test_prompt.py
Co-authored-by: Florian Bruhin <me@the-compiler.org>
2021-06-05 08:53:22 +08:00
Jason Rosenzweig 412e428e9d
Took suggestions, added '..' back to tabbing, fixed tests 2021-06-04 22:35:37 +08:00
Florian Bruhin e76eb4672a
Merge pull request #6516 from SidharthArya/patch-1
userscripts: adding localhost userscript
2021-06-04 16:32:56 +02:00
Sidharth Arya 6219592e47
Update README.md 2021-06-04 19:44:43 +05:30
Sidharth Arya 7e7ef7439b
Update README.md 2021-06-04 18:27:19 +05:30
Jason Rosenzweig 344a2d1f72
Removed _current_path, changed type comment to annotation 2021-06-04 10:10:36 +08:00
Jason Rosenzweig df28469d44
Fixed indentation, typing 2021-06-04 10:04:34 +08:00
Jason Rosenzweig 4fc17293b0
All tests should pass now 2021-06-04 09:58:50 +08:00
Jason Rosenzweig e3c3580ab6
Fixed some formatting 2021-06-04 09:41:52 +08:00
Jason Rosenzweig 7bd837b86f
Still not ideal but less repition between the two functions (one uses the other) 2021-06-04 09:32:47 +08:00
Jason Rosenzweig 9d06d97fbe
Using self._root_index more because I wasn't using it before 2021-06-04 01:37:46 +08:00
Jason Rosenzweig a88a83765c
Forgot to delete commented out code 2021-06-04 01:26:41 +08:00
Jason Rosenzweig 1fe3ba356e
Better tests, added back _get_valid_dirs hopefully temporarily 2021-06-04 01:20:49 +08:00
Jason Rosenzweig 0a87bb71cc
Merge branch 'master' of https://github.com/jso8910/qutebrowser
Merge upstream
2021-06-04 01:04:01 +08:00
Jason Rosenzweig 5610a43177
Not working with this commit, but have to commit to merge 2021-06-04 01:03:52 +08:00
jso8910 74633b388c
Update qutebrowser/mainwindow/prompt.py
Co-authored-by: Florian Bruhin <me@the-compiler.org>
2021-06-04 00:58:59 +08:00
Jason Rosenzweig 3a0d20e5f9
Added new test 2021-06-04 00:34:34 +08:00
Jason Rosenzweig 0d7226ce14
Fixed tests, just need to add new tests for file filtering 2021-06-04 00:21:02 +08:00
Jason Rosenzweig f31637c586
Even better formatting. No need to run tests on this one, just going to try and fix the test failing issue 2021-06-03 23:52:07 +08:00
Jason Rosenzweig f675e13efa
Less repeating, no longer refinding all directories in directory 2021-06-03 23:26:06 +08:00
Jason Rosenzweig c72e53417d
Fixed formatting for linter 2021-06-03 23:01:58 +08:00
Jason Rosenzweig 3c9a1a059c
Fixed tabbing so it doesn't only tab to matches of first letter of self._to_complete 2021-06-03 21:17:03 +08:00
jso8910 21036a736b Merge branch 'qutebrowser:master' into master 2021-06-03 21:05:20 +08:00
Jason Rosenzweig 4be2229760
Fixed crash when directory does not exist 2021-06-03 09:20:17 +08:00
Jason Rosenzweig f713421b88
Completely reworked the mechanism and it appears to just work 2021-06-03 08:09:00 +08:00
Florian Bruhin 93d21b475e
Merge pull request #6490 from rien333/patch-1
[readability-js] Add reference to AUR package
2021-06-02 15:46:15 +02:00
Jason Rosenzweig 17e79ac667
Cleaned up some code for the linters 2021-06-02 21:14:15 +08:00
Jason Rosenzweig d7db865085
Added string matching for download dialog.
For example if I type "Download" the Downloads folder will show up. Not quite fuzzyfinding. However, there is a bug where the first character typed after the / for example the 'z' in '/home/z' will remove all folders until the next character is typed.
2021-06-02 20:52:53 +08:00
Florian Bruhin c63033a303 README: Move surf to active 2021-06-02 14:42:02 +02:00
Ander Punnar 00a394506f
Merge remote-tracking branch 'origin/master' into 4nd3r/hostblock_subdomains 2021-06-01 20:36:56 +03:00
Florian Bruhin b349880550 Improve IRC links 2021-06-01 19:06:33 +02:00
Florian Bruhin 948e878d39 Release v2.2.3 2021-06-01 18:32:13 +02:00
Florian Bruhin 925a79ad49
Merge pull request #6503 from bitraid/nsis-fix-uninst-2
Windows Uninstaller: Fix silent uninstall (again)
2021-06-01 18:01:47 +02:00
bitraid 74cf64a063
Windows Uninstaller: Fix silent uninstall (again) 2021-06-01 18:57:54 +03:00
Florian Bruhin 1d499b7d57 Merge remote-tracking branch 'origin/pr/6498' 2021-06-01 16:48:48 +02:00
Florian Bruhin 0f329d62d2 Update changelog 2021-06-01 16:48:23 +02:00
Florian Bruhin 9ff9fd0a02 brave adblock: Handle DeserializationError
Fixes #6489
2021-06-01 16:48:04 +02:00
Florian Bruhin a3f9cad456 Speculative fix for deleted WebEngineCaret
(Hopefully) fixes #6394.
2021-06-01 16:48:04 +02:00
Florian Bruhin b4b65b8cd1 Make dark mode tests work correctly on ARM/aarch64
Fixes #6489
2021-06-01 16:48:04 +02:00
bitraid 78d4a9d41b
Windows Installer: Allow elevation when silent 2021-05-31 14:06:09 +03:00
Florian Bruhin 63aea83a58
Merge pull request #6497 from qutebrowser/update-dependencies
Update dependencies
2021-05-31 12:57:07 +02:00
Mirko König 235b0ba539 : Multiple url per login are considered. 2021-05-31 08:41:07 +02:00
qutebrowser bot 6155482743 Update dependencies 2021-05-31 05:11:16 +00:00
Florian Bruhin 67ff458d3f Update changelog 2021-05-30 12:55:54 +02:00
Florian Bruhin c74d107562 Handle un-encodable initial text for editor 2021-05-30 12:55:54 +02:00
Florian Bruhin f0d432565b Fix crash when quitting on qute://settings 2021-05-30 12:16:28 +02:00
Florian Bruhin 505a24c580 Make quitter.is_shutting_down public
Needed for a bugfix in the next commit.
2021-05-30 12:16:28 +02:00
Florian Bruhin 996487c43e Validate encoding for header settings
Also needed to add encoding check support to FormatString.
2021-05-30 12:16:28 +02:00
Rijnder Wever a0ac31e0eb
Add reference to AUR package
I just added the readability package to the [AUR](https://aur.archlinux.org/packages/nodejs-readability-git/).

Not much of a difference from using npm directly, but, personally,  (i) I prefer to manage all my (important) packages using yay, and (ii) like to perform all system upgrades from one place (i.e. yay --devel).
2021-05-30 00:36:41 +02:00
Florian Bruhin 03fa938383 tests: Update import path for pytestqt SignalBlocker 2021-05-29 23:23:08 +02:00
Florian Bruhin 33596cfa4a tests: Fix test_system_default_rendering with Noto Sans Mono 2021-05-29 00:24:25 +02:00
Florian Bruhin 380de52c93 Fix lint 2021-05-28 17:19:21 +02:00
Florian Bruhin 1394bd9b13 Point to official Libera Chat webchat 2021-05-28 16:57:47 +02:00
Florian Bruhin ea8cf59523 Update changelog 2021-05-28 16:56:11 +02:00
Florian Bruhin f8c2b0a7e7 Fix version checking for notifications
We need to check for the QtWebEngine version, not for the version of Qt.
Additionally, there's no need to re-check in DBusNotificationAdapter.__init__ as
it never gets instantiated on older versions, so it's now an assertion instead.
2021-05-28 16:53:01 +02:00
Florian Bruhin 1830f784df Fix tests/lint
We need to set XDG_RUNTIME_DIR properly in the tests so that the log is empty.
2021-05-28 16:50:58 +02:00
Florian Bruhin 549d5b73c2 Update changelog 2021-05-28 15:54:50 +02:00
Florian Bruhin 40477e826c log: Handle JSONLogger in change_console_formatter
Fixes #6482
2021-05-28 15:46:35 +02:00
Florian Bruhin 1400415c0c Disable QTBUG-77137 workaround on Qt 5.14+ 2021-05-27 11:05:40 +02:00
Florian Bruhin f2e322c581 ci: Switch to #qutebrowser-bots 2021-05-27 09:28:31 +02:00
Florian Bruhin c8f549abcd Update changelog 2021-05-26 15:44:33 +02:00
Florian Bruhin 73b1cb58ee Merge remote-tracking branch 'origin/pr/6477' 2021-05-26 15:43:09 +02:00
Florian Bruhin b366911d0a ci: Switch bots to Libera 2021-05-26 10:54:32 +02:00
Florian Bruhin 7961cf7355 RIP Freenode 2021-05-26 09:34:37 +02:00
bitraid 92178e8152
Windows Installer: Update minimum OS version 2021-05-25 18:00:15 +03:00
Florian Bruhin c6be1096b3 Update changelog 2021-05-25 15:25:49 +02:00
Florian Bruhin bae08ae386 Set permission strings in Info.plist
Fixes #6475
2021-05-25 15:25:49 +02:00
Florian Bruhin 2b3a5cc163 doc: Update list of chrome:// URLs 2021-05-25 15:25:49 +02:00
Florian Bruhin c3a54534ca
Merge pull request #6472 from qutebrowser/update-dependencies
Update dependencies
2021-05-25 09:55:45 +02:00
qutebrowser bot d4177dcf47 Update dependencies 2021-05-24 04:24:00 +00:00
Ander Punnar 4e47af2158
Merge remote-tracking branch 'origin/master' into 4nd3r/hostblock_subdomains 2021-05-20 20:52:42 +03:00
Florian Bruhin 90fbe1e181 Release v2.2.2 2021-05-20 18:12:35 +02:00
Florian Bruhin 2a4796b5f4 Update changelog 2021-05-19 17:23:42 +02:00
Florian Bruhin eae2eba2b1 Merge remote-tracking branch 'origin/pr/6470' 2021-05-19 17:22:10 +02:00
Florian Bruhin 66fc2f0799 Remove type-arg which is non-generic in older Pythons 2021-05-19 13:31:46 +02:00
Florian Bruhin c01b47f27b mypy: Set disallow_any_generics
See #6100
2021-05-19 13:15:09 +02:00
user202729 502832ac19 Move function call with side effect out of assertion to avoid error when assertions are disabled 2021-05-19 09:07:09 +07:00
Florian Bruhin 06e49efd3d Update changelog URLs for pallets projects 2021-05-18 19:05:25 +02:00
Florian Bruhin 0aa79efbe5 Update jinja.py typing after jinja upgrade
jinja ships its own (more correct) stubs now

see https://github.com/python/typeshed/issues/3197
2021-05-18 18:31:05 +02:00
Florian Bruhin f74518842f Update changelog 2021-05-18 18:31:05 +02:00
Florian Bruhin f617cc6d09 Enable URL patterns for fonts.web.*
See #3636
2021-05-18 18:31:05 +02:00
Florian Bruhin d0cb876eef Add a new site-specific quirk for Google Docs
See #6464, #5472, #4805, #4810
e010afd3a2
https://bugreports.qt.io/browse/QTBUG-69652
2021-05-18 18:31:05 +02:00
Florian Bruhin 2f9b1ef4a7 mkvenv: Also install linters with --dev
Can be useful for editors
2021-05-18 18:31:05 +02:00
Florian Bruhin 82ac19386c
Merge pull request #6465 from qutebrowser:update-dependencies
Update dependencies
2021-05-18 18:30:21 +02:00
qutebrowser bot 65813bd915 Update dependencies 2021-05-17 04:22:14 +00:00
Florian Bruhin 493d7470c4 ci: Try to avoid upload load
I suspect we get issues because 6 jobs try to upload at the same time
2021-05-14 14:34:56 +02:00
Mirko König 13eeb90b8f Removed surrounding $() resolve CI warnings. 2021-05-14 12:05:46 +02:00
Florian Bruhin ac12fcd714 Fix tests without QtWebEngine 2021-05-13 16:42:34 +02:00
Florian Bruhin 9e52ad621a Remove unused imports 2021-05-13 16:03:29 +02:00
Florian Bruhin 57ed85ffad Fix running without QtWebEngine 2021-05-13 15:58:03 +02:00
Florian Bruhin 335ed484c1 Fix state config unit tests 2021-05-13 15:11:52 +02:00
Florian Bruhin 948fd5040d Store initial QtWebEngine version 2021-05-13 14:13:36 +02:00
Florian Bruhin b50d8c57c4 Update changelog 2021-05-13 13:04:24 +02:00
Florian Bruhin ee0347ba2f Merge remote-tracking branch 'origin/pr/6462' 2021-05-13 13:04:13 +02:00
Florian Bruhin b03b03bdf6 Remove service workers based on QtWebEngine version
See https://bugreports.qt.io/browse/QTBUG-93744
2021-05-13 13:04:01 +02:00
Ryan Roden-Corrent a36efcf6b5
Fix crash in cmd completion for set-cmd-text.
2c4bb064e introduced support for showing bindings in the completion menu
for commands initiated with set-cmd-text. This would crash if given a
binding for just 'set-cmd-text' with no args.

Fixes #6453.
2021-05-13 06:29:39 -04:00
Mirko König ef8045b0ea : Added userscript to handle 1password 2021-05-11 17:00:28 +02:00
Florian Bruhin 7a0118119e
Merge pull request #6451 from qutebrowser/update-dependencies
Update dependencies
2021-05-10 15:20:38 +02:00
qutebrowser bot b9c025380c Update dependencies 2021-05-10 04:20:29 +00:00
Nicholas Schwab 8aef7cedcd Set delay between clock updates to 500ms. 2021-05-06 19:32:32 +02:00
Nicholas Schwab 096529c06b Override showEvent and hideEvent instead of show. 2021-05-06 19:28:57 +02:00
Nicholas Schwab 53794f8c82 Merged two comparisons. 2021-05-06 17:45:24 +02:00
Nicholas Schwab 7d8aacc6f9 Changed Clock.format to always be string to make mypy happy. 2021-05-06 17:45:24 +02:00
Nicholas Schwab ffbfa5386d Reworked _draw_widgets() to reduce complexity. 2021-05-06 17:45:24 +02:00
Nicholas Schwab 44116f9d82 Added doc-strings to Clock widget. 2021-05-06 17:45:24 +02:00
Nicholas Schwab 0442311251 Update documentation. 2021-05-06 17:45:22 +02:00
Nicholas Schwab 6cd62e3160 Allow clock entry in statusbar.widgets config. 2021-05-06 17:43:42 +02:00
Nicholas Schwab e59eba3d17 Add clock widget to statusbar. 2021-05-06 17:42:42 +02:00
Nicholas Schwab 5959221fb6 Added widget to display a clock in the statusbar. 2021-05-06 17:42:42 +02:00
Florian Bruhin 413ce38abc tests: Fix test_check_coverage with Python 3.10 2021-05-05 20:36:27 +02:00
Florian Bruhin 468d1f5dc1 tests: Avoid deprecated SSL protocol value
See https://docs.python.org/3.10/whatsnew/3.10.html#ssl
2021-05-05 20:35:43 +02:00
Florian Bruhin 7535ae3fd8 Ignore Python 3.10 distutils deprecation warning
See https://github.com/ionelmc/python-hunter/issues/97
2021-05-05 20:04:48 +02:00
qutebrowser bot ee1e0ee3a0 Update dependencies 2021-05-05 15:26:54 +00:00
Florian Bruhin eac6be1367 Clarify backend version string 2021-05-05 16:59:56 +02:00
Ander Punnar 2fc588358b
Merge remote-tracking branch 'origin/master' into 4nd3r/hostblock_subdomains 2021-05-03 22:45:18 +03:00
Florian Bruhin 5983339bef Update changelog 2021-05-03 15:22:13 +02:00
Florian Bruhin 63b8269f5c notifications: Fix crash with awesomewm devel 2021-05-03 15:22:13 +02:00
Florian Bruhin 7ddd5c6228
Merge pull request #6443 from qutebrowser/update-dependencies
Update dependencies
2021-05-03 07:59:32 +02:00
qutebrowser bot addf6a4788 Update dependencies 2021-05-03 04:21:05 +00:00
Florian Bruhin 62de76e878 Revert "ci: Pin Python 3.10 to Alpha 7"
This reverts commit 0c1414c6aa.
2021-04-30 10:48:07 +02:00
Florian Bruhin 9db7fbdc11 ci: Fix shell syntax 2021-04-30 10:11:18 +02:00
Florian Bruhin 874f843698 ci: Try harder to detach dmg
Speculatively fixes #6431
2021-04-29 13:56:31 +02:00
Florian Bruhin a4a0aa8395 Fix changelog typo 2021-04-29 13:37:48 +02:00
Florian Bruhin 0be423ad77 Release v2.2.1 2021-04-29 13:33:30 +02:00
Florian Bruhin 4751890acb ci: Fix CodeQL 2021-04-29 00:06:36 +02:00
Florian Bruhin 8023b8c8fe ci: Lock down workflows
Closes #6430
2021-04-28 23:01:43 +02:00
Florian Bruhin 9f8ff83614 Update changelog 2021-04-28 08:21:01 +02:00
Florian Bruhin 79f3bf76e8 Merge remote-tracking branch 'origin/pr/6410' 2021-04-28 08:17:53 +02:00
Florian Bruhin 669a6faee2 Merge remote-tracking branch 'origin/pr/6416' 2021-04-28 08:17:52 +02:00
Florian Bruhin 16592e952b Merge remote-tracking branch 'origin/pr/6429' 2021-04-28 08:17:33 +02:00
Florian Bruhin 3e2c216640 Update changelog 2021-04-28 08:16:30 +02:00
Florian Bruhin be37524f47 Add a site-specific quirk for Discord
Closes #4379
2021-04-28 08:14:43 +02:00
qutebrowser bot eeb9f8e3fa Update dependencies 2021-04-27 11:34:12 +00:00
Nicholas Schwab 38c5eba3e1 Improved readability of statusbar.widgets documentation. 2021-04-24 17:34:40 +02:00
Ander Punnar 55103390b7
Merge remote-tracking branch 'origin/master' into 4nd3r/hostblock_subdomains 2021-04-24 11:05:45 +03:00
Florian Bruhin 2599e9bc97 Revert "Set print resolution to 300dpi"
This reverts commit 2e4ca779c6.
2021-04-23 11:45:02 +02:00
Florian Bruhin 7ff57d33dd Revert "Update changelog"
This reverts commit c945efe5f8.
2021-04-23 11:44:58 +02:00
Florian Bruhin c945efe5f8 Update changelog 2021-04-23 11:22:18 +02:00
Florian Bruhin 2e4ca779c6 Set print resolution to 300dpi
See https://codereview.qt-project.org/c/qt/qtwebengine/+/344042
2021-04-23 11:20:15 +02:00
Florian Bruhin 0ee169e497 Fix tests on Windows 2021-04-23 11:10:53 +02:00
Florian Bruhin fe73cd3fc2 Update changelog 2021-04-23 10:43:04 +02:00
Florian Bruhin c7b3559d82 Fix :spawn -u -o
Fixes #6407
2021-04-23 10:42:34 +02:00
Nicholas Schwab a083728168 Added text: to valid values of statusbar.widgets, making the
documentation more uniform.
2021-04-22 15:17:54 +02:00
Florian Bruhin b1265cbeff Update PE checksum patching after PyInstaller update 2021-04-21 11:37:00 +02:00
afreakk b04f99bcfc
qute-pass: dont run pass twice when otp-only 2021-04-19 14:56:36 +02:00
Florian Bruhin 0c1414c6aa ci: Pin Python 3.10 to Alpha 7
See https://github.com/actions/setup-python/issues/207

pytest isn't ready yet:
https://github.com/pytest-dev/pytest/issues/8539
2021-04-19 11:43:37 +02:00
Florian Bruhin d244442cb6 doc: Fix spelling 2021-04-19 11:33:09 +02:00
Florian Bruhin 680939042d Update changelog 2021-04-19 11:26:11 +02:00
Florian Bruhin 6692928f95 Merge remote-tracking branch 'origin/pr/6377' 2021-04-19 11:23:55 +02:00
Florian Bruhin ae475298e9 Merge remote-tracking branch 'origin/pr/6380' 2021-04-19 11:23:53 +02:00
Florian Bruhin ffdee8534d requirements: Fully remove python_version marker for adblock
See https://github.com/ArniDagur/python-adblock/issues/28

Follow-up to de4fff3866
2021-04-19 11:22:24 +02:00
Florian Bruhin 6985da96ef
Merge pull request #6405 from qutebrowser/update-dependencies
Update dependencies
2021-04-19 11:20:52 +02:00
qutebrowser bot 3b76a0d4b9 Update dependencies 2021-04-19 04:21:40 +00:00
Florian Bruhin fe80b04ed1 Update changelog 2021-04-17 10:43:52 +02:00
Florian Bruhin 1b4daf7c37 mkvenv: Handle failing ldconfig 2021-04-17 09:46:30 +02:00
Florian Bruhin 9fdfd3b4c0 notifications: Ignore KDE's ExcessNotificationGeneration 2021-04-17 09:41:52 +02:00
frank shin 49e858e7d4 address PR comment 2021-04-17 01:29:01 -04:00
afreakk efcb379872
qute-pass: extract username/pw only when needed 2021-04-16 17:12:09 +02:00
Florian Bruhin de4fff3866 misc: Install adblock on Python 3.10 with bleeding requirements
See https://github.com/ArniDagur/python-adblock/issues/28
2021-04-15 11:16:39 +02:00
Florian Bruhin febb921040 Add QUTE_QTWEBENGINE_VERSION_OVERRIDE
See https://github.com/NixOS/nixpkgs/pull/119376#issuecomment-820073044
2021-04-15 11:00:18 +02:00
Florian Bruhin 32604a6651 tests: Fix test_version with git's init.defaultBranch 2021-04-15 10:54:17 +02:00
Florian Bruhin 7ce827749c Revert accidental version.py changes 2021-04-15 09:00:59 +02:00
Florian Bruhin 6b3e7c2ca8 Fix up test 2021-04-15 08:59:53 +02:00
Florian Bruhin 72facbb8f2 Remove old q_app
Follow-up to c175823020, see #6393
2021-04-15 08:13:35 +02:00
Florian Bruhin 557719bb39 requirements: Use pyparsing from git again
https://github.com/pyparsing/pyparsing/issues/271 is fixed
2021-04-14 14:12:32 +02:00
Ander Punnar 0fe9520042
Merge remote-tracking branch 'origin/master' into 4nd3r/hostblock_subdomains 2021-04-13 22:27:53 +03:00
Florian Bruhin dacaefaf38 Update changelog 2021-04-13 17:39:04 +02:00
Florian Bruhin ebf9619583 notifications: Show adapter errors to users
Otherwise their notifications could suddenly stop working or otherwise
change apperance.
2021-04-13 17:38:48 +02:00
Florian Bruhin 2cfc64579a notifications: Handle MaxNotificationsExceeded error from GNOME Flashback 2021-04-13 17:38:48 +02:00
Florian Bruhin 9aa8740ec9 scripts: Add --no-confirm to build_release 2021-04-13 12:48:51 +02:00
frank shin 909230a8ac Check bitwarden CLI tool return code instead of stderr to check for error 2021-04-10 11:24:29 -04:00
Ander Punnar 26b84e1c95
add subdomain blocking test 2021-04-09 22:57:41 +03:00
Ander Punnar 569b7c1ed2
Merge remote-tracking branch 'origin/master' into 4nd3r/hostblock_subdomains 2021-04-09 22:57:26 +03:00
Ander Punnar 4449fe914c
fix test 2021-04-09 01:22:19 +03:00
Ander Punnar e3eb603f79
fix pylint 2021-04-09 00:28:53 +03:00
Ander Punnar 2b752a4929
make _widened_hostnames public, move to urlutils 2021-04-09 00:19:48 +03:00
Ander Punnar 3112c685a0
Merge remote-tracking branch 'origin/master' into 4nd3r/hostblock_subdomains 2021-04-09 00:13:26 +03:00
Ander Punnar c0a55c1f75
block subdomains of blocked hosts 2021-04-08 00:31:31 +03:00
700 changed files with 36544 additions and 23688 deletions

View File

@ -1,19 +0,0 @@
[bumpversion]
current_version = 2.2.0
commit = True
message = Release v{new_version}
tag = True
sign_tags = True
tag_name = v{new_version}
[bumpversion:file:qutebrowser/__init__.py]
parse = __version__ = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)
[bumpversion:file:misc/org.qutebrowser.qutebrowser.appdata.xml]
search = <!-- Add new releases here -->
replace = <!-- Add new releases here -->
<release version="{new_version}" date="{now:%Y-%m-%d}"/>
[bumpversion:file:doc/changelog.asciidoc]
search = (unreleased)
replace = ({now:%Y-%m-%d})

26
.bumpversion.toml Normal file
View File

@ -0,0 +1,26 @@
[tool.bumpversion]
current_version = "3.6.3"
commit = true
message = "Release v{new_version}"
tag = true
sign_tags = true
tag_name = "v{new_version}"
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
serialize = ["{major}.{minor}.{patch}"]
allow_dirty = false
[[tool.bumpversion.files]]
filename = "qutebrowser/__init__.py"
search = "__version__ = \"{current_version}\""
replace = "__version__ = \"{new_version}\""
[[tool.bumpversion.files]]
filename = "misc/org.qutebrowser.qutebrowser.appdata.xml"
search = "<!-- Add new releases here -->"
replace = """<!-- Add new releases here -->
<release version='{new_version}' date='{now:%Y-%m-%d}'/>"""
[[tool.bumpversion.files]]
filename = "doc/changelog.asciidoc"
search = "(unreleased)"
replace = "({now:%Y-%m-%d})"

View File

@ -1,7 +1,11 @@
coverage:
status:
project: false
patch: false
project:
default:
informational: true
patch:
default:
informational: true
changes: false
comment: false

View File

@ -4,6 +4,7 @@ include =
tests/*
scripts/*
branch = true
patch = subprocess
omit =
qutebrowser/__main__.py
*/__init__.py

23
.flake8
View File

@ -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
@ -16,6 +17,7 @@ exclude = .*,__pycache__,resources.py
# (for pytest's __tracebackhide__)
# F401: Unused import
# N802: function name should be lowercase
# N818: exception name '...' should be named with an Error suffix
# N806: variable in function should be lowercase
# P101: format string does contain unindexed parameters
# P102: docstring does contain unindexed parameters
@ -39,25 +41,34 @@ exclude = .*,__pycache__,resources.py
# A003: Builtin name for class attribute (needed for overridden methods)
# W503: like break before binary operator
# W504: line break after binary operator
# FI15: __future__ import "generator_stop" missing
# FI18: __future__ import "annotations" missing
# FI58: __future__ import "annotations" present
# PT004: fixture '{name}' does not return anything, add leading underscore
# PT011: pytest.raises(ValueError) is too broad, set the match parameter or use a more specific exception
# PT012: pytest.raises() block should contain a single simple statement
ignore =
B001,B008,B305,
E128,E226,E265,E501,E402,E266,E722,E731,
F401,
N802,
N802,N818,
P101,P102,P103,
D102,D103,D106,D107,D104,D105,D209,D211,D401,D402,D403,D412,D413,
A003,
W503, W504
FI15
min-version = 3.6.1
W503, W504,
FI18,FI58,
PT004,
PT011,
PT012
min-version = 3.9.0
max-complexity = 12
per-file-ignores =
qutebrowser/api/hook.py : N801
tests/* : B011,D100,D101
qutebrowser/qt/*.py : F403
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
copyright-check = True
copyright-regexp = # Copyright [\d-]+ .*
copyright-min-file-size = 110
pytest-parametrize-names-type = csv

View File

@ -5,11 +5,11 @@ open pull requests.
- Before you start to work on something, please leave a comment on the relevant
issue (or open one). This makes sure there is no duplicate work done.
- Either run the testsuite locally, or keep an eye on Travis CI / AppVeyor
after pushing changes.
- Either run the testsuite locally, or keep an eye on the CI at the end of the
pull request page after pushing changes.
- If you are stuck somewhere or have questions,
https://github.com/qutebrowser/qutebrowser#getting-help[please ask]!
https://github.com/qutebrowser/qutebrowser/blob/main/doc/help/index.asciidoc#getting-help[please ask]!
See the link:../doc/contributing.asciidoc[full contribution documentation] for
details and other useful hints.

2
.github/FUNDING.yml vendored
View File

@ -1,2 +1,2 @@
github: The-Compiler
custom: https://github.com/qutebrowser/qutebrowser/blob/master/README.asciidoc#donating
custom: https://github.com/qutebrowser/qutebrowser/blob/main/README.asciidoc#donating

3
.github/SECURITY.md vendored
View File

@ -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).

6
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

View File

@ -10,99 +10,72 @@ on:
jobs:
tests:
if: "github.repository == 'qutebrowser/qutebrowser'"
runs-on: ubuntu-20.04
timeout-minutes: 30
runs-on: ubuntu-24.04
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
include:
- testenv: bleeding
image: "archlinux-webengine-unstable"
container:
image: "qutebrowser/ci:archlinux-webengine-unstable"
image: "qutebrowser/ci:${{ matrix.image }}"
env:
FORCE_COLOR: "1"
PY_COLORS: "1"
DOCKER: "archlinux-webengine-unstable"
DOCKER: "${{ matrix.image }}"
CI: true
PYTEST_ADDOPTS: "--color=yes"
TMPDIR: "${{ runner.temp }}"
volumes:
# Hardcoded because we can't use ${{ runner.temp }} here apparently.
- /home/runner/work/_temp/:/home/runner/work/_temp/
options: --privileged --tty
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up problem matchers
run: "python scripts/dev/ci/problemmatchers.py py3 ${{ runner.temp }}"
- name: Upgrade 3rd party assets
run: "tox exec -e ${{ matrix.testenv }} -- python scripts/dev/update_3rdparty.py --gh-token ${{ secrets.GITHUB_TOKEN }} --modern-pdfjs"
- name: Run tox
run: dbus-run-session tox -e bleeding
pyinstaller:
if: "github.repository == 'qutebrowser/qutebrowser'"
strategy:
fail-fast: false
matrix:
include:
- os: macos-10.15
- os: windows-2019
args: --64bit
- os: windows-2019
args: --32bit
- os: macos-10.15
args: --debug
- os: windows-2019
args: --64bit --debug
- os: windows-2019
args: --32bit --debug
runs-on: "${{ matrix.os }}"
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Get asciidoc
uses: actions/checkout@v2
with:
repository: asciidoc-py/asciidoc-py
ref: '9.x'
path: asciidoc
- name: Move asciidoc out of the repo
run: mv asciidoc ..
- name: Install dependencies
run: dbus-run-session tox -e ${{ matrix.testenv }}
- name: Gather info
id: info
run: |
python -m pip install -U pip
python -m pip install -U -r misc/requirements/requirements-tox.txt
- name: Patch qutebrowser for debugging
if: "contains(matrix.args, '--debug')"
run: |
sed -i '' '/.-d., .--debug.,/s/$/ default=True,/' qutebrowser/qutebrowser.py
- name: Run tox
run: "tox -e build-release -- --asciidoc ../asciidoc/asciidoc.py --gh-token ${{ secrets.GITHUB_TOKEN }} ${{ matrix.args }}"
- name: Upload artifacts
uses: actions/upload-artifact@v2
echo "date=$(date +'%Y-%m-%d')" >> "$GITHUB_OUTPUT"
echo "sha_short=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
shell: bash
if: failure()
- name: Upload screenshots
uses: actions/upload-artifact@v6
with:
name: "qutebrowser-nightly-${{ github.sha }}"
name: "end2end-screenshots-${{ steps.info.outputs.date }}-${{ steps.info.outputs.sha_short }}-${{ matrix.image }}"
path: |
dist/qutebrowser-*.dmg
dist/qutebrowser-*-windows-standalone-*.zip
dist/qutebrowser-*-*.exe
${{ runner.temp }}/pytest-of-user/pytest-current/pytest-screenshots/*.png
if-no-files-found: ignore
if: failure()
irc:
timeout-minutes: 2
continue-on-error: true
runs-on: ubuntu-20.04
needs: [tests, pyinstaller]
runs-on: ubuntu-24.04
needs: [tests]
if: "always() && github.repository == 'qutebrowser/qutebrowser'"
steps:
- name: Send success IRC notification
uses: Gottox/irc-message-action@v1
if: "needs.tests.result == 'success' && needs.pyinstaller.result == 'success'"
uses: Gottox/irc-message-action@v2
if: "needs.tests.result == 'success'"
with:
server: chat.freenode.net
channel: '#qutebrowser-dev'
server: irc.libera.chat
channel: '#qutebrowser-bots'
nickname: qutebrowser-bot
message: "[${{ github.workflow }}] \u00033Success:\u0003 ${{ github.ref }} https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} (@${{ github.actor }})"
- name: Send non-success IRC notification
uses: Gottox/irc-message-action@v1
if: "needs.tests.result != 'success' || needs.pyinstaller.result != 'success'"
uses: Gottox/irc-message-action@v2
if: "needs.tests.result != 'success'"
with:
server: chat.freenode.net
channel: '#qutebrowser-dev'
server: irc.libera.chat
channel: '#qutebrowser-bots'
nickname: qutebrowser-bot
message: "[${{ github.workflow }}] \u00034FAIL:\u0003 ${{ github.ref }} https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} (@${{ github.actor }})\n
tests: ${{ needs.tests.result }}, pyinstaller: ${{ needs.pyinstaller.result }}"
tests: ${{ needs.tests.result }}"

View File

@ -6,6 +6,7 @@ on:
- 'dependabot/*'
pull_request:
env:
FORCE_COLOR: "1"
PY_COLORS: "1"
MYPY_FORCE_TERMINAL_WIDTH: "180"
@ -13,45 +14,50 @@ jobs:
linters:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
timeout-minutes: 10
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
- testenv: pylint
- testenv: flake8
- testenv: mypy
- testenv: mypy-pyqt6
- testenv: mypy-pyqt5
- testenv: docs
- testenv: vulture
- testenv: misc
- testenv: pyroma
- testenv: check-manifest
- testenv: eslint
- testenv: shellcheck
args: "-f gcc" # For problem matchers
- testenv: yamllint
- testenv: actionlint
- testenv: package
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: actions/cache@v5
with:
path: |
.mypy_cache
.tox
~/.cache/pip
key: "${{ matrix.testenv }}-${{ hashFiles('misc/requirements/requirements-*.txt') }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('scripts/dev/pylint_checkers/qute_pylint/*.py') }}"
- uses: actions/setup-python@v2
- uses: actions/setup-python@v6
with:
python-version: '3.8'
- uses: actions/setup-node@v2-beta
python-version: '3.10'
- uses: actions/setup-node@v6
with:
node-version: '12.x'
node-version: '22.x'
if: "matrix.testenv == 'eslint'"
- name: Set up problem matchers
run: "python scripts/dev/ci/problemmatchers.py ${{ matrix.testenv }} ${{ runner.temp }}"
- name: Install dependencies
run: |
[[ ${{ matrix.testenv }} == eslint ]] && npm install -g eslint
[[ ${{ matrix.testenv }} == docs ]] && sudo apt-get install --no-install-recommends asciidoc
[[ ${{ 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
[[ ${{ matrix.testenv }} == vulture || ${{ matrix.testenv }} == pylint ]] && sudo apt-get update && sudo apt-get install --no-install-recommends libegl1
if [[ ${{ matrix.testenv }} == shellcheck ]]; then
scversion="stable"
bindir="$HOME/.local/bin"
@ -59,90 +65,162 @@ jobs:
wget -qO- "https://github.com/koalaman/shellcheck/releases/download/$scversion/shellcheck-$scversion.linux.x86_64.tar.xz" | tar -xJv --strip-components 1 -C "$bindir" shellcheck-$scversion/shellcheck
echo "$bindir" >> "$GITHUB_PATH"
fi
if [[ ${{ matrix.testenv }} == actionlint ]]; then
bindir="$HOME/.local/bin"
mkdir -p "$bindir"
wget -q https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash
bash download-actionlint.bash latest "$bindir"
echo "$bindir" >> "$GITHUB_PATH"
fi
python -m pip install -U pip
python -m pip install -U -r misc/requirements/requirements-tox.txt
- name: "Run ${{ matrix.testenv }}"
run: "dbus-run-session -- tox -e ${{ matrix.testenv}} -- ${{ matrix.args }}"
run: |
if [[ -z "${{ matrix.args }}" ]]; then
dbus-run-session -- tox -e ${{ matrix.testenv }}
else
dbus-run-session -- tox -e ${{ matrix.testenv }} -- ${{ matrix.args }}
fi
tests-docker:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
timeout-minutes: 30
runs-on: ubuntu-20.04
timeout-minutes: 45
runs-on: ubuntu-22.04 # not 24.04 because sandboxing fails by default (#8424)
strategy:
fail-fast: false
matrix:
image:
- archlinux-webkit
- archlinux-webengine
# - archlinux-webengine-unstable
include:
- testenv: py
image: archlinux-webengine
- testenv: py
image: archlinux-webengine-unstable
container:
image: "qutebrowser/ci:${{ matrix.image }}"
env:
QUTE_BDD_WEBENGINE: "${{ matrix.image != 'archlinux-webkit' }}"
DOCKER: "${{ matrix.image }}"
CI: true
PYTEST_ADDOPTS: "--color=yes"
TMPDIR: "${{ runner.temp }}"
volumes:
# Hardcoded because we can't use ${{ runner.temp }} here apparently.
- /home/runner/work/_temp/:/home/runner/work/_temp/
options: --privileged --tty
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up problem matchers
run: "python scripts/dev/ci/problemmatchers.py py38 ${{ runner.temp }}"
run: "python scripts/dev/ci/problemmatchers.py tests ${{ runner.temp }}"
- name: Run tox
run: dbus-run-session tox -e py
run: "dbus-run-session -- tox -e ${{ matrix.testenv }}"
- name: Gather info
id: info
run: |
echo "date=$(date +'%Y-%m-%d')" >> "$GITHUB_OUTPUT"
echo "sha_short=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
shell: bash
if: failure()
- name: Upload screenshots
uses: actions/upload-artifact@v6
with:
name: "end2end-screenshots-${{ steps.info.outputs.date }}-${{ steps.info.outputs.sha_short }}-${{ matrix.image }}"
path: |
${{ runner.temp }}/pytest-of-user/pytest-current/pytest-screenshots/*.png
if-no-files-found: ignore
if: failure()
tests:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
timeout-minutes: 45
continue-on-error: "${{ matrix.experimental == true }}"
# continue-on-error: "${{ matrix.experimental == true }}"
strategy:
fail-fast: false
matrix:
include:
### PyQt 5.12 (Python 3.6)
- testenv: py36-pyqt512
os: ubuntu-18.04
python: 3.6
### PyQt 5.13 (Python 3.7)
- testenv: py37-pyqt513
os: ubuntu-20.04
python: 3.7
### PyQt 5.14 (Python 3.8)
- testenv: py38-pyqt514
os: ubuntu-20.04
python: 3.8
### PyQt 5.15.0 (Python 3.9)
- testenv: py39-pyqt5150
os: ubuntu-20.04
python: 3.9
### PyQt 5.15 (Python 3.9, with coverage)
- testenv: py39-pyqt515-cov
os: ubuntu-20.04
python: 3.9
### PyQt 5.15 (Python 3.10)
- testenv: py310-pyqt515
os: ubuntu-20.04
python: 3.10-dev
### macOS: PyQt 5.15 (Python 3.9 to match PyInstaller env)
- testenv: py39-pyqt515
os: macos-10.15
python: 3.7
### PyQt 5.15.2 (Python 3.9)
- testenv: py39-pyqt5152
os: ubuntu-22.04
python: "3.9"
### PyQt 5.15 (Python 3.10, with coverage)
# FIXME:qt6
# - testenv: py310-pyqt515-cov
# os: ubuntu-22.04
# python: "3.10"
### PyQt 5.15 (Python 3.11)
- testenv: py311-pyqt515
os: ubuntu-22.04
python: "3.11"
### PyQt 6.2 (Python 3.9)
- testenv: py39-pyqt62
os: ubuntu-22.04
python: "3.9"
### PyQt 6.3 (Python 3.9)
- testenv: py39-pyqt63
os: ubuntu-22.04
python: "3.9"
## PyQt 6.4 (Python 3.9)
- testenv: py39-pyqt64
os: ubuntu-22.04
python: "3.9"
### PyQt 6.5 (Python 3.10)
- testenv: py310-pyqt65
os: ubuntu-22.04
python: "3.10"
### PyQt 6.6 (Python 3.11)
- testenv: py311-pyqt66
os: ubuntu-22.04
python: "3.11"
### PyQt 6.6 (Python 3.12)
- testenv: py312-pyqt66
os: ubuntu-22.04
python: "3.12"
### PyQt 6.7 (Python 3.11)
- testenv: py311-pyqt67
os: ubuntu-22.04
python: "3.11"
### PyQt 6.7 (Python 3.12)
- testenv: py312-pyqt67
os: ubuntu-22.04
python: "3.12"
### PyQt 6.8 (Python 3.13)
- testenv: py313-pyqt68
os: ubuntu-24.04
python: "3.13"
### PyQt 6.8 (Python 3.13)
- testenv: py313-pyqt68
os: ubuntu-24.04
python: "3.13"
### PyQt 6.9 (Python 3.14)
- testenv: py314-pyqt69
os: ubuntu-24.04
python: "3.14"
### PyQt 6.10 (Python 3.14)
- testenv: py314-pyqt610
os: ubuntu-24.04
python: "3.14"
### macOS Sonoma (M1 runner)
- testenv: py314-pyqt610
os: macos-14
python: "3.14"
args: "tests/unit" # Only run unit tests on macOS
### macOS Big Sur
# - testenv: py39-pyqt515
# os: macos-11.0
# python: 3.9
# args: "tests/unit" # Only run unit tests on macOS
### Windows: PyQt 5.15 (Python 3.9 to match PyInstaller env)
- testenv: py39-pyqt515
os: windows-2019
python: 3.9
### macOS Sequoia (Intel runner)
- testenv: py314-pyqt610
os: macos-15-intel
python: "3.14"
args: "tests/unit" # Only run unit tests on macOS
### Windows
- testenv: py314-pyqt610
os: windows-2022
python: "3.14"
- testenv: py314-pyqt610
os: windows-2025
python: "3.14"
runs-on: "${{ matrix.os }}"
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: actions/cache@v5
with:
path: |
.mypy_cache
@ -150,7 +228,7 @@ jobs:
~/.cache/pip
key: "${{ matrix.testenv }}-${{ matrix.os }}-${{ matrix.python }}-${{ hashFiles('misc/requirements/requirements-*.txt') }}-${{ hashFiles('requirements.txt') }}"
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v6
with:
python-version: "${{ matrix.python }}"
- name: Set up problem matchers
@ -158,12 +236,17 @@ jobs:
- name: Install apt dependencies
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends libyaml-dev libegl1-mesa libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0
sudo apt-get install --no-install-recommends libyaml-dev libegl1 libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-shape0 libxcb-cursor0 libjpeg-dev
if: "startsWith(matrix.os, 'ubuntu-')"
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U -r misc/requirements/requirements-tox.txt
- name: Upgrade 3rd party assets
run: "tox exec -e ${{ matrix.testenv }} -- python scripts/dev/update_3rdparty.py --gh-token ${{ secrets.GITHUB_TOKEN }}"
if: "startsWith(matrix.os, 'windows-')"
- name: "Set TMPDIR for pytest"
run: 'echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"'
- name: "Run ${{ matrix.testenv }}"
run: "dbus-run-session -- tox -e ${{ matrix.testenv }} -- ${{ matrix.args }}"
if: "startsWith(matrix.os, 'ubuntu-')"
@ -175,63 +258,82 @@ jobs:
if: "failure()"
- name: Upload coverage
if: "endsWith(matrix.testenv, '-cov')"
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v5
with:
name: "${{ matrix.testenv }}"
- name: Gather info
id: info
run: |
echo "date=$(date +'%Y-%m-%d')" >> "$GITHUB_OUTPUT"
echo "sha_short=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
shell: bash
if: failure()
- name: Upload screenshots
uses: actions/upload-artifact@v6
with:
name: "end2end-screenshots-${{ steps.info.outputs.date }}-${{ steps.info.outputs.sha_short }}-${{ matrix.testenv }}-${{ matrix.os }}"
path: |
${{ runner.temp }}/pytest-of-runner/pytest-current/pytest-screenshots/*.png
if-no-files-found: ignore
if: failure()
codeql:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
timeout-minutes: 30
runs-on: ubuntu-20.04
permissions:
security-events: write
timeout-minutes: 15
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v4
with:
languages: javascript, python
queries: +security-extended
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v4
irc:
timeout-minutes: 2
continue-on-error: true
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
needs: [linters, tests, tests-docker, codeql]
if: "always() && github.repository_owner == 'qutebrowser'"
steps:
- name: Send success IRC notification
uses: Gottox/irc-message-action@v1
uses: Gottox/irc-message-action@v2
if: "needs.linters.result == 'success' && needs.tests.result == 'success' && needs.tests-docker.result == 'success' && needs.codeql.result == 'success'"
with:
server: chat.freenode.net
channel: '#qutebrowser-dev'
server: irc.libera.chat
channel: '#qutebrowser-bots'
nickname: qutebrowser-bot
message: "[${{ github.workflow }}] \u00033Success:\u0003 ${{ github.ref }} https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} (@${{ github.actor }})"
- name: Send failure IRC notification
uses: Gottox/irc-message-action@v1
uses: Gottox/irc-message-action@v2
if: "needs.linters.result == 'failure' || needs.tests.result == 'failure' || needs.tests-docker.result == 'failure' || needs.codeql.result == 'failure'"
with:
server: chat.freenode.net
channel: '#qutebrowser-dev'
server: irc.libera.chat
channel: '#qutebrowser-bots'
nickname: qutebrowser-bot
message: "[${{ github.workflow }}] \u00034FAIL:\u0003 ${{ github.ref }} https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} (@${{ github.actor }})\n
linters: ${{ needs.linters.result }}, tests: ${{ needs.tests.result }}, tests-docker: ${{ needs.tests-docker.result }}, codeql: ${{ needs.codeql.result }}"
- name: Send skipped IRC notification
uses: Gottox/irc-message-action@v1
uses: Gottox/irc-message-action@v2
if: "needs.linters.result == 'skipped' || needs.tests.result == 'skipped' || needs.tests-docker.result == 'skipped' || needs.codeql.result == 'skipped'"
with:
server: chat.freenode.net
channel: '#qutebrowser-dev'
server: irc.libera.chat
channel: '#qutebrowser-bots'
nickname: qutebrowser-bot
message: "[${{ github.workflow }}] \u00038Skipped:\u0003 ${{ github.ref }} https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} (@${{ github.actor }})"
- name: Send cancelled IRC notification
uses: Gottox/irc-message-action@v1
uses: Gottox/irc-message-action@v2
if: "needs.linters.result == 'cancelled' || needs.tests.result == 'cancelled' || needs.tests-docker.result == 'cancelled' || needs.codeql.result == 'cancelled'"
with:
server: chat.freenode.net
channel: '#qutebrowser-dev'
server: irc.libera.chat
channel: '#qutebrowser-bots'
nickname: qutebrowser-bot
message: "[${{ github.workflow }}] \u000314Cancelled:\u0003 ${{ github.ref }} https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} (@${{ github.actor }})\n
linters: ${{ needs.linters.result }}, tests: ${{ needs.tests.result }}, tests-docker: ${{ needs.tests-docker.result }}, codeql: ${{ needs.codeql.result }}"

View File

@ -8,54 +8,54 @@ on:
jobs:
docker:
if: "github.repository == 'qutebrowser/qutebrowser'"
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
image:
- archlinux-webkit
- archlinux-webengine
- archlinux-webengine-unstable
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.x'
- run: pip install jinja2
- name: Generate Dockerfile
run: python3 generate.py ${{ matrix.image }}
working-directory: scripts/dev/ci/docker/
- uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
username: qutebrowser
password: ${{ secrets.DOCKER_TOKEN }}
- uses: docker/build-push-action@v2
- uses: docker/build-push-action@v6
with:
file: scripts/dev/ci/docker/Dockerfile
context: .
tags: "qutebrowser/ci:${{ matrix.image }}"
push: ${{ github.ref == 'refs/heads/master' }}
push: ${{ github.ref == 'refs/heads/main' }}
irc:
timeout-minutes: 2
continue-on-error: true
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
needs: [docker]
if: "always() && github.repository == 'qutebrowser/qutebrowser'"
steps:
- name: Send success IRC notification
uses: Gottox/irc-message-action@v1
uses: Gottox/irc-message-action@v2
if: "needs.docker.result == 'success'"
with:
server: chat.freenode.net
channel: '#qutebrowser-dev'
server: irc.libera.chat
channel: '#qutebrowser-bots'
nickname: qutebrowser-bot
message: "[${{ github.workflow }}] \u00033Success:\u0003 ${{ github.ref }} https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} (@${{ github.actor }})"
- name: Send non-success IRC notification
uses: Gottox/irc-message-action@v1
uses: Gottox/irc-message-action@v2
if: "needs.docker.result != 'success'"
with:
server: chat.freenode.net
channel: '#qutebrowser-dev'
server: irc.libera.chat
channel: '#qutebrowser-bots'
nickname: qutebrowser-bot
message: "[${{ github.workflow }}] \u00034FAIL:\u0003 ${{ github.ref }} https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} (@${{ github.actor }})"

107
.github/workflows/nightly.yml vendored Normal file
View File

@ -0,0 +1,107 @@
name: Nightly builds
on:
workflow_dispatch:
schedule:
# Every day at 04:05 UTC
# https://crontab.guru/#05_04_*_*_*
- cron: '05 04 * * *'
jobs:
pyinstaller:
if: "github.repository == 'qutebrowser/qutebrowser'"
strategy:
fail-fast: false
matrix:
include:
- os: macos-15-intel
toxenv: build-release
name: macos-intel
- os: macos-14
toxenv: build-release
name: macos-apple-silicon
- os: windows-latest
toxenv: build-release
name: windows
- os: macos-15-intel
args: --debug
toxenv: build-release
name: macos-debug-intel
- os: macos-14
toxenv: build-release
name: macos-debug-apple-silicon
- os: windows-latest
args: --debug
toxenv: build-release
name: windows-debug
runs-on: "${{ matrix.os }}"
timeout-minutes: 45
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install nsis
if: "matrix.os == 'windows-latest'"
run: |
irm get.scoop.sh | iex
scoop update
scoop bucket add extras
scoop install nsis
Add-Content $env:GITHUB_PATH "C:\Users\runneradmin\scoop\shims"
shell: pwsh
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U -r misc/requirements/requirements-tox.txt
- name: Patch qutebrowser for debugging
if: "contains(matrix.args, '--debug')"
run: |
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
id: info
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@v6
with:
name: "qutebrowser-nightly-${{ steps.info.outputs.date }}-${{ steps.info.outputs.sha_short }}-${{ matrix.name }}"
path: |
dist/qutebrowser-*.dmg
dist/qutebrowser-*-windows-standalone-*.zip
dist/qutebrowser-*-*.exe
if-no-files-found: error
irc:
timeout-minutes: 2
continue-on-error: true
runs-on: ubuntu-24.04
needs: [pyinstaller]
if: "always() && github.repository == 'qutebrowser/qutebrowser'"
steps:
- name: Send success IRC notification
uses: Gottox/irc-message-action@v2
if: "needs.pyinstaller.result == 'success'"
with:
server: irc.libera.chat
channel: '#qutebrowser-bots'
nickname: qutebrowser-bot
message: "[${{ github.workflow }}] \u00033Success:\u0003 ${{ github.ref }} https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} (@${{ github.actor }})"
- name: Send non-success IRC notification
uses: Gottox/irc-message-action@v2
if: "needs.pyinstaller.result != 'success'"
with:
server: irc.libera.chat
channel: '#qutebrowser-bots'
nickname: qutebrowser-bot
message: "[${{ github.workflow }}] \u00034FAIL:\u0003 ${{ github.ref }} https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} (@${{ github.actor }})\n
pyinstaller: ${{ needs.pyinstaller.result }}"

View File

@ -7,8 +7,8 @@ on:
- cron: '05 04 * * 1'
workflow_dispatch:
inputs:
environment:
descriptions: 'Test environments to update'
environments:
description: 'Test environments to update'
required: false
default: ''
@ -18,22 +18,20 @@ jobs:
timeout-minutes: 20
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
- uses: actions/checkout@v6
with:
python-version: '3.7'
- name: Set up Python 3.8
uses: actions/setup-python@v2
persist-credentials: false
- name: Set up Python 3.9
uses: actions/setup-python@v6
with:
python-version: '3.8'
python-version: '3.9'
- name: Recompile requirements
run: "python3 scripts/dev/recompile_requirements.py ${{ github.events.input.environments }}"
run: "python3 scripts/dev/recompile_requirements.py ${{ github.event.input.environments }}"
id: requirements
- name: Install apt dependencies
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends libyaml-dev libegl1-mesa libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 asciidoc python3-venv xvfb
sudo apt-get install --no-install-recommends libyaml-dev libegl1 libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-shape0 libxcb-cursor0 asciidoc python3-venv xvfb
- name: Install dependencies
run: |
python -m pip install -U pip
@ -43,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@v3
uses: peter-evans/create-pull-request@v8
with:
committer: qutebrowser bot <bot@qutebrowser.org>
author: qutebrowser bot <bot@qutebrowser.org>
@ -72,19 +70,18 @@ jobs:
if: "always() && github.repository == 'qutebrowser/qutebrowser'"
steps:
- name: Send success IRC notification
uses: Gottox/irc-message-action@v1
uses: Gottox/irc-message-action@v2
if: "needs.update.result == 'success'"
with:
server: chat.freenode.net
channel: '#qutebrowser-dev'
server: irc.libera.chat
channel: '#qutebrowser-bots'
nickname: qutebrowser-bot
message: "[${{ github.workflow }}] \u00033Success:\u0003 ${{ github.ref }} https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} (@${{ github.actor }})"
- name: Send non-success IRC notification
uses: Gottox/irc-message-action@v1
uses: Gottox/irc-message-action@v2
if: "needs.update.result != 'success'"
with:
server: chat.freenode.net
channel: '#qutebrowser-dev'
server: irc.libera.chat
channel: '#qutebrowser-bots'
nickname: qutebrowser-bot
message: "[${{ github.workflow }}] \u00034FAIL:\u0003 ${{ github.ref }} https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} (@${{ github.actor }})\n
linters: ${{ needs.linters.result }}, tests: ${{ needs.tests.result }}, tests-docker: ${{ needs.tests-docker.result }}, codeql: ${{ needs.codeql.result }}"
message: "[${{ github.workflow }}] \u00034FAIL:\u0003 ${{ github.ref }} https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} (@${{ github.actor }})"

252
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,252 @@
name: Release
on:
workflow_dispatch:
inputs:
release_type:
description: 'Release type'
required: true
default: 'patch'
type: choice
options:
- 'patch'
- 'minor'
- 'major'
- 'reupload' # reupload last release
# FIXME do we want a possibility to do prereleases here?
python_version:
description: 'Python version'
required: true
default: '3.14'
type: choice
options:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- '3.13'
- '3.14'
jobs:
prepare:
runs-on: ubuntu-24.04
timeout-minutes: 5
outputs:
version: ${{ steps.bump.outputs.version }}
version_x: ${{ steps.bump.outputs.version_x }}
release_id: ${{ inputs.release_type == 'reupload' && steps.find-release.outputs.result || steps.create-release.outputs.id }}
permissions:
contents: write # To push release commit/tag
steps:
- name: Find release branch
uses: actions/github-script@v8
id: find-branch
with:
script: |
if (context.payload.inputs.release_type != 'patch') {
return 'main';
}
const branches = await github.paginate(github.rest.repos.listBranches, {
owner: context.repo.owner,
repo: context.repo.repo,
});
const branch_names = branches.map(branch => branch.name);
console.log(`branches: ${branch_names}`);
const release_branches = branch_names.filter(branch => branch.match(/^v\d+\.\d+\.x$/));
if (release_branches.length === 0) {
core.setFailed('No release branch found!');
return '';
}
console.log(`release_branches: ${release_branches}`);
// Get newest release branch (biggest version number)
const sorted = release_branches.sort((a, b) => a.localeCompare(b, undefined, { numeric: true, sensitivity: 'base' }));
console.log(`sorted: ${sorted}`);
return sorted.at(-1);
result-encoding: string
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
# Doesn't really matter what we prepare the release with, but let's
# use the same version for consistency.
python-version: ${{ github.event.inputs.python_version }}
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U -r misc/requirements/requirements-tox.txt
- name: Configure git
run: |
git config --global user.name "qutebrowser bot"
git config --global user.email "bot@qutebrowser.org"
- name: Switch to release branch
uses: actions/checkout@v6
with:
ref: ${{ steps.find-branch.outputs.result }}
- name: Import GPG Key
run: |
gpg --import <<< "${{ secrets.QUTEBROWSER_BOT_GPGKEY }}"
- name: Bump version
id: bump
run: "tox -e update-version -- ${{ inputs.release_type }}"
- name: Check milestone
uses: actions/github-script@v8
with:
script: |
const milestones = await github.paginate(github.rest.issues.listMilestones, {
owner: context.repo.owner,
repo: context.repo.repo,
});
const names = milestones.map(milestone => milestone.title);
console.log(`milestones: ${names}`);
const milestone = milestones.find(milestone => milestone.title === "v${{ steps.bump.outputs.version }}");
if (milestone !== undefined) {
core.setFailed(`Found open milestone ${milestone.title} with ${milestone.open_issues} open and ${milestone.closed_issues} closed issues!`);
}
- name: Push release commit/tag
if: ${{ inputs.release_type != 'reupload' }}
run: |
git push origin ${{ steps.find-branch.outputs.result }}
git push origin v${{ steps.bump.outputs.version }}
- name: Cherry-pick release commit
if: ${{ inputs.release_type == 'patch' }}
run: |
git fetch origin main
git checkout main
git cherry-pick -x v${{ steps.bump.outputs.version }}
git push origin main
git checkout v${{ steps.bump.outputs.version_x }}
- name: Create release branch
if: ${{ inputs.release_type == 'minor' || inputs.release_type == 'major' }}
run: |
git checkout -b v${{ steps.bump.outputs.version_x }}
git push --set-upstream origin v${{ steps.bump.outputs.version_x }}
- name: Create GitHub draft release
if: ${{ inputs.release_type != 'reupload' }}
id: create-release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.bump.outputs.version }}
draft: true
body: "*Release artifacts for this release are currently being uploaded...*"
- name: Find GitHub draft release
if: ${{ inputs.release_type == 'reupload' }}
id: find-release
uses: actions/github-script@v8
with:
script: |
const releases = await github.paginate(github.rest.repos.listReleases, {
owner: context.repo.owner,
repo: context.repo.repo,
});
const names = releases.map(release => release.name);
console.log(`releases: ${names}`);
const release = releases.find(release => release.tag_name === "v${{ steps.bump.outputs.version }}");
if (release === undefined) {
core.setFailed(`No release found with tag v${{ steps.bump.outputs.version }}!`);
}
if (!release.draft) {
core.setFailed(`Release ${release.tag_name} is not a draft release!`);
}
return release.id;
result-encoding: string
release:
strategy:
matrix:
include:
- os: macos-14-large # Intel
- os: macos-14 # Apple Silicon
- os: windows-2022
- os: ubuntu-24.04
runs-on: "${{ matrix.os }}"
timeout-minutes: 45
needs: [prepare]
permissions:
contents: write # To upload release artifacts
steps:
- uses: actions/checkout@v6
with:
ref: v${{ inputs.release_type == 'reupload' && needs.prepare.outputs.version_x || needs.prepare.outputs.version }}
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ inputs.python_version }}
- name: Import GPG Key
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
run: |
gpg --import <<< "${{ secrets.QUTEBROWSER_BOT_GPGKEY }}"
# Needed because of the following import chain:
# - scripts/dev/build_release.py
# - scripts/dev/update_3rdparty.py
# - scripts/dictcli.py
# - qutebrowser/browser/webengine/spell.py
# - utils.message -> utils.usertypes -> utils.qtutils -> qt.gui
# - PyQt6.QtGui
# Some additional packages are needed for a2x to build manpage
- name: Install apt dependencies
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends libegl1 libxml2-utils docbook-xml xsltproc docbook-xsl
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U -r misc/requirements/requirements-tox.txt
# FIXME consider switching to trusted publishers:
# https://blog.pypi.org/posts/2023-04-20-introducing-trusted-publishers/
- name: Build and upload release
run: "tox -e build-release -- --upload --no-confirm ${{ inputs.release_type == 'reupload' && '--reupload' || '' }}"
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.QUTEBROWSER_BOT_PYPI_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
finalize:
runs-on: ubuntu-24.04
timeout-minutes: 5
needs: [prepare, release]
permissions:
contents: write # To change release
steps:
- name: Publish final release
uses: actions/github-script@v8
with:
script: |
await github.rest.repos.updateRelease({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: "${{ needs.prepare.outputs.release_id }}",
draft: false,
body: "Check the [changelog](https://github.com/qutebrowser/qutebrowser/blob/main/doc/changelog.asciidoc) for changes in this release.",
})
irc:
timeout-minutes: 2
continue-on-error: true
runs-on: ubuntu-24.04
needs: [prepare, release, finalize]
if: "${{ always() }}"
steps:
- name: Send success IRC notification
uses: Gottox/irc-message-action@v2
if: "${{ needs.finalize.result == 'success' }}"
with:
server: irc.libera.chat
channel: '#qutebrowser-bots'
nickname: qutebrowser-bot
message: "[${{ github.workflow }}] \u00033Success:\u0003 ${{ github.ref }} https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} (@${{ github.actor }})"
- name: Send main channel IRC notification
uses: Gottox/irc-message-action@v2
if: "${{ needs.finalize.result == 'success' && github.repository == 'qutebrowser/qutebrowser' }}"
with:
server: irc.libera.chat
channel: '#qutebrowser'
nickname: qutebrowser-bot
message: "qutebrowser v${{ needs.prepare.outputs.version }} has been released! https://github.com/${{ github.repository }}/releases/tag/v${{ needs.prepare.outputs.version }}"
- name: Send non-success IRC notification
uses: Gottox/irc-message-action@v2
if: "${{ needs.finalize.result != 'success' }}"
with:
server: irc.libera.chat
channel: '#qutebrowser-bots'
nickname: qutebrowser-bot
message: "[${{ github.workflow }}] \u00034FAIL:\u0003 ${{ github.ref }} https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} (@${{ github.actor }})\n
prepare: ${{ needs.prepare.result }}, release: ${{ needs.release.result}}, finalize: ${{ needs.finalize.result }}"

1
.gitignore vendored
View File

@ -49,6 +49,7 @@ TODO
/scripts/testbrowser/cpp/webengine/testbrowser
/scripts/testbrowser/cpp/webengine/.qmake.stash
/scripts/dev/pylint_checkers/qute_pylint.egg-info
/scripts/dev/pylint_checkers/build
/misc/file_version_info.txt
/doc/extapi/_build
/misc/nsis/include

281
.mypy.ini
View File

@ -1,16 +1,15 @@
[mypy]
python_version = 3.6
python_version = 3.9
### --strict
warn_unused_configs = True
# disallow_any_generics = True
disallow_any_generics = True
disallow_subclassing_any = True
# disallow_untyped_calls = True
# disallow_untyped_defs = True
disallow_untyped_defs = True
disallow_incomplete_defs = True
check_untyped_defs = True
disallow_untyped_decorators = True
# no_implicit_optional = True
warn_redundant_casts = True
warn_unused_ignores = True
# warn_return_any = True
@ -20,101 +19,255 @@ strict_equality = True
### Other strictness flags
warn_unreachable = True
disallow_any_unimported = True
enable_error_code = ignore-without-code
strict_bytes = True
### Output
show_error_codes = True
show_error_context = True
pretty = True
[mypy-colorama]
# https://github.com/tartley/colorama/issues/206
ignore_missing_imports = 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
[mypy-pygments.*]
# https://github.com/pygments/pygments/issues/1189
[mypy-objc]
# https://github.com/ronaldoussoren/pyobjc/issues/417
ignore_missing_imports = True
[mypy-qutebrowser.browser.browsertab]
disallow_untyped_defs = True
[mypy-AppKit]
# https://github.com/ronaldoussoren/pyobjc/issues/417
ignore_missing_imports = True
[mypy-qutebrowser.browser.hints]
disallow_untyped_defs = True
[mypy-qutebrowser.browser.webkit.*]
ignore_errors = True
[mypy-qutebrowser.browser.inspector]
disallow_untyped_defs = True
[mypy-qutebrowser.config.configtypes]
# Needs some major work to use specific generics
disallow_any_generics = False
[mypy-qutebrowser.browser.webkit.webkitinspector]
disallow_untyped_defs = True
# Modules that are not fully typed yet
[mypy-qutebrowser.app]
disallow_untyped_defs = False
[mypy-qutebrowser.browser.webengine.webengineinspector]
disallow_untyped_defs = True
[mypy-qutebrowser.browser.commands]
disallow_untyped_defs = False
[mypy-qutebrowser.browser.webengine.notification]
disallow_untyped_defs = True
[mypy-qutebrowser.browser.downloads]
disallow_untyped_defs = False
[mypy-qutebrowser.misc.guiprocess]
disallow_untyped_defs = True
[mypy-qutebrowser.browser.downloadview]
disallow_untyped_defs = False
[mypy-qutebrowser.misc.objects]
disallow_untyped_defs = True
[mypy-qutebrowser.browser.eventfilter]
disallow_untyped_defs = False
[mypy-qutebrowser.misc.quitter]
disallow_untyped_defs = True
[mypy-qutebrowser.browser.greasemonkey]
disallow_untyped_defs = False
[mypy-qutebrowser.misc.debugcachestats]
disallow_untyped_defs = True
[mypy-qutebrowser.browser.history]
disallow_untyped_defs = False
[mypy-qutebrowser.misc.elf]
disallow_untyped_defs = True
[mypy-qutebrowser.browser.navigate]
disallow_untyped_defs = False
[mypy-qutebrowser.misc.utilcmds]
disallow_untyped_defs = True
[mypy-qutebrowser.browser.network.pac]
disallow_untyped_defs = False
[mypy-qutebrowser.misc.throttle]
disallow_untyped_defs = True
[mypy-qutebrowser.browser.network.proxy]
disallow_untyped_defs = False
[mypy-qutebrowser.misc.backendproblem]
disallow_untyped_defs = True
[mypy-qutebrowser.browser.pdfjs]
disallow_untyped_defs = False
[mypy-qutebrowser.config.*]
disallow_untyped_defs = True
[mypy-qutebrowser.browser.qtnetworkdownloads]
disallow_untyped_defs = False
[mypy-qutebrowser.api.*]
disallow_untyped_defs = True
[mypy-qutebrowser.browser.shared]
disallow_untyped_defs = False
[mypy-qutebrowser.components.*]
disallow_untyped_defs = True
[mypy-qutebrowser.browser.signalfilter]
disallow_untyped_defs = False
[mypy-qutebrowser.extensions.*]
disallow_untyped_defs = True
[mypy-qutebrowser.browser.urlmarks]
disallow_untyped_defs = False
[mypy-qutebrowser.browser.webelem]
disallow_untyped_defs = True
[mypy-qutebrowser.browser.webengine.cookies]
disallow_untyped_defs = False
[mypy-qutebrowser.browser.webkit.webkitelem]
disallow_untyped_defs = True
[mypy-qutebrowser.browser.webengine.interceptor]
disallow_untyped_defs = False
[mypy-qutebrowser.browser.webengine.webengineelem]
disallow_untyped_defs = True
[mypy-qutebrowser.browser.webengine.spell]
disallow_untyped_defs = False
[mypy-qutebrowser.browser.webengine.darkmode]
disallow_untyped_defs = True
[mypy-qutebrowser.browser.webengine.tabhistory]
disallow_untyped_defs = False
[mypy-qutebrowser.keyinput.*]
disallow_untyped_defs = True
[mypy-qutebrowser.browser.webengine.webenginedownloads]
disallow_untyped_defs = False
[mypy-qutebrowser.utils.*]
disallow_untyped_defs = True
[mypy-qutebrowser.browser.webengine.webenginequtescheme]
disallow_untyped_defs = False
[mypy-qutebrowser.mainwindow.statusbar.command]
disallow_untyped_defs = True
[mypy-qutebrowser.browser.webengine.webenginesettings]
disallow_untyped_defs = False
[mypy-qutebrowser.browser.qutescheme]
disallow_untyped_defs = True
[mypy-qutebrowser.browser.webengine.webenginetab]
disallow_untyped_defs = False
[mypy-qutebrowser.browser.webengine.webview]
disallow_untyped_defs = False
[mypy-qutebrowser.commands.argparser]
disallow_untyped_defs = False
[mypy-qutebrowser.commands.cmdexc]
disallow_untyped_defs = False
[mypy-qutebrowser.commands.command]
disallow_untyped_defs = False
[mypy-qutebrowser.commands.runners]
disallow_untyped_defs = False
[mypy-qutebrowser.commands.userscripts]
disallow_untyped_defs = False
[mypy-qutebrowser.completion.completer]
disallow_untyped_defs = False
[mypy-qutebrowser.completion.completiondelegate]
disallow_untyped_defs = False
[mypy-qutebrowser.completion.completionwidget]
disallow_untyped_defs = False
[mypy-qutebrowser.completion.models.completionmodel]
disallow_untyped_defs = False
[mypy-qutebrowser.completion.models.configmodel]
disallow_untyped_defs = False
[mypy-qutebrowser.completion.models.histcategory]
disallow_untyped_defs = False
[mypy-qutebrowser.completion.models.listcategory]
disallow_untyped_defs = False
[mypy-qutebrowser.completion.models.miscmodels]
disallow_untyped_defs = False
[mypy-qutebrowser.completion.models.urlmodel]
disallow_untyped_defs = False
[mypy-qutebrowser.completion.models.util]
disallow_untyped_defs = False
[mypy-qutebrowser.mainwindow.mainwindow]
disallow_untyped_defs = False
[mypy-qutebrowser.mainwindow.messageview]
disallow_untyped_defs = False
[mypy-qutebrowser.mainwindow.prompt]
disallow_untyped_defs = False
[mypy-qutebrowser.mainwindow.statusbar.backforward]
disallow_untyped_defs = False
[mypy-qutebrowser.mainwindow.statusbar.bar]
disallow_untyped_defs = False
[mypy-qutebrowser.mainwindow.statusbar.clock]
disallow_untyped_defs = False
[mypy-qutebrowser.mainwindow.statusbar.keystring]
disallow_untyped_defs = False
[mypy-qutebrowser.mainwindow.statusbar.percentage]
disallow_untyped_defs = False
[mypy-qutebrowser.mainwindow.statusbar.progress]
disallow_untyped_defs = False
[mypy-qutebrowser.mainwindow.statusbar.tabindex]
disallow_untyped_defs = False
[mypy-qutebrowser.mainwindow.statusbar.textbase]
disallow_untyped_defs = False
[mypy-qutebrowser.mainwindow.statusbar.url]
disallow_untyped_defs = False
[mypy-qutebrowser.mainwindow.tabbedbrowser]
disallow_untyped_defs = False
[mypy-qutebrowser.mainwindow.tabwidget]
disallow_untyped_defs = False
[mypy-qutebrowser.mainwindow.windowundo]
disallow_untyped_defs = False
[mypy-qutebrowser.misc.autoupdate]
disallow_untyped_defs = False
[mypy-qutebrowser.misc.checkpyver]
disallow_untyped_defs = False
[mypy-qutebrowser.misc.cmdhistory]
disallow_untyped_defs = False
[mypy-qutebrowser.misc.consolewidget]
disallow_untyped_defs = False
[mypy-qutebrowser.misc.crashdialog]
disallow_untyped_defs = False
[mypy-qutebrowser.misc.crashsignal]
disallow_untyped_defs = False
[mypy-qutebrowser.misc.earlyinit]
disallow_untyped_defs = False
[mypy-qutebrowser.misc.editor]
disallow_untyped_defs = False
[mypy-qutebrowser.misc.httpclient]
disallow_untyped_defs = False
[mypy-qutebrowser.misc.ipc]
disallow_untyped_defs = False
[mypy-qutebrowser.misc.keyhintwidget]
disallow_untyped_defs = False
[mypy-qutebrowser.misc.lineparser]
disallow_untyped_defs = False
[mypy-qutebrowser.misc.miscwidgets]
disallow_untyped_defs = False
[mypy-qutebrowser.misc.msgbox]
disallow_untyped_defs = False
[mypy-qutebrowser.misc.pastebin]
disallow_untyped_defs = False
[mypy-qutebrowser.misc.savemanager]
disallow_untyped_defs = False
[mypy-qutebrowser.misc.sessions]
disallow_untyped_defs = False
[mypy-qutebrowser.misc.split]
disallow_untyped_defs = False
[mypy-qutebrowser.qutebrowser]
disallow_untyped_defs = False
[mypy-qutebrowser.completion.models.filepathcategory]
disallow_untyped_defs = True

View File

@ -1,27 +1,28 @@
# vim: ft=dosini fileencoding=utf-8:
[MASTER]
ignore=resources.py
extension-pkg-whitelist=PyQt5,sip
extension-pkg-whitelist=PyQt5,PyQt6,sip
load-plugins=qute_pylint.config,
qute_pylint.modeline,
qute_pylint.openencoding,
pylint.extensions.docstyle,
pylint.extensions.emptystring,
pylint.extensions.broad_try_clause,
pylint.extensions.overlapping_exceptions,
persistent=n
pylint.extensions.code_style,
pylint.extensions.comparison_placement,
pylint.extensions.for_any_all,
pylint.extensions.docstyle,
pylint.extensions.check_elif,
pylint.extensions.typing,
pylint.extensions.docparams,
pylint.extensions.private_import,
pylint.extensions.dict_init_mutate,
pylint.extensions.dunder
[broad_try_clause]
max-try-statements=7
persistent=n
py-version=3.9
[MESSAGES CONTROL]
enable=all
disable=locally-disabled,
locally-enabled,
suppressed-message,
fixme,
no-self-use,
cyclic-import,
blacklisted-name,
logging-format-interpolation,
@ -46,7 +47,19 @@ disable=locally-disabled,
too-many-statements,
too-few-public-methods,
import-outside-toplevel,
bad-continuation # This lint disagrees with Black
consider-using-f-string,
consider-using-assignment-expr,
logging-fstring-interpolation,
raise-missing-from,
consider-using-tuple,
consider-using-namedtuple-or-dataclass,
missing-raises-doc,
missing-type-doc,
missing-param-doc,
useless-param-doc,
wrong-import-order, # doesn't work with qutebrowser.qt, even with known-third-party set
ungrouped-imports, # ditto
use-implicit-booleaness-not-comparison-to-zero,
[BASIC]
function-rgx=[a-z_][a-z0-9_]{2,50}$
@ -58,10 +71,13 @@ argument-rgx=[a-z_][a-z0-9_]{0,30}$
variable-rgx=[a-z_][a-z0-9_]{0,30}$
docstring-min-length=3
no-docstring-rgx=(^_|^main$)
class-const-naming-style=snake_case
max-positional-arguments=7
[FORMAT]
max-line-length=88
ignore-long-lines=(<?https?://|file://|^# Copyright 201\d|link:)
# FIXME:v4 (lint) down to 88 again once we use black
max-line-length=190
ignore-long-lines=(<?https?://|file://|link:)
expected-line-ending-format=LF
[VARIABLES]

View File

@ -4,7 +4,7 @@ recursive-include qutebrowser/javascript *.js
graft tests
graft qutebrowser/html
graft qutebrowser/3rdparty
graft icons
graft qutebrowser/icons
graft doc/img
graft misc/apparmor
graft misc/userscripts
@ -32,6 +32,7 @@ include doc/qutebrowser.1.asciidoc
include doc/changelog.asciidoc
prune qutebrowser/3rdparty
exclude mypy.ini
exclude pyrightconfig.json
exclude tox.ini
exclude qutebrowser/javascript/.eslintrc.yaml
exclude qutebrowser/javascript/.eslintignore

View File

@ -1,22 +1,24 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// If you are reading this in plaintext or on PyPi:
//
// A rendered version is available at:
// https://github.com/qutebrowser/qutebrowser/blob/master/README.asciidoc
// https://github.com/qutebrowser/qutebrowser/blob/main/README.asciidoc
qutebrowser
===========
// QUTE_WEB_HIDE
image:icons/qutebrowser-64x64.png[qutebrowser logo] *A keyboard-driven, vim-like browser based on PyQt5 and Qt.*
image:qutebrowser/icons/qutebrowser-64x64.png[qutebrowser logo] *A keyboard-driven, vim-like browser based on Python and Qt.*
image:https://github.com/qutebrowser/qutebrowser/workflows/CI/badge.svg["Build Status", link="https://github.com/qutebrowser/qutebrowser/actions?query=workflow%3ACI"]
image:https://codecov.io/github/qutebrowser/qutebrowser/coverage.svg?branch=master["coverage badge",link="https://codecov.io/github/qutebrowser/qutebrowser?branch=master"]
image:https://codecov.io/github/qutebrowser/qutebrowser/coverage.svg?branch=main["coverage badge",link="https://codecov.io/github/qutebrowser/qutebrowser?branch=main"]
link:https://www.qutebrowser.org[website] | link:https://blog.qutebrowser.org[blog] | https://github.com/qutebrowser/qutebrowser/blob/master/doc/faq.asciidoc[FAQ] | https://www.qutebrowser.org/doc/contributing.html[contributing] | link:https://github.com/qutebrowser/qutebrowser/releases[releases] | https://github.com/qutebrowser/qutebrowser/blob/master/doc/install.asciidoc[installing]
link:https://www.qutebrowser.org[website] | link:https://blog.qutebrowser.org[blog] | https://github.com/qutebrowser/qutebrowser/blob/main/doc/faq.asciidoc[FAQ] | https://www.qutebrowser.org/doc/contributing.html[contributing] | link:https://github.com/qutebrowser/qutebrowser/releases[releases] | https://github.com/qutebrowser/qutebrowser/blob/main/doc/install.asciidoc[installing]
// QUTE_WEB_HIDE_END
qutebrowser is a keyboard-focused browser with a minimal GUI. It's based
on Python and PyQt5 and free software, licensed under the GPL.
on Python and Qt and free software, licensed under the GPL.
It was inspired by other browsers/addons like dwb and Vimperator/Pentadactyl.
@ -24,9 +26,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/main/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
@ -40,7 +44,7 @@ image:doc/img/hints.png["screenshot 4",width=300,link="doc/img/hints.png"]
Downloads
---------
See the https://github.com/qutebrowser/qutebrowser/releases[github releases
See the https://github.com/qutebrowser/qutebrowser/releases[GitHub releases
page] for available downloads and the link:doc/install.asciidoc[INSTALL] file for
detailed instructions on how to get qutebrowser running on various platforms.
@ -63,27 +67,32 @@ ways:
* Use the built-in `:report` command or the automatic crash dialog.
* Open an issue in the Github issue tracker.
* Write a mail to the
https://lists.schokokeks.org/mailman/listinfo.cgi/qutebrowser[mailinglist] at
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
------------
The following software and libraries are required to run qutebrowser:
* https://www.python.org/[Python] 3.6.1 or newer
* https://www.qt.io/[Qt] 5.12.0 or newer (5.12 LTS or 5.15 recommended)
with the following modules:
* https://www.python.org/[Python] 3.9 or newer
* https://www.qt.io/[Qt], either 6.2.0 or newer, or 5.15.0 or newer, with the following modules:
- QtCore / qtbase
- QtQuick (part of qtbase or qtdeclarative in some distributions)
- QtSQL (part of qtbase in some distributions)
- QtDBus (part of qtbase in some distributions; note that a connection to DBus at
runtime is optional)
- QtOpenGL
- QtWebEngine, or
- QtWebEngine (if using Qt 5, 5.15.2 or newer), or
- alternatively QtWebKit (5.212) - **This is not recommended** due to known security
issues in QtWebKit, you most likely want to use qutebrowser with the
default QtWebEngine backend (based on Chromium) instead. Quoting the
@ -91,15 +100,14 @@ The following software and libraries are required to run qutebrowser:
_[The latest QtWebKit] release is based on [an] old WebKit revision with known
unpatched vulnerabilities. Please use it carefully and avoid visiting untrusted
websites and using it for transmission of sensitive data._
* https://www.riverbankcomputing.com/software/pyqt/intro[PyQt] 5.12.0 or newer
for Python 3
* https://www.riverbankcomputing.com/software/pyqt/intro[PyQt] 6.2.2 or newer
(Qt 6) or 5.15.0 or newer (Qt 5)
* https://palletsprojects.com/p/jinja/[jinja2]
* https://github.com/yaml/pyyaml[PyYAML]
On older Python versions (3.6/3.7/3.8), the following backports are also required:
On macOS, the following libraries are also required:
* https://importlib-resources.readthedocs.io/[importlib_resources] (Python 3.8 or older)
* https://github.com/ericvsmith/dataclasses[dataclasses] (Python 3.6 only)
* https://pyobjc.readthedocs.io/en/latest/[pyobjc-core and pyobjc-framework-Cocoa]
The following libraries are optional:
@ -109,10 +117,6 @@ The following libraries are optional:
QtWebEngine backend.
* On Windows, https://pypi.python.org/pypi/colorama/[colorama] for colored log
output.
* https://importlib-metadata.readthedocs.io/[importlib_resources] on Python 3.7
or older, to improve QtWebEngine version detection when PyQtWebEngine is
installed via pip (thus, this dependency usually isn't relevant for
packagers).
* https://asciidoc.org/[asciidoc] to generate the documentation for the `:help`
command, when using the git repository (rather than a release).
@ -132,13 +136,16 @@ level, you can get qutebrowser t-shirts, stickers and more!
GitHub Sponsors allows for one-time donations (using the buttons next to "Select a
tier") as well as custom amounts. **For currencies other than Euro or Swiss Francs, this
is the preferred donation method.** GitHub uses https://stripe.com/[Stripe] to accept
payment via credit carts without any fees. Billing via PayPal is available as well, with
payment via credit cards without any fees. Billing via PayPal is available as well, with
less fees than a direct PayPal transaction.
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
@ -146,13 +153,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&currency_code=CHF&source=url[CHF],
https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=me%40the-compiler.org&item_name=qutebrowser&currency_code=EUR&source=url[EUR],
https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=me%40the-compiler.org&item_name=qutebrowser&currency_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]
@ -202,23 +212,20 @@ Active
~~~~~~
* https://fanglingsu.github.io/vimb/[vimb] (C, GTK+ with WebKit2)
* https://luakit.github.io/luakit/[luakit] (C/Lua, GTK+ with WebKit2)
* https://nyxt.atlas.engineer/[Nyxt browser] (formerly "Next browser", Lisp, Emacs-like but also offers Vim bindings, QtWebKit or GTK+/WebKit2 - note there was a https://jgkamat.gitlab.io/blog/next-rce.html[critical remote code execution] which was handled quite badly)
* https://luakit.github.io/[luakit] (C/Lua, GTK+ with WebKit2)
* https://nyxt.atlas.engineer/[Nyxt browser] (formerly "Next browser", Lisp, Emacs-like but also offers Vim bindings, QtWebEngine or GTK+/WebKit2 - note there was a https://jgkamat.gitlab.io/blog/next-rce.html[critical remote code execution in 2019] which was handled quite badly)
* https://vieb.dev/[Vieb] (JavaScript, Electron)
* https://surf.suckless.org/[surf] (C, GTK+ with WebKit1/WebKit2)
* https://github.com/jun7/wyeb[wyeb] (C, GTK+ with WebKit2)
* Chrome/Chromium addons:
https://vimium.github.io/[Vimium],
https://github.com/dcchambers/vb4c[vb4c] (fork of cVim)
https://vimium.github.io/[Vimium]
* Firefox addons (based on WebExtensions):
https://github.com/tridactyl/tridactyl[Tridactyl],
https://addons.mozilla.org/en-GB/firefox/addon/vimium-ff/[Vimium-FF] (experimental),
https://github.com/ueokande/vim-vixen[Vim Vixen],
https://github.com/amedama41/vvimpulation[VVimpulation]
https://tridactyl.xyz/[Tridactyl],
https://addons.mozilla.org/en-GB/firefox/addon/vimium-ff/[Vimium-FF]
* Addons for Firefox and Chrome:
https://github.com/brookhong/Surfingkeys[Surfingkeys],
https://krabby.netlify.com/[Krabby],
https://lydell.github.io/LinkHints/[Link Hints] (hinting only)
* Addons for Safari:
https://televator.net/vimari/[Vimari]
https://github.com/brookhong/Surfingkeys[Surfingkeys] (https://github.com/brookhong/Surfingkeys/issues/1796[somewhat sketchy]...),
https://lydell.github.io/LinkHints/[Link Hints] (hinting only),
https://github.com/ueokande/vimmatic[Vimmatic]
Inactive
~~~~~~~~
@ -230,25 +237,29 @@ main inspiration for qutebrowser)
QtWebEngine, https://github.com/parkouss/webmacs/issues/137[unmaintained])
* https://sourceforge.net/p/vimprobable/wiki/Home/[vimprobable] (C, GTK+ with
WebKit1)
* https://wiki.archlinux.org/index.php?title=Jumanji[jumanji] (C, GTK+ with WebKit1,
original site is gone but the Arch Linux wiki has some data)
* https://pwmt.org/projects/jumanji/[jumanji] (C, GTK+ with WebKit1)
* http://conkeror.org/[conkeror] (Javascript, Emacs-like, XULRunner/Gecko)
* https://www.uzbl.org/[uzbl] (C, GTK+ with WebKit1/WebKit2)
* https://github.com/conformal/xombrero[xombrero] (C, GTK+ with WebKit1)
* https://github.com/linkdd/cream-browser[Cream Browser] (C, GTK+ with WebKit1)
* https://surf.suckless.org/[surf] (C, GTK+ with WebKit1/WebKit2)
* Firefox addons (not based on WebExtensions or no recent activity):
http://www.vimperator.org/[Vimperator],
http://bug.5digits.org/pentadactyl/index[Pentadactyl],
https://github.com/akhodakivskiy/VimFx[VimFx] (seems to offer a
https://gir.st/blog/legacyfox.htm[hack] to run on modern Firefox releases),
https://github.com/shinglyu/QuantumVim[QuantumVim]
https://github.com/shinglyu/QuantumVim[QuantumVim],
https://github.com/ueokande/vim-vixen[Vim Vixen],
https://github.com/amedama41/vvimpulation[VVimpulation],
https://krabby.netlify.app/[Krabby]
* Chrome/Chromium addons:
https://github.com/k2nr/ViChrome/[ViChrome],
https://github.com/jinzhu/vrome[Vrome],
https://github.com/lusakasa/saka-key[Saka Key] (https://github.com/lusakasa/saka-key/issues/171[unmaintained]),
https://github.com/1995eaton/chromium-vim[cVim],
https://github.com/dcchambers/vb4c[vb4c] (fork of cVim, https://github.com/dcchambers/vb4c/issues/23#issuecomment-810694017[unmaintained]),
https://glee.github.io/[GleeBox]
* Addons for Safari:
https://televator.net/vimari/[Vimari]
License
-------

View File

@ -1,6 +1,14 @@
Crowdfunding backers
====================
2019+
-----
Since late 2019, qutebrowser is taking recurring donations via
https://github.com/sponsors/The-Compiler/[GitHub Sponsors] and
https://liberapay.com/The-Compiler/[Liberapay]. You can find Sponsors/Patrons
who opted to be listed as public on the respective pages. **Thank you!**
2017
----

File diff suppressed because it is too large Load Diff

View File

@ -24,11 +24,11 @@ several ways:
* Send a mail to the mailing list at mailto:qutebrowser@lists.qutebrowser.org[]
(optionally
https://lists.schokokeks.org/mailman/listinfo.cgi/qutebrowser[subscribe]
https://listi.jpberlin.de/mailman/listinfo/qutebrowser[subscribe]
first).
* Join the IRC channel irc://irc.freenode.org/#qutebrowser[`#qutebrowser`] on
https://freenode.net/[Freenode]
(https://webchat.freenode.net/?channels=#qutebrowser[webchat]).
* Join the IRC channel link:ircs://irc.libera.chat:6697/#qutebrowser[`#qutebrowser`] on
https://libera.chat/[Libera Chat] (https://web.libera.chat/#qutebrowser[webchat],
https://matrix.to/#qutebrowser:libera.chat[via Matrix]).
Finding something to work on
----------------------------
@ -41,7 +41,7 @@ If you want to find something useful to do, check the
https://github.com/qutebrowser/qutebrowser/issues[issue tracker]. Some
pointers:
* https://github.com/qutebrowser/qutebrowser/labels/easy[Issues which should
* https://github.com/qutebrowser/qutebrowser/contribute[Issues which should
be easy to solve]
* https://github.com/qutebrowser/qutebrowser/labels/component%3A%20docs[Documentation issues which require little/no coding]
@ -84,9 +84,9 @@ If you prefer to send a patch to the mailinglist, you can generate a patch
based on your changes like this:
----
git format-patch origin/master <1>
git format-patch origin/main <1>
----
<1> Replace `master` by the branch your work was based on, e.g.,
<1> Replace `main` by the branch your work was based on, e.g.,
`origin/develop`.
Running qutebrowser
@ -111,9 +111,9 @@ unittests and several linters/checkers.
Currently, the following tox environments are available:
* Tests using https://www.pytest.org[pytest]:
- `py36`, `py37`, ...: Run pytest for python 3.6/3.7/... with the system-wide PyQt.
- `py36-pyqt512`, ..., `py36-pyqt515`: Run pytest with the given PyQt version (`py35-*` also works).
- `py36-pyqt515-cov`: Run with coverage support (other Python/PyQt versions work too).
- `py39`, `py310`, ...: Run pytest for python 3.9/3.10/... with the system-wide PyQt.
- `py39-pyqt515`, ..., `py39-pyqt65`: Run pytest with the given PyQt version (`py310-*` etc. also works).
- `py39-pyqt515-cov`: Run with coverage support (other Python/PyQt versions work too).
* `flake8`: Run various linting checks via https://pypi.python.org/pypi/flake8[flake8].
* `vulture`: Run https://pypi.python.org/pypi/vulture[vulture] to find
unused code portions.
@ -121,13 +121,14 @@ Currently, the following tox environments are available:
* `pyroma`: Check packaging practices with
https://pypi.python.org/pypi/pyroma/[pyroma].
* `eslint`: Run https://eslint.org/[ESLint] javascript checker.
* `check-manifest`: Check MANIFEST.in completeness with
https://github.com/mgedmin/check-manifest[check-manifest].
* `mkvenv`: Bootstrap a virtualenv for testing.
* `misc`: Run `scripts/misc_checks.py` to check for:
- untracked git files
- VCS conflict markers
- common spelling mistakes
* http://mypy-lang.org/[mypy] for static type checking:
- `mypy-pyqt5` run mypy with PyQt5 installed
- `mypy-pyqt6` run mypy with PyQt6 installed
The default test suite is run with `tox`; the list of default
environments is obtained with `tox -l`.
@ -153,7 +154,7 @@ smallest scope which makes sense. Most of the time, this will be line scope.
false-positives, let me know! I'm still tweaking the parameters.
Running Specific Tests
Running specific tests
~~~~~~~~~~~~~~~~~~~~~~
While you are developing you often don't want to run the full test
@ -168,16 +169,47 @@ Examples:
----
# run only pytest tests which failed in last run:
tox -e py35 -- --lf
tox -e py39 -- --lf
# run only the end2end feature tests:
tox -e py35 -- tests/end2end/features
tox -e py39 -- tests/end2end/features
# run everything with undo in the generated name, based on the scenario text
tox -e py35 -- tests/end2end/features/test_tabs_bdd.py -k undo
tox -e py39 -- tests/end2end/features/test_tabs_bdd.py -k undo
# run coverage test for specific file (updates htmlcov/index.html)
tox -e py35-cov -- tests/unit/browser/test_webelem.py
tox -e py39-cov -- tests/unit/browser/test_webelem.py
----
Specifying the backend for tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tests automatically pick the backend based on what they manage to import. If
you have both backends available and you would like the tests to be run with a
specific one you can set either of a) the environment variable QUTE_TESTS_BACKEND
, or b) the command line argument --qute-backend, to the desired backend
(webkit/webengine).
If you need an environment with webkit installed to do testing while we still
support it (see #4039) you can re-use the docker container used for the CI
test runs which has PyQt5Webkit installed from the archlinux package archives.
Examples:
----
# Get a bash shell in the docker container with
# a) the current directory mounted at /work in the container
# b) the container using the X11 display :27 (for example, a Xephyr instance) from the host
# c) the tox and hypothesis dirs set to somewhere in the container that it can write to
# d) the system site packages available in the tox venv so you can use PyQt
# from the OS without having to run the link_pyqt script
docker run -it -v $PWD:/work:ro -w /work -e QUTE_TESTS_BACKEND=webkit -e DISPLAY=:27 -v /tmp/.X11-unix:/tmp/.X11-unix -e TOX_WORK_DIR="/home/user/.tox" -e HYPOTHESIS_EXAMPLES_DIR="/home/user/.hypothesis/examples" -e VIRTUALENV_SYSTEM_SITE_PACKAGES=True qutebrowser/ci:archlinux-webkit bash
# Start a qutebrowser temporary basedir in the appropriate tox environment to
# play with
tox exec -e py-qt5 -- python3 -m qutebrowser -T --backend webkit
# Run tests, passing positional args through to pytest.
tox -e py-qt5 -- tests/unit
----
Profiling
@ -219,7 +251,8 @@ Useful websites
Some resources which might be handy:
* https://doc.qt.io/qt-5/classes.html[The Qt5 reference]
* https://doc.qt.io/qt-6/classes.html[The Qt 6 reference]
* https://doc.qt.io/qt-5/classes.html[The Qt 5 reference]
* https://docs.python.org/3/library/index.html[The Python reference]
* https://httpbin.org/[httpbin, a test service for HTTP requests/responses]
* https://requestbin.com/[RequestBin, a service to inspect HTTP requests]
@ -274,7 +307,7 @@ Other
Languages] (https://www.rfc-editor.org/errata_search.php?rfc=5646[Errata])
* https://www.w3.org/TR/CSS2/[Cascading Style Sheets Level 2 Revision 1 (CSS
2.1) Specification]
* https://doc.qt.io/qt-5/stylesheet-reference.html[Qt Style Sheets Reference]
* https://doc.qt.io/qt-6/stylesheet-reference.html[Qt Style Sheets Reference]
* https://mimesniff.spec.whatwg.org/[MIME Sniffing Standard]
* https://spec.whatwg.org/[WHATWG specifications]
* https://www.w3.org/html/wg/drafts/html/master/Overview.html[HTML 5.1 Nightly]
@ -353,7 +386,7 @@ All objects can be printed by starting with the `--debug` flag and using the
The registry is mainly used for <<commands,command handlers>>, but it can
also be useful in places where using Qt's
https://doc.qt.io/qt-5/signalsandslots.html[signals and slots] mechanism would
https://doc.qt.io/qt-6/signalsandslots.html[signals and slots] mechanism would
be difficult.
Logging
@ -544,11 +577,8 @@ ____
Setting up a Windows Development Environment
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Install https://www.python.org/downloads/release/python-362/[Python 3.6].
* Install https://www.python.org/downloads/release/python-3911/[Python 3.9].
* Install PyQt via `pip install PyQt5`.
* Create a file at `C:\Windows\system32\python3.bat` with the following content (adjust the path as necessary):
`@C:\Python36\python %*`.
This will make the Python 3.6 interpreter available as `python3`, which is used by various development scripts.
* Install git from the https://git-scm.com/download/win[git-scm downloads page].
Try not to enable `core.autocrlf`, since that will cause `flake8` to complain a lot. Use an editor that can deal with plain line feeds instead.
* Clone your favourite qutebrowser repository.
@ -565,27 +595,48 @@ Chrome URLs
~~~~~~~~~~~
With the QtWebEngine backend, qutebrowser supports several chrome:// urls which
can be useful for debugging:
can be useful for debugging.
- chrome://appcache-internals/
- chrome://blob-internals/
Info pages:
- chrome://device-log/ (QtWebEngine >= 6.3)
- chrome://gpu/
- chrome://sandbox/ (Linux only)
- chrome://qt/ (QtWebEngine >= 6.7)
Misc. / Debugging pages:
- chrome://dino/
- chrome://histograms/
- chrome://network-errors/
- chrome://tracing/ (QtWebEngine >= 5.15.3)
- chrome://ukm/ (QtWebEngine >= 5.15.3)
- chrome://user-actions/ (QtWebEngine >= 5.15.3)
- chrome://webrtc-logs/ (QtWebEngine >= 5.15.3)
- chrome://extensions/ (QtWebEngine >= 6.10)
Internals pages:
- chrome://accessibility/
- chrome://appcache-internals/ (QtWebEngine < 6.4)
- chrome://attribution-internals/ (QtWebEngine >= 6.4)
- chrome://blob-internals/
- chrome://conversion-internals/ (QtWebEngine >= 5.15.3 and < 6.4)
- chrome://indexeddb-internals/
- chrome://media-internals/
- chrome://network-errors/
- chrome://net-internals/ (QtWebEngine >= 5.15.4)
- chrome://process-internals/
- chrome://quota-internals/
- chrome://serviceworker-internals/
- chrome://webrtc-internals/
Crash/hang pages:
- chrome://crash/ (crashes the current renderer process!)
- chrome://kill/ (kills the current renderer process!)
- chrome://gpuclean/ (crashes the current renderer process!)
- chrome://gpucrash/ (crashes qutebrowser!)
- chrome://gpuhang/ (hangs qutebrowser!)
- chrome://gpuclean/ (crashes the current renderer process!)
- chrome://ppapiflashcrash/
- chrome://ppapiflashhang/
- chrome://quota-internals/
- chrome://taskscheduler-internals/
- chrome://sandbox/ (Linux only)
- chrome://kill/ (kills the current renderer process!)
QtWebEngine internals
~~~~~~~~~~~~~~~~~~~~~
@ -595,11 +646,14 @@ This is mostly useful for qutebrowser maintainers to work around issues in Qt -
The hierarchy of widgets when QtWebEngine is involved looks like this:
- qutebrowser has a `WebEngineTab` object, which is its abstraction over QtWebKit/QtWebEngine.
- The `WebEngineTab` has a `_widget` attribute, which is the https://doc.qt.io/qt-5/qwebengineview.html[QWebEngineView]
- That view has a https://doc.qt.io/qt-5/qwebenginepage.html[QWebEnginePage] for everything which doesn't require rendering.
- The view also has a layout with exactly one element (which also is its `focusProxy()`)
- That element is the https://code.qt.io/cgit/qt/qtwebengine.git/tree/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp[RenderWidgetHostViewQtDelegateWidget] (it inherits https://doc.qt.io/qt-5/qquickwidget.html[QQuickWidget]) - also often referred to as RWHV or RWHVQDW. It can be obtained via `sip.cast(tab._widget.focusProxy(), QQuickWidget)`.
- Calling `rootObject()` on that gives us the https://doc.qt.io/qt-5/qquickitem.html[QQuickItem] where Chromium renders into (?). With it, we can do things like `.setRotation(20)`.
- The `WebEngineTab` has a `_widget` attribute, which is the https://doc.qt.io/qt-6/qwebengineview.html[QWebEngineView]
- That view has a https://doc.qt.io/qt-6/qwebenginepage.html[QWebEnginePage] for everything which doesn't require rendering.
- The view also has a layout with exactly one element (which also is its `focusProxy()`).
- Qt 5: That element is the https://code.qt.io/cgit/qt/qtwebengine.git/tree/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp?h=5.15[RenderWidgetHostViewQtDelegateWidget] (it inherits https://doc.qt.io/qt-6/qquickwidget.html[QQuickWidget]) - also often referred to as RWHV or RWHVQDW.
It can be obtained via `sip.cast(tab._widget.focusProxy(), QQuickWidget)`.
- Qt 6: That element is the https://code.qt.io/cgit/qt/qtwebengine.git/tree/src/webenginewidgets/api/qwebengineview.cpp[WebEngineQuickWidget] (it inherits https://doc.qt.io/qt-6/qquickwidget.html[QQuickWidget]).
It can be obtained via `tab._widget.focusProxy()`.
- Calling `rootObject()` on that gives us the https://doc.qt.io/qt-6/qquickitem.html[QQuickItem] where Chromium renders into (?). With it, we can do things like `.setRotation(20)`.
Style conventions
-----------------
@ -657,7 +711,6 @@ Return:
+
* The layout of a module should be roughly like this:
- Shebang (`#!/usr/bin/python`, if needed)
- vim-modeline (`# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et`)
- Copyright
- GPL boilerplate
- Module docstring
@ -671,6 +724,41 @@ Return:
- `__magic__` methods
- other methods
- overrides of Qt methods
* Type hinting: the qutebrowser codebase uses type hints liberally to enable
static type checking and autocompletion in editors.
- We use http://mypy-lang.org/[mypy] in CI jobs to perform static type
checking.
- Not all of the codebase is covered by type hints currently. We encourage
including type hints on all new code and even adding type hints to
existing code if you find yourself working on some that isn't already
covered. There are some module specific rules in the mypy config file,
`.mypy.ini`, to make type hints strictly required in some areas.
- More often than not mypy is correct when it raises issues. But don't be
afraid to add `# type: ignore[...]` statements or casts if you need to.
As an optional part of the language not all type information from third
parties is always correct. Mypy will raise a new issue if it spots an
"ignore" statement which is no longer needed because the underlying
issue has been resolved.
- One area where we have to take particular care is in code that deals
with differences between PyQt5 and PyQt6. We try to write most code in a
way that will work with either backend but when you need to deal with
differences you should use a pattern like:
+
[source,python]
----
if machinery.IS_QT5:
... # do PyQt5 specific implementation
else:
# PyQt6
... # do PyQt6 specific implementation
----
+
then you have to https://mypy.readthedocs.io/en/latest/command_line.html#cmdoption-mypy-always-true[tell]
mypy to treat `machinery.IS_QT5` as a constant value then run mypy twice to
cover both branches. There are a handful of variables in
`qutebrowser/qt/machinery.py` that mypy needs to know about. There are tox
jobs (`mypy-pyqt5` and `mypy-pyqt6`) that take care of telling mypy to use
them as constants.
Checklists
----------
@ -701,20 +789,35 @@ New PyQt release
qutebrowser release
~~~~~~~~~~~~~~~~~~~
* Make sure there are no unstaged changes and the tests are green.
* Make sure there are no unstaged or unpushed changes.
* Make sure CI is reasonably green.
* Make sure all issues with the related milestone are closed.
* Consider updating the completions for `content.headers.user_agent` in `configdata.yml`.
* Minor release: Consider updating some files from master:
* Mark the https://github.com/qutebrowser/qutebrowser/milestones[milestone] as closed.
* Consider updating the completions for `content.headers.user_agent` in `configdata.yml`
and the Firefox UA in `qutebrowser/browser/webengine/webenginesettings.py`.
* Minor release: Consider updating some files from main:
- `misc/requirements/` and `requirements.txt`
- `scripts/`
* Update changelog in main branch and ensure the correct version number has `(unreleased)`
* If necessary: Update changelog in release branch from main.
**Automatic release via GitHub Actions (starting with v3.0.0):**
* Double check Python version in `.github/workflows/release.yml`
* Run the `release` workflow on the `main` branch, e.g. via `gh workflow run release -f release_type=minor` (`release_type` can be `major`, `minor` or `patch`; you can also override `python_version`)
* Consider running `gh run watch` or `gh run view --web` to watch the progress
**Manual release:**
* Make sure Python is up-to-date on build machines.
* Mark the milestone at https://github.com/qutebrowser/qutebrowser/milestones as closed.
* Update changelog in master branch
* If necessary: Update changelog in release branch from master.
* Run `./.venv/bin/python3 scripts/dev/update_version.py {major,minor,patch}`.
* Run the printed instructions accordingly.
**Post release:**
* Update `qutebrowser-git` PKGBUILD if dependencies/install changed.
* Add unreleased future versions to changelog
* Update IRC topic
* Announce to qutebrowser and qutebrowser-announce mailinglist.
* Post announcement mail to subreddit
* Post on the website formerly known as Twitter

View File

@ -61,7 +61,7 @@ Why Python?::
point, I wasn't comfortable with C++ so that wasn't an alternative.
But isn't Python too slow for a browser?::
https://www.infoworld.com/d/application-development/van-rossum-python-not-too-slow-188715[It's generally less of a problem than one would expect.]
https://www.infoworld.com/article/2303031/van-rossum-python-is-not-too-slow-2.html[It's generally less of a problem than one would expect.]
Most of the heavy lifting of qutebrowser is done by Qt and
QtWebKit/QtWebEngine in C++, with the
https://wiki.python.org/moin/GlobalInterpreterLock[GIL] released.
@ -141,7 +141,7 @@ The comma prefix is used to make sure user-defined bindings don't conflict with
the built-in ones.
+
Note that you might need an additional package (e.g.
https://www.archlinux.org/packages/community/any/youtube-dl/[youtube-dl] on
https://archlinux.org/packages/extra/any/yt-dlp/[yt-dlp] on
Archlinux) to play web videos with mpv.
+
There is a very useful script for mpv, which emulates "unique application"
@ -158,7 +158,7 @@ It also works nicely with rapid hints:
:bind ;M hint --rapid links spawn umpv {hint-url}
----
How do I use qutebrowser with mutt?::
How do I use qutebrowser with mutt/neomutt or other mail clients?::
For security reasons, local files without `.html` extensions aren't
rendered as HTML, see
https://bugs.chromium.org/p/chromium/issues/detail?id=777737[this Chromium issue]
@ -166,8 +166,29 @@ How do I use qutebrowser with mutt?::
extension:
+
----
text/html; qutebrowser %s; needsterminal; nametemplate=%s.html
text/html; qutebrowser %s; needsterminal; nametemplate=%s.html
----
+
Note that you might want to add additional options to qutebrowser, so that it
runs as a separate instance configured to disable JavaScript and avoid network
requests, in order to avoid privacy leaks when reading mails. The easiest way
to do so is by specifying a non-existent proxy server, e.g.:
+
----
qutebrowser --temp-basedir -s content.proxy http://localhost:666 -s content.dns_prefetch false -s content.javascript.enabled false %s
----
+
With Qt 6, using something like:
+
----
qutebrowser --temp-basedir -s content.dns_prefetch false -s content.javascript.enabled false %s
----
+
should lead to a similar result, due to a more restrictive implementation of
the `content.local_content_can_access_remote_urls` setting (`false` by default
already). However, it's advised to use a page like
https://www.emailprivacytester.com/[Email Privacy Tester] to verify your
configuration.
What is the difference between bookmarks and quickmarks?::
Bookmarks will always use the title of the website as their name, but with quickmarks
@ -234,7 +255,7 @@ Why does it take longer to open a URL in qutebrowser than in chromium?::
loaded until it is detected that there is an instance running
to which the URL is then passed. This takes some time.
One workaround is to use this
https://github.com/qutebrowser/qutebrowser/blob/master/scripts/open_url_in_instance.sh[script]
https://github.com/qutebrowser/qutebrowser/blob/main/scripts/open_url_in_instance.sh[script]
and place it in your $PATH with the name "qutebrowser". This
script passes the URL via a unix socket to qutebrowser (if its
running already) using socat which is much faster and starts a new
@ -354,9 +375,9 @@ There is a total of four possible approaches to get dark websites:
of the Dark Reader extension. This is mostly untested, though.
How do I make copy to clipboard buttons work?::
You can `:set content.javascript.can_access_clipboard true`, or
`:set -u some.domain content.javascript.can_access_clipboard true` if you want to limit
the setting to `some.domain`.
You can `:set content.javascript.clipboard access` to allow this globally (not
recommended!), or `:set -u some.domain content.javascript.clipboard access` if
you want to limit the setting to `some.domain`.
== Troubleshooting
@ -409,7 +430,7 @@ allowing him to work part-time on qutebrowser. If you keep your donation level
for long enough, you can get some qutebrowser stickers!
Why GitHub Sponsors?::
GitHub Sponsors is a crowdfundign platform nicely integrated with
GitHub Sponsors is a crowdfunding platform nicely integrated with
qutebrowser's existing GitHub page and a better offering than alternatives such
as Patreon or Liberapay.
+

View File

@ -15,8 +15,10 @@ For command arguments, there are also some variables you can use:
- `{url}` expands to the URL of the current page
- `{url:pretty}` expands to the URL in decoded format
- `{url:host}`, `{url:domain}`, `{url:auth}`, `{url:scheme}`, `{url:username}`,
`{url:password}`, `{url:host}`, `{url:port}`, `{url:path}` and `{url:query}`
`{url:password}`, `{url:port}`, `{url:path}` and `{url:query}`
expand to the respective parts of the current URL
- `{url:yank}` expands to the URL of the current page but strips all the query
parameters in the `url.yank_ignored_parameters` setting.
- `{title}` expands to the current page's title
- `{clipboard}` expands to the clipboard contents
- `{primary}` expands to the primary selection contents
@ -40,6 +42,12 @@ possible to run or bind multiple commands by separating them with `;;`.
|<<clear-messages,clear-messages>>|Clear all message notifications.
|<<click-element,click-element>>|Click the element matching the given filter.
|<<close,close>>|Close the current window.
|<<cmd-edit,cmd-edit>>|Open an editor to modify the current command.
|<<cmd-later,cmd-later>>|Execute a command after some time.
|<<cmd-repeat,cmd-repeat>>|Repeat a given command.
|<<cmd-repeat-last,cmd-repeat-last>>|Repeat the last executed command.
|<<cmd-run-with-count,cmd-run-with-count>>|Run a command with the given count.
|<<cmd-set-text,cmd-set-text>>|Preset the statusbar to some text.
|<<config-clear,config-clear>>|Set all settings back to their default.
|<<config-cycle,config-cycle>>|Cycle an option between multiple values.
|<<config-dict-add,config-dict-add>>|Add a key/value pair to a dictionary option.
@ -60,7 +68,6 @@ possible to run or bind multiple commands by separating them with `;;`.
|<<download-open,download-open>>|Open the last/[count]th download.
|<<download-remove,download-remove>>|Remove the last/[count]th download from the list.
|<<download-retry,download-retry>>|Retry the first failed/[count]th download.
|<<edit-command,edit-command>>|Open an editor to modify the current command.
|<<edit-text,edit-text>>|Open an external editor with the currently selected form field.
|<<edit-url,edit-url>>|Navigate to a url formed in an external editor.
|<<fake-key,fake-key>>|Send a fake keypress or key string to the website or qutebrowser.
@ -75,7 +82,6 @@ possible to run or bind multiple commands by separating them with `;;`.
|<<insert-text,insert-text>>|Insert text at cursor position.
|<<jseval,jseval>>|Evaluate a JavaScript string.
|<<jump-mark,jump-mark>>|Jump to the mark named by `key`.
|<<later,later>>|Execute a command after some time.
|<<macro-record,macro-record>>|Start or stop recording a macro.
|<<macro-run,macro-run>>|Run a recorded macro.
|<<message-error,message-error>>|Show an error message in the statusbar.
@ -94,11 +100,8 @@ possible to run or bind multiple commands by separating them with `;;`.
|<<quickmark-save,quickmark-save>>|Save the current page as a quickmark.
|<<quit,quit>>|Quit qutebrowser.
|<<reload,reload>>|Reload the current/[count]th tab.
|<<repeat,repeat>>|Repeat a given command.
|<<repeat-command,repeat-command>>|Repeat the last executed command.
|<<report,report>>|Report a bug in qutebrowser.
|<<restart,restart>>|Restart qutebrowser while keeping existing tabs open.
|<<run-with-count,run-with-count>>|Run a command with the given count.
|<<save,save>>|Save configs and state.
|<<screenshot,screenshot>>|Take a screenshot of the currently shown part of the page.
|<<scroll,scroll>>|Scroll the current tab in the given direction.
@ -114,7 +117,6 @@ possible to run or bind multiple commands by separating them with `;;`.
|<<session-load,session-load>>|Load a session.
|<<session-save,session-save>>|Save a session.
|<<set,set>>|Set an option.
|<<set-cmd-text,set-cmd-text>>|Preset the statusbar to some text.
|<<set-mark,set-mark>>|Set a mark at the current scroll position in the current tab.
|<<spawn,spawn>>|Spawn an external command.
|<<stop,stop>>|Stop loading in the current/[count]th tab.
@ -146,7 +148,7 @@ Update block lists for both the host- and the Brave ad blocker.
[[back]]
=== back
Syntax: +:back [*--tab*] [*--bg*] [*--window*] ['index']+
Syntax: +:back [*--tab*] [*--bg*] [*--window*] [*--quiet*] ['index']+
Go back in the history of the current tab.
@ -157,6 +159,7 @@ Go back in the history of the current tab.
* +*-t*+, +*--tab*+: Go back in a new tab.
* +*-b*+, +*--bg*+: Go back in a background tab.
* +*-w*+, +*--window*+: Go back in a new window.
* +*-q*+, +*--quiet*+: Don't show an error if already at the beginning of history.
==== count
How many pages to go back.
@ -203,7 +206,7 @@ If no url and title are provided, then save the current page as a bookmark. If a
[[bookmark-del]]
=== bookmark-del
Syntax: +:bookmark-del ['url']+
Syntax: +:bookmark-del [*--all*] ['url']+
Delete a bookmark.
@ -211,6 +214,9 @@ Delete a bookmark.
* +'url'+: The url of the bookmark to delete. If not given, use the current page's url.
==== optional arguments
* +*-a*+, +*--all*+: If given, delete all bookmarks.
==== note
* This command does not split arguments after the last argument and handles quotes literally.
@ -254,25 +260,122 @@ Clear all message notifications.
[[click-element]]
=== click-element
Syntax: +:click-element [*--target* 'target'] [*--force-event*] 'filter' 'value'+
Syntax: +:click-element [*--target* 'target'] [*--force-event*] [*--select-first*] 'filter' ['value']+
Click the element matching the given filter.
The given filter needs to result in exactly one element, otherwise, an error is shown.
==== positional arguments
* +'filter'+: How to filter the elements. id: Get an element based on its ID.
* +'filter'+: How to filter the elements.
* +'value'+: The value to filter for.
- id: Get an element based on its ID.
- css: Filter by a CSS selector.
- position: Click the element at specified position.
Specify `value` as 'x,y'.
- focused: Click the currently focused element.
* +'value'+: The value to filter for. Optional for 'focused' filter.
==== optional arguments
* +*-t*+, +*--target*+: How to open the clicked element (normal/tab/tab-bg/window).
* +*-f*+, +*--force-event*+: Force generating a fake click event.
* +*-s*+, +*--select-first*+: Select first matching element if there are multiple.
[[close]]
=== close
Close the current window.
[[cmd-edit]]
=== cmd-edit
Syntax: +:cmd-edit [*--run*]+
Open an editor to modify the current command.
==== optional arguments
* +*-r*+, +*--run*+: Run the command if the editor exits successfully.
[[cmd-later]]
=== cmd-later
Syntax: +:cmd-later 'duration' 'command'+
Execute a command after some time.
==== positional arguments
* +'duration'+: Duration to wait in format XhYmZs or a number for milliseconds.
* +'command'+: The command to run, with optional args.
==== note
* This command does not split arguments after the last argument and handles quotes literally.
* With this command, +;;+ is interpreted literally instead of splitting off a second command.
* This command does not replace variables like +\{url\}+.
[[cmd-repeat]]
=== cmd-repeat
Syntax: +:cmd-repeat 'times' 'command'+
Repeat a given command.
==== positional arguments
* +'times'+: How many times to repeat.
* +'command'+: The command to run, with optional args.
==== count
Multiplies with 'times' when given.
==== note
* This command does not split arguments after the last argument and handles quotes literally.
* With this command, +;;+ is interpreted literally instead of splitting off a second command.
* This command does not replace variables like +\{url\}+.
[[cmd-repeat-last]]
=== cmd-repeat-last
Repeat the last executed command.
==== count
Which count to pass the command.
[[cmd-run-with-count]]
=== cmd-run-with-count
Syntax: +:cmd-run-with-count 'count-arg' 'command'+
Run a command with the given count.
If cmd_run_with_count itself is run with a count, it multiplies count_arg.
==== positional arguments
* +'count-arg'+: The count to pass to the command.
* +'command'+: The command to run, with optional args.
==== count
The count that run_with_count itself received.
==== note
* This command does not split arguments after the last argument and handles quotes literally.
* With this command, +;;+ is interpreted literally instead of splitting off a second command.
* This command does not replace variables like +\{url\}+.
[[cmd-set-text]]
=== cmd-set-text
Syntax: +:cmd-set-text [*--space*] [*--append*] [*--run-on-count*] 'text'+
Preset the statusbar to some text.
==== positional arguments
* +'text'+: The commandline to set.
==== optional arguments
* +*-s*+, +*--space*+: If given, a space is added to the end.
* +*-a*+, +*--append*+: If given, the text is appended to the current text.
* +*-r*+, +*--run-on-count*+: If given with a count, the command is run with the given count rather than setting the command text.
==== count
The count if given.
==== note
* This command does not split arguments after the last argument and handles quotes literally.
[[config-clear]]
=== config-clear
Syntax: +:config-clear [*--save*]+
@ -294,7 +397,7 @@ Cycle an option between multiple values.
* +'values'+: The values to cycle through.
==== optional arguments
* +*-u*+, +*--pattern*+: The URL pattern to use.
* +*-u*+, +*--pattern*+: The link:configuring{outfilesuffix}#patterns[URL pattern] to use.
* +*-t*+, +*--temp*+: Set value temporarily until qutebrowser is closed.
* +*-p*+, +*--print*+: Print the value after setting.
@ -329,8 +432,13 @@ Remove a key from a dict.
[[config-diff]]
=== config-diff
Syntax: +:config-diff [*--include-hidden*]+
Show all customized options.
==== optional arguments
* +*-i*+, +*--include-hidden*+: Also include internal qutebrowser settings.
[[config-edit]]
=== config-edit
Syntax: +:config-edit [*--no-source*]+
@ -391,7 +499,7 @@ This sets an option back to its default and removes it from autoconfig.yml.
* +'option'+: The name of the option.
==== optional arguments
* +*-u*+, +*--pattern*+: The URL pattern to use.
* +*-u*+, +*--pattern*+: The link:configuring{outfilesuffix}#patterns[URL pattern] to use.
* +*-t*+, +*--temp*+: Set value temporarily until qutebrowser is closed.
[[config-write-py]]
@ -499,15 +607,6 @@ Retry the first failed/[count]th download.
==== count
The index of the download to retry.
[[edit-command]]
=== edit-command
Syntax: +:edit-command [*--run*]+
Open an editor to modify the current command.
==== optional arguments
* +*-r*+, +*--run*+: Run the command if the editor exits successfully.
[[edit-text]]
=== edit-text
Open an external editor with the currently selected form field.
@ -549,7 +648,7 @@ Send a fake keypress or key string to the website or qutebrowser.
[[forward]]
=== forward
Syntax: +:forward [*--tab*] [*--bg*] [*--window*] ['index']+
Syntax: +:forward [*--tab*] [*--bg*] [*--window*] [*--quiet*] ['index']+
Go forward in the history of the current tab.
@ -560,6 +659,7 @@ Go forward in the history of the current tab.
* +*-t*+, +*--tab*+: Go forward in a new tab.
* +*-b*+, +*--bg*+: Go forward in a background tab.
* +*-w*+, +*--window*+: Go forward in a new window.
* +*-q*+, +*--quiet*+: Don't show an error if already at the end of history.
==== count
How many pages to go forward.
@ -577,7 +677,7 @@ Toggle fullscreen mode.
[[greasemonkey-reload]]
=== greasemonkey-reload
Syntax: +:greasemonkey-reload [*--force*]+
Syntax: +:greasemonkey-reload [*--force*] [*--quiet*]+
Re-read Greasemonkey scripts from disk.
@ -586,6 +686,7 @@ The scripts are read from a 'greasemonkey' subdirectory in qutebrowser's data or
==== optional arguments
* +*-f*+, +*--force*+: For any scripts that have required dependencies, re-download them.
* +*-q*+, +*--quiet*+: Suppress message after loading scripts.
[[help]]
=== help
@ -678,9 +779,8 @@ Start hinting.
* +*-a*+, +*--add-history*+: Whether to add the spawned or yanked link to the browsing history.
* +*-r*+, +*--rapid*+: Whether to do rapid hinting. With rapid hinting, the hint mode isn't left after a hint is followed, so you can easily
open multiple links. This is only possible with targets
`tab` (with `tabs.background=true`), `tab-bg`,
`window`, `run`, `hover`, `userscript` and `spawn`.
open multiple links. Note this won't work with targets
`tab-fg`, `fill`, `delete` and `right-click`.
* +*-f*+, +*--first*+: Click the first hinted element without prompting.
@ -766,21 +866,6 @@ Jump to the mark named by `key`.
==== positional arguments
* +'key'+: mark identifier; capital indicates a global mark
[[later]]
=== later
Syntax: +:later 'duration' 'command'+
Execute a command after some time.
==== positional arguments
* +'duration'+: Duration to wait in format XhYmZs or a number for milliseconds.
* +'command'+: The command to run, with optional args.
==== note
* This command does not split arguments after the last argument and handles quotes literally.
* With this command, +;;+ is interpreted literally instead of splitting off a second command.
* This command does not replace variables like +\{url\}+.
[[macro-record]]
=== macro-record
Syntax: +:macro-record ['register']+
@ -804,34 +889,46 @@ How many times to run the macro.
[[message-error]]
=== message-error
Syntax: +:message-error 'text'+
Syntax: +:message-error [*--rich*] 'text'+
Show an error message in the statusbar.
==== positional arguments
* +'text'+: The text to show.
==== optional arguments
* +*-r*+, +*--rich*+: Render the given text as https://doc.qt.io/qt-6/richtext-html-subset.html[Qt Rich Text].
[[message-info]]
=== message-info
Syntax: +:message-info 'text'+
Syntax: +:message-info [*--rich*] 'text'+
Show an info message in the statusbar.
==== positional arguments
* +'text'+: The text to show.
==== optional arguments
* +*-r*+, +*--rich*+: Render the given text as https://doc.qt.io/qt-6/richtext-html-subset.html[Qt Rich Text].
==== count
How many times to show the message
How many times to show the message.
[[message-warning]]
=== message-warning
Syntax: +:message-warning 'text'+
Syntax: +:message-warning [*--rich*] 'text'+
Show a warning message in the statusbar.
==== positional arguments
* +'text'+: The text to show.
==== optional arguments
* +*-r*+, +*--rich*+: Render the given text as https://doc.qt.io/qt-6/richtext-html-subset.html[Qt Rich Text].
[[messages]]
=== messages
Syntax: +:messages [*--plain*] [*--tab*] [*--bg*] [*--window*] [*--logfilter* 'logfilter'] ['level']+
@ -972,7 +1069,7 @@ You can view all saved quickmarks on the link:qute://bookmarks[bookmarks page].
[[quickmark-del]]
=== quickmark-del
Syntax: +:quickmark-del ['name']+
Syntax: +:quickmark-del [*--all*] ['name']+
Delete a quickmark.
@ -981,6 +1078,9 @@ Delete a quickmark.
if there are more than one).
==== optional arguments
* +*-a*+, +*--all*+: Delete all quickmarks.
==== note
* This command does not split arguments after the last argument and handles quotes literally.
@ -1030,31 +1130,6 @@ Reload the current/[count]th tab.
==== count
The tab index to reload.
[[repeat]]
=== repeat
Syntax: +:repeat 'times' 'command'+
Repeat a given command.
==== positional arguments
* +'times'+: How many times to repeat.
* +'command'+: The command to run, with optional args.
==== count
Multiplies with 'times' when given.
==== note
* This command does not split arguments after the last argument and handles quotes literally.
* With this command, +;;+ is interpreted literally instead of splitting off a second command.
* This command does not replace variables like +\{url\}+.
[[repeat-command]]
=== repeat-command
Repeat the last executed command.
==== count
Which count to pass the command.
[[report]]
=== report
Syntax: +:report ['info'] ['contact']+
@ -1070,26 +1145,6 @@ Report a bug in qutebrowser.
=== restart
Restart qutebrowser while keeping existing tabs open.
[[run-with-count]]
=== run-with-count
Syntax: +:run-with-count 'count-arg' 'command'+
Run a command with the given count.
If run_with_count itself is run with a count, it multiplies count_arg.
==== positional arguments
* +'count-arg'+: The count to pass to the command.
* +'command'+: The command to run, with optional args.
==== count
The count that run_with_count itself received.
==== note
* This command does not split arguments after the last argument and handles quotes literally.
* With this command, +;;+ is interpreted literally instead of splitting off a second command.
* This command does not replace variables like +\{url\}+.
[[save]]
=== save
Syntax: +:save ['what' ...]+
@ -1121,7 +1176,7 @@ Syntax: +:scroll 'direction'+
Scroll the current tab in the given direction.
Note you can use `:run-with-count` to have a keybinding with a bigger scroll increment.
Note you can use `:cmd-run-with-count` to have a keybinding with a bigger scroll increment.
==== positional arguments
* +'direction'+: In which direction to scroll (up/down/left/right/top/bottom).
@ -1255,7 +1310,7 @@ Load a session.
[[session-save]]
=== session-save
Syntax: +:session-save [*--current*] [*--quiet*] [*--force*] [*--only-active-window*] [*--with-private*] ['name']+
Syntax: +:session-save [*--current*] [*--quiet*] [*--force*] [*--only-active-window*] [*--with-private*] [*--no-history*] ['name']+
Save a session.
@ -1269,6 +1324,7 @@ Save a session.
* +*-f*+, +*--force*+: Force saving internal sessions (starting with an underline).
* +*-o*+, +*--only-active-window*+: Saves only tabs of the currently active window.
* +*-p*+, +*--with-private*+: Include private windows.
* +*-n*+, +*--no-history*+: Don't store tab history.
[[set]]
=== set
@ -1285,28 +1341,7 @@ If the option name ends with '?' or no value is provided, the value of the optio
==== optional arguments
* +*-t*+, +*--temp*+: Set value temporarily until qutebrowser is closed.
* +*-p*+, +*--print*+: Print the value after setting.
* +*-u*+, +*--pattern*+: The URL pattern to use.
[[set-cmd-text]]
=== set-cmd-text
Syntax: +:set-cmd-text [*--space*] [*--append*] [*--run-on-count*] 'text'+
Preset the statusbar to some text.
==== positional arguments
* +'text'+: The commandline to set.
==== optional arguments
* +*-s*+, +*--space*+: If given, a space is added to the end.
* +*-a*+, +*--append*+: If given, the text is appended to the current text.
* +*-r*+, +*--run-on-count*+: If given with a count, the command is run with the given count rather than setting the command text.
==== count
The count if given.
==== note
* This command does not split arguments after the last argument and handles quotes literally.
* +*-u*+, +*--pattern*+: The link:configuring{outfilesuffix}#patterns[URL pattern] to use.
[[set-mark]]
=== set-mark
@ -1356,13 +1391,14 @@ The tab index to stop.
[[tab-clone]]
=== tab-clone
Syntax: +:tab-clone [*--bg*] [*--window*]+
Syntax: +:tab-clone [*--bg*] [*--window*] [*--private*]+
Duplicate the current tab.
==== optional arguments
* +*-b*+, +*--bg*+: Open in a background tab.
* +*-w*+, +*--window*+: Open in a new window.
* +*-p*+, +*--private*+: Open in a new private window.
[[tab-close]]
=== tab-close
@ -1430,6 +1466,7 @@ If neither is given, move it to the first position.
==== positional arguments
* +'index'+: `+` or `-` to move relative to the current tab by count, or a default of 1 space.
A tab index to move to that index.
`start` and `end` to move to the start and the end.
==== count
@ -1669,6 +1706,7 @@ How many steps to zoom out.
|<<move-to-start-of-next-block,move-to-start-of-next-block>>|Move the cursor or selection to the start of next block.
|<<move-to-start-of-prev-block,move-to-start-of-prev-block>>|Move the cursor or selection to the start of previous block.
|<<prompt-accept,prompt-accept>>|Accept the current prompt.
|<<prompt-fileselect-external,prompt-fileselect-external>>|Choose a location using a configured external picker.
|<<prompt-item-focus,prompt-item-focus>>|Shift the focus of the prompt file completion menu to another item.
|<<prompt-open-download,prompt-open-download>>|Immediately open a download.
|<<prompt-yank,prompt-yank>>|Yank URL to clipboard or primary selection.
@ -1679,13 +1717,13 @@ How many steps to zoom out.
|<<rl-beginning-of-line,rl-beginning-of-line>>|Move to the start of the line.
|<<rl-delete-char,rl-delete-char>>|Delete the character after the cursor.
|<<rl-end-of-line,rl-end-of-line>>|Move to the end of the line.
|<<rl-filename-rubout,rl-filename-rubout>>|Delete backwards using the OS path separator as boundary.
|<<rl-forward-char,rl-forward-char>>|Move forward a character.
|<<rl-forward-word,rl-forward-word>>|Move forward to the end of the next word.
|<<rl-kill-line,rl-kill-line>>|Remove chars from the cursor to the end of the line.
|<<rl-kill-word,rl-kill-word>>|Remove chars from the cursor to the end of the current word.
|<<rl-unix-filename-rubout,rl-unix-filename-rubout>>|Remove chars from the cursor to the previous path separator.
|<<rl-rubout,rl-rubout>>|Delete backwards using the given characters as boundaries.
|<<rl-unix-line-discard,rl-unix-line-discard>>|Remove chars backward from the cursor to the beginning of the line.
|<<rl-unix-word-rubout,rl-unix-word-rubout>>|Remove chars from the cursor to the beginning of the word.
|<<rl-yank,rl-yank>>|Paste the most recently deleted text.
|<<selection-drop,selection-drop>>|Drop selection and keep selection mode enabled.
|<<selection-reverse,selection-reverse>>|Swap the stationary and moving end of the current selection.
@ -1857,6 +1895,12 @@ Accept the current prompt.
==== optional arguments
* +*-s*+, +*--save*+: Save the value to the config.
[[prompt-fileselect-external]]
=== prompt-fileselect-external
Choose a location using a configured external picker.
This spawns the external fileselector configured via `fileselect.folder.command`.
[[prompt-item-focus]]
=== prompt-item-focus
Syntax: +:prompt-item-focus 'which'+
@ -1937,6 +1981,12 @@ Move to the end of the line.
This acts like readline's end-of-line.
[[rl-filename-rubout]]
=== rl-filename-rubout
Delete backwards using the OS path separator as boundary.
For behavior that matches readline's `unix-filename-rubout` exactly, use `:rl-rubout "/ "` instead. This command uses the OS path separator (i.e. `\` on Windows) and ignores spaces.
[[rl-forward-char]]
=== rl-forward-char
Move forward a character.
@ -1961,11 +2011,17 @@ Remove chars from the cursor to the end of the current word.
This acts like readline's kill-word.
[[rl-unix-filename-rubout]]
=== rl-unix-filename-rubout
Remove chars from the cursor to the previous path separator.
[[rl-rubout]]
=== rl-rubout
Syntax: +:rl-rubout 'delim'+
Delete backwards using the given characters as boundaries.
With " ", this acts like readline's `unix-word-rubout`. With " /", this acts like readline's `unix-filename-rubout`, but consider using `:rl-filename-rubout` instead: It uses the OS path separator (i.e. `\` on Windows) and ignores spaces.
==== positional arguments
* +'delim'+: A string of characters (or a single character) until which text will be deleted.
This acts like readline's unix-filename-rubout.
[[rl-unix-line-discard]]
=== rl-unix-line-discard
@ -1973,12 +2029,6 @@ Remove chars backward from the cursor to the beginning of the line.
This acts like readline's unix-line-discard.
[[rl-unix-word-rubout]]
=== rl-unix-word-rubout
Remove chars from the cursor to the beginning of the word.
This acts like readline's unix-word-rubout. Whitespace is used as a word delimiter.
[[rl-yank]]
=== rl-yank
Paste the most recently deleted text.
@ -2139,7 +2189,7 @@ Syntax: +:debug-webaction 'action'+
Execute a webaction.
Available actions: https://doc.qt.io/archives/qt-5.5/qwebpage.html#WebAction-enum (WebKit) https://doc.qt.io/qt-5/qwebenginepage.html#WebAction-enum (WebEngine)
Available actions: https://doc.qt.io/archives/qt-5.5/qwebpage.html#WebAction-enum (WebKit) https://doc.qt.io/qt-6/qwebenginepage.html#WebAction-enum (WebEngine)
==== positional arguments
* +'action'+: The action to execute, e.g. MoveToNextChar.

View File

@ -22,6 +22,19 @@ exists, the `autoconfig.yml` file **is not read anymore** by default. You need
to <<configpy-autoconfig,load it from `config.py`>> if you want settings changed via
`:set`/`:bind` to persist between restarts.
[[patterns]]
URL pattern support
-------------------
Many settings are customizable depending on the page being visited by using URL
patterns. The link:settings{outfilesuffix}[settings documentation] marks such
settings with "This setting supports URL patterns.
The syntax is based on Chromium's
https://developer.chrome.com/docs/extensions/develop/concepts/match-patterns/[URL pattern syntax].
As an extension, the scheme and path can be left off as a short-hand syntax, so
`example.com` is equivalent to `*://example.com/*`.
[[autoconfig]]
Configuring qutebrowser via the user interface
----------------------------------------------
@ -45,9 +58,10 @@ customizable.
Using the link:commands{outfilesuffix}#set[`:set`] command and command completion, you
can quickly set settings interactively, for example `:set tabs.position left`.
Some settings are also customizable for a given
https://developer.chrome.com/apps/match_patterns[URL pattern] by doing e.g.
`:set --pattern=*://example.com/ content.images false`.
<<patterns,URL patterns>> can be used via
`:set --pattern *://example.com/* content.images false`, or with shorthand
syntax for both argument and pattern, `:set -u example.com content.images
false`.
To get more help about a setting, use e.g. `:help tabs.position`.
@ -160,12 +174,12 @@ color = config.get('colors.completion.fg')
Per-domain settings
~~~~~~~~~~~~~~~~~~~
Using `config.set`, some settings are also customizable for a given
https://developer.chrome.com/apps/match_patterns[URL pattern]:
Using `config.set` instead of the `c.` shorthand, many settings are also
customizable for a given <<patterns,URL patterns>>.
[source,python]
----
config.set('content.images', False, '*://example.com/')
config.set('content.images', False, '*://example.com/*')
----
Alternatively, you can use `with config.pattern(...) as p:` to get a shortcut
@ -173,7 +187,7 @@ similar to `c.` which is scoped to the given domain:
[source,python]
----
with config.pattern('*://example.com/') as p:
with config.pattern('*://example.com/*') as p:
p.content.images = False
----
@ -377,8 +391,8 @@ import subprocess
def read_xresources(prefix):
props = {}
x = subprocess.run(['xrdb', '-query'], stdout=subprocess.PIPE)
lines = x.stdout.decode().split('\n')
x = subprocess.run(['xrdb', '-query'], capture_output=True, check=True, text=True)
lines = x.stdout.split('\n')
for line in filter(lambda l : l.startswith(prefix), lines):
prop, _, value = line.partition(':\t')
props[prop] = value
@ -392,11 +406,18 @@ Pre-built colorschemes
^^^^^^^^^^^^^^^^^^^^^^
- A collection of https://github.com/chriskempson/base16[base16] color-schemes can be found in https://github.com/theova/base16-qutebrowser[base16-qutebrowser] and used with https://github.com/AuditeMarlow/base16-manager[base16-manager].
- https://gitlab.com/jjzmajic/qutewal[Pywal integration]
- Another collection: https://github.com/leosolid/qutebrowser-themes[qutebrowser-themes]
- Pywal integration: https://gitlab.com/jjzmajic/qutewal[qutewal], https://github.com/makman12/pywalQute[pywalQute]
- https://github.com/arcticicestudio/nord[Nord]: https://github.com/Linuus/nord-qutebrowser[Linuus], https://github.com/KnownAsDon/QuteBrowser-Nord-Theme[KnownAsDon]
- https://github.com/dracula/qutebrowser-dracula-theme[Dracula]
- https://gitlab.com/lovetocode999/selenized-qutebrowser[Selenized]
- https://github.com/morhetz/gruvbox[gruvbox]: https://github.com/The-Compiler/dotfiles/blob/master/qutebrowser/gruvbox.py[The-Compiler], https://gitlab.com/shaneyost/dots-popos-september-2020/-/blob/master/qutebrowser/config.py[Shane Yost]
- 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]
- https://github.com/iruzo/matrix-qutebrowser[Matrix]
- https://github.com/harmtemolder/qutebrowser-solarized[Solarized]
- https://github.com/Rehpotsirhc-z/qutebrowser-doom-one[Doom One]
Avoiding flake8 errors
^^^^^^^^^^^^^^^^^^^^^^
@ -431,9 +452,16 @@ Various emacs/conkeror-like keybinding configs exist:
- https://gitlab.com/jgkamat/qutemacs/blob/master/qutemacs.py[jgkamat]
- https://gitlab.com/Kaligule/qutebrowser-emacs-config/blob/master/config.py[Kaligule]
- https://me0w.net/pit/1540882719[nm0i]
- https://web.archive.org/web/20210512185023/https://me0w.net/pit/1540882719[nm0i]
- https://www.reddit.com/r/qutebrowser/comments/eh10i7/config_share_qute_with_emacs_keybindings/[jasonsun0310]
- https://git.sr.ht/~willvaughn/dots/tree/main/item/.config/qutebrowser/qutemacs.py[willvaughn]
It's also mostly possible to get rid of modal keybindings by setting
`input.insert_mode.auto_enter` to `false`, and `input.forward_unbound_keys` to
`all`.
Other resources
^^^^^^^^^^^^^^^
- https://www.ii.com/qutebrowser-tips-fragments/[Infinite Ink: qutebrowser Tips and Fragments]
- https://www.ii.com/qutebrowser-configpy/[Infinite Ink: qutebrowsers Template config.py]

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
qutebrowser help
================
@ -6,7 +8,7 @@ Documentation
The following help pages are currently available:
* link:https://raw.githubusercontent.com/qutebrowser/qutebrowser/master/doc/img/cheatsheet-big.png[Key binding cheatsheet]
* link:https://raw.githubusercontent.com/qutebrowser/qutebrowser/main/doc/img/cheatsheet-big.png[Key binding cheatsheet]
* link:../quickstart{outfilesuffix}[Quick start guide]
* link:../faq{outfilesuffix}[Frequently asked questions]
* link:../changelog{outfilesuffix}[Change Log]
@ -22,14 +24,14 @@ Getting help
------------
You can get help in the IRC channel
irc://irc.freenode.org/#qutebrowser[`#qutebrowser`] on
http://freenode.net/[Freenode]
(https://webchat.freenode.net/?channels=#qutebrowser[webchat]), or by writing a
message to the
https://lists.schokokeks.org/mailman/listinfo.cgi/qutebrowser[mailinglist] at
link:ircs://irc.libera.chat:6697/#qutebrowser[`#qutebrowser`] on
https://libera.chat/[Libera Chat]
(https://web.libera.chat/#qutebrowser[webchat]),
or by writing a message to the
https://listi.jpberlin.de/mailman/listinfo/qutebrowser[mailinglist] at
mailto:qutebrowser@lists.qutebrowser.org[].
There's also an https://lists.schokokeks.org/mailman/listinfo.cgi/qutebrowser-announce[announce-only mailinglist]
There's also an https://listi.jpberlin.de/mailman/listinfo/qutebrowser-announce[announce-only mailinglist]
at mailto:qutebrowser-announce@lists.qutebrowser.org[] (the announcements also
get sent to the general qutebrowser@ list).
@ -49,9 +51,19 @@ ways:
* Use the built-in `:report` command or the automatic crash dialog.
* Open an issue in the Github issue tracker.
* Write a mail to the
https://lists.schokokeks.org/mailman/listinfo.cgi/qutebrowser[mailinglist] at
https://listi.jpberlin.de/mailman/listinfo/qutebrowser[mailinglist] at
mailto:qutebrowser@lists.qutebrowser.org[].
Other resources
---------------
- https://blog.qutebrowser.org/[Development blog]
- https://twitter.com/qutebrowser[Twitter account],
https://fosstodon.org/@qutebrowser[Mastodon account]
- Infinite Ink: https://www.ii.com/qutebrowser-getting-started/[Getting Started
with qutebrowser] and https://www.ii.com/portal/qutebrowser/[other
qutebrowser articles]
License
-------

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 763 KiB

After

Width:  |  Height:  |  Size: 692 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -21,78 +21,61 @@ some distributions (notably, Debian Stable and Ubuntu) do only update
qutebrowser and the underlying QtWebEngine when there's a new release of the
distribution, typically once all couple of months to years.
On Debian / Ubuntu
------------------
[[debian]]
On Debian / Ubuntu / Linux Mint / ...
-------------------------------------
How to install qutebrowser depends a lot on the version of Debian/Ubuntu you're
running.
With those distributions, qutebrowser is in the official repositories, and you
can install it with `apt install qutebrowser`.
[[ubuntu1604]]
Debian Stretch / Ubuntu 16.04 LTS / Linux Mint 18
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
However, when using a stable variant (e.g. Debian Stable / Ubuntu LTS / Linux
Mint), note that your versions of qutebrowser and the underlying QtWebEngine
will only be updated when there's a new release of your distribution (e.g.
upgrading from Ubuntu 22.04 to 24.04):
Debian Stretch does have QtWebEngine packaged, but only in a very old and insecure
version (Qt 5.7, based on a Chromium from March 2016). Furthermore, it packages Python
3.5 which is not supported anymore since qutebrowser v2.0.0.
- Ubuntu 20.04, Linux Mint 20: qutebrowser 1.10.1, QtWebEngine 5.12.8 (based on Chromium 69 from 2018)
- Ubuntu 22.04, Linux Mint 21: qutebrowser 2.5.0, QtWebEngine 5.15.9 (based on Chromium 87 from 2020)
- Debian Bookworm: qutebrowser 2.5.3, QtWebEngine 5.15.13 (based on Chromium 87 from 2020)
Ubuntu 16.04 doesn't come with an up-to-date engine (a new enough QtWebKit, or
QtWebEngine) and also comes with Python 3.5.
The old versions of the underlying Chromium will lead to various compatibility
issues. Additionally, QtWebEngine on all Debian-based distributions is
https://www.debian.org/releases/bookworm/amd64/release-notes/ch-information.en.html#browser-security[not covered]
by Debian's security support.
You should be able to install a newer Python (3.6+) using the
https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa[deadsnakes PPA] or
https://github.com/pyenv/pyenv[pyenv], and then proceed to
<<tox,install qutebrowser in a virtualenv>>. However, this is currently untested. If you
got this setup to work successfully, please submit a pull request to adjust these
instructions!
It's recommended to <<tox,install qutebrowser in a virtualenv>> with a newer PyQt/Qt binary instead.
If you need proprietary codec support or use an architecture not supported by Qt
binaries, starting with Ubuntu 22.04 and Debian Bookworm, it's possible to
install Qt 6 via apt. By using `scripts/mkvenv.py` with `--pyqt-type link` you get a
newer qutebrowser running with:
- Ubuntu 22.04, Linux Mint 21: QtWebEngine 6.2.4 (based on Chromium 90 from mid-2021)
- Debian Bookworm: QtWebEngine 6.4.2 (based on Chromium 102 from mid-2022)
Note you'll need some basic libraries to use the virtualenv-installed PyQt:
----
# apt install --no-install-recommends git ca-certificates python3 python3-venv asciidoc libglib2.0-0 libgl1 libfontconfig1 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-shape0 libxcb-xfixes0 libxcb-xinerama0 libxcb-xkb1 libxkbcommon-x11-0 libdbus-1-3 libyaml-dev gcc python3-dev libnss3
----
// FIXME not needed anymore?
// libxi6 libxrender1 libegl1-mesa
Debian Buster / Ubuntu 18.04 LTS / Linux Mint 19
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Debian Buster packages qutebrowser, but ships a very old version (v1.6.1 from March
2019). The QtWebEngine library used for rendering web contents is also very old (Qt
5.11, based on a Chromium from March 2018) and insecure. It is
https://www.debian.org/releases/buster/amd64/release-notes/ch-information.en.html#browser-security[not covered]
by Debian's security patches. It's recommended to <<tox,install qutebrowser in a
virtualenv>> with a newer PyQt/Qt binary instead.
With Ubuntu 18.04, the situation looks similar (but worse): There, qutebrowser v1.1.1
from January 2018 is packaged, with QtWebEngine 5.9 based on a Chromium from January
2017. It's recommended to either upgrade to Ubuntu 20.04 LTS or <<tox,install
qutebrowser in a virtualenv>> with a newer PyQt/Qt binary instead.
Ubuntu 20.04 LTS / Linux Mint 20 (or newer)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
With those distributions, qutebrowser is in the official repositories, and you
can install it with apt:
----
# apt install qutebrowser
# apt install --no-install-recommends git ca-certificates python3 python3-venv libgl1 libxkbcommon-x11-0 libegl1 libfontconfig1 libglib2.0-0 libdbus-1-3 libxcb-cursor0 libxcb-icccm4 libxcb-keysyms1 libxcb-shape0 libnss3 libxcomposite1 libxdamage1 libxrender1 libxrandr2 libxtst6 libxi6 libasound2
----
Additional hints
~~~~~~~~~~~~~~~~
- On Ubuntu 20.04 / Linux Mint 20 / Debian Bullseye, no OpenSSL 3 is available.
However, Qt 6.5 https://www.qt.io/blog/moving-to-openssl-3-in-binary-builds-starting-from-qt-6.5-beta-2[moved to OpenSSL 3]
for its binary builds. Thus, you will either need to live with
`:adblock-update` and `:download` being broken, or use `--pyqt-version 6.4` for
the `scripts/mkvenv.py` script to get an older Qt.
- If running from git, run the following to generate the documentation for the
`:help` command (the `mkvenv.py` script used with a virtualenv install already does
`:help` command (the `scripts/mkvenv.py` script used with a virtualenv install already does
this for you):
+
----
# apt install --no-install-recommends asciidoc
$ pip install -r misc/requirements/requirements-docs.txt # or install asciidoc manually
$ python3 scripts/asciidoc2html.py
----
- If you prefer using QtWebKit, there's QtWebKit 5.212 available in
Ubuntu 18.04 / Debian Buster or newer. Note however that it is based on an upstream
those distributions. Note however that it is based on an upstream
WebKit from September 2016 with known security issues and no sandboxing or process
isolation.
- If video or sound don't work with QtWebKit, try installing the gstreamer plugins:
@ -120,6 +103,14 @@ To be able to play videos with proprietary codecs with QtWebEngine, you will
need to install an additional package from the RPM Fusion Free repository.
For more information see https://rpmfusion.org/Configuration.
With Qt 6 (recommended):
-----
# dnf install libavcodec-freeworld
-----
With Qt 5:
-----
# dnf install qt5-qtwebengine-freeworld
-----
@ -177,6 +168,13 @@ need to turn off the `bindist` flag for `dev-qt/qtwebengine`.
See the https://wiki.gentoo.org/wiki/Qutebrowser#USE_flags[Gentoo Wiki] for
more information.
To be able to use Kerberos authentication, you will need to turn on the
`kerberos` USE-flag system-wide and re-emerge `dev-qt/qtwebengine` after that.
See the
https://wiki.gentoo.org/wiki/Qutebrowser#Kerberos_authentication_does_not_work[
Troubleshooting section in Gentoo Wiki] for more information.
On Void Linux
-------------
@ -237,14 +235,9 @@ Via Flatpak
qutebrowser is available
https://flathub.org/apps/details/org.qutebrowser.qutebrowser[on Flathub]
as `org.qutebrowser.qutebrowser`.
NOTE: The Flatpak package is
https://github.com/flathub/org.qutebrowser.qutebrowser/issues/8#issuecomment-799579975[looking for (co-)maintainers].
The package recently was updated after being out of date for multiple years. It
currently (March 2021) is up to date again. If that situation changes, consider
to <<tox,install qutebrowser in a virtualenv>> instead, which is one of the
officially maintained options and will always be up-to-date.
as `org.qutebrowser.qutebrowser`. See the
https://github.com/flathub/org.qutebrowser.qutebrowser/wiki[qutebrowser Flatpak documentation]
for more information about setting up certain features with the Flatpak sandbox.
On FreeBSD
----------
@ -264,6 +257,10 @@ and QtWebEngine backend is also not available.
On Windows
----------
NOTE: As an additional resource, see
https://www.ii.com/installing-qutebrowser-on-windows/[Infinite Ink: Installing
qutebrowser on Windows].
There are different ways to install qutebrowser on Windows:
Prebuilt binaries
@ -274,7 +271,7 @@ https://github.com/qutebrowser/qutebrowser/releases[are built] for every
release.
Note that you'll need to upgrade to new versions manually (subscribe to the
https://lists.schokokeks.org/mailman/listinfo.cgi/qutebrowser-announce[qutebrowser-announce
https://listi.jpberlin.de/mailman/listinfo/qutebrowser-announce[qutebrowser-announce
mailinglist] to get notified on new releases). You can install a newer version
without uninstalling the older one.
@ -286,23 +283,24 @@ Nightly builds
~~~~~~~~~~~~~~
If you want to test out new features before an official qutebrowser release, automated
https://github.com/qutebrowser/qutebrowser/actions/workflows/bleeding.yml[nightly
builds] are available. To download them, open the lastest run (usually the first one),
then download the archive at the bottom of the page. Note that due to GitHub
limitations, all variants (Windows/macOS, 32/64 bit, debug/non-debug) are contained in a
single archive.
https://github.com/qutebrowser/qutebrowser/actions/workflows/nightly.yml[nightly
builds] are available. To download them, open the latest run (usually the first one),
then download the archive at the bottom of the page.
Those builds also include variants with debug logging enabled, which can be useful to
track down issues.
https://chocolatey.org/packages/qutebrowser[Chocolatey package]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTE: Due to GitHub limitations, you need to be signed in with a GitHub account
to download the files.
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
----
@ -331,33 +329,47 @@ files from the
https://github.com/qutebrowser/qutebrowser/releases[release page].
Note that you'll need to upgrade to new versions manually (subscribe to the
https://lists.schokokeks.org/mailman/listinfo.cgi/qutebrowser-announce[qutebrowser-announce
https://listi.jpberlin.de/mailman/listinfo/qutebrowser-announce[qutebrowser-announce
mailinglist] to get notified on new releases).
The binary release ships with a QtWebEngine built without proprietary codec
support. To get support for e.g. h264/mp4 videos, you'll need to build
QtWebEngine from source yourself with support for that enabled.
This binary is also available through the
https://caskroom.github.io/[Homebrew Cask] package manager:
NOTE: Currently, qutebrowser
https://github.com/qutebrowser/qutebrowser/issues/5020[does not use] macOS'
https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution[Notarization],
due to https://github.com/pyinstaller/pyinstaller/issues/6612[PyInstaller issues]
(as well as the requirement to
https://developer.apple.com/support/compare-memberships/[pay USD 100 per year to Apple]).
Depending on your system settings, this might lead to errors such as
"qutebrowser.app can't be opened because Apple cannot check it for malicious
software." or "can't be opened because it is from an unidentified developer".
You should be able to open the .app by right-clicking it and selecting "Open", see the
https://support.apple.com/guide/mac-help/open-a-mac-app-from-an-unidentified-developer-mh40616/mac[macOS documentation]
for details.
This binary is also available through the https://brew.sh/[Homebrew] package
manager as a https://github.com/Homebrew/homebrew-cask[cask]:
----
$ brew install qutebrowser --cask
$ brew install qutebrowser
----
Nightly builds
~~~~~~~~~~~~~~
If you want to test out new features before an official qutebrowser release, automated
https://github.com/qutebrowser/qutebrowser/actions/workflows/bleeding.yml[nightly
builds] are available. To download them, open the lastest run (usually the first one),
then download the archive at the bottom of the page. Note that due to GitHub
limitations, all variants (Windows/macOS, 32/64 bit, debug/non-debug) are contained in a
single archive.
https://github.com/qutebrowser/qutebrowser/actions/workflows/nightly.yml[nightly
builds] are available. To download them, open the latest run (usually the first one),
then download the archive at the bottom of the page.
Those builds also include variants with debug logging enabled, which can be useful to
track down issues.
NOTE: Due to GitHub limitations, you need to be signed in with a GitHub account
to download the files.
Manual Install
~~~~~~~~~~~~~~
@ -368,26 +380,15 @@ qutebrowser from source.
==== Homebrew
----
$ brew install qt
(build PyQt and PyQtWebEngine from source)
$ brew install pyqt@6
$ 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
---------
qutebrowser ships with a
https://github.com/qutebrowser/qutebrowser/blob/master/misc/Makefile[Makefile]
https://github.com/qutebrowser/qutebrowser/blob/main/misc/Makefile[Makefile]
intended for packagers. This installs system-wide files in a proper locations,
so it should be preferred to the usual `setup.py install` or `pip install`
invocation.
@ -410,7 +411,7 @@ location for a particular application, rather than being installed globally.
The `scripts/mkvenv.py` script in this repository can be used to create a
virtualenv for qutebrowser and install it (including all dependencies) there.
The next couple of sections will explain the most common use-cases - run
`mkvenv.py` with `--help` to see all available options.
`scripts/mkvenv.py` with `--help` to see all available options.
Getting the repository
~~~~~~~~~~~~~~~~~~~~~~
@ -427,7 +428,7 @@ Installing dependencies (including Qt)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Using a Qt installed via virtualenv needs a couple of system-wide libraries.
See the <<ubuntu1604,Ubuntu 16.04 section>> for details about which libraries
See the <<debian,Debian-based distributions section>> for details about which libraries
are required.
Then run the install script:
@ -443,7 +444,7 @@ This installs all needed Python dependencies in a `.venv` subfolder
This comes with an up-to-date Qt/PyQt including a pre-compiled QtWebEngine
binary, but has a few caveats:
- Make sure your `python3` is Python 3.6 or newer, otherwise you'll get a "No
- Make sure your `python3` is Python 3.9 or newer, otherwise you'll get a "No
matching distribution found" error and/or qutebrowser will not run.
- It only works on 64-bit x86 systems, with other architectures you'll get the
same error.
@ -454,8 +455,8 @@ See the next section for an alternative install method which might help with
those issues but result in an older Qt version.
You can specify a Qt/PyQt version with the `--pyqt-version` flag, see
`mkvenv.py --help` for a list of available versions. By default, the latest
version which plays well with qutebrowser is used.
`scripts/mkvenv.py --help` for a list of available versions. By default, the
latest version which plays well with qutebrowser is used.
NOTE: If the Qt smoke test fails with a _"This application failed to start
because no Qt platform plugin could be initialized."_ message, most likely a
@ -465,22 +466,24 @@ failed on ..._ line for details.
Installing dependencies (system-wide Qt)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Alternatively, you can use `mkvenv.py --pyqt-type link` to symlink your local
PyQt/Qt install instead of installing PyQt in the virtualenv. However, unless
you have a new QtWebKit or QtWebEngine available, qutebrowser will not work. It
also typically means you'll be using an older release of QtWebEngine.
Alternatively, you can use `scripts/mkvenv.py --pyqt-type link` to symlink
your local PyQt/Qt install instead of installing PyQt in the virtualenv.
However, unless you have a new QtWebKit or QtWebEngine available, qutebrowser
will not work. It also typically means you'll be using an older release of
QtWebEngine.
On Windows, run `set PYTHON=C:\path\to\python.exe` (CMD) or ``$Env:PYTHON =
On Windows, run `set PYTHON=C:\path\to\python.exe` (CMD) or `$Env:PYTHON =
"..."` (Powershell) first.
There is a third mode, `mkvenv.py --pyqt-type source` which uses a system-wide
Qt but builds PyQt from source. In most scenarios, this shouldn't be needed.
There is a third mode, `scripts/mkvenv.py --pyqt-type source` which uses a
system-wide Qt but builds PyQt from source. In most scenarios, this shouldn't
be needed.
Creating a wrapper script
~~~~~~~~~~~~~~~~~~~~~~~~~
Running `mkvenv.py` does not install a system-wide `qutebrowser` script. You can
launch qutebrowser by doing:
Running `scripts/mkvenv.py` does not install a system-wide `qutebrowser`
script. You can launch qutebrowser by doing:
----
.venv/bin/python3 -m qutebrowser
@ -494,24 +497,12 @@ You can create a simple wrapper script to start qutebrowser somewhere in your
~/path/to/qutebrowser/.venv/bin/python3 -m qutebrowser "$@"
----
Building the docs
~~~~~~~~~~~~~~~~~
To build the documentation, install `asciidoc` (note that LaTeX which comes as
optional/recommended dependency with some distributions is not required).
Then, run:
----
$ python3 scripts/asciidoc2html.py
----
Updating
~~~~~~~~
If you cloned the git repository, run `mkvenv.py --update` which will take care
of updating the code (via `git pull`) and recreating the environment with the
newest dependencies.
If you cloned the git repository, run `scripts/mkvenv.py --update` which will
take care of updating the code (via `git pull`) and recreating the environment
with the newest dependencies.
Alternatively, you can update your local copy of the code (e.g. by pulling the
git repo, or extracting a new version) and the virtualenv should automatically

View File

@ -9,6 +9,7 @@ Basic keybindings to get you started
------------------------------------
* Use the arrow keys or `hjkl` to move around a webpage (vim-like syntax is used in quite a few places)
* To zoom in or out of a webpage, use the `+` or `-` keys respectively
* To go to a new webpage, press `o`, then type a url, then press Enter (Use `O` to open the url in a new tab, `go` to edit the current URL)
* If what you've typed isn't a url, then a search engine will be used instead (DuckDuckGo, by default)
* To switch between tabs, use `J` (next tab) and `K` (previous tab), or press `<Alt-num>`, where `num` is the position of the tab to switch to
@ -22,9 +23,9 @@ Basic keybindings to get you started
What to do now
--------------
* View the link:https://raw.githubusercontent.com/qutebrowser/qutebrowser/master/doc/img/cheatsheet-big.png[key binding cheatsheet]
* View the link:https://raw.githubusercontent.com/qutebrowser/qutebrowser/main/doc/img/cheatsheet-big.png[key binding cheatsheet]
to make yourself familiar with the key bindings: +
image:https://raw.githubusercontent.com/qutebrowser/qutebrowser/master/doc/img/cheatsheet-small.png["qutebrowser key binding cheatsheet",link="https://raw.githubusercontent.com/qutebrowser/qutebrowser/master/doc/img/cheatsheet-big.png"]
image:https://raw.githubusercontent.com/qutebrowser/qutebrowser/main/doc/img/cheatsheet-small.png["qutebrowser key binding cheatsheet",link="https://raw.githubusercontent.com/qutebrowser/qutebrowser/main/doc/img/cheatsheet-big.png"]
* There's also a https://www.shortcutfoo.com/app/dojos/qutebrowser[free training
course] on shortcutfoo for the keybindings - note that you need to be in
insert mode (i) for it to work.
@ -33,8 +34,8 @@ image:https://raw.githubusercontent.com/qutebrowser/qutebrowser/master/doc/img/c
`scripts/asciidoc2html.py` to generate the documentation.
* Go to the link:qute://settings[settings page] to set up qutebrowser the way you want it.
* Subscribe to
https://lists.schokokeks.org/mailman/listinfo.cgi/qutebrowser[the mailinglist] or
https://lists.schokokeks.org/mailman/listinfo.cgi/qutebrowser-announce[the announce-only mailinglist].
https://listi.jpberlin.de/mailman/listinfo/qutebrowser[the mailinglist] or
https://listi.jpberlin.de/mailman/listinfo/qutebrowser-announce[the announce-only mailinglist].
* Let me know what features you are missing or things that need (even small!)
improvements.
@ -46,13 +47,13 @@ If you get stuck, you can get help in multiple ways:
* The `:help` command inside qutebrowser shows the built-in documentation.
Additionally, each command can be started with a `--help` flag to show its
help.
* Chat via the IRC channel: irc://irc.freenode.org/#qutebrowser[`#qutebrowser`] on
https://freenode.net/[Freenode]
(https://webchat.freenode.net/?channels=#qutebrowser[webchat])
* Chat via the IRC channel: link:ircs://irc.libera.chat:6697/#qutebrowser[`#qutebrowser`] on
https://libera.chat/[Libera Chat] (https://web.libera.chat/#qutebrowser[webchat],
or https://matrix.to/#qutebrowser:libera.chat[via Matrix])
* On Reddit: https://www.reddit.com/r/qutebrowser/[/r/qutebrowser]
* Via https://github.com/qutebrowser/qutebrowser/discussions[GitHub Discussions]
* Using the mailinglist: mailto:qutebrowser@lists.qutebrowser.org[]
(https://lists.schokokeks.org/mailman/listinfo.cgi/qutebrowser[subscribe])
(https://listi.jpberlin.de/mailman/listinfo/qutebrowser[subscribe])
Donating
--------
@ -61,10 +62,12 @@ 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/main/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]
https://github.com/qutebrowser/qutebrowser/blob/main/README.asciidoc#donating[donation section]
in the README for details.

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Note some sections in this file (everything between QUTE_*_START and
// QUTE_*_END) are autogenerated by scripts/src2asciidoc.sh. DO NOT edit them
// by hand.
@ -10,14 +12,14 @@
:homepage: https://www.qutebrowser.org/
== NAME
qutebrowser - a keyboard-driven, vim-like browser based on PyQt5.
qutebrowser - a keyboard-driven, vim-like browser based on Python and Qt.
== SYNOPSIS
*qutebrowser* ['-OPTION' ['...']] [':COMMAND' ['...']] ['URL' ['...']]
== DESCRIPTION
qutebrowser is a keyboard-focused browser with a minimal GUI. It's based
on Python and Qt5 and is free software, licensed under the GPL.
on Python and Qt and is free software, licensed under the GPL.
It was inspired by other browsers/addons like dwb and Vimperator/Pentadactyl.
@ -34,7 +36,7 @@ show it.
*'URL'*::
URLs to open on startup (empty as a window separator).
=== optional arguments
=== options
*-h*, *--help*::
show this help message and exit
@ -62,8 +64,14 @@ show it.
*--backend* '{webkit,webengine}'::
Which backend to use.
*--qt-wrapper* '{PyQt6,PyQt5}'::
Which Qt wrapper to use. This can also be set via the QUTE_QT_WRAPPER environment variable. If both are set, the command line argument takes precedence.
*--desktop-file-name* 'DESKTOP_FILE_NAME'::
Set the base name of the desktop entry for this application. Used to set the app_id under Wayland. See https://doc.qt.io/qt-5/qguiapplication.html#desktopFileName-prop
Set the base name of the desktop entry for this application. Used to set the app_id under Wayland. See https://doc.qt.io/qt-6/qguiapplication.html#desktopFileName-prop
*--untrusted-args*::
Mark all following arguments as untrusted, which enforces that they are URLs/search terms (and not flags or commands)
=== debug arguments
*-l* '{critical,error,warning,info,debug,vdebug}', *--loglevel* '{critical,error,warning,info,debug,vdebug}'::
@ -120,18 +128,24 @@ environment, the directories configured there are used instead of the above
defaults.
== BUGS
Bugs are tracked in the Github issue tracker at
Bugs are tracked in the Github issue tracker at
https://github.com/qutebrowser/qutebrowser/issues.
If you found a bug, use the built-in ':report' command to create a bug report
with all information needed.
If you prefer, you can also write to the
https://lists.schokokeks.org/mailman/listinfo.cgi/qutebrowser[mailinglist] at
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
@ -149,11 +163,12 @@ this program. If not, see <https://www.gnu.org/licenses/>.
== RESOURCES
* Website: https://www.qutebrowser.org/
* Mailinglist: mailto:qutebrowser@lists.qutebrowser.org[] /
https://lists.schokokeks.org/mailman/listinfo.cgi/qutebrowser
https://listi.jpberlin.de/mailman/listinfo/qutebrowser
* Announce-only mailinglist: mailto:qutebrowser-announce@lists.qutebrowser.org[] /
https://lists.schokokeks.org/mailman/listinfo.cgi/qutebrowser-announce
* IRC: irc://irc.freenode.org/#qutebrowser[`#qutebrowser`] on
https://freenode.net/[Freenode]
https://listi.jpberlin.de/mailman/listinfo/qutebrowser-announce
* IRC: link:ircs://irc.libera.chat:6697/#qutebrowser[`#qutebrowser`] on
https://libera.chat/[Libera Chat] (https://web.libera.chat/#qutebrowser[webchat],
https://matrix.to/#qutebrowser:libera.chat[via Matrix])
* Github: https://github.com/qutebrowser/qutebrowser
== AUTHOR

View File

@ -68,55 +68,13 @@ Then install the needed debuginfo packages:
Archlinux
^^^^^^^^^
For Archlinux, no debug information is provided. You can either compile Qt
yourself (which will take a few hours even on a modern machine) or use
debugging symbols compiled/packaged by me (x86_64 only).
To install my pre-built packages
++++++++++++++++++++++++++++++++
First download and sign the key:
For Archlinux, debug information is provided via their https://wiki.archlinux.org/title/Debuginfod[Debuginfod instance]. To use it, set the following in your environment:
----
# pacman-key -r 0xD6A1C70FE80A0C82
$ pacman-key -f 0xD6A1C70FE80A0C82
Key fingerprint = 14AF EC28 70C6 4863 C5C7 ACCB D6A1 C70F E80A 0C82
# pacman-key --lsign-key 0xD6A1C70FE80A0C82
DEBUGINFOD_URLS="https://debuginfod.archlinux.org/"
----
Then edit your `/etc/pacman.conf` to add the repository to the bottom:
----
[qt-debug]
Server = https://qutebrowser.org/qt-debug/$arch
----
Then install the packages:
----
# pacman -Suy python-pyqt5-debug qt5-base-debug qt5-webkit-debug qt5-webengine-debug
----
The `-debug` packages conflict with the non-debug variants - it's safe to
remove them.
To compile by yourself
++++++++++++++++++++++
Note that building Qt will likely take multiple hours, even on a recent system.
I'd also expect it to take around 6 GB of RAM and 30 GB of disk space for a
successful compile run.
----
$ git clone https://github.com/qutebrowser/qt-debug-pkgbuild.git
$ cd qt-debug-pkgbuild
$ export DEBUG_CFLAGS='-ggdb3 -fvar-tracking-assignments -Og'
$ export DEBUG_CXXFLAGS='-ggdb3 -fvar-tracking-assignments -Og'
$ cd qt5
$ makepkg -si --pkg qt5-base-debug,qt5-webkit-debug,qt5-webengine-debug
$ cd ../pyqt5
$ makepkg -si --pkg python-pyqt5-debug
----
(Until early 2021, there was a custom [`qt-debug` repository](https://github.com/qutebrowser/qt-debug-pkgbuild). This is now archived.)
Getting the stack trace
~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -22,7 +22,10 @@ To call a userscript, it needs to be stored in your config or data directory und
`userscripts` (for example: `~/.local/share/qutebrowser/userscripts/myscript`),
or just use an absolute path.
NOTE: On Windows, only userscripts with `com`, `bat`, or `exe` extensions will be launched.
NOTE: On Windows, only userscripts with `com`, `bat`, or `exe` extensions will
be launched. As an additional resource, see
https://www.ii.com/qutebrowser-userscripts-on-windows/[Infinite Ink:
qutebrowser Userscripts on Windows].
Getting information
-------------------
@ -49,14 +52,16 @@ The following environment variables will be set when a userscript is launched:
In `command` mode:
- `QUTE_URL`: The current URL.
- `QUTE_URL`: The current page URL.
- `QUTE_TITLE`: The title of the current page.
- `QUTE_SELECTED_TEXT`: The text currently selected on the page.
- `QUTE_COUNT`: The `count` from the spawn command running the userscript.
- `QUTE_TAB_INDEX`: The current tab's index.
In `hints` mode:
- `QUTE_URL`: The URL selected via hints.
- `QUTE_CURRENT_URL`: The current page URL.
- `QUTE_SELECTED_TEXT`: The plain text of the element selected via hints.
- `QUTE_SELECTED_HTML`: The HTML of the element selected via hints.

View File

@ -4,6 +4,7 @@ ICONSIZES = 16 24 32 48 64 128 256 512
DATAROOTDIR = $(PREFIX)/share
DATADIR ?= $(DATAROOTDIR)
MANDIR ?= $(DATAROOTDIR)/man
A2X ?= a2x
ifdef DESTDIR
SETUPTOOLSOPTS = --root="$(DESTDIR)"
@ -14,7 +15,7 @@ all: man
man: doc/qutebrowser.1
doc/qutebrowser.1: doc/qutebrowser.1.asciidoc
a2x -f manpage $<
$(A2X) -f manpage $<
install: man
$(PYTHON) setup.py install --prefix="$(PREFIX)" --optimize=1 $(SETUPTOOLSOPTS)
@ -24,9 +25,9 @@ install: man
"$(DESTDIR)$(MANDIR)/man1/qutebrowser.1"
install -Dm644 misc/org.qutebrowser.qutebrowser.desktop \
"$(DESTDIR)$(DATADIR)/applications/org.qutebrowser.qutebrowser.desktop"
$(foreach i,$(ICONSIZES),install -Dm644 "icons/qutebrowser-$(i)x$(i).png" \
$(foreach i,$(ICONSIZES),install -Dm644 "qutebrowser/icons/qutebrowser-$(i)x$(i).png" \
"$(DESTDIR)$(DATADIR)/icons/hicolor/$(i)x$(i)/apps/qutebrowser.png";)
install -Dm644 icons/qutebrowser.svg \
install -Dm644 qutebrowser/icons/qutebrowser.svg \
"$(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps/qutebrowser.svg"
install -Dm755 -t "$(DESTDIR)$(DATADIR)/qutebrowser/userscripts/" \
$(filter-out misc/userscripts/__pycache__,$(wildcard misc/userscripts/*))

View File

@ -2570,7 +2570,7 @@
id="flowPara5604"
style="font-size:13.8667px;line-height:1.25;font-family:sans-serif;stroke-width:1.06667">Website: https://www.qutebrowser.org/ </flowPara><flowPara
id="flowPara5595"
style="font-size:13.8667px;line-height:1.25;font-family:sans-serif;stroke-width:1.06667">IRC: #qutebrowser on Freenode</flowPara><flowPara
style="font-size:13.8667px;line-height:1.25;font-family:sans-serif;stroke-width:1.06667">IRC: #qutebrowser on Libera Chat (irc.libera.chat)</flowPara><flowPara
id="flowPara5597"
style="font-size:13.8667px;line-height:1.25;font-family:sans-serif;stroke-width:1.06667">Mailinglist: qutebrowser@lists.qutebrowser.org</flowPara></flowRoot>
<text

Before

Width:  |  Height:  |  Size: 175 KiB

After

Width:  |  Height:  |  Size: 175 KiB

View File

@ -1,19 +1,6 @@
# Copyright 2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# qutebrowser is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with qutebrowser. If not, see <https://www.gnu.org/licenses/>.
# SPDX-License-Identifier: GPL-3.0-or-later
# NSIS installer header. Uses NsisMultiUser plugin and contains portions of
# its demo code, copyright 2017 Richard Drizin, Alex Mitev.
@ -150,7 +137,7 @@ var KeepReg
; Functions
Function CheckInstallation
; if there's an installed version, uninstall it first (I chose not to start the uninstaller silently, so that user sees what failed)
; if both per-user and per-machine versions are installed, unistall the one that matches $MultiUser.InstallMode
; if both per-user and per-machine versions are installed, uninstall the one that matches $MultiUser.InstallMode
StrCpy $0 ""
${if} $HasCurrentModeInstallation = 1
StrCpy $0 "$MultiUser.InstallMode"
@ -351,13 +338,12 @@ Section "Register with Windows" SectionWindowsRegister
!insertmacro UpdateRegDWORD SHCTX "SOFTWARE\Classes\$2" "EditFlags" 0x00000002
!insertmacro UpdateRegStr SHCTX "SOFTWARE\Classes\$2\DefaultIcon" "" "$1,0"
!insertmacro UpdateRegStr SHCTX "SOFTWARE\Classes\$2\shell" "" "open"
!insertmacro UpdateRegStr SHCTX "SOFTWARE\Classes\$2\shell\open\command" "" "$\"$1$\" $\"%1$\""
!insertmacro UpdateRegStr SHCTX "SOFTWARE\Classes\$2\shell\open\command" "" "$\"$1$\" --untrusted-args $\"%1$\""
!insertmacro UpdateRegStr SHCTX "SOFTWARE\Classes\$2\shell\open\ddeexec" "" ""
StrCmp $2 "${PRODUCT_NAME}HTML" 0 +4
StrCpy $2 "${PRODUCT_NAME}URL"
StrCpy $3 "${PRODUCT_NAME} URL"
Goto WriteRegHandler
!insertmacro UpdateRegStr SHCTX "SOFTWARE\Classes\$2" "URL Protocol" ""
${endif}
SectionEnd
@ -444,8 +430,23 @@ SectionEnd
; Callbacks
Function .onInit
StrCpy $KeepReg 1
!insertmacro CheckPlatform ${PLATFORM}
!insertmacro CheckMinWinVer ${MIN_WIN_VER}
; OS version check
; https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-osversioninfoa#remarks
; https://learn.microsoft.com/en-us/windows/release-health/release-information
; https://learn.microsoft.com/en-us/windows/release-health/windows11-release-information
${If} ${AtLeastWin11}
Goto _os_check_pass
${ElseIf} ${IsNativeAMD64} ; Windows 10 has no x86_64 emulation on arm64
${AndIf} ${AtLeastWin10}
${AndIf} ${AtLeastBuild} 17763 ; Windows 10 1809 (also in error message below)
Goto _os_check_pass
${EndIf}
MessageBox MB_OK|MB_ICONSTOP "This version of ${PRODUCT_NAME} requires a 64-bit$\r$\n\
version of Windows 10 1809 or later."
Abort
_os_check_pass:
${ifnot} ${UAC_IsInnerInstance}
!insertmacro CheckSingleInstance "Setup" "Global" "${SETUP_MUTEX}"
!insertmacro CheckSingleInstance "Application" "Local" "${APP_MUTEX}"
@ -543,8 +544,16 @@ Function PageInstallModeChangeMode
FunctionEnd
Function PageComponentsPre
GetDlgItem $0 $HWNDPARENT 1
SendMessage $0 ${BCM_SETSHIELD} 0 0 ; hide SHIELD (Windows Vista and above)
SendMessage $mui.Button.Next ${BCM_SETSHIELD} 0 0
StrCmpS $HasCurrentModeInstallation 0 +9
IfFileExists "$DESKTOP\${PRODUCT_NAME}.lnk" +4
SectionGetFlags ${SectionDesktopIcon} $1
IntOp $1 $1 & 0xFFFFFFFE
SectionSetFlags ${SectionDesktopIcon} $1
IfFileExists "$STARTMENU\${PRODUCT_NAME}.lnk" +4
SectionGetFlags ${SectionStartMenuIcon} $1
IntOp $1 $1 & 0xFFFFFFFE
SectionSetFlags ${SectionStartMenuIcon} $1
FunctionEnd
Function PageDirectoryPre

View File

@ -1,19 +1,6 @@
# Copyright 2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# qutebrowser is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with qutebrowser. If not, see <https://www.gnu.org/licenses/>.
# SPDX-License-Identifier: GPL-3.0-or-later
# NSIS pages header. Uses NsisMultiUser plugin and contains portions of
# its demo code, copyright 2017 Richard Drizin, Alex Mitev.
@ -22,7 +9,7 @@
; NsisMultiUser optional defines
!define MULTIUSER_INSTALLMODE_ALLOW_BOTH_INSTALLATIONS 0
!define MULTIUSER_INSTALLMODE_ALLOW_ELEVATION 1
!define MULTIUSER_INSTALLMODE_ALLOW_ELEVATION_IF_SILENT 0
!define MULTIUSER_INSTALLMODE_ALLOW_ELEVATION_IF_SILENT 1
!define MULTIUSER_INSTALLMODE_DEFAULT_ALLUSERS 1
!if ${PLATFORM} == "win64"
!define MULTIUSER_INSTALLMODE_64_BIT 1

View File

@ -1,20 +1,7 @@
# Copyright 2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
# encoding: iso-8859-1
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# qutebrowser is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with qutebrowser. If not, see <https://www.gnu.org/licenses/>.
# SPDX-License-Identifier: GPL-3.0-or-later
# NSIS installer script. Uses NsisMultiUser plugin and contains portions of
# its demo code, copyright 2017 Richard Drizin, Alex Mitev.
@ -43,6 +30,9 @@ ShowUninstDetails hide
!addplugindir /x86-unicode ".\plugins\x86-unicode"
!addincludedir ".\include"
!define MUI_BGCOLOR "SYSCLR:Window"
!define MUI_TEXTCOLOR "SYSCLR:WindowText"
!include MUI2.nsh
!include NsisMultiUser.nsh
!include StdUtils.nsh
@ -57,9 +47,9 @@ ShowUninstDetails hide
!define URL_UPDATE "https://qutebrowser.org/doc/install.html"
!define HELP_LINK "https://qutebrowser.org/doc/help/"
!define CONTACT "mail@qutebrowser.org"
!define COMMENTS "A keyboard-driven, vim-like browser based on PyQt5."
!define COMMENTS "A keyboard-driven, vim-like browser based on Python and Qt."
!define LANGID "1033" ; U.S. English
!define MIN_WIN_VER "XP"
!define MIN_WIN_VER "8"
!define SETUP_MUTEX "${PRODUCT_NAME} Setup Mutex" ; do not change this between program versions!
!define APP_MUTEX "${PRODUCT_NAME} App Mutex" ; do not change this between program versions!
!define REG_UN "Software\Microsoft\Windows\CurrentVersion\Uninstall"
@ -134,11 +124,11 @@ ShowUninstDetails hide
; If not defined, get VERSION from PROGEXE. Set DIST_DIR accordingly.
!ifndef VERSION
!define /ifndef DIST_DIR ".\..\..\dist\${PRODUCT_NAME}-${ARCH}"
!define /ifndef DIST_DIR ".\..\..\dist\${PRODUCT_NAME}"
!getdllversion "${DIST_DIR}\${PROGEXE}" expv_
!define VERSION "${expv_1}.${expv_2}.${expv_3}"
!else
!define /ifndef DIST_DIR ".\..\..\dist\${PRODUCT_NAME}-${VERSION}-${ARCH}"
!define /ifndef DIST_DIR ".\..\..\dist\${PRODUCT_NAME}-${VERSION}"
!endif
; Pack the exe header with upx if UPX is defined.

View File

@ -1,19 +1,6 @@
# Copyright 2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# qutebrowser is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with qutebrowser. If not, see <https://www.gnu.org/licenses/>.
# SPDX-License-Identifier: GPL-3.0-or-later
# NSIS uninstaller header. Uses NsisMultiUser plugin and contains portions of
# its demo code, copyright 2017 Richard Drizin, Alex Mitev.

View File

@ -1,19 +1,6 @@
# Copyright 2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# qutebrowser is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with qutebrowser. If not, see <https://www.gnu.org/licenses/>.
# SPDX-License-Identifier: GPL-3.0-or-later
# NSIS pages header. Uses NsisMultiUser plugin and contains portions of
# its demo code, copyright 2017 Richard Drizin, Alex Mitev.

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2017 suve <veg@svgames.pl> -->
<!-- SPDX-FileCopyrightText: suve <veg@svgames.pl> -->
<component type="desktop">
<id>org.qutebrowser.qutebrowser</id>
<metadata_license>CC-BY-SA-3.0</metadata_license>
@ -23,16 +23,16 @@
<launchable type="desktop-id">org.qutebrowser.qutebrowser.desktop</launchable>
<screenshots>
<screenshot type="default">
<image>https://raw.githubusercontent.com/qutebrowser/qutebrowser/master/doc/img/main.png</image>
<image>https://raw.githubusercontent.com/qutebrowser/qutebrowser/main/doc/img/main.png</image>
</screenshot>
<screenshot>
<image>https://raw.githubusercontent.com/qutebrowser/qutebrowser/master/doc/img/downloads.png</image>
<image>https://raw.githubusercontent.com/qutebrowser/qutebrowser/main/doc/img/downloads.png</image>
</screenshot>
<screenshot>
<image>https://raw.githubusercontent.com/qutebrowser/qutebrowser/master/doc/img/completion.png</image>
<image>https://raw.githubusercontent.com/qutebrowser/qutebrowser/main/doc/img/completion.png</image>
</screenshot>
<screenshot>
<image>https://raw.githubusercontent.com/qutebrowser/qutebrowser/master/doc/img/hints.png</image>
<image>https://raw.githubusercontent.com/qutebrowser/qutebrowser/main/doc/img/hints.png</image>
</screenshot>
</screenshots>
<url type="homepage">https://www.qutebrowser.org</url>
@ -44,6 +44,32 @@
</content_rating>
<releases>
<!-- Add new releases here -->
<release version='3.6.3' date='2025-11-30'/>
<release version='3.6.2' date='2025-11-27'/>
<release version='3.6.1' date='2025-11-03'/>
<release version='3.6.0' date='2025-10-24'/>
<release version='3.5.1' date='2025-06-05'/>
<release version='3.5.0' date='2025-04-12'/>
<release version="3.4.0" date="2024-12-14"/>
<release version="3.3.1" date="2024-10-12"/>
<release version="3.3.0" date="2024-10-12"/>
<release version="3.2.1" date="2024-06-25"/>
<release version="3.2.0" date="2024-06-03"/>
<release version="3.1.0" date="2023-12-08"/>
<release version="3.0.2" date="2023-10-19"/>
<release version="3.0.1" date="2023-10-19"/>
<release version="3.0.0" date="2023-08-18"/>
<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"/>
<release version="2.4.0" date="2021-10-21"/>
<release version="2.3.1" date="2021-07-28"/>
<release version="2.3.0" date="2021-06-28"/>
<release version="2.2.3" date="2021-06-01"/>
<release version="2.2.2" date="2021-05-20"/>
<release version="2.2.1" date="2021-04-29"/>
<release version="2.2.0" date="2021-04-13"/>
<release version="2.1.1" date="2021-04-01"/>
<release version="2.1.0" date="2021-03-12"/>

View File

@ -39,16 +39,16 @@ GenericName[ta]=இணைய உலாவி
GenericName[th]=
GenericName[tr]=Web Tarayıcı
GenericName[uk]=Навігатор Тенет
Comment=A keyboard-driven, vim-like browser based on PyQt5
Comment[de]=Ein Tastatur-gesteuerter, vim-ähnlicher Browser basierend auf PyQt5
Comment[it]= Un browser web vim-like utilizzabile da tastiera basato su PyQt5
Comment=A keyboard-driven, vim-like browser based on Python and Qt
Comment[de]=Ein Tastatur-gesteuerter, vim-ähnlicher Browser basierend auf Python und Qt
Comment[it]= Un browser web vim-like utilizzabile da tastiera basato su Python e Qt
Icon=qutebrowser
Type=Application
Categories=Network;WebBrowser;
Exec=qutebrowser %u
Exec=qutebrowser --untrusted-args %u
Terminal=false
StartupNotify=true
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/qute;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rdf+xml;image/gif;image/webp;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/qute;
Keywords=Browser
Actions=new-window;preferences;

View File

@ -1,13 +0,0 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
<file>icons/qutebrowser-16x16.png</file>
<file>icons/qutebrowser-24x24.png</file>
<file>icons/qutebrowser-32x32.png</file>
<file>icons/qutebrowser-48x48.png</file>
<file>icons/qutebrowser-64x64.png</file>
<file>icons/qutebrowser-96x96.png</file>
<file>icons/qutebrowser-128x128.png</file>
<file>icons/qutebrowser-256x256.png</file>
<file>icons/qutebrowser-512x512.png</file>
</qresource>
</RCC>

View File

@ -6,23 +6,117 @@ import os
sys.path.insert(0, os.getcwd())
from scripts import setupcommon
import qutebrowser
from qutebrowser.extensions import loader
block_cipher = None
INFO_PLIST_UPDATES = {
'CFBundleVersion': qutebrowser.__version__,
'CFBundleShortVersionString': qutebrowser.__version__,
'NSSupportsAutomaticGraphicsSwitching': True,
'NSHighResolutionCapable': True,
'NSRequiresAquaSystemAppearance': False,
'CFBundleURLTypes': [{
"CFBundleURLName": "http(s) URL",
"CFBundleURLSchemes": ["http", "https"]
}, {
"CFBundleURLName": "local file URL",
"CFBundleURLSchemes": ["file"]
}],
'CFBundleDocumentTypes': [
{
"CFBundleTypeIconFile": "document.icns",
"CFBundleTypeName": name,
"CFBundleTypeRole": "Viewer",
"LSItemContentTypes": [content_type],
}
for name, content_type in [
("GIF image", "com.compuserve.gif"),
("HTML document", "public.html"),
("XHTML document", "public.xhtml"),
("JavaScript script", "com.netscape.javascript-source"),
("JPEG image", "public.jpeg"),
("MHTML document", "org.ietf.mhtml"),
("HTML5 Audio (Ogg)", "org.xiph.ogg-audio"),
("HTML5 Video (Ogg)", "org.xiph.oggv"),
("PNG image", "public.png"),
("SVG document", "public.svg-image"),
("Plain text document", "public.text"),
("HTML5 Video (WebM)", "org.webmproject.webm"),
("WebP image", "org.webmproject.webp"),
("PDF Document", "com.adobe.pdf"),
]
],
'UTImportedTypeDeclarations': [
{
"UTTypeConformsTo": ["public.data", "public.content"],
"UTTypeDescription": "MIME HTML document",
"UTTypeIconFile": "document.icns",
"UTTypeIdentifier": "org.ietf.mhtml",
"UTTypeReferenceURL": "https://www.ietf.org/rfc/rfc2557",
"UTTypeTagSpecification": {
"com.apple.ostype": "MHTM",
"public.filename-extension": ["mht", "mhtml"],
"public.mime-type": ["multipart/related", "application/x-mimearchive"],
},
},
{
"UTTypeConformsTo": ["public.audio"],
"UTTypeDescription": "Ogg Audio",
"UTTypeIconFile": "document.icns",
"UTTypeIdentifier": "org.xiph.ogg-audio",
"UTTypeReferenceURL": "https://xiph.org/ogg/",
"UTTypeTagSpecification": {
"public.filename-extension": ["ogg", "oga"],
"public.mime-type": ["audio/ogg"],
},
},
{
"UTTypeConformsTo": ["public.movie"],
"UTTypeDescription": "Ogg Video",
"UTTypeIconFile": "document.icns",
"UTTypeIdentifier": "org.xiph.ogv",
"UTTypeReferenceURL": "https://xiph.org/ogg/",
"UTTypeTagSpecification": {
"public.filename-extension": ["ogm", "ogv"],
"public.mime-type": ["video/ogg"],
},
},
],
# https://developer.apple.com/documentation/avfoundation/cameras_and_media_capture/requesting_authorization_for_media_capture_on_macos
#
# Keys based on Google Chrome's .app, except Bluetooth keys which seem to
# be iOS-only.
#
# If we don't do this, we get a SIGABRT from macOS when those permissions
# are used, and even in some other situations (like logging into Google
# accounts)...
'NSCameraUsageDescription':
'A website in qutebrowser wants to use the camera.',
'NSLocationUsageDescription':
'A website in qutebrowser wants to use your location information.',
'NSMicrophoneUsageDescription':
'A website in qutebrowser wants to use your microphone.',
'NSBluetoothAlwaysUsageDescription':
'A website in qutebrowser wants to access Bluetooth.',
}
def get_data_files():
data_files = [
('../qutebrowser/html', 'html'),
('../qutebrowser/img', 'img'),
('../qutebrowser/javascript', 'javascript'),
('../qutebrowser/html/doc', 'html/doc'),
('../qutebrowser/git-commit-id', '.'),
('../qutebrowser/config/configdata.yml', 'config'),
('../qutebrowser/html', 'qutebrowser/html'),
('../qutebrowser/img', 'qutebrowser/img'),
('../qutebrowser/icons', 'qutebrowser/icons'),
('../qutebrowser/javascript', 'qutebrowser/javascript'),
('../qutebrowser/html/doc', 'qutebrowser/html/doc'),
('../qutebrowser/git-commit-id', 'qutebrowser/git-commit-id'),
('../qutebrowser/config/configdata.yml', 'qutebrowser/config'),
]
if os.path.exists(os.path.join('qutebrowser', '3rdparty', 'pdfjs')):
data_files.append(('../qutebrowser/3rdparty/pdfjs', '3rdparty/pdfjs'))
data_files.append(('../qutebrowser/3rdparty/pdfjs', 'qutebrowser/3rdparty/pdfjs'))
else:
print("Warning: excluding pdfjs as it's not present!")
@ -30,7 +124,7 @@ def get_data_files():
def get_hidden_imports():
imports = ['PyQt5.QtOpenGL', 'PyQt5._QOpenGLFunctions_2_0']
imports = ["PyQt5.QtOpenGL"] if "PYINSTALLER_QT5" in os.environ else []
for info in loader.walk_components():
imports.append(info.name)
return imports
@ -40,14 +134,19 @@ setupcommon.write_git_file()
if os.name == 'nt':
icon = '../icons/qutebrowser.ico'
icon = '../qutebrowser/icons/qutebrowser.ico'
elif sys.platform == 'darwin':
icon = '../icons/qutebrowser.icns'
icon = '../qutebrowser/icons/qutebrowser.icns'
else:
icon = None
DEBUG = os.environ.get('PYINSTALLER_DEBUG', '').lower() in ['1', 'true']
if DEBUG:
options = options = [('v', None, 'OPTION')]
else:
options = []
a = Analysis(['../qutebrowser/__main__.py'],
@ -65,6 +164,7 @@ pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
options,
exclude_binaries=True,
name='qutebrowser',
icon=icon,
@ -84,5 +184,5 @@ coll = COLLECT(exe,
app = BUNDLE(coll,
name='qutebrowser.app',
icon=icon,
# https://github.com/pyinstaller/pyinstaller/blob/b78bfe530cdc2904f65ce098bdf2de08c9037abb/PyInstaller/hooks/hook-PyQt5.QtWebEngineWidgets.py#L24
bundle_identifier='org.qt-project.Qt.QtWebEngineCore')
info_plist=INFO_PLIST_UPDATES,
bundle_identifier='org.qutebrowser.qutebrowser')

View File

@ -19,4 +19,11 @@ Some examples:
#@ filter: mypkg != 1.0.0
#@ ignore: mypkg, otherpkg
#@ replace: foo bar
## Use the marker line to restrict the unpinned Flask requirement to python
## 3.7. For python 3.7 add a specific version into the output.
Flask
# Python 3.7
#@ markers: Flask python_version>="3.7"
#@ add: Flask==2.2.5 ; python_version=="3.7.*"
```

View File

@ -1,8 +0,0 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
build==0.3.1.post1
check-manifest==0.46
packaging==20.9
pep517==0.10.0
pyparsing==2.4.7
toml==0.10.2

View File

@ -1 +0,0 @@
check-manifest

View File

@ -1,24 +1,73 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
bump2version==1.0.1
certifi==2020.12.5
cffi==1.14.5
chardet==4.0.0
cryptography==3.4.7
github3.py==2.0.0
hunter==3.3.2
idna==2.10
jwcrypto==0.8
manhole==1.8.0
packaging==20.9
pycparser==2.20
Pympler==0.9
pyparsing==2.4.7
PyQt-builder==1.9.1
python-dateutil==2.8.1
requests==2.25.1
sip==6.0.3
six==1.15.0
toml==0.10.2
uritemplate==3.0.1
# urllib3==1.26.4
annotated-types==0.7.0
anyio==4.12.0
autocommand==2.2.2
backports.tarfile==1.2.0
bracex==2.6
build==1.3.0
bump-my-version==1.2.5
certifi==2025.11.12
cffi==2.0.0
charset-normalizer==3.4.4
click==8.1.8
cryptography==46.0.3
docutils==0.22.3
exceptiongroup==1.3.1
github3.py==4.0.1
h11==0.16.0
httpcore==1.0.9
httpx==0.28.1
hunter==3.9.0
id==1.5.0
idna==3.11
importlib_metadata==8.7.0
importlib_resources==6.5.2
inflect==7.3.1
jaraco.classes==3.4.0
jaraco.collections==5.1.0
jaraco.context==6.0.1
jaraco.functools==4.0.1
jaraco.text==3.12.1
jeepney==0.9.0
keyring==25.7.0
manhole==1.8.1
markdown-it-py==3.0.0
mdurl==0.1.2
more-itertools==10.8.0
nh3==0.3.2
packaging==25.0
platformdirs==4.4.0
prompt_toolkit==3.0.52
pycparser==2.23
pydantic==2.12.5
pydantic-settings==2.11.0
pydantic_core==2.41.5
Pygments==2.19.2
PyJWT==2.10.1
Pympler==1.1
pyproject_hooks==1.2.0
PyQt-builder==1.19.1
python-dateutil==2.9.0.post0
python-dotenv==1.2.1
questionary==2.1.1
readme_renderer==44.0
requests==2.32.5
requests-toolbelt==1.0.0
rfc3986==2.0.0
rich==14.2.0
rich-click==1.9.4
SecretStorage==3.3.3
sip==6.14.0
six==1.17.0
tomli==2.3.0
tomlkit==0.13.3
twine==6.2.0
typeguard==4.3.0
typing-inspection==0.4.2
typing_extensions==4.15.0
uritemplate==4.2.0
# urllib3==2.6.2
wcmatch==10.1
wcwidth==0.2.14
zipp==3.23.0

View File

@ -1,9 +1,16 @@
hunter
pympler
github3.py
bump2version
bump-my-version
requests
pyqt-builder
build
twine
# Included to override setuptools' vendored version that is being included in
# the lock file by pip freeze.
importlib_resources
platformdirs
# Already included via test requirements
#@ ignore: urllib3

View File

@ -0,0 +1,3 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
asciidoc==10.2.1

View File

@ -0,0 +1 @@
asciidoc

View File

@ -1,24 +1,23 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
attrs==20.3.0
flake8==3.9.0
flake8-bugbear==21.4.3
flake8-builtins==1.5.3
flake8-comprehensions==3.4.0
flake8-copyright==0.2.2
flake8-debugger==4.0.0
flake8-deprecated==1.3
flake8-docstrings==1.6.0
flake8-future-import==0.4.6
flake8-mock==0.3
flake8-polyfill==1.0.2
attrs==25.4.0
flake8==7.3.0
flake8-bugbear==24.12.12
flake8-builtins==3.0.0
flake8-comprehensions==3.17.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==2.1.0
flake8-string-format==0.3.0
flake8-tidy-imports==4.2.1
flake8-tidy-imports==4.12.0
flake8-tuple==0.4.1
mccabe==0.6.1
pep8-naming==0.11.1
pycodestyle==2.7.0
pydocstyle==6.0.0
pyflakes==2.3.1
six==1.15.0
snowballstemmer==2.1.0
mccabe==0.7.0
pep8-naming==0.15.1
pycodestyle==2.14.0
pydocstyle==6.3.0
pyflakes==3.4.0
six==1.17.0
snowballstemmer==3.0.1

View File

@ -2,15 +2,18 @@ flake8
flake8-bugbear
flake8-builtins
flake8-comprehensions
flake8-copyright
flake8-debugger
flake8-deprecated
flake8-deprecated!=2.0.0
flake8-docstrings
# https://github.com/savoirfairelinux/flake8-copyright/issues/19
# flake8-copyright
flake8-future-import
flake8-mock
# https://github.com/aleGpereira/flake8-mock/issues/10
# flake8-mock
flake8-string-format
flake8-tidy-imports
flake8-tuple
flake8-pytest-style
pep8-naming
pydocstyle
pyflakes

View File

@ -1,19 +1,20 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
chardet==4.0.0
diff-cover==5.0.1
importlib-metadata==3.10.0
importlib-resources==5.1.2
inflect==5.3.0
Jinja2==2.11.3
jinja2-pluralize==0.3.0
lxml==4.6.3
MarkupSafe==1.1.1
mypy==0.812
mypy-extensions==0.4.3
pluggy==0.13.1
Pygments==2.8.1
PyQt5-stubs==5.15.2.0
typed-ast==1.4.3
typing-extensions==3.7.4.3
zipp==3.4.1
chardet==5.2.0
diff_cover==10.0.0
Jinja2==3.1.6
librt==0.7.3
lxml==6.0.2
MarkupSafe==3.0.3
mypy==1.19.0
mypy_extensions==1.1.0
pathspec==0.12.1
pluggy==1.6.0
Pygments==2.19.2
PyQt5-stubs==5.15.6.0
tomli==2.3.0
types-colorama==0.4.15.20250801
types-docutils==0.22.3.20251115
types-Pygments==2.19.0.20251121
types-PyYAML==6.0.12.20250915
typing_extensions==4.15.0

View File

@ -1,8 +1,8 @@
mypy
lxml # For HTML reports
diff-cover
PyQt5-stubs
# So stubs are available even on newer Python versions
importlib_resources
importlib_metadata
PyQt5-stubs
types-PyYAML
types-colorama
types-Pygments

View File

@ -1,8 +0,0 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
appdirs==1.4.4
packaging==20.4
pyparsing==2.4.7
setuptools==47.3.1
six==1.15.0
wheel==0.34.2

View File

@ -1,5 +1,8 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
altgraph==0.17
pyinstaller==4.2
pyinstaller-hooks-contrib==2021.1
altgraph==0.17.5
importlib_metadata==8.7.0
packaging==25.0
pyinstaller==6.17.0
pyinstaller-hooks-contrib==2025.10
zipp==3.23.0

View File

@ -1 +1 @@
PyInstaller
pyinstaller

View File

@ -1,25 +1,28 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
astroid==2.3.3 # rq.filter: < 2.4
certifi==2020.12.5
cffi==1.14.5
chardet==4.0.0
cryptography==3.4.7
future==0.18.2
github3.py==2.0.0
idna==2.10
isort==4.3.21
jwcrypto==0.8
lazy-object-proxy==1.4.3
mccabe==0.6.1
pefile==2019.4.18
pycparser==2.20
pylint==2.4.4 # rq.filter: < 2.5
python-dateutil==2.8.1
astroid==3.3.11
certifi==2025.11.12
cffi==2.0.0
charset-normalizer==3.4.4
cryptography==46.0.3
dill==0.4.0
github3.py==4.0.1
idna==3.11
importlib_metadata==8.7.0
isort==6.1.0
mccabe==0.7.0
pefile==2024.8.26
platformdirs==4.4.0
pycparser==2.23
PyJWT==2.10.1
pylint==3.3.9
python-dateutil==2.9.0.post0
./scripts/dev/pylint_checkers
requests==2.25.1
six==1.15.0
typed-ast==1.4.3 ; python_version<"3.8"
uritemplate==3.0.1
# urllib3==1.26.4
wrapt==1.11.2
requests==2.32.5
six==1.17.0
tomli==2.3.0
tomlkit==0.13.3
typing_extensions==4.15.0
uritemplate==4.2.0
# urllib3==2.6.2
zipp==3.23.0

View File

@ -1,14 +1,12 @@
pylint<2.5
pylint
astroid
./scripts/dev/pylint_checkers
requests
github3.py
pefile
# fix qute-pylint location
#@ replace: qute-pylint.* ./scripts/dev/pylint_checkers
#@ markers: typed-ast python_version<"3.8"
#@ filter: pylint < 2.5
#@ filter: astroid < 2.4
#@ replace: qute[_-]pylint.* ./scripts/dev/pylint_checkers
# Already included via test requirements
#@ ignore: urllib3

View File

@ -1,5 +0,0 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
PyQt5==5.12.3 # rq.filter: < 5.13
PyQt5-sip==12.8.1
PyQtWebEngine==5.12.1 # rq.filter: < 5.13

View File

@ -1,4 +0,0 @@
#@ filter: PyQt5 < 5.13
#@ filter: PyQtWebEngine < 5.13
PyQt5 >= 5.12, < 5.13
PyQtWebEngine >= 5.12, < 5.13

View File

@ -1,5 +0,0 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
PyQt5==5.13.2 # rq.filter: < 5.14
PyQt5-sip==12.8.1
PyQtWebEngine==5.13.2 # rq.filter: < 5.14

View File

@ -1,4 +0,0 @@
#@ filter: PyQt5 < 5.14
#@ filter: PyQtWebEngine < 5.14
PyQt5 >= 5.13, < 5.14
PyQtWebEngine >= 5.13, < 5.14

View File

@ -1,5 +0,0 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
PyQt5==5.14.2 # rq.filter: < 5.15
PyQt5-sip==12.8.1
PyQtWebEngine==5.14.0 # rq.filter: < 5.15

View File

@ -1,4 +0,0 @@
#@ filter: PyQt5 < 5.15
#@ filter: PyQtWebEngine < 5.15
PyQt5 >= 5.14, < 5.15
PyQtWebEngine >= 5.14, < 5.15

View File

@ -1,5 +0,0 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
PyQt5==5.15.0 # rq.filter: == 5.15.0
PyQt5-sip==12.8.1
PyQtWebEngine==5.15.0 # rq.filter: == 5.15.0

View File

@ -1,4 +0,0 @@
#@ filter: PyQt5 == 5.15.0
#@ filter: PyQtWebEngine == 5.15.0
PyQt5 == 5.15.0
PyQtWebEngine == 5.15.0

View File

@ -0,0 +1,5 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
PyQt5==5.15.2 # rq.filter: == 5.15.2
PyQt5_sip==12.17.1
PyQtWebEngine==5.15.2 # rq.filter: == 5.15.2

View File

@ -0,0 +1,4 @@
#@ filter: PyQt5 == 5.15.2
#@ filter: PyQtWebEngine == 5.15.2
PyQt5 == 5.15.2
PyQtWebEngine == 5.15.2

View File

@ -1,7 +1,7 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
PyQt5==5.15.4 # rq.filter: < 5.16
PyQt5-Qt5==5.15.2
PyQt5-sip==12.8.1
PyQtWebEngine==5.15.4 # rq.filter: < 5.16
PyQtWebEngine-Qt5==5.15.2
PyQt5==5.15.11 # rq.filter: < 5.16
PyQt5-Qt5==5.15.18
PyQt5_sip==12.17.1
PyQtWebEngine==5.15.7 # rq.filter: < 5.16
PyQtWebEngine-Qt5==5.15.18

View File

@ -0,0 +1,7 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
PyQt5==5.15.11
PyQt5-Qt5==5.15.18
PyQt5_sip==12.17.1
PyQtWebEngine==5.15.7
PyQtWebEngine-Qt5==5.15.18

View File

@ -0,0 +1,2 @@
PyQt5
PyQtWebEngine

View File

@ -0,0 +1,8 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
PyQt6==6.10.1
PyQt6-Qt6==6.10.1
PyQt6-WebEngine==6.10.0
PyQt6-WebEngine-Qt6==6.10.1
PyQt6_sip==13.10.2
--extra-index-url https://www.riverbankcomputing.com/pypi/simple/

View File

@ -0,0 +1,8 @@
PyQt6 >= 6.10, < 6.11
PyQt6-Qt6 >= 6.10, < 6.11
PyQt6-WebEngine >= 6.10, < 6.11
PyQt6-WebEngine-Qt6 >= 6.10, < 6.11
# WORKAROUND for https://www.riverbankcomputing.com/pipermail/pyqt/2025-October/046347.html
#@ add: --extra-index-url https://www.riverbankcomputing.com/pypi/simple/
--extra-index-url https://www.riverbankcomputing.com/pypi/simple/

View File

@ -0,0 +1,7 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
PyQt6==6.2.3
PyQt6-Qt6==6.2.4
PyQt6-WebEngine==6.2.1
PyQt6-WebEngine-Qt6==6.2.4
PyQt6_sip==13.10.2

View File

@ -0,0 +1,4 @@
PyQt6 >= 6.2, < 6.3
PyQt6-Qt6 >= 6.2, < 6.3
PyQt6-WebEngine >= 6.2, < 6.3
PyQt6-WebEngine-Qt6 >= 6.2, < 6.3

View File

@ -0,0 +1,7 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
PyQt6==6.3.1
PyQt6-Qt6==6.3.2
PyQt6-WebEngine==6.3.1
PyQt6-WebEngine-Qt6==6.3.2
PyQt6_sip==13.10.2

View File

@ -0,0 +1,4 @@
PyQt6 >= 6.3, < 6.4
PyQt6-Qt6 >= 6.3, < 6.4
PyQt6-WebEngine >= 6.3, < 6.4
PyQt6-WebEngine-Qt6 >= 6.3, < 6.4

View File

@ -0,0 +1,7 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
PyQt6==6.4.2
PyQt6-Qt6==6.4.3
PyQt6-WebEngine==6.4.0
PyQt6-WebEngine-Qt6==6.4.3
PyQt6_sip==13.10.2

View File

@ -0,0 +1,4 @@
PyQt6 >= 6.4, < 6.5
PyQt6-Qt6 >= 6.4, < 6.5
PyQt6-WebEngine >= 6.4, < 6.5
PyQt6-WebEngine-Qt6 >= 6.4, < 6.5

View File

@ -0,0 +1,7 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
PyQt6==6.5.3
PyQt6-Qt6==6.5.3
PyQt6-WebEngine==6.5.0
PyQt6-WebEngine-Qt6==6.5.3
PyQt6_sip==13.10.2

View File

@ -0,0 +1,4 @@
PyQt6 >= 6.5, < 6.6
PyQt6-Qt6 >= 6.5, < 6.6
PyQt6-WebEngine >= 6.5, < 6.6
PyQt6-WebEngine-Qt6 >= 6.5, < 6.6

View File

@ -0,0 +1,7 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
PyQt6==6.6.1
PyQt6-Qt6==6.6.3
PyQt6-WebEngine==6.6.0
PyQt6-WebEngine-Qt6==6.6.3
PyQt6_sip==13.10.2

View File

@ -0,0 +1,4 @@
PyQt6 >= 6.6, < 6.7
PyQt6-Qt6 >= 6.6, < 6.7
PyQt6-WebEngine >= 6.6, < 6.7
PyQt6-WebEngine-Qt6 >= 6.6, < 6.7

View File

@ -0,0 +1,8 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
PyQt6==6.7.1
PyQt6-Qt6==6.7.3
PyQt6-WebEngine==6.7.0
PyQt6-WebEngine-Qt6==6.7.3
PyQt6-WebEngineSubwheel-Qt6==6.7.3
PyQt6_sip==13.10.2

View File

@ -0,0 +1,4 @@
PyQt6 >= 6.7, < 6.8
PyQt6-Qt6 >= 6.7, < 6.8
PyQt6-WebEngine >= 6.7, < 6.8
PyQt6-WebEngine-Qt6 >= 6.7, < 6.8

View File

@ -0,0 +1,7 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
PyQt6==6.8.1
PyQt6-Qt6==6.8.2
PyQt6-WebEngine==6.8.0
PyQt6-WebEngine-Qt6==6.8.2
PyQt6_sip==13.10.2

View File

@ -0,0 +1,4 @@
PyQt6 >= 6.8, < 6.9
PyQt6-Qt6 >= 6.8, < 6.9
PyQt6-WebEngine >= 6.8, < 6.9
PyQt6-WebEngine-Qt6 >= 6.8, < 6.9

View File

@ -0,0 +1,7 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
PyQt6==6.9.1
PyQt6-Qt6==6.9.2
PyQt6-WebEngine==6.9.0
PyQt6-WebEngine-Qt6==6.9.2
PyQt6_sip==13.10.2

View File

@ -0,0 +1,4 @@
PyQt6 >= 6.9, < 6.10
PyQt6-Qt6 >= 6.9, < 6.10
PyQt6-WebEngine >= 6.9, < 6.10
PyQt6-WebEngine-Qt6 >= 6.9, < 6.10

View File

@ -0,0 +1,8 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
PyQt6==6.10.1
PyQt6-Qt6==6.10.1
PyQt6-WebEngine==6.10.0
PyQt6-WebEngine-Qt6==6.10.1
PyQt6_sip==13.10.2
--extra-index-url https://www.riverbankcomputing.com/pypi/simple/

View File

@ -0,0 +1,8 @@
PyQt6
PyQt6-Qt6
PyQt6-WebEngine
PyQt6-WebEngine-Qt6
# WORKAROUND for https://www.riverbankcomputing.com/pipermail/pyqt/2025-October/046347.html
#@ add: --extra-index-url https://www.riverbankcomputing.com/pypi/simple/
--extra-index-url https://www.riverbankcomputing.com/pypi/simple/

View File

@ -1,7 +0,0 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
PyQt5==5.15.3
PyQt5-Qt==5.15.2
PyQt5-sip==12.8.1
PyQtWebEngine==5.15.3
PyQtWebEngine-Qt==5.15.2

View File

@ -1,2 +0,0 @@
PyQt5==5.15.3
PyQtWebEngine==5.15.3

View File

@ -1,7 +1,8 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
PyQt5==5.15.4
PyQt5-Qt5==5.15.2
PyQt5-sip==12.8.1
PyQtWebEngine==5.15.4
PyQtWebEngine-Qt5==5.15.2
PyQt6==6.10.1
PyQt6-Qt6==6.10.1
PyQt6-WebEngine==6.10.0
PyQt6-WebEngine-Qt6==6.10.1
PyQt6_sip==13.10.2
--extra-index-url https://www.riverbankcomputing.com/pypi/simple/

View File

@ -1,2 +1,8 @@
PyQt5
PyQtWebEngine
PyQt6
PyQt6-Qt6
PyQt6-WebEngine
PyQt6-WebEngine-Qt6
# WORKAROUND for https://www.riverbankcomputing.com/pipermail/pyqt/2025-October/046347.html
#@ add: --extra-index-url https://www.riverbankcomputing.com/pypi/simple/
--extra-index-url https://www.riverbankcomputing.com/pypi/simple/

View File

@ -1,5 +1,18 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
docutils==0.17
Pygments==2.8.1
pyroma==3.1
build==1.3.0
certifi==2025.11.12
charset-normalizer==3.4.4
check-manifest==0.51
docutils==0.22.3
idna==3.11
importlib_metadata==8.7.0
packaging==25.0
Pygments==2.19.2
pyproject_hooks==1.2.0
pyroma==5.0.1
requests==2.32.5
tomli==2.3.0
trove-classifiers==2025.12.1.14
urllib3==2.6.2
zipp==3.23.0

Some files were not shown because too many files have changed in this diff Show More