Commit Graph

25196 Commits

Author SHA1 Message Date
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