Commit Graph

368 Commits

Author SHA1 Message Date
Florian Bruhin 8ae5e3d83b version: Use correct profile for extension list
See #8785
2025-11-21 22:50:52 +01:00
Florian Bruhin 66cbe0d9c9 Add QtWebEngine 6.10.1 security patch version 2025-11-21 18:31:43 +01:00
Florian Bruhin 242cf2a22e version: Add basic info about loaded WebExtensions 2025-10-23 23:24:40 +02:00
Florian Bruhin 6b48ae4084 Update security patch version for Qt 6.10 release 2025-10-10 19:03:14 +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 326a83309a version: Update for Qt 6.10 Beta 4 2025-09-11 01:00:01 +02:00
Florian Bruhin 17522478db version: Update for QtWebEngine 6.9.2 and 6.10 2025-09-02 23:47:00 +02:00
Florian Bruhin 6b3b83981a Qt 6.10: Adjust security patch version 2025-07-21 13:47:45 +02: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 81546c97ae version: Add security patch level for QtWebEngine 6.10 Beta 1 2025-06-24 20:42:03 +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
Florian Bruhin bff2ad9086 version: Add QtWebEngine 6.9.1 2025-06-05 11:33:41 +02: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
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 351fef8c1e Update comment 2025-04-10 15:52:50 +02:00
Florian Bruhin 4dde8e1594 version: Add security patch version for Qt 6.8.3 2025-03-26 13:51:52 +01:00
Florian Bruhin 4c9e989c39 Qt 6.9: Upgrade security patch version 2025-03-15 12:28:55 +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 4a1a30bc33 Add security patch version for Qt 6.8.2 2025-02-03 10:55:23 +01:00
Florian Bruhin 3144264a9d First adjustments for Qt 6.9
See #8444
2025-01-03 16:45:39 +01:00
Florian Bruhin c0c3caead5 Add Qt 5.15.18 Chromium version 2024-12-10 08:28:35 +01:00
Florian Bruhin e158a480f5 Add QtWebEngine 6.8.1 Chromium security version 2024-12-04 21:17:03 +01:00
Florian Bruhin dc5662b141 Update chromium release dates 2024-10-21 10:28:32 +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 775db2caef Update Chromium security patch versions 2024-10-12 22:19:58 +02:00
toofar 0b0eb46b55 update expected security patch version for Qt 6.7.3 2024-10-05 12:03:35 +13:00
toofar 3331a4cc6a Dump 6.8 beta4 security patch version 2024-09-06 19:35:51 +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 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
Florian Bruhin 3221e6ca49 Update Chromium version information 2024-06-18 16:36:25 +02:00
Florian Bruhin 7d32df88cb Adjust security patch version for Qt 6.7.1 2024-05-25 14:51:29 +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
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
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 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
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 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 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 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
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
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
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 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
Florian Bruhin 08e498e207 First chromium version update for Qt 6.6 2023-09-08 19:19:40 +02:00
Florian Bruhin d5b5f26996 Update Chromium version comments 2023-08-19 19:09:14 +02: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