Commit Graph

25516 Commits

Author SHA1 Message Date
toofar ed76333271 Maybe move to pip as build frontend in makefile
It seems to me that installers are more likely to have pip installed
than build, so if we can get by using pip as the frontend in the
makefile, then we should.

pip does not have a way to build an sdist (tarball), so we'll have to
see if any of the packaging workflows depend on that. It does seem to
dump the source tree in dist/lib, but I'm not sure if that is part of
the API or not.
2025-06-08 16:54:56 +12:00
toofar f98a967b21 Add test for aur packaging workflow.
Previously I've added comparison methods for testing alternate direct
implementations of setup.py. Now I'm working through the actual
packaging workflows that I can find.

The source I am following is here: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=qutebrowser-git

For the replacement I've substituted:

* setup.py build -> python3 -m build
    * I think these are a little different because `setup.py build` puts
      all the source file on disk, but build outputs a wheel and
      tarball.
* setup.py install -> pip install
    * It's a bit awkward using a different frontend than the other
      makefile target (build vs pip) but with build we would have to
      call pip to install the wheel anyway. On the other hand, pip
      doesn't seem to have an option to just create a wheel
    * The only difference in outputs is that previously it was passing
      `--optimize=1` to setup.py, pip install doesn't seem to have an
      option to pass a specific optimization level

The diff is included in the source code currently, I'll move it to a GH
comment when I've gone through a few more workflows.
2025-06-08 16:24:08 +12:00
toofar 00cde1ae7c test script: stash changes so checkouts can proceed 2025-06-03 21:28:57 +12:00
toofar ebcf8363b6 wip 2025-05-17 12:08:38 +12:00
toofar 5228960c77 Add test script to compare output file trees etc 2025-05-10 17:28:38 +12:00
toofar f9808b55ab Make description attribute static
Hmm, seems the description can't be read from an attribute, why? Anyway,
it's not like it changes often. Lets copy it, and add a note to change
the python code to read from importlib.metadata, if we even want to?

TODO:
* compare the output file-by-file of pip install -e before and after
* compare the output file-by-file of setup.py install/build/wheel or
  whatever and the corresponding build commands (and update makefile)
* think about removing stuff that isn't used from `__init__.py`, or
  making it read from importlib.metadata
* see how it looks with hatch (dynamic bits and build hooks)
2025-05-03 16:44:15 +12:00
toofar f72ce65e8e wip: initial pyproject.toml 2025-05-03 16:44:15 +12: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