Commit Graph

22062 Commits

Author SHA1 Message Date
Florian Bruhin 0ce3d58bb1 Release v2.1.1 2021-04-01 11:28:41 +02:00
Florian Bruhin 9b5d119f4e Update changelog from master 2021-04-01 10:19:42 +02:00
Florian Bruhin 8172bfeab2 Update requirements from master 2021-04-01 10:10:21 +02:00
Florian Bruhin aae64890d6 Revert "Fix gopass mime format for qute-pass userscript"
This reverts commit 3284ec900e.

Not needed as most gopass versions do this when stdout is a pipe, but it
interfers with reading the username from the secret.

See the discussion in #6323 for more detail, and #5972 for the original
PR.

(cherry picked from commit 9115ea4a4bbc4858d7fa0422cff59c29699fa53a)
2021-04-01 10:04:59 +02:00
Florian Bruhin d59a189987 tests: Skip test_real_chromium_version if guessing too much
(cherry picked from commit c7657e65cc)
2021-03-31 13:57:51 +02:00
Florian Bruhin e1ea8de74f tests: Fix accidental network access
Running :adblock-update also updates ABP lists and thus tries downloading easylist.
(cherry picked from commit ac9388fb1b)
2021-03-31 13:57:51 +02:00
Florian Bruhin ccbd1e41d8 tests: Make test_real_chromium_version clearer
(cherry picked from commit c9e6aea1b4)
2021-03-31 13:57:51 +02:00
Florian Bruhin 8d18255563 flatpak: Try getting ID from /.flatpak_info
(cherry picked from commit 8b49d87526)
2021-03-31 13:57:51 +02:00
Florian Bruhin 45d34846c8 Increase vim compatibility
Vim has this, and it's almost easter, so clearly we should have it too.
Also it's from Monty Python, which makes it even more fitting.

HEAD KNIGHT: Ni!
KNIGHTS: Ni! Ni! Ni!
ARTHUR: Who are you?
HEAD KNIGHT: We are the Knights Who Say... Ni!
ARTHUR: No! Not the Knights Who Say Ni!
HEAD KNIGHT: The same!
BEDEVERE: Who are they?
HEAD KNIGHT: We are the keepers of the sacred words: Ni, Pen, and Ni-wom!
RANDOM: Ni-wom!
ARTHUR: Those who hear them seldom live to tell the tale!
HEAD KNIGHT: The Knights Who Say Ni demand a sacrifice!
ARTHUR: Knights of Ni, we are but simple travellers who seek the enchanter who lives beyond these woods.
HEAD KNIGHT: Ni! Ni! Ni! Ni!
ARTHUR and PARTY: Oh, ow!
HEAD KNIGHT: We shall say 'nee' again to you if you do not appease us.
ARTHUR: Well, what is it you want?
HEAD KNIGHT: We want... a shrubbery!
[dramatic chord]
ARTHUR: A what?
HEAD KNIGHT: Ni! Ni!
ARTHUR and PARTY: Oh, ow!
ARTHUR: Please, please! No more! We shall find a shrubbery.
HEAD KNIGHT: You must return here with a shrubbery or else you will never pass through this wood alive!
ARTHUR: O Knights of Ni, you are just and fair, and we will return with a shrubbery.
HEAD KNIGHT: One that looks nice.
ARTHUR: Of course.
HEAD KNIGHT: And not too expensive.
ARTHUR: Yes.
HEAD KNIGHTS: Now... go!

ARTHUR: Old crone! Is there anywhere in this town where we could buy a shrubbery!
[dramatic chord]
CRONE: Who sent you?
ARTHUR: The Knights Who Say Nee.
CRONE: Agh! No! Never! We have no shrubberies here.
ARTHUR: If you do not tell us where we can buy a shrubbery, my friend
and I will say... we will say... `nee'.
CRONE: Agh! Do your worst!
ARTHUR: Very well! If you will not assist us voluntarily,... Ni!
CRONE: No! Never! No shrubberies!
ARTHUR: Ni!
BEDEVERE: Noo! Noo!
ARTHUR: No, no, no, no -- it's not that, it's 'Ni'.
BEDEVERE: Noo!
ARTHUR: No, no -- 'Ni'. You're not doing it properly.
BEDEVERE: Noo! Ni!
ARTHUR: That's it, that's it, you've got it.
ARTHUR and BEDEVERE: Ni! Ni!
ROGER: Are you saying 'Ni' to that old woman?
ARTHUR: Um, yes.
ROGER: Oh, what sad times are these when passing ruffians can say `Ni' at will to old ladies. There is a pestilence upon this land, nothing is sacred. Even those who arrange and design shrubberies are under considerable economic stress at this period in history.
ARTHUR: Did you say `shrubberies'?
ROGER: Yes, shrubberies are my trade -- I am a shrubber. My name is Roger the Shrubber. I arrange, design, and sell shrubberies.
BEDEVERE: Ni!
ARTHUR: No! No, no, no! No!
ARTHUR: O, Knights of Ni, we have brought you your shrubbery. May we go now?
HEAD KNIGHT: It is a good shrubbery. I like the laurels particularly. But there is one small problem.
ARTHUR: What is that?
HEAD KNIGHT: We are now... no longer the Knights Who Say Ni.
RANDOM: Ni!
HEAD KNIGHT: Shh shh. We are now the Knights Who Say Ecky-ecky-ecky- ecky-pikang-zoom-boing-mumble-mumble.
RANDOM: Ni!
HEAD KNIGHT: Therefore, we must give you a test.
ARTHUR: What is this test, O Knights of-- Knights Who 'Til Recently Said Ni?
HEAD KNIGHT: Firstly, you must find... another shrubbery!
[dramatic chord]
ARTHUR: Not another shrubbery!
HEAD KNIGHT: Then, when you have found the shrubbery, you must place it here beside this shrubbery, only slightly higher so you get a two-level effect with a little path running down the middle.
RANDOM: A path! A path! Ni!
HEAD KNIGHT: Then, when you have found the shrubbery, you must cut down the mightiest tree in the forest... with... a herring!
[dramatic chord]
ARTHUR: We shall do no such thing!
HEAD KNIGHT: Oh, please!
ARTHUR: Cut down a tree with a herring? It can't be done.
KNIGHTS: Aaaaugh! Aaaugh!
HEAD KNIGHT: Don't say that word.
ARTHUR: What word?
HEAD KNIGHT: I cannot tell, suffice to say is one of the words the Knights of Ni cannot hear.
ARTHUR: How can we not say the word if you don't tell us what it is?
KNIGHTS: Aaaaugh! Aaaugh!
ARTHUR: What, `is'?
HEAD KNIGHT: No, not `is' -- we couldn't get vary far in life not saying `is'.
BEDEVERE: My liege, it's Sir Robin!
MINSTREL (singing): Packing it in and packing it up
And sneaking away and buggering up
And chickening out and pissing about
Yes, bravely he is throwing in the sponge
ARTHUR: Oh, Robin!
ROBIN: My liege! It's good to see you!
KNIGHTS: Aaaaugh!
HEAD KNIGHT: He said the word!
ARTHUR: Surely you've not given up your quest for the Holy Grail?
MINSTREL (singing): He is sneaking away and buggering up--
ROBIN: Shut up! No, no no-- far from it.
HEAD KNIGHT: He said the word again!
ROBIN: I was looking for it.
KNIGHTS: Aaaaugh!
ROBIN: Uh, here, here in this forest.
ARTHUR: No, it is far from--
KNIGHTS: Aaaaugh!
HEAD KNIGHT: Aaaaugh! Stop saying the word!
ARTHUR: Oh, stop it!
KNIGHTS: Aaaaugh!
HEAD KNIGHT: Oh! He said it again!
ARTHUR: Patsy!
HEAD KNIGHT: Aaugh! I said it! I said it! Ooh! I said it again!
KNIGHTS: Aaaaugh!

(cherry picked from commit 5a4b51a784)
2021-03-31 13:29:54 +02:00
Florian Bruhin a220fba14d flatpak: Make things work without FLATPAK_ID
(cherry picked from commit 3b1bbc709c)
2021-03-31 13:29:54 +02:00
Florian Bruhin d7913f78f6 flatpak: Fix standarddir/ipc tests
(cherry picked from commit f35e284de0)
2021-03-31 13:29:54 +02:00
Florian Bruhin 0a4cb0ef7f ci: Move test_mkvenv.py to update-dependencies
It requires some time and network access, so no need to run it as part of the automated tests.

(cherry picked from commit 545a295cf0)
2021-03-31 13:29:54 +02:00
Florian Bruhin 965ca663a1 Fix --asciidoc for mkvenv.py
(cherry picked from commit ed49bdd9a4)
2021-03-31 13:29:54 +02:00
Florian Bruhin 3642c34b5c tests: Ignore mDNS errors
They happen with data/crashers/webrtc.html in Flatpak and are harmless.

(cherry picked from commit aea69ff3df)
2021-03-31 13:29:54 +02:00
Florian Bruhin ed2ffff16c flatpak: Skip download dispatcher tests
(cherry picked from commit 40c72f849d)
2021-03-31 13:29:54 +02:00
Florian Bruhin bdf84abf75 flatpak: Get correct path to QtWebEngine locales
(cherry picked from commit 31e655dd36)
2021-03-31 13:29:54 +02:00
Florian Bruhin 8546f48bb7 Rename version.is_sandboxed() to is_flatpak()
(cherry picked from commit 5ce8a9c9c1)

For easier backporting of changes.
2021-03-30 10:34:35 +02:00
Florian Bruhin bd3130e8af Fix coverage
This is covered by tests in master, and by pre-release checks here
2021-03-30 08:31:02 +02:00
Florian Bruhin 3ce4d5916c ipc: Hide socket warning when re-getting socket
(cherry picked from commit 6de2d23841)
2021-03-29 23:45:41 +02:00
Florian Bruhin 5c14bfd8c6 ipc: Fix socket handling
Speculatively fixes #5344

(cherry picked from commit 4a2c6c7624)
2021-03-29 23:45:38 +02:00
Florian Bruhin 76c8d20f6a scripts: Fix asciidoc error
Fixup to 28bd35ed58

(cherry picked from commit f511f11ecd)
2021-03-29 23:43:40 +02:00
Florian Bruhin ab498fbf26 Fix QtWebEngine version guessing with PyInstaller
Fixes #6337

(cherry picked from commit eee6e6180e)
2021-03-29 23:43:36 +02:00
Florian Bruhin 25374d6743 Split QtWebEngine version handling into different methods
Preparation for #6337

(cherry picked from commit 028e7b6569)
2021-03-29 23:43:31 +02:00
Florian Bruhin 143db4f9d3 tests: Don't download TLD list
(cherry picked from commit 9303e6a854)
2021-03-24 21:28:55 +01:00
Florian Bruhin da0a1afad2 Catch AttributeError for FormatString configtype
(cherry picked from commit b171f3c0f2)
2021-03-24 13:25:19 +01:00
Florian Bruhin 74903367ed Use mainwindow.raise_window for :tab-select
Fixes #6321

(cherry picked from commit 5d69a21262)
2021-03-24 09:46:14 +01:00
Florian Bruhin 2f8fbff53a standarddir: Fix custom basedirs with flatpak
See https://github.com/flathub/org.qutebrowser.qutebrowser/issues/18#issuecomment-802827816

(cherry picked from commit 74c9f66752)
2021-03-23 22:44:10 +01:00
Florian Bruhin fa48382162 Improve bindings.key_mappings description
(cherry picked from commit 3dc5584cac)
2021-03-20 11:17:38 +01:00
Florian Bruhin 10c3eb0bef Fix bindings.key_mappings with multiple keys
Otherwise, when e.g. doing "<Meta+Up>": "gg" in bindings.key_mappings,
there's a crash like:

    Traceback (most recent call last):
      File "/usr/lib/python3.9/site-packages/qutebrowser/keyinput/eventfilter.py", line 105, in eventFilter
        return handler(typing.cast(QKeyEvent, event))
      File "/usr/lib/python3.9/site-packages/qutebrowser/keyinput/eventfilter.py", line 75, in _handle_key_event
        return man.handle_event(event)
      File "/usr/lib/python3.9/site-packages/qutebrowser/keyinput/modeman.py", line 462, in handle_event
        return handler(cast(QKeyEvent, event))
      File "/usr/lib/python3.9/site-packages/qutebrowser/keyinput/modeman.py", line 283, in _handle_keypress
        match = parser.handle(event, dry_run=dry_run)
      File "/usr/lib/python3.9/site-packages/qutebrowser/keyinput/modeparsers.py", line 105, in handle
        match = super().handle(e, dry_run=dry_run)
      File "/usr/lib/python3.9/site-packages/qutebrowser/keyinput/basekeyparser.py", line 309, in handle
        result = self._match_key_mapping(result.sequence)
      File "/usr/lib/python3.9/site-packages/qutebrowser/keyinput/basekeyparser.py", line 246, in _match_key_mapping
        mapped = sequence.with_mappings(
      File "/usr/lib/python3.9/site-packages/qutebrowser/keyinput/keyutils.py", line 675, in with_mappings
        assert len(new_seq) == 1
    AssertionError

While this isn't the intended way to use this setting, we shouldn't
crash - and let's just make it work instead of forbidding it.

(cherry picked from commit 5b6d2c60b4)
2021-03-20 11:17:38 +01:00
s3lph c6028d763e qute-pass userscript: Add -o flag to gopass otp invocation so the metadata arount the OTP token is omitted
(cherry picked from commit 62ff0f0ec0)
2021-03-20 10:09:49 +01:00
Florian Bruhin 10bf505feb Only connect IPC after init has finished
Otherwise, if there's a fatal error message shown during init, we try to
open something via IPC before we're fully initialized. This can e.g.
lead to a KeyError for qtnetwork-download-manager:

    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/qutebrowser/app.py", line 120, in <lambda>
        process_pos_args(args, cwd=cwd, via_ipc=True,
      File "/usr/lib/python3/dist-packages/qutebrowser/app.py", line 230, in process_pos_args
        win_id = mainwindow.get_window(via_ipc, force_window=True)
      File "/usr/lib/python3/dist-packages/qutebrowser/mainwindow/mainwindow.py", line 89, in get_window
        window = MainWindow(private=None)
      File "/usr/lib/python3/dist-packages/qutebrowser/mainwindow/mainwindow.py", line 220, in __init__
        self._init_downloadmanager()
      File "/usr/lib/python3/dist-packages/qutebrowser/mainwindow/mainwindow.py", line 350, in _init_downloadmanager
        qtnetwork_download_manager = objreg.get('qtnetwork-download-manager')
      File "/usr/lib/python3/dist-packages/qutebrowser/utils/objreg.py", line 249, in get
        return reg[name]
      File "/usr/lib/python3.8/collections/__init__.py", line 1010, in __getitem__
        raise KeyError(key)
    KeyError: 'qtnetwork-download-manager'

(cherry picked from commit 6c0d8d59647b39ecf3292b125991522d3502db65)
2021-03-19 17:59:27 +01:00
Florian Bruhin 4e849d234d Handle OSError in brave adblock
(cherry picked from commit 09c848fe34bd61fca74c6191ff5e49dbbf9ae101)
2021-03-19 17:59:27 +01:00
Florian Bruhin 2859be73ce Add quirk for krunker.io
(cherry picked from commit 7de06df5f4)
2021-03-18 19:41:17 +01:00
Florian Bruhin ccae0452c5 Only run test_flatpak_runtimedir on Linux
Paths are different on macOS/Windows

(cherry picked from commit 069743e98d)
2021-03-18 12:31:12 +01:00
Florian Bruhin 3f079ef037 Fix test_flatpak_runtimedir
(cherry picked from commit 6a65ff1ad0)
2021-03-18 12:20:09 +01:00
Florian Bruhin 0a3f3a2f98 Fix lint
Alternative to c07b93b7c4
2021-03-18 11:08:48 +01:00
Florian Bruhin 37a41c7b7a Add a test for flatpak runtime dir
See #6300

(cherry picked from commit ca8c320585, but
adjusted for this branch)
2021-03-18 11:07:51 +01:00
Florian Bruhin 3acdb3288c Try to recover from CompletionMetaInfo with unexpected structure
Fixes #6302

(cherry picked from commit 254b21f3ec)
2021-03-18 10:35:32 +01:00
Florian Bruhin 9f67a763ef Use correct runtime path for Flatpak
See #6300

Independent from the implementation on master, due to the circular
import workaround.
2021-03-18 10:35:09 +01:00
Florian Bruhin b246fb383b Improve joinpath regex
joinpath is still useful with a list of args

(cherry picked from commit ed20af9828)
2021-03-17 18:52:12 +01:00
Florian Bruhin e71be7ffc4 Fix shadowed name
(cherry picked from commit ff341513af)
2021-03-17 18:51:46 +01:00
Florian Bruhin c30a6c5e95 tests: Handle XDG_*_HOME standarddir tests
For some reason, a recent change on GitHub's runners seems to explicitly
set XDG_CONFIG_HOME. That breaks our tests, however, because we can't
simply override HOME to control where the directories are created.
Thus, make sure that XDG_*_HOME is always unset.

(cherry picked from commit 23810876e4)
2021-03-17 18:51:46 +01:00
Florian Bruhin aa1801ecae Fix version parsing with Flatpak
See https://github.com/flathub/org.qutebrowser.qutebrowser/issues/11

(cherry picked from commit 7ae7b6ea1a)
2021-03-17 17:37:09 +01:00
Florian Bruhin c82e2bbe0b Fix lint
(cherry picked from commit 2a7e053495)
2021-03-12 22:00:56 +01:00
Florian Bruhin f5e5057ad9 tests: Further improve and stabilize screenshots
(cherry picked from commit 903e5e2943)
2021-03-12 19:10:28 +01:00
Florian Bruhin b91e234578 Leave insert mode when clicking devtools 'x'
Closes #6270

(cherry picked from commit 579e70b0ab)
2021-03-12 18:29:02 +01:00
Florian Bruhin 34bf1065a7 Also enable formula workaround on Qt 5.12 and 5.13
Fixes #6268

(cherry picked from commit 43ab61106c)
2021-03-12 18:18:59 +01:00
Florian Bruhin d38ee4effd Stabilize darkmode mathml test
(cherry picked from commit 54d2ca2a07)
2021-03-12 18:18:59 +01:00
Florian Bruhin 368ed9a4bb Fix version sorting in mkvenv.py for requirements-pyinstaller
(cherry picked from commit b45ac601c6)
2021-03-12 13:57:57 +01:00
Florian Bruhin 874215dfa3 Update changelog URLs
(cherry picked from commit 7646cfa2f4)
2021-03-12 13:36:20 +01:00