Commit Graph

2579 Commits

Author SHA1 Message Date
toofar 5cc948aeb5 Downgrade mypy for now
I believe we are being afflicted by this issue: https://github.com/python/mypy/issues/16451
Although I'm not 100% sure because there is a lot going on in this
function and I haven't managed to grok it.

The mypy 1.7 release [notes][1.7] say you can disable the new type
inference by running `tox -e mypy-pyqt6 -- --old-type-inference` and
indeed mypy passes with that. So either our type hints are incorrect or
we are hitting a bug. Considering the inferred type hint has a `Never`
in it I'm leading toward it being a bug. So I'll bump the mypy version
down and hopefully next week the issue will be resolved.

The mypy output before this commit was:

    mypy-pyqt6: commands[0]> .tox/mypy-pyqt6/bin/python -m mypy --always-true=USE_PYQT6 --always-false=USE_PYQT5 --always-false=USE_PYSIDE6 --always-false=IS_QT5 --always-true=IS_QT6 --always-true=IS_PYQT --always-false=IS_PYSIDE qutebrowser
    qutebrowser/utils/qtutils.py:239: error: Argument 1 to "contextmanager" has incompatible type
    "Callable[[str, bool, str], Iterator[IO[AnyStr]]]"; expected "Callable[[str, bool, str], Iterator[IO[Never]]]"  [arg-type]
        @contextlib.contextmanager
         ^
    qutebrowser/misc/lineparser.py: note: In member "save" of class "LineParser":
    qutebrowser/misc/lineparser.py:168: error: Need type annotation for "f"  [var-annotated]
                    with qtutils.savefile_open(self._configfile, self._binary) as f:
                         ^
    qutebrowser/misc/lineparser.py: note: In member "save" of class "LimitLineParser":
    qutebrowser/misc/lineparser.py:226: error: Need type annotation for "f"  [var-annotated]
                with qtutils.savefile_open(self._configfile, self._binary) as f:
                     ^
    qutebrowser/config/configfiles.py: note: In member "_save" of class "YamlConfig":
    qutebrowser/config/configfiles.py:292: error: Need type annotation for "f"  [var-annotated]
                with qtutils.savefile_open(self._filename) as f:
                     ^
    qutebrowser/misc/sessions.py: note: In member "save" of class "SessionManager":
    qutebrowser/misc/sessions.py:343: error: Need type annotation for "f"  [var-annotated]
                    with qtutils.savefile_open(path) as f:

[1.7]: https://mypy-lang.blogspot.com/2023/11/mypy-17-released.html
2023-11-13 20:23:06 +13:00
toofar d55e831f39 Merge second dependancy update.
Didn't manage to merge the first one in time.

ref: https://github.com/qutebrowser/qutebrowser/pull/7990
2023-11-13 18:46:09 +13:00
toofar bb9788f80f add pyqt6.6 requirements file
What is that big chain of !pyqt- etc mean? idk

ref: https://github.com/qutebrowser/qutebrowser/pull/7990
2023-11-13 18:45:18 +13:00
qutebrowser bot 9ebd28a108 Update dependencies 2023-11-13 18:45:18 +13:00
qutebrowser bot ef9301da92 Update dependencies 2023-11-13 04:24:22 +00:00
qutebrowser bot 27b43bd5ac Update dependencies 2023-10-30 04:22:08 +00:00
toofar ab7b079411 debug python imports
For windows I'm getting a "Module not found." error, which I suspect is
it not finding qutebrowser itself, but lets see.

ref: https://pyinstaller.org/en/stable/spec-files.html#giving-run-time-python-options
2023-10-28 10:44:55 +13:00
toofar b4bbf3252f un-pin pyinstaller
ref: #7806
2023-10-28 10:44:44 +13:00
qutebrowser bot 1709987966 Update dependencies 2023-10-23 04:23:17 +00:00
qutebrowser bot fa862c786e Release v3.0.2
(cherry picked from commit f4ba52d33f)
2023-10-19 18:39:52 +00:00
qutebrowser bot ea80b73d73 Release v3.0.1
(cherry picked from commit b3b1384037)
2023-10-19 18:15:46 +00:00
qutebrowser bot c20c196250 Update dependencies 2023-10-16 04:24:13 +00:00
qutebrowser bot 2c503bf35d Update dependencies 2023-10-09 04:25:45 +00:00
qutebrowser bot 7d9db29661 Update dependencies 2023-10-02 04:22:42 +00:00
qutebrowser bot 5cd2faba52 Update dependencies 2023-09-25 04:23:04 +00:00
qutebrowser bot 2be3febced Update dependencies 2023-09-18 04:25:55 +00:00
qutebrowser bot 3cc79c562d Update dependencies 2023-09-11 04:22:04 +00:00
Florian Bruhin 3fabc8fe37 tests: Ignore false-positive (?) hypothesis health check
See https://github.com/HypothesisWorks/hypothesis/issues/3733
Should fix nightly builds (and the next dependency upgrade).
2023-09-08 12:04:37 +02:00
qutebrowser bot c7c56fb035 Update dependencies 2023-09-04 04:22:47 +00:00
qutebrowser bot 4d15de5a3b Update dependencies 2023-08-28 04:23:01 +00:00
qutebrowser bot 35e4122a52 Update dependencies 2023-08-21 04:25:14 +00:00
toofar d4a7619f9c userscripts: run view_in_mpv jseval in main world
1. run jseval in main world: the script adds an element that calls the
   `restore_video` function. This was failing with a "not found" message
   on webengine, presumably because the dom click handler runs in the
   main world and the function was over in the jseval world. The the
   script predates webengine which is the backend that implements the
   worlds.
2. remove a console log message, seems to be just noise and easy enough
   to add back later
3. remove href attribute of the restore video link: this seemed to be
   causing the `restore_video` method to be called twice. The second
   time with `this` as the global Window object, which was causing an
   error because that has a null `parentNode` attribute.
4. added the `cursor: pointer` style that was needed since the element
   didn't have an href anymore
5. change the mpv flags `--terminal` -> `--quiet`. This means we get
   error messages (eg from yt-dlp) in error logs and in the `:process`
   page now. It can get a bit spammy though if you are running from a
   terminal. I'm getting a log of keepalive warning and error logs from
   ffmpeg. On the other hand it's really annoying to see a "process
   failed, see :process for details" and having no error messages in
   there.

Fixes: #7838
2023-08-20 10:57:14 +12:00
qutebrowser bot b11ead8f42 Release v3.0.0 2023-08-18 14:15:48 +00:00
Florian Bruhin 967d0ce291 Revert "Release v3.0.0"
This reverts commit f3692d8f28.
2023-08-18 16:14:34 +02:00
qutebrowser bot f3692d8f28 Release v3.0.0 2023-08-18 13:38:14 +00:00
Florian Bruhin ab820fe8a0 ci: Set up asciidoc properly for releases 2023-08-17 12:39:00 +02:00
Florian Bruhin a25e7c2b64 Fix remaining references to old commands
Follow-up to #7809, see #7214
2023-08-15 20:15:48 +02:00
qutebrowser bot 9115a6212a Update dependencies 2023-08-14 04:21:37 +00:00
bitraid 7599dbc209 nsis: custom error message for Qt5 OS version check
The CheckPlatform macro will prompt the user user to use the 32bit installer
if they are on a 32bit system. But we don't provide a 32bit installer anymore.

This commit changes the OS version check for Qt5 builds to be based on checking
version numbers ourselves too, so that we can have our own error message.

Also moves the Qt5 conditionals to be compile time ones.
2023-08-13 15:14:24 +12:00
toofar 6f7b76f066 nsis: allow Win10 versions back to 1607 2023-08-13 15:14:24 +12:00
toofar c1841c7948 nsis: remove arch from binary path string
We dropped 32bit support in #7804 and as a result removed the arch
suffix from the binary that pyinstaller produces. This commit removes it
form the lookup path in the installer too.

Note that we are leaving the arch string in the installer itself for
now. Mostly because it'll be removed as part of a later change when the
installer itself is refreshed. But it might also be useful to clarify in
the installer names what the arch is? Maybe, that reasoning might not
fit with the previous change to remove the arch strings.
2023-08-13 15:14:24 +12:00
bitraid f903ae4985 nsis: minimum OS version check for Qt6
The Qt docs for 6.5 say that the minimum supported version is Windows 10
1809.

Experimentally it seems qutebrowser and it's dependencies work fine on a
version as early 1607.

There should be no change in OS version requirements for the Qt5 build,
although we've dropped 32 bit support already and in a future version of
the installer we may bring the minimum OS version support in line with
the Qt6 requirements for simplicity too.

Added a new QT5 version into the NSIS scripts so we can do the different
version check per installer build. It just uses the python bool
serialization format so should always be "True" or "False", but I've
added a fallback anyway for consistency.
2023-08-13 15:14:24 +12:00
toofar 0f2d34623c Merge remote-tracking branch 'upstream/main' into feat/mac_sandbox_pre_release_pyinstaller
Only conflict was the removal of support for 32bit builds in
build_release.py
2023-08-12 13:49:01 +12:00
toofar 32470686ce macOS: switch to more suitable bundle ID
Trying to switch the bundle ID again and see if that makes things work.
Will need to check 5.15 too.

ref: https://github.com/qutebrowser/qutebrowser/pull/7803#issuecomment-1657106925
Closes: #5180
2023-08-12 13:36:50 +12:00
toofar 088d6f48c2 Pin PyInstaller to specific commit
I don't want to deal with having to review development changes of
pyinstaller every week. So pin to one commit for now that we can
actually test. I'm subscribed to release notifications on github so I'll
manually change this back to point to the pyinstaller pypi package ones
it does.
2023-08-12 13:36:50 +12:00
qutebrowser bot 38223ecb40 Update dependencies 2023-08-07 04:22:49 +00:00
toofar fc91c976d3 manual update of cryptography (and rich)
When handling the automated dependancy update PR GH warned on push of a
low priority security issue with cryptography. So updating that now.

Rich has an update available too.

ref: https://github.com/qutebrowser/qutebrowser/security/dependabot/32
ref: #7807
2023-08-02 20:55:51 +12:00
qutebrowser bot 4049bac356 Update dependencies 2023-07-31 04:22:34 +00:00
toofar c0d31d399d adjust pyinstaller data paths to match importlib_resources
Not that we are looking up resources via importlib_resources for
pyinstaller builds too we need to change where the data files are
installed to to match what importlib_resources is expecting.

There was a comment in the previous resource lookup special case
complaining about the data files being at the top level so it seems this
is a change for the better anyhow.

Observed paths:

    requested file: qutebrowser.app/Contents/Frameworks/qutebrowser/config/configdata.yml
    actual file   : qutebrowser.app/Contents/Frameworks/config/configdata.yml
2023-07-27 19:17:27 +12:00
toofar a71aff389d Pin latest pyinstaller commit from develop branch
PyInstaller has [recently][symlinks] landed a change that should restore
the webengine sandbox on macOS builds. With a bit more testing we are
hoping that we can go ahead releasing builds based on that
in-development PyInstaller codebase even before they've made a release.

This commit pins our pyinstaller dependency to be the latest commit on
their develop branch.

[symlinks]: https://github.com/pyinstaller/pyinstaller/pull/7619
2023-07-27 19:08:18 +12:00
qutebrowser bot 5b2038c4cb Update dependencies 2023-07-24 11:22:06 +00:00
Florian Bruhin 8ddaef35d0 reuse: Fix more copyright headers
See previous commit, forgot ? after year range
2023-07-23 12:56:13 +02:00
Florian Bruhin 3eb826f664 reuse: Update remaining copyright texts
git ls-files | \
    xargs sed -Ei 's/Copyright [0-9]{4}(-[0-9]{4}) ([^<]*)<([^>]*)>/SPDX-FileCopyrightText: \2<\3>/'
2023-07-23 12:52:01 +02:00
Florian Bruhin 0718b25796 reuse: Initial copyright text update for myself
git ls-files | \
    xargs sed -Ei 's/Copyright [0-9]{4}(-[0-9]{4}) Florian Bruhin \(The Compiler\) <mail@qutebrowser\.org>/SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>/'
2023-07-23 12:49:05 +02:00
Florian Bruhin 67686bb1a7 reuse: Fix remaining userscripts without extension
reuse annotate --license="GPL-3.0-or-later" --style python \
    misc/userscripts/openfeeds \
    misc/userscripts/qute-bitwarden \
    misc/userscripts/qute-keepass \
    misc/userscripts/qute-keepassxc \
    misc/userscripts/qute-lastpass \
    misc/userscripts/qute-pass \
    misc/userscripts/tor_identity \
    misc/userscripts/dmenu_qutebrowser \
    misc/userscripts/rss
2023-07-23 12:28:23 +02:00
Florian Bruhin d2975c6d09 reuse: Get files in misc/nsis/ to use SPDX
reuse annotate --license="GPL-3.0-or-later" --style python \
    misc/nsis/uninstall_pages.nsh \
    misc/nsis/install.nsh \
    misc/nsis/uninstall.nsh

And fixing qutebrowser.nsi manually as that uses iso-8859-1 and the reuse tool
doesn't like that apparently.
2023-07-23 12:19:27 +02:00
Florian Bruhin ec34865168 Move master branch references to main
Closes #7097
2023-07-23 11:38:19 +02:00
Florian Bruhin 273230eb07 Merge remote-tracking branch 'origin/pr/7789' 2023-07-22 12:36:31 +02:00
qutebrowser bot 4e0180cede Update dependencies 2023-07-20 10:57:42 +00:00
Florian Bruhin 6d1dcc30ad Merge remote-tracking branch 'origin/update-dependencies' 2023-07-10 10:04:14 +02:00