Commit Graph

25361 Commits

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