From d77b0fb8a325dd80958c266cf893c5911d7edcb0 Mon Sep 17 00:00:00 2001 From: Kian-Meng Ang Date: Thu, 17 Nov 2022 11:48:44 +0800 Subject: Fix typos Found via `codespell -S *.js -L technik,gir,nam,ans,wih,wil,ro,nowe,te,datas,qutie,ned,fo,clude,alph,crashers,nd,wasn,cros,ue,possition` Co-authored-by: Marcel Schilling --- doc/changelog.asciidoc | 22 +++++++++++----------- doc/faq.asciidoc | 4 ++-- doc/install.asciidoc | 4 ++-- misc/requirements/requirements-tests-bleeding.txt | 2 +- qutebrowser/completion/models/filepathcategory.py | 2 +- qutebrowser/config/config.py | 4 ++-- qutebrowser/mainwindow/mainwindow.py | 2 +- scripts/dev/misc_checks.py | 2 +- tests/end2end/features/utilcmds.feature | 2 +- tests/end2end/test_invocations.py | 2 +- tests/unit/completion/test_completer.py | 2 +- 11 files changed, 24 insertions(+), 24 deletions(-) diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc index 79641c7cb..6f2a7b16e 100644 --- a/doc/changelog.asciidoc +++ b/doc/changelog.asciidoc @@ -595,13 +595,13 @@ Changed - When a shown message replaces an existing related one (e.g. for zoom levels), the replacing now also works even if a different message was shown in between. - The `.redirect(...)` method on interceptors now supports an - `ignore_unsupported=True` argument which supresses exceptions if a request could + `ignore_unsupported=True` argument which suppresses exceptions if a request could not be redirected. Note, however, that it is still not public API. - When the `--config-py` argument is used, no warning about a missing `config.load_autoconfig` is shown anymore, as the argument is typically used for temporarily testing a config. - The internal `_autosave` session used for crash recovery is now only saved - once per minute, since saving it for every page load is a noticable performance + once per minute, since saving it for every page load is a noticeable performance issue. - The `readability-js` userscript now displays a small header with page information. @@ -1029,7 +1029,7 @@ Changed - `config.py` files now are required to have either `config.load_autoconfig(False)` (don't load `autoconfig.yml`) or `config.load_autoconfig()` (do load `autoconfig.yml`) in them. -- Various host-blocking settings have been renamed to accomodate the new ABP-like +- Various host-blocking settings have been renamed to accommodate the new ABP-like adblocker: * `content.host_blocking.enabled` -> `content.blocking.enabled` (controlling both blockers) * `content.host_blocking.whitelist` -> `content.blocking.whitelist` (controlling both blockers) @@ -1205,11 +1205,11 @@ Fixed ~~~~~ - Setting the `content.headers.referer` setting to `same-domain` (the default) - was supposed to truncate referers to only the host with QtWebEngine. + was supposed to truncate referrers to only the host with QtWebEngine. Unfortunately, this functionality broke in Qt 5.14. It works properly again with this release, including a test so this won't happen again. - With QtWebEngine 5.15, setting the `content.headers.referer` setting to - `never` did still send referers. This is now fixed as well. + `never` did still send referrers. This is now fixed as well. - In v1.14.0, a regression was introduced, causing a crash when qutebrowser was closed after opening a download with PDF.js. This is now fixed. - With Qt 5.12, the `Object.fromEntries` JavaScript API is unavailable (it was @@ -1226,7 +1226,7 @@ Fixed conversion was shown. This is now fixed. - Ever since Qt 5.11, fetching more completion data when that data is loaded lazily (such as with history) and the last visible item is selected was broken. - The exact reason is currently unknown, but this release adds a tenative fix. + The exact reason is currently unknown, but this release adds a tentative fix. - When PgUp/PgDown were used to go beyond the last visible item, the above issue caused a crash, which is now also fixed. - As a workaround for an overzealous Microsoft Defender false-positive detecting @@ -1342,9 +1342,9 @@ Changed which fixes issues with e.g. formulas on Wikipedia. - The `readability-js` userscript now adds some CSS to improve the reader mode styling in various scenarios: - * Images are now shrinked to the page width, similarly to what Firefox' reader + * Images are now shrunk to the page width, similarly to what Firefox' reader mode does. - * Some images ore now displayed as block (rather than inline) which is what + * Some images are now displayed as block (rather than inline) which is what Firefox' reader mode does as well. * Blockquotes are now styled more distinctively, again based on the Firefox reader mode. @@ -3166,7 +3166,7 @@ Fixed - Fix workaround for black screens or crashes with Nvidia cards - Handle a filesystem going read-only gracefully - Fix crash when setting `fonts.monospace` -- Fix list options not being modifyable via `.append()` in `config.py` +- Fix list options not being modifiable via `.append()` in `config.py` - Mark the content.notifications setting as QtWebKit only correctly - Fix wrong rendering of keys like `` in the completion @@ -3202,7 +3202,7 @@ Major changes * New dependency on the QtSql module and Qt sqlite support. * New dependency on the https://www.attrs.org/[attrs] project (packaged as `python-attr` in some distributions). - * The depedency on PyOpenGL (when using QtWebEngine) got removed. Note + * The dependency on PyOpenGL (when using QtWebEngine) got removed. Note that PyQt5.QtOpenGL is still a dependency. * PyQt5.QtOpenGL is now always required, even with QtWebKit. - The QtWebEngine backend is now used by default. Note this means that @@ -4423,7 +4423,7 @@ Changed * Add `-s`/`--space` argument to `:set-cmd-text` (as `:set-cmd-text "foo "` will now set the literal text `"foo "`) - Ignore `;;` for splitting with some commands like `:bind`. - Add unbound (new) default keybindings to config. This also adds a new `` special command. - * To unbind a command keybinding without binding it to a new key, you now have to bind it to `` or it'll be readded automatically. + * To unbind a command keybinding without binding it to a new key, you now have to bind it to `` or it'll be re-added automatically. - If an SSL error is raised multiple times with the same error/certificate/host/scheme/port, the user is only asked once. - Jump to last instead of first item when pressing Shift-Tab the first time in the completion. - Add a fullscreen keybinding. diff --git a/doc/faq.asciidoc b/doc/faq.asciidoc index bcbd0d29a..61f787d3d 100644 --- a/doc/faq.asciidoc +++ b/doc/faq.asciidoc @@ -170,7 +170,7 @@ text/html; qutebrowser %s; needsterminal; nametemplate=%s.html ---- + Note that you might want to add additional options to qutebrowser, so that it -runs as a seperate instance configured to disable JavaScript and avoid network +runs as a separate instance configured to disable JavaScript and avoid network requests, in order to avoid privacy leaks when reading mails. The easiest way to do so is by specifying a non-existent proxy server, e.g.: + @@ -376,7 +376,7 @@ There is a total of four possible approaches to get dark websites: How do I make copy to clipboard buttons work?:: You can `:set content.javascript.clipboard access` to allow this globally (not -recommended!), or `:set -u some.domain content.javascript.clipboad access` if +recommended!), or `:set -u some.domain content.javascript.clipboard access` if you want to limit the setting to `some.domain`. diff --git a/doc/install.asciidoc b/doc/install.asciidoc index 4b1d5bfff..bbf7ab62f 100644 --- a/doc/install.asciidoc +++ b/doc/install.asciidoc @@ -292,7 +292,7 @@ Nightly builds If you want to test out new features before an official qutebrowser release, automated https://github.com/qutebrowser/qutebrowser/actions/workflows/nightly.yml[nightly -builds] are available. To download them, open the lastest run (usually the first one), +builds] are available. To download them, open the latest run (usually the first one), then download the archive at the bottom of the page. Those builds also include variants with debug logging enabled, which can be useful to @@ -369,7 +369,7 @@ Nightly builds If you want to test out new features before an official qutebrowser release, automated https://github.com/qutebrowser/qutebrowser/actions/workflows/nightly.yml[nightly -builds] are available. To download them, open the lastest run (usually the first one), +builds] are available. To download them, open the latest run (usually the first one), then download the archive at the bottom of the page. Those builds also include variants with debug logging enabled, which can be useful to diff --git a/misc/requirements/requirements-tests-bleeding.txt b/misc/requirements/requirements-tests-bleeding.txt index d249a7e7e..2a902c3e8 100644 --- a/misc/requirements/requirements-tests-bleeding.txt +++ b/misc/requirements/requirements-tests-bleeding.txt @@ -9,7 +9,7 @@ git+https://github.com/HypothesisWorks/hypothesis.git#subdirectory=hypothesis-py git+https://github.com/pytest-dev/pytest.git git+https://github.com/pytest-dev/pytest-bdd.git git+https://github.com/ionelmc/pytest-benchmark.git -# WORKAROUND for pytest-instafail using deprectated pytest functionality +# WORKAROUND for pytest-instafail using deprecated pytest functionality # See https://github.com/pytest-dev/pytest-instafail/pull/26 git+https://github.com/The-Compiler/pytest-instafail.git@new-hookimpl git+https://github.com/pytest-dev/pytest-mock.git diff --git a/qutebrowser/completion/models/filepathcategory.py b/qutebrowser/completion/models/filepathcategory.py index fd2cb58ce..58d90869a 100644 --- a/qutebrowser/completion/models/filepathcategory.py +++ b/qutebrowser/completion/models/filepathcategory.py @@ -19,7 +19,7 @@ """Completion category for filesystem paths. -NOTE: This module deliberatly uses os.path rather than pathlib, because of how +NOTE: This module deliberately uses os.path rather than pathlib, because of how it interacts with the completion, which operates on strings. For example, we need to be able to tell the difference between "~/input" and "~/input/". Also, if we get "~/input", we want to glob "~/input*" rather than "~/input/*" which diff --git a/qutebrowser/config/config.py b/qutebrowser/config/config.py index d29bfcb61..38c90f3da 100644 --- a/qutebrowser/config/config.py +++ b/qutebrowser/config/config.py @@ -109,7 +109,7 @@ class change_filter: # noqa: N801,N806 pylint: disable=invalid-name and calls the wrapped function if we are. We assume the function passed doesn't take any parameters. However, it - could take a "self" argument, so we can't cleary express this in the + could take a "self" argument, so we can't clearly express this in the type above. Args: @@ -188,7 +188,7 @@ class KeyConfig: def get_reverse_bindings_for(self, mode: str) -> '_ReverseBindings': """Get a dict of commands to a list of bindings for the mode. - This is intented for user-facing display of keybindings. + This is intended for user-facing display of keybindings. As such, bindings for 'set-cmd-text [flags] : ...' are translated to ' ...', as from the user's perspective these keys behave like bindings for '' (that allow for further input before running). diff --git a/qutebrowser/mainwindow/mainwindow.py b/qutebrowser/mainwindow/mainwindow.py index 0fa8ed875..51c765551 100644 --- a/qutebrowser/mainwindow/mainwindow.py +++ b/qutebrowser/mainwindow/mainwindow.py @@ -412,7 +412,7 @@ class MainWindow(QWidget): self._set_decoration(config.val.window.hide_decoration) def _add_widgets(self): - """Add or readd all widgets to the VBox.""" + """Add or re-add all widgets to the VBox.""" self._vbox.removeWidget(self.tabbed_browser.widget) self._vbox.removeWidget(self._downloadview) self._vbox.removeWidget(self.status) diff --git a/scripts/dev/misc_checks.py b/scripts/dev/misc_checks.py index 487672ea3..d7beb80b8 100644 --- a/scripts/dev/misc_checks.py +++ b/scripts/dev/misc_checks.py @@ -165,7 +165,7 @@ def check_spelling(args: argparse.Namespace) -> Optional[bool]: 'artefact', 'an unix', 'an utf', 'an unicode', 'unparseable', 'dependancies', 'convertable', 'chosing', 'authentification'} - # Words which look better when splitted, but might need some fine tuning. + # Words which look better when split, but might need some fine tuning. words |= {'webelements', 'mouseevent', 'keysequence', 'normalmode', 'eventloops', 'sizehint', 'statemachine', 'metaobject', 'logrecord'} diff --git a/tests/end2end/features/utilcmds.feature b/tests/end2end/features/utilcmds.feature index e8172ae20..621a7650b 100644 --- a/tests/end2end/features/utilcmds.feature +++ b/tests/end2end/features/utilcmds.feature @@ -11,7 +11,7 @@ Feature: Miscellaneous utility commands exposed to the user. Scenario: :later before When I run :later 500 scroll down Then the page should not be scrolled - # wait for scroll to execture so we don't ruin our future + # wait for scroll to execute so we don't ruin our future And the page should be scrolled vertically Scenario: :later after diff --git a/tests/end2end/test_invocations.py b/tests/end2end/test_invocations.py index 5a34d0357..f3fdbbfba 100644 --- a/tests/end2end/test_invocations.py +++ b/tests/end2end/test_invocations.py @@ -822,7 +822,7 @@ def test_unavailable_backend(request, quteproc_new): def test_json_logging_without_debug(request, quteproc_new, runtime_tmpdir): args = _base_args(request.config) + ['--temp-basedir', ':quit'] args.remove('--debug') - args.remove('about:blank') # interfers with :quit at the end + args.remove('about:blank') # interferes with :quit at the end quteproc_new.exit_expected = True quteproc_new.start(args, env={'XDG_RUNTIME_DIR': str(runtime_tmpdir)}) diff --git a/tests/unit/completion/test_completer.py b/tests/unit/completion/test_completer.py index 0f59f50ab..23e4b771c 100644 --- a/tests/unit/completion/test_completer.py +++ b/tests/unit/completion/test_completer.py @@ -196,7 +196,7 @@ def _set_cmd_prompt(cmd, txt): marks=pytest.mark.xfail(reason='issue #74')), (':set -t -p |', 'section', '', []), (':open -- |', None, '', []), - (':gibberish nonesense |', None, '', []), + (':gibberish nonsense |', None, '', []), ('/:help|', None, '', []), ('::bind|', 'command', ':bind', []), (':-w open |', None, '', []), -- cgit v1.2.3-54-g00ecf From b831e1283d983d903e1cfdf295fc1824e4c3be55 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 20 Nov 2022 10:35:21 +0100 Subject: bleeding requirements: Switch back to pytest-instafail master --- misc/requirements/requirements-tests-bleeding.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/misc/requirements/requirements-tests-bleeding.txt b/misc/requirements/requirements-tests-bleeding.txt index d249a7e7e..f1ad30158 100644 --- a/misc/requirements/requirements-tests-bleeding.txt +++ b/misc/requirements/requirements-tests-bleeding.txt @@ -9,9 +9,7 @@ git+https://github.com/HypothesisWorks/hypothesis.git#subdirectory=hypothesis-py git+https://github.com/pytest-dev/pytest.git git+https://github.com/pytest-dev/pytest-bdd.git git+https://github.com/ionelmc/pytest-benchmark.git -# WORKAROUND for pytest-instafail using deprectated pytest functionality -# See https://github.com/pytest-dev/pytest-instafail/pull/26 -git+https://github.com/The-Compiler/pytest-instafail.git@new-hookimpl +git+https://github.com/pytest-dev/pytest-instafail.git git+https://github.com/pytest-dev/pytest-mock.git git+https://github.com/pytest-dev/pytest-qt.git git+https://github.com/pytest-dev/pytest-rerunfailures.git -- cgit v1.2.3-54-g00ecf From 6cf333c33ad51a11e6745a97c86b4db7d486e580 Mon Sep 17 00:00:00 2001 From: qutebrowser bot Date: Mon, 21 Nov 2022 04:22:59 +0000 Subject: Update dependencies --- misc/requirements/requirements-dev.txt | 2 +- misc/requirements/requirements-mypy.txt | 2 +- misc/requirements/requirements-pylint.txt | 4 ++-- misc/requirements/requirements-tests.txt | 8 ++++---- misc/requirements/requirements-tox.txt | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/misc/requirements/requirements-dev.txt b/misc/requirements/requirements-dev.txt index b3dafe27c..1d614fd80 100644 --- a/misc/requirements/requirements-dev.txt +++ b/misc/requirements/requirements-dev.txt @@ -35,7 +35,7 @@ requests-toolbelt==0.10.1 rfc3986==2.0.0 rich==12.6.0 SecretStorage==3.3.3 -sip==6.7.4 +sip==6.7.5 six==1.16.0 toml==0.10.2 tomli==2.0.1 diff --git a/misc/requirements/requirements-mypy.txt b/misc/requirements/requirements-mypy.txt index 1cd283d8a..2379ede40 100644 --- a/misc/requirements/requirements-mypy.txt +++ b/misc/requirements/requirements-mypy.txt @@ -7,7 +7,7 @@ importlib-resources==5.10.0 Jinja2==3.1.2 lxml==4.9.1 MarkupSafe==2.1.1 -mypy==0.990 +mypy==0.991 mypy-extensions==0.4.3 pluggy==1.0.0 Pygments==2.13.0 diff --git a/misc/requirements/requirements-pylint.txt b/misc/requirements/requirements-pylint.txt index 52211c92c..bedd05dcb 100644 --- a/misc/requirements/requirements-pylint.txt +++ b/misc/requirements/requirements-pylint.txt @@ -1,6 +1,6 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py -astroid==2.12.12 +astroid==2.12.13 certifi==2022.9.24 cffi==1.15.1 charset-normalizer==2.1.1 @@ -16,7 +16,7 @@ pefile==2022.5.30 platformdirs==2.5.4 pycparser==2.21 PyJWT==2.6.0 -pylint==2.15.5 +pylint==2.15.6 python-dateutil==2.8.2 ./scripts/dev/pylint_checkers requests==2.28.1 diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt index daa7f1dd8..4b82c0d71 100644 --- a/misc/requirements/requirements-tests.txt +++ b/misc/requirements/requirements-tests.txt @@ -4,22 +4,22 @@ attrs==22.1.0 beautifulsoup4==4.11.1 certifi==2022.9.24 charset-normalizer==2.1.1 -cheroot==8.6.0 +cheroot==9.0.0 click==8.1.3 coverage==6.5.0 -exceptiongroup==1.0.2 +exceptiongroup==1.0.4 execnet==1.9.0 filelock==3.8.0 Flask==2.2.2 hunter==3.5.1 -hypothesis==6.56.4 +hypothesis==6.58.0 idna==3.4 importlib-metadata==5.0.0 iniconfig==1.1.1 itsdangerous==2.1.2 jaraco.functools==3.5.2 # Jinja2==3.1.2 -Mako==1.2.3 +Mako==1.2.4 manhole==1.8.0 # MarkupSafe==2.1.1 more-itertools==9.0.0 diff --git a/misc/requirements/requirements-tox.txt b/misc/requirements/requirements-tox.txt index 520b410b1..e97aab627 100644 --- a/misc/requirements/requirements-tox.txt +++ b/misc/requirements/requirements-tox.txt @@ -8,9 +8,9 @@ platformdirs==2.5.4 pluggy==1.0.0 py==1.11.0 pyparsing==3.0.9 -setuptools==65.5.1 +setuptools==65.6.0 six==1.16.0 tomli==2.0.1 -tox==3.27.0 +tox==3.27.1 virtualenv==20.16.7 wheel==0.38.4 -- cgit v1.2.3-54-g00ecf From 4c9ea9fb7df002abc0f4f2e3015f208677e82684 Mon Sep 17 00:00:00 2001 From: qutebrowser bot Date: Mon, 28 Nov 2022 04:21:58 +0000 Subject: Update dependencies --- misc/requirements/requirements-dev.txt | 8 ++++---- misc/requirements/requirements-flake8.txt | 6 +++--- misc/requirements/requirements-mypy.txt | 6 +++--- misc/requirements/requirements-pylint.txt | 4 ++-- misc/requirements/requirements-pyroma.txt | 5 +++-- misc/requirements/requirements-sphinx.txt | 6 +++--- misc/requirements/requirements-tests.txt | 10 +++++----- misc/requirements/requirements-tox.txt | 2 +- requirements.txt | 4 ++-- 9 files changed, 26 insertions(+), 25 deletions(-) diff --git a/misc/requirements/requirements-dev.txt b/misc/requirements/requirements-dev.txt index 1d614fd80..c7b517271 100644 --- a/misc/requirements/requirements-dev.txt +++ b/misc/requirements/requirements-dev.txt @@ -7,12 +7,12 @@ certifi==2022.9.24 cffi==1.15.1 charset-normalizer==2.1.1 commonmark==0.9.1 -cryptography==38.0.3 +cryptography==38.0.4 docutils==0.19 github3.py==3.2.0 hunter==3.5.1 idna==3.4 -importlib-metadata==5.0.0 +importlib-metadata==5.1.0 jaraco.classes==3.2.3 jeepney==0.8.0 keyring==23.11.0 @@ -42,6 +42,6 @@ tomli==2.0.1 twine==4.0.1 typing_extensions==4.4.0 uritemplate==4.1.1 -# urllib3==1.26.12 +# urllib3==1.26.13 webencodings==0.5.1 -zipp==3.10.0 +zipp==3.11.0 diff --git a/misc/requirements/requirements-flake8.txt b/misc/requirements/requirements-flake8.txt index 413c5be78..fa2844776 100644 --- a/misc/requirements/requirements-flake8.txt +++ b/misc/requirements/requirements-flake8.txt @@ -1,7 +1,7 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py attrs==22.1.0 -flake8==5.0.4 +flake8==6.0.0 flake8-bugbear==22.10.27 flake8-builtins==2.0.1 flake8-comprehensions==3.10.1 @@ -17,8 +17,8 @@ flake8-tidy-imports==4.8.0 flake8-tuple==0.4.1 mccabe==0.7.0 pep8-naming==0.13.2 -pycodestyle==2.9.1 +pycodestyle==2.10.0 pydocstyle==6.1.1 -pyflakes==2.5.0 +pyflakes==3.0.1 six==1.16.0 snowballstemmer==2.2.0 diff --git a/misc/requirements/requirements-mypy.txt b/misc/requirements/requirements-mypy.txt index 2379ede40..92702d655 100644 --- a/misc/requirements/requirements-mypy.txt +++ b/misc/requirements/requirements-mypy.txt @@ -1,8 +1,8 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py chardet==5.0.0 -diff-cover==7.0.2 -importlib-metadata==5.0.0 +diff-cover==7.1.0 +importlib-metadata==5.1.0 importlib-resources==5.10.0 Jinja2==3.1.2 lxml==4.9.1 @@ -15,4 +15,4 @@ PyQt5-stubs==5.15.6.0 tomli==2.0.1 types-PyYAML==6.0.12.2 typing_extensions==4.4.0 -zipp==3.10.0 +zipp==3.11.0 diff --git a/misc/requirements/requirements-pylint.txt b/misc/requirements/requirements-pylint.txt index bedd05dcb..8f6f2d352 100644 --- a/misc/requirements/requirements-pylint.txt +++ b/misc/requirements/requirements-pylint.txt @@ -4,7 +4,7 @@ astroid==2.12.13 certifi==2022.9.24 cffi==1.15.1 charset-normalizer==2.1.1 -cryptography==38.0.3 +cryptography==38.0.4 dill==0.3.6 future==0.18.2 github3.py==3.2.0 @@ -26,5 +26,5 @@ tomlkit==0.11.6 typed-ast==1.5.4 ; python_version<"3.8" typing_extensions==4.4.0 uritemplate==4.1.1 -# urllib3==1.26.12 +# urllib3==1.26.13 wrapt==1.14.1 diff --git a/misc/requirements/requirements-pyroma.txt b/misc/requirements/requirements-pyroma.txt index 5ca054ae8..58a1c7355 100644 --- a/misc/requirements/requirements-pyroma.txt +++ b/misc/requirements/requirements-pyroma.txt @@ -9,7 +9,8 @@ packaging==21.3 pep517==0.13.0 Pygments==2.13.0 pyparsing==3.0.9 -pyroma==4.0 +pyroma==4.1 requests==2.28.1 tomli==2.0.1 -urllib3==1.26.12 +trove-classifiers==2022.10.19 +urllib3==1.26.13 diff --git a/misc/requirements/requirements-sphinx.txt b/misc/requirements/requirements-sphinx.txt index f04f2d829..7ff7940ce 100644 --- a/misc/requirements/requirements-sphinx.txt +++ b/misc/requirements/requirements-sphinx.txt @@ -7,7 +7,7 @@ charset-normalizer==2.1.1 docutils==0.19 idna==3.4 imagesize==1.4.1 -importlib-metadata==5.0.0 +importlib-metadata==5.1.0 Jinja2==3.1.2 MarkupSafe==2.1.1 packaging==21.3 @@ -23,5 +23,5 @@ sphinxcontrib-htmlhelp==2.0.0 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 -urllib3==1.26.12 -zipp==3.10.0 +urllib3==1.26.13 +zipp==3.11.0 diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt index 4b82c0d71..505992bf6 100644 --- a/misc/requirements/requirements-tests.txt +++ b/misc/requirements/requirements-tests.txt @@ -12,9 +12,9 @@ execnet==1.9.0 filelock==3.8.0 Flask==2.2.2 hunter==3.5.1 -hypothesis==6.58.0 +hypothesis==6.58.1 idna==3.4 -importlib-metadata==5.0.0 +importlib-metadata==5.1.0 iniconfig==1.1.1 itsdangerous==2.1.2 jaraco.functools==3.5.2 @@ -38,7 +38,7 @@ pytest-instafail==0.4.2 pytest-mock==3.10.0 pytest-qt==4.2.0 pytest-repeat==0.9.1 -pytest-rerunfailures==10.2 +pytest-rerunfailures==10.3 pytest-xdist==3.0.2 pytest-xvfb==2.0.0 PyVirtualDisplay==3.0 @@ -51,7 +51,7 @@ tldextract==3.4.0 toml==0.10.2 tomli==2.0.1 typing_extensions==4.4.0 -urllib3==1.26.12 +urllib3==1.26.13 vulture==2.6 Werkzeug==2.2.2 -zipp==3.10.0 +zipp==3.11.0 diff --git a/misc/requirements/requirements-tox.txt b/misc/requirements/requirements-tox.txt index e97aab627..1827f3bf5 100644 --- a/misc/requirements/requirements-tox.txt +++ b/misc/requirements/requirements-tox.txt @@ -8,7 +8,7 @@ platformdirs==2.5.4 pluggy==1.0.0 py==1.11.0 pyparsing==3.0.9 -setuptools==65.6.0 +setuptools==65.6.3 six==1.16.0 tomli==2.0.1 tox==3.27.1 diff --git a/requirements.txt b/requirements.txt index cc254cf60..9b74b46b6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,14 +2,14 @@ adblock==0.6.0 colorama==0.4.6 -importlib-metadata==5.0.0 ; python_version=="3.7.*" +importlib-metadata==5.1.0 ; python_version=="3.7.*" importlib-resources==5.10.0 ; python_version=="3.7.*" or python_version=="3.8.*" Jinja2==3.1.2 MarkupSafe==2.1.1 Pygments==2.13.0 PyYAML==6.0 typing_extensions==4.4.0 ; python_version<"3.8" -zipp==3.10.0 +zipp==3.11.0 # Unpinned due to recompile_requirements.py limitations pyobjc-core ; sys_platform=="darwin" pyobjc-framework-Cocoa ; sys_platform=="darwin" -- cgit v1.2.3-54-g00ecf From 938392f93d9f640169328167829e50ab81892eef Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 28 Nov 2022 10:40:48 +0100 Subject: requirements: Drop flake8-copyright for now See #7499, #7104 and https://github.com/savoirfairelinux/flake8-copyright/issues/19 --- misc/requirements/requirements-flake8.txt | 1 - misc/requirements/requirements-flake8.txt-raw | 3 ++- scripts/dev/changelog_urls.json | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/misc/requirements/requirements-flake8.txt b/misc/requirements/requirements-flake8.txt index fa2844776..482a6e50d 100644 --- a/misc/requirements/requirements-flake8.txt +++ b/misc/requirements/requirements-flake8.txt @@ -5,7 +5,6 @@ flake8==6.0.0 flake8-bugbear==22.10.27 flake8-builtins==2.0.1 flake8-comprehensions==3.10.1 -flake8-copyright==0.2.3 flake8-debugger==4.1.2 flake8-deprecated==2.0.1 flake8-docstrings==1.6.0 diff --git a/misc/requirements/requirements-flake8.txt-raw b/misc/requirements/requirements-flake8.txt-raw index f5ecb7c8d..42bf76ee2 100644 --- a/misc/requirements/requirements-flake8.txt-raw +++ b/misc/requirements/requirements-flake8.txt-raw @@ -5,7 +5,8 @@ flake8-comprehensions flake8-debugger flake8-deprecated!=2.0.0 flake8-docstrings -flake8-copyright +# https://github.com/savoirfairelinux/flake8-copyright/issues/19 +# flake8-copyright flake8-future-import # https://github.com/aleGpereira/flake8-mock/issues/10 # flake8-mock diff --git a/scripts/dev/changelog_urls.json b/scripts/dev/changelog_urls.json index b4e7d4a7a..e29d2c204 100644 --- a/scripts/dev/changelog_urls.json +++ b/scripts/dev/changelog_urls.json @@ -47,7 +47,6 @@ "flake8-tidy-imports": "https://github.com/adamchainz/flake8-tidy-imports/blob/main/HISTORY.rst", "flake8-tuple": "https://github.com/ar4s/flake8_tuple/blob/master/HISTORY.rst", "flake8-comprehensions": "https://github.com/adamchainz/flake8-comprehensions/blob/main/HISTORY.rst", - "flake8-copyright": "https://github.com/savoirfairelinux/flake8-copyright/blob/master/CHANGELOG.rst", "flake8-deprecated": "https://github.com/gforcada/flake8-deprecated/blob/master/CHANGES.rst", "flake8-future-import": "https://github.com/xZise/flake8-future-import#changes", "flake8-string-format": "https://github.com/xZise/flake8-string-format#changes", -- cgit v1.2.3-54-g00ecf From 02274b76410d5a0998c8695b87d6d447b4d10352 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 28 Nov 2022 10:41:47 +0100 Subject: scripts: Add trove-classifiers changelog URL --- scripts/dev/changelog_urls.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/dev/changelog_urls.json b/scripts/dev/changelog_urls.json index e29d2c204..53d8d4845 100644 --- a/scripts/dev/changelog_urls.json +++ b/scripts/dev/changelog_urls.json @@ -154,5 +154,6 @@ "rich": "https://github.com/Textualize/rich/blob/master/CHANGELOG.md", "ply": "https://github.com/dabeaz/ply/blob/master/CHANGES", "pyobjc-core": "https://pyobjc.readthedocs.io/en/latest/changelog.html", - "pyobjc-framework-Cocoa": "https://pyobjc.readthedocs.io/en/latest/changelog.html" + "pyobjc-framework-Cocoa": "https://pyobjc.readthedocs.io/en/latest/changelog.html", + "trove-classifiers": "https://github.com/pypa/trove-classifiers/commits/main" } -- cgit v1.2.3-54-g00ecf From ce64e5d899666bd469bf07bd0fecbc75d4bfed3a Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 29 Nov 2022 08:23:42 +0100 Subject: Add a quirk for Array.at Trivial to polyfill, needed by various pages in the wild, and only natively available with Qt 6.2. Closes #7501 Also see #7237 and 726d5e614b1f80c339084eba7d1c240bf467fa9b --- qutebrowser/browser/webengine/webenginetab.py | 6 ++- qutebrowser/javascript/.eslintrc.yaml | 2 +- qutebrowser/javascript/quirks/array_at.user.js | 58 ++++++++++++++++++++++++++ tests/unit/javascript/test_js_quirks.py | 6 +++ 4 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 qutebrowser/javascript/quirks/array_at.user.js diff --git a/qutebrowser/browser/webengine/webenginetab.py b/qutebrowser/browser/webengine/webenginetab.py index 8057d5800..6cd0e7526 100644 --- a/qutebrowser/browser/webengine/webenginetab.py +++ b/qutebrowser/browser/webengine/webenginetab.py @@ -1233,7 +1233,11 @@ class _WebEngineScripts(QObject): _Quirk( 'object_fromentries', predicate=versions.webengine < utils.VersionNumber(5, 13), - ) + ), + _Quirk( + 'array_at', + predicate=versions.webengine < utils.VersionNumber(6, 2), + ), ] for quirk in quirks: diff --git a/qutebrowser/javascript/.eslintrc.yaml b/qutebrowser/javascript/.eslintrc.yaml index 43fd1b6e6..566304c27 100644 --- a/qutebrowser/javascript/.eslintrc.yaml +++ b/qutebrowser/javascript/.eslintrc.yaml @@ -29,7 +29,7 @@ rules: init-declarations: "off" no-plusplus: "off" no-extra-parens: "off" - id-length: ["error", {"exceptions": ["i", "k", "v", "x", "y"]}] + id-length: ["error", {"exceptions": ["i", "n", "k", "v", "x", "y"]}] object-shorthand: "off" max-statements: ["error", {"max": 40}] quotes: ["error", "double", {"avoidEscape": true}] diff --git a/qutebrowser/javascript/quirks/array_at.user.js b/qutebrowser/javascript/quirks/array_at.user.js new file mode 100644 index 000000000..0badebd77 --- /dev/null +++ b/qutebrowser/javascript/quirks/array_at.user.js @@ -0,0 +1,58 @@ +// Based on: https://github.com/tc39/proposal-relative-indexing-method#polyfill + +/* +Copyright (c) 2020 Tab Atkins Jr. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +/* eslint-disable no-invalid-this */ + +"use strict"; + +(function() { + function at(idx) { + // ToInteger() abstract op + let n = Math.trunc(idx) || 0; + // Allow negative indexing from the end + if (n < 0) { + n += this.length; + } + // OOB access is guaranteed to return undefined + if (n < 0 || n >= this.length) { + return undefined; + } + // Otherwise, this is just normal property access + return this[n]; + } + + const TypedArray = Reflect.getPrototypeOf(Int8Array); + for (const type of [Array, String, TypedArray]) { + Object.defineProperty( + type.prototype, + "at", + { + "value": at, + "writable": true, + "enumerable": false, + "configurable": true, + } + ); + } +})(); diff --git a/tests/unit/javascript/test_js_quirks.py b/tests/unit/javascript/test_js_quirks.py index 7036dcfc9..03c3c1493 100644 --- a/tests/unit/javascript/test_js_quirks.py +++ b/tests/unit/javascript/test_js_quirks.py @@ -61,6 +61,12 @@ from qutebrowser.utils import usertypes {'0': 'a', '1': 'b'}, id='object-fromentries', ), + pytest.param( + QUrl("https://test.qutebrowser.org/linkedin"), + '[1, 2, 3].at(1)', + 2, + id='array-at', + ), ]) def test_js_quirks(config_stub, js_tester_webengine, base_url, source, expected): config_stub.val.content.site_specific_quirks.skip = [] -- cgit v1.2.3-54-g00ecf From c1dcb1164f963f82d3bc093c2fd1941914021a21 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 29 Nov 2022 08:49:50 +0100 Subject: Update changelog --- doc/changelog.asciidoc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc index 1abebf9c7..c9d14ba68 100644 --- a/doc/changelog.asciidoc +++ b/doc/changelog.asciidoc @@ -124,6 +124,13 @@ Fixed v2.5.3 (unreleased) ------------------- +Added +~~~~~ + +- New `array_at` quirk, polyfilling the + https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at[`Array.at` method], + which is needed by various websites, but only natively available with Qt 6.2. + Fixed ~~~~~ -- cgit v1.2.3-54-g00ecf From 100e654fd754f4dfd1fbebdc2c09ab3923b34891 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 29 Nov 2022 08:56:53 +0100 Subject: tests: Replace class-level pytestmark by decorators --- tests/unit/browser/test_navigate.py | 3 +-- tests/unit/browser/webkit/test_webkitelem.py | 3 +-- tests/unit/config/test_configcommands.py | 12 +++++------- tests/unit/config/test_configfiles.py | 6 ++---- 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/tests/unit/browser/test_navigate.py b/tests/unit/browser/test_navigate.py index 9813705ca..7c3173602 100644 --- a/tests/unit/browser/test_navigate.py +++ b/tests/unit/browser/test_navigate.py @@ -26,10 +26,9 @@ from qutebrowser.browser import navigate from qutebrowser.utils import urlutils +@pytest.mark.usefixtures('config_stub') class TestIncDec: - pytestmark = pytest.mark.usefixtures('config_stub') - @pytest.mark.parametrize('incdec', ['increment', 'decrement']) @pytest.mark.parametrize('value', [ '{}foo', 'foo{}', 'foo{}bar', '42foo{}' diff --git a/tests/unit/browser/webkit/test_webkitelem.py b/tests/unit/browser/webkit/test_webkitelem.py index 7df91922d..d580fec99 100644 --- a/tests/unit/browser/webkit/test_webkitelem.py +++ b/tests/unit/browser/webkit/test_webkitelem.py @@ -678,10 +678,9 @@ class TestIsVisibleIframe: assert not invalid_objects.elems[1]._is_visible(invalid_objects.frame) +@pytest.mark.usefixtures('config_stub') class TestRectOnView: - pytestmark = pytest.mark.usefixtures('config_stub') - @pytest.mark.parametrize('js_rect', [ None, # real geometry via getElementRects {}, # no geometry at all via getElementRects diff --git a/tests/unit/config/test_configcommands.py b/tests/unit/config/test_configcommands.py index 22de04070..e641efb00 100644 --- a/tests/unit/config/test_configcommands.py +++ b/tests/unit/config/test_configcommands.py @@ -517,13 +517,12 @@ class TestUnsetAndClear: assert yaml_value(name) == (usertypes.UNSET if save else 'never') +@pytest.mark.usefixtures('config_tmpdir', 'data_tmpdir', + 'config_stub', 'key_config_stub') class TestSource: """Test :config-source.""" - pytestmark = pytest.mark.usefixtures('config_tmpdir', 'data_tmpdir', - 'config_stub', 'key_config_stub') - @pytest.mark.parametrize('location', ['default', 'absolute', 'relative']) @pytest.mark.parametrize('clear', [True, False]) def test_config_source(self, tmp_path, commands, config_stub, config_tmpdir, @@ -601,14 +600,13 @@ class TestSource: assert str(excinfo.value) == expected +@pytest.mark.usefixtures('config_tmpdir', 'data_tmpdir', + 'config_stub', 'key_config_stub', + 'qapp') class TestEdit: """Tests for :config-edit.""" - pytestmark = pytest.mark.usefixtures('config_tmpdir', 'data_tmpdir', - 'config_stub', 'key_config_stub', - 'qapp') - def test_no_source(self, commands, mocker): mock = mocker.patch('qutebrowser.config.configcommands.editor.' 'ExternalEditor._start_editor', autospec=True) diff --git a/tests/unit/config/test_configfiles.py b/tests/unit/config/test_configfiles.py index f93986306..e0ebbabdf 100644 --- a/tests/unit/config/test_configfiles.py +++ b/tests/unit/config/test_configfiles.py @@ -851,10 +851,9 @@ def confpy(tmp_path, config_tmpdir, data_tmpdir, config_stub, key_config_stub): return ConfPy(tmp_path) +@pytest.mark.usefixtures('config_stub', 'key_config_stub') class TestConfigPyModules: - pytestmark = pytest.mark.usefixtures('config_stub', 'key_config_stub') - @pytest.fixture def qbmodulepy(self, tmp_path): return ConfPy(tmp_path, filename="qbmodule.py") @@ -911,12 +910,11 @@ class TestConfigPyModules: assert sys.path.count(tmp_path) == 1 +@pytest.mark.usefixtures('config_stub', 'key_config_stub') class TestConfigPy: """Tests for ConfigAPI and read_config_py().""" - pytestmark = pytest.mark.usefixtures('config_stub', 'key_config_stub') - def test_assertions(self, confpy): """Make sure assertions in config.py work for these tests.""" confpy.write('assert False') -- cgit v1.2.3-54-g00ecf From 39e577c36eef9892165a6979c403e9b2d9bc239c Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 29 Nov 2022 09:28:24 +0100 Subject: Add missing setting entry for array-at quirk --- doc/help/settings.asciidoc | 1 + qutebrowser/config/configdata.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/doc/help/settings.asciidoc b/doc/help/settings.asciidoc index 36ad243a7..8327ec048 100644 --- a/doc/help/settings.asciidoc +++ b/doc/help/settings.asciidoc @@ -2783,6 +2783,7 @@ Valid values: * +js-string-replaceall+ * +js-globalthis+ * +js-object-fromentries+ + * +js-array-at+ * +misc-krunker+ * +misc-mathml-darkmode+ diff --git a/qutebrowser/config/configdata.yml b/qutebrowser/config/configdata.yml index 4b9b6da8e..f63bddaca 100644 --- a/qutebrowser/config/configdata.yml +++ b/qutebrowser/config/configdata.yml @@ -613,6 +613,7 @@ content.site_specific_quirks.skip: - js-string-replaceall - js-globalthis - js-object-fromentries + - js-array-at - misc-krunker - misc-mathml-darkmode none_ok: true -- cgit v1.2.3-54-g00ecf From dc5ef397c9e84c6dd1433c80202465a0e3eba449 Mon Sep 17 00:00:00 2001 From: qutebrowser bot Date: Mon, 5 Dec 2022 04:22:56 +0000 Subject: Update dependencies --- misc/requirements/requirements-dev.txt | 4 ++-- misc/requirements/requirements-mypy.txt | 4 ++-- misc/requirements/requirements-pyinstaller.txt | 4 ++-- misc/requirements/requirements-pylint.txt | 2 +- misc/requirements/requirements-pyroma.txt | 2 +- misc/requirements/requirements-tests.txt | 4 ++-- misc/requirements/requirements-tox.txt | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/misc/requirements/requirements-dev.txt b/misc/requirements/requirements-dev.txt index c7b517271..c82fb8663 100644 --- a/misc/requirements/requirements-dev.txt +++ b/misc/requirements/requirements-dev.txt @@ -20,7 +20,7 @@ manhole==1.8.0 more-itertools==9.0.0 packaging==21.3 pep517==0.13.0 -pkginfo==1.8.3 +pkginfo==1.9.2 ply==3.11 pycparser==2.21 Pygments==2.13.0 @@ -39,7 +39,7 @@ sip==6.7.5 six==1.16.0 toml==0.10.2 tomli==2.0.1 -twine==4.0.1 +twine==4.0.2 typing_extensions==4.4.0 uritemplate==4.1.1 # urllib3==1.26.13 diff --git a/misc/requirements/requirements-mypy.txt b/misc/requirements/requirements-mypy.txt index 92702d655..59f9c1359 100644 --- a/misc/requirements/requirements-mypy.txt +++ b/misc/requirements/requirements-mypy.txt @@ -1,7 +1,7 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py -chardet==5.0.0 -diff-cover==7.1.0 +chardet==5.1.0 +diff-cover==7.2.0 importlib-metadata==5.1.0 importlib-resources==5.10.0 Jinja2==3.1.2 diff --git a/misc/requirements/requirements-pyinstaller.txt b/misc/requirements/requirements-pyinstaller.txt index 5c938bea0..6c4cb4a77 100644 --- a/misc/requirements/requirements-pyinstaller.txt +++ b/misc/requirements/requirements-pyinstaller.txt @@ -1,5 +1,5 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py altgraph==0.17.3 -pyinstaller==5.6.2 -pyinstaller-hooks-contrib==2022.13 +pyinstaller==5.7.0 +pyinstaller-hooks-contrib==2022.14 diff --git a/misc/requirements/requirements-pylint.txt b/misc/requirements/requirements-pylint.txt index 8f6f2d352..593dbc34d 100644 --- a/misc/requirements/requirements-pylint.txt +++ b/misc/requirements/requirements-pylint.txt @@ -16,7 +16,7 @@ pefile==2022.5.30 platformdirs==2.5.4 pycparser==2.21 PyJWT==2.6.0 -pylint==2.15.6 +pylint==2.15.7 python-dateutil==2.8.2 ./scripts/dev/pylint_checkers requests==2.28.1 diff --git a/misc/requirements/requirements-pyroma.txt b/misc/requirements/requirements-pyroma.txt index 58a1c7355..92aa62e5b 100644 --- a/misc/requirements/requirements-pyroma.txt +++ b/misc/requirements/requirements-pyroma.txt @@ -12,5 +12,5 @@ pyparsing==3.0.9 pyroma==4.1 requests==2.28.1 tomli==2.0.1 -trove-classifiers==2022.10.19 +trove-classifiers==2022.12.1 urllib3==1.26.13 diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt index 505992bf6..1e8cf1c82 100644 --- a/misc/requirements/requirements-tests.txt +++ b/misc/requirements/requirements-tests.txt @@ -12,7 +12,7 @@ execnet==1.9.0 filelock==3.8.0 Flask==2.2.2 hunter==3.5.1 -hypothesis==6.58.1 +hypothesis==6.60.0 idna==3.4 importlib-metadata==5.1.0 iniconfig==1.1.1 @@ -39,7 +39,7 @@ pytest-mock==3.10.0 pytest-qt==4.2.0 pytest-repeat==0.9.1 pytest-rerunfailures==10.3 -pytest-xdist==3.0.2 +pytest-xdist==3.1.0 pytest-xvfb==2.0.0 PyVirtualDisplay==3.0 requests==2.28.1 diff --git a/misc/requirements/requirements-tox.txt b/misc/requirements/requirements-tox.txt index 1827f3bf5..569783c6e 100644 --- a/misc/requirements/requirements-tox.txt +++ b/misc/requirements/requirements-tox.txt @@ -12,5 +12,5 @@ setuptools==65.6.3 six==1.16.0 tomli==2.0.1 tox==3.27.1 -virtualenv==20.16.7 +virtualenv==20.17.0 wheel==0.38.4 -- cgit v1.2.3-54-g00ecf From 3f5febf227d746ef9b9b1c90a0110c6e8c23cb3c Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 6 Dec 2022 10:38:53 +0100 Subject: bleeding tests: Downgrade broken mesa See https://archlinux.org/packages/extra/x86_64/mesa/download/ --- scripts/dev/ci/docker/Dockerfile.j2 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/dev/ci/docker/Dockerfile.j2 b/scripts/dev/ci/docker/Dockerfile.j2 index 9aef5e16e..4785e0c10 100644 --- a/scripts/dev/ci/docker/Dockerfile.j2 +++ b/scripts/dev/ci/docker/Dockerfile.j2 @@ -20,6 +20,11 @@ RUN pacman -Suyy --noconfirm \ libyaml \ xorg-xdpyinfo +# WORKAROUND for https://bugs.archlinux.org/task/76720 +{% if unstable %} +RUN pacman -U --noconfirm https://archlinux.org/packages/extra/x86_64/mesa/download/ +{% endif %} + {% if not webengine %} RUN pacman -U --noconfirm \ https://archive.archlinux.org/packages/q/qt5-webkit/qt5-webkit-5.212.0alpha4-18-x86_64.pkg.tar.zst \ -- cgit v1.2.3-54-g00ecf From 7b90fd37378853ed47153463298db66a3a98ecac Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 6 Dec 2022 12:22:09 +0100 Subject: Use a proper @pyqtSlot for FilenamePrompt In bleeding tests, we started to get a segfault on the second test in tests/unit/mainwindow/test_prompt.py, with a stacktrace like: Thread 1 "python" received signal SIGSEGV, Segmentation fault. 0x00007ffff7b55912 in _PyFunction_Vectorcall (func=, stack=0x7fffd74656a8, nargsf=, kwnames=0x0) at Objects/call.c:341 341 if (((PyCodeObject *)f->fc_code)->co_flags & CO_OPTIMIZED) { (gdb) bt #0 0x00007ffff7b55912 in _PyFunction_Vectorcall (func=, stack=0x7fffd74656a8, nargsf=, kwnames=0x0) at Objects/call.c:341 #1 0x00007ffff4e0b3f1 in PyQtSlot::call(_object*, _object*) const (this=0x555556c759c0, args=('/tmp/pytest-of-florian/pytest-70/test_simple_completion_1_next_0/test',), callable=) at ../../qpy/QtCore/qpycore_pyqtslot.cpp:247 #2 PyQtSlot::invoke(void**, _object*, void*, bool) const (this=0x555556c759c0, qargs=, qargs@entry=0x7fffffff86c0, self=, self@entry=0x0, result=result@entry=0x0, no_receiver_check=) at ../../qpy/QtCore/qpycore_pyqtslot.cpp:159 #3 0x00007ffff4e12213 in PyQtSlot::invoke(void**, bool) const (no_receiver_check=, qargs=0x7fffffff86c0, this=) at ../../qpy/QtCore/qpycore_pyqtslot.cpp:78 #4 PyQtSlotProxy::unislot(void**) (qargs=0x7fffffff86c0, this=0x555557193e20) at ../../qpy/QtCore/qpycore_pyqtslotproxy.cpp:205 #5 PyQtSlotProxy::unislot(void**) (qargs=0x7fffffff86c0, this=0x555557193e20) at ../../qpy/QtCore/qpycore_pyqtslotproxy.cpp:186 #6 PyQtSlotProxy::qt_metacall(QMetaObject::Call, int, void**) (this=0x555557193e20, _c=, _id=0, _a=0x7fffffff86c0) at ../../qpy/QtCore/qpycore_pyqtslotproxy.cpp:170 #7 0x00007ffff48bd91d in doActivate(QObject*, int, void**) (sender=0x555556b3d680, signal_index=28, argv=0x7fffffff86c0) at kernel/qobject.cpp:3945 #8 0x00007fffeff96aca in QFileSystemModel::directoryLoaded(QString const&) (this=, _t1=) at .moc/moc_qfilesystemmodel.cpp:272 #9 0x00007ffff48b0be0 in QObject::event(QEvent*) (this=this@entry=0x555556b3d680, e=e@entry=0x7fff0c004af0) at kernel/qobject.cpp:1347 #10 0x00007fffeff962ab in QFileSystemModel::event(QEvent*) (this=this@entry=0x555556b3d680, event=event@entry=0x7fff0c004af0) at dialogs/qfilesystemmodel.cpp:1748 #11 0x00007ffff070995c in sipQFileSystemModel::event(QEvent*) (this=0x555556b3d680, a0=0x7fff0c004af0) at /usr/src/debug/pyqt5/PyQt5-5.15.7/build/QtWidgets/sipQtWidgetsQFileSystemModel.cpp:376 [...] #23 0x00007ffff4da94ce in meth_QCoreApplication_processEvents(PyObject*, PyObject*, PyObject*) (sipArgs=, sipKwds=0x0) at /usr/src/debug/pyqt5/PyQt5-5.15.7/build/QtCore/sipQtCoreQCoreApplication.cpp:590 [...] from pytest-qt in Python: Current thread 0x00007fb366207740 (most recent call first): File ".../pytestqt/plugin.py", line 209 in _process_events File ".../pytestqt/plugin.py", line 171 in pytest_runtest_setup [...] File ".../pytest/src/_pytest/runner.py", line 115 in pytest_runtest_protocol [...] File ".../pytest/src/_pytest/main.py", line 317 in pytest_cmdline_main [...] Introduced by this change in pytest, which now deletes the temporary directory after the test by default: https://github.com/pytest-dev/pytest/pull/10517 It sounds like something odd like the directory removal causing (Py)Qt to call the lambda, but the underlying Python object already being gone or something along those lines. With a proper Qt slot (@pyqtSlot), PyQt seems to do the right thing, so let's just use that instead... --- qutebrowser/mainwindow/prompt.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/qutebrowser/mainwindow/prompt.py b/qutebrowser/mainwindow/prompt.py index 5d3bced59..c5acaabda 100644 --- a/qutebrowser/mainwindow/prompt.py +++ b/qutebrowser/mainwindow/prompt.py @@ -760,9 +760,21 @@ class FilenamePrompt(_BasePrompt): self._file_view.setColumnHidden(col, True) # Nothing selected initially self._file_view.setCurrentIndex(QModelIndex()) - # The model needs to be sorted so we get the correct first/last index - self._file_model.directoryLoaded.connect( - lambda: self._file_model.sort(0)) + + self._file_model.directoryLoaded.connect(self.on_directory_loaded) + + @pyqtSlot() + def on_directory_loaded(self): + """Sort the model after a directory gets loaded. + + The model needs to be sorted so we get the correct first/last index. + + NOTE: This needs to be a proper @pystSlot() function, and not a lambda. + Otherwise, PyQt seems to fail to disconnect it immediately after the + object gets destroyed, and we get segfaults when deleting the directory + in unit tests. + """ + self._file_model.sort(0) def accept(self, value=None, save=False): self._check_save_support(save) -- cgit v1.2.3-54-g00ecf From f396c6fe671ae86402eb35f352fb1eee07493c87 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 6 Dec 2022 17:06:56 +0100 Subject: tests: Make sure we close history database connections With pytest main, pytest now reuses temporary directories... --- tests/unit/completion/test_histcategory.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/unit/completion/test_histcategory.py b/tests/unit/completion/test_histcategory.py index cb37fb784..648017cf0 100644 --- a/tests/unit/completion/test_histcategory.py +++ b/tests/unit/completion/test_histcategory.py @@ -36,7 +36,8 @@ def hist(data_tmpdir, config_stub): db = sql.Database(str(data_tmpdir / 'test_histcategory.db')) config_stub.val.completion.timestamp_format = '%Y-%m-%d' config_stub.val.completion.web_history.max_items = -1 - return sql.SqlTable(db, 'CompletionHistory', ['url', 'title', 'last_atime']) + yield sql.SqlTable(db, 'CompletionHistory', ['url', 'title', 'last_atime']) + db.close() # pytest could re-use the filename @pytest.mark.parametrize('pattern, before, after', [ -- cgit v1.2.3-54-g00ecf From 4c9050d4be4f813e79b71ade28c7d71920851ed0 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 12 Dec 2022 09:29:56 +0100 Subject: Update tox.ini syntax for tox 4 compat See https://tox.wiki/en/4.0.3/faq.html#tox-4-changed-ini-rules --- tox.ini | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 8d33750f3..f9c7aab45 100644 --- a/tox.ini +++ b/tox.ini @@ -14,7 +14,20 @@ setenv = PYTEST_QT_API=pyqt5 pyqt{,512,513,514,515,5150}: LINK_PYQT_SKIP=true cov: PYTEST_ADDOPTS=--cov --cov-report xml --cov-report=html --cov-report= -passenv = PYTHON DISPLAY XAUTHORITY HOME USERNAME USER CI XDG_* QUTE_* DOCKER QT_QUICK_BACKEND FORCE_COLOR DBUS_SESSION_BUS_ADDRESS +passenv = + PYTHON + DISPLAY + XAUTHORITY + HOME + USERNAME + USER + CI + XDG_* + QUTE_* + DOCKER + QT_QUICK_BACKEND + FORCE_COLOR + DBUS_SESSION_BUS_ADDRESS basepython = py: {env:PYTHON:python3} py3: {env:PYTHON:python3} @@ -178,7 +191,9 @@ commands = bash scripts/dev/run_shellcheck.sh {posargs} [testenv:mypy] basepython = {env:PYTHON:python3} -passenv = TERM MYPY_FORCE_TERMINAL_WIDTH +passenv = + TERM + MYPY_FORCE_TERMINAL_WIDTH deps = -r{toxinidir}/requirements.txt -r{toxinidir}/misc/requirements/requirements-dev.txt -- cgit v1.2.3-54-g00ecf From b63cdf19f4691b3dfcab1fbad97c7289be568a03 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 12 Dec 2022 09:51:22 +0100 Subject: scripts: Show asciidoc errors while discovering --- scripts/asciidoc2html.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/asciidoc2html.py b/scripts/asciidoc2html.py index 1b904736d..291d48d5f 100755 --- a/scripts/asciidoc2html.py +++ b/scripts/asciidoc2html.py @@ -234,11 +234,16 @@ class AsciiDoc: for executable in ['asciidoc', 'asciidoc.py']: try: subprocess.run([executable, '--version'], - stdout=subprocess.DEVNULL, - stderr=subprocess.DEVNULL, + capture_output=True, + text=True, check=True) - except OSError: + except FileNotFoundError: pass + except OSError as e: + utils.print_error(f"While running {executable}: {e}") + except subprocess.CalledProcessError as e: + utils.print_error( + f"While running {executable}: {e}\n{e.stdout}\n{e.stderr}") else: return [executable] -- cgit v1.2.3-54-g00ecf From af176f749fd7f5521d3978e268a1fad169ac2bd4 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 12 Dec 2022 11:04:59 +0100 Subject: scripts: Use pip-installed asciidoc Fixes #7352, closes #6793 --- doc/install.asciidoc | 18 ++-------- misc/requirements/requirements-docs.txt | 3 ++ misc/requirements/requirements-docs.txt-raw | 1 + scripts/asciidoc2html.py | 51 +++-------------------------- scripts/dev/build_release.py | 17 ++-------- scripts/dev/update_version.py | 3 +- scripts/mkvenv.py | 18 ++++------ 7 files changed, 22 insertions(+), 89 deletions(-) create mode 100644 misc/requirements/requirements-docs.txt create mode 100644 misc/requirements/requirements-docs.txt-raw diff --git a/doc/install.asciidoc b/doc/install.asciidoc index bbf7ab62f..da211d850 100644 --- a/doc/install.asciidoc +++ b/doc/install.asciidoc @@ -48,7 +48,7 @@ instructions! Note you'll need some basic libraries to use the virtualenv-installed PyQt: ---- -# apt install --no-install-recommends git ca-certificates python3 python3-venv asciidoc libglib2.0-0 libgl1 libfontconfig1 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-shape0 libxcb-xfixes0 libxcb-xinerama0 libxcb-xkb1 libxkbcommon-x11-0 libdbus-1-3 libyaml-dev gcc python3-dev libnss3 libasound2 +# apt install --no-install-recommends git ca-certificates python3 python3-venv libglib2.0-0 libgl1 libfontconfig1 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-shape0 libxcb-xfixes0 libxcb-xinerama0 libxcb-xkb1 libxkbcommon-x11-0 libdbus-1-3 libyaml-dev gcc python3-dev libnss3 libasound2 ---- // FIXME not needed anymore? @@ -72,7 +72,7 @@ qutebrowser in a virtualenv>> with a newer PyQt/Qt binary instead. Note you'll need some basic libraries to use the virtualenv-installed PyQt: ---- -# apt install --no-install-recommends git ca-certificates python3 python3-venv asciidoc libglib2.0-0 libgl1 libfontconfig1 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-shape0 libxcb-xfixes0 libxcb-xinerama0 libxcb-xkb1 libxkbcommon-x11-0 libdbus-1-3 libyaml-dev gcc python3-dev libnss3 libasound2 +# apt install --no-install-recommends git ca-certificates python3 python3-venv libglib2.0-0 libgl1 libfontconfig1 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-shape0 libxcb-xfixes0 libxcb-xinerama0 libxcb-xkb1 libxkbcommon-x11-0 libdbus-1-3 libyaml-dev gcc python3-dev libnss3 libasound2 ---- Ubuntu 20.04 LTS / Linux Mint 20 (or newer) @@ -93,7 +93,7 @@ Additional hints this for you): + ---- -# apt install --no-install-recommends asciidoc +$ pip install -r misc/requirements/requirements-docs.txt # or install asciidoc manually $ python3 scripts/asciidoc2html.py ---- @@ -514,18 +514,6 @@ You can create a simple wrapper script to start qutebrowser somewhere in your ~/path/to/qutebrowser/.venv/bin/python3 -m qutebrowser "$@" ---- -Building the docs -~~~~~~~~~~~~~~~~~ - -To build the documentation, install `asciidoc` (note that LaTeX which comes as -optional/recommended dependency with some distributions is not required). - -Then, run: - ----- -$ python3 scripts/asciidoc2html.py ----- - Updating ~~~~~~~~ diff --git a/misc/requirements/requirements-docs.txt b/misc/requirements/requirements-docs.txt new file mode 100644 index 000000000..d2d35d758 --- /dev/null +++ b/misc/requirements/requirements-docs.txt @@ -0,0 +1,3 @@ +# This file is automatically generated by scripts/dev/recompile_requirements.py + +asciidoc==10.2.0 diff --git a/misc/requirements/requirements-docs.txt-raw b/misc/requirements/requirements-docs.txt-raw new file mode 100644 index 000000000..1cd92d927 --- /dev/null +++ b/misc/requirements/requirements-docs.txt-raw @@ -0,0 +1 @@ +asciidoc diff --git a/scripts/asciidoc2html.py b/scripts/asciidoc2html.py index 291d48d5f..560faa0cd 100755 --- a/scripts/asciidoc2html.py +++ b/scripts/asciidoc2html.py @@ -48,13 +48,7 @@ class AsciiDoc: 'install', 'stacktrace' ] - def __init__(self, - asciidoc: Optional[str], - asciidoc_python: Optional[str], - website: Optional[str]) -> None: - self._cmd: Optional[List[str]] = None - self._asciidoc = asciidoc - self._asciidoc_python = asciidoc_python + def __init__(self, website: Optional[str]) -> None: self._website = website self._homedir: Optional[pathlib.Path] = None self._themedir: Optional[pathlib.Path] = None @@ -63,7 +57,6 @@ class AsciiDoc: def prepare(self) -> None: """Get the asciidoc command and create the homedir to use.""" - self._cmd = self._get_asciidoc_cmd() self._homedir = pathlib.Path(tempfile.mkdtemp()) self._themedir = self._homedir / '.asciidoc' / 'themes' / 'qute' self._tempdir = self._homedir / 'tmp' @@ -224,31 +217,6 @@ class AsciiDoc: except FileExistsError: pass - def _get_asciidoc_cmd(self) -> List[str]: - """Try to find out what commandline to use to invoke asciidoc.""" - if self._asciidoc is not None: - python = (sys.executable if self._asciidoc_python is None - else self._asciidoc_python) - return [python, self._asciidoc] - - for executable in ['asciidoc', 'asciidoc.py']: - try: - subprocess.run([executable, '--version'], - capture_output=True, - text=True, - check=True) - except FileNotFoundError: - pass - except OSError as e: - utils.print_error(f"While running {executable}: {e}") - except subprocess.CalledProcessError as e: - utils.print_error( - f"While running {executable}: {e}\n{e.stdout}\n{e.stderr}") - else: - return [executable] - - raise FileNotFoundError - def call(self, src: pathlib.Path, dst: pathlib.Path, *args): """Call asciidoc for the given files. @@ -258,8 +226,7 @@ class AsciiDoc: *args: Additional arguments passed to asciidoc. """ print("Calling asciidoc for {}...".format(src.name)) - assert self._cmd is not None # for mypy - cmdline = self._cmd[:] + cmdline = [sys.executable, "-m", "asciidoc"] if dst is not None: cmdline += ['--out-file', str(dst)] cmdline += args @@ -286,12 +253,6 @@ def parse_args() -> argparse.Namespace: parser = argparse.ArgumentParser() parser.add_argument('--website', help="Build website into a given " "directory.") - parser.add_argument('--asciidoc', help="Full path to asciidoc.py. " - "If not given, it's searched in PATH.", - nargs='?') - parser.add_argument('--asciidoc-python', help="Python to use for asciidoc." - "If not given, the current Python interpreter is used.", - nargs='?') return parser.parse_args() @@ -303,9 +264,8 @@ def run(**kwargs) -> None: try: asciidoc.prepare() except FileNotFoundError: - utils.print_error("Could not find asciidoc! Please install it, or use " - "the --asciidoc argument to point this script to " - "the correct asciidoc.py location!") + utils.print_error("Could not find asciidoc! Please install it, e.g. via " + "pip install -r misc/requirements/requirements-docs.txt") sys.exit(1) try: @@ -319,8 +279,7 @@ def main(colors: bool = False) -> None: utils.change_cwd() utils.use_color = colors args = parse_args() - run(asciidoc=args.asciidoc, asciidoc_python=args.asciidoc_python, - website=args.website) + run(website=args.website) if __name__ == '__main__': diff --git a/scripts/dev/build_release.py b/scripts/dev/build_release.py index c175c68a7..20eb19e18 100755 --- a/scripts/dev/build_release.py +++ b/scripts/dev/build_release.py @@ -96,15 +96,10 @@ def call_tox( env=env, check=True) -def run_asciidoc2html(args: argparse.Namespace) -> None: +def run_asciidoc2html() -> None: """Run the asciidoc2html script.""" utils.print_title("Running asciidoc2html.py") - a2h_args = [] - if args.asciidoc is not None: - a2h_args += ['--asciidoc', args.asciidoc] - if args.asciidoc_python is not None: - a2h_args += ['--asciidoc-python', args.asciidoc_python] - call_script('asciidoc2html.py', *a2h_args) + call_script('asciidoc2html.py') def _maybe_remove(path: pathlib.Path) -> None: @@ -684,12 +679,6 @@ def main() -> None: parser = argparse.ArgumentParser() parser.add_argument('--skip-docs', action='store_true', help="Don't generate docs") - parser.add_argument('--asciidoc', help="Full path to asciidoc.py. " - "If not given, it's searched in PATH.", - nargs='?') - parser.add_argument('--asciidoc-python', help="Python to use for asciidoc." - "If not given, the current Python interpreter is used.", - nargs='?') parser.add_argument('--gh-token', help="GitHub token to use.", nargs='?') parser.add_argument('--upload', action='store_true', required=False, @@ -724,7 +713,7 @@ def main() -> None: if args.skip_docs: pathlib.Path("qutebrowser", "html", "doc").mkdir(parents=True, exist_ok=True) else: - run_asciidoc2html(args) + run_asciidoc2html() if os.name == 'nt': artifacts = build_windows( diff --git a/scripts/dev/update_version.py b/scripts/dev/update_version.py index 975787415..67e22ea26 100644 --- a/scripts/dev/update_version.py +++ b/scripts/dev/update_version.py @@ -81,8 +81,7 @@ if __name__ == "__main__": "tox -e build-release -- --upload" .format(v=version)) print("* Windows: git fetch; git checkout v{v}; " - "py -3.9 -m tox -e build-release -- --asciidoc " - "$env:userprofile\\bin\\asciidoc-9.1.0\\asciidoc.py --upload" + "py -3.9 -m tox -e build-release -- --upload" .format(v=version)) print("* macOS: git fetch && git checkout v{v} && " "tox -e build-release -- --upload" diff --git a/scripts/mkvenv.py b/scripts/mkvenv.py index 005c657a1..6b37bc9cb 100755 --- a/scripts/mkvenv.py +++ b/scripts/mkvenv.py @@ -81,9 +81,6 @@ def parse_args(argv: List[str] = None) -> argparse.Namespace: parser.add_argument('--virtualenv', action='store_true', help="Use virtualenv instead of venv.") - parser.add_argument('--asciidoc', help="Full path to asciidoc.py. " - "If not given, asciidoc is searched in PATH.", - nargs='?',) parser.add_argument('--dev', action='store_true', help="Also install dev/test dependencies.") @@ -424,17 +421,14 @@ def install_qutebrowser(venv_dir: pathlib.Path) -> None: pip_install(venv_dir, '-e', str(REPO_ROOT)) -def regenerate_docs(venv_dir: pathlib.Path, asciidoc: Optional[str]): +def regenerate_docs(venv_dir: pathlib.Path): """Regenerate docs using asciidoc.""" utils.print_title("Generating documentation") - if asciidoc is not None: - a2h_args = ['--asciidoc', asciidoc] - else: - a2h_args = [] - script_path = pathlib.Path(__file__).parent / 'asciidoc2html.py' + pip_install(venv_dir, '-r', str(requirements_file('docs'))) - print_command('python3 scripts/asciidoc2html.py', *a2h_args, venv=True) - run_venv(venv_dir, 'python', str(script_path), *a2h_args) + script_path = pathlib.Path(__file__).parent / 'asciidoc2html.py' + print_command('python3 scripts/asciidoc2html.py', venv=True) + run_venv(venv_dir, 'python', str(script_path)) def update_repo(): @@ -499,7 +493,7 @@ def run(args) -> None: install_dev_requirements(venv_dir) if not args.skip_docs: - regenerate_docs(venv_dir, args.asciidoc) + regenerate_docs(venv_dir) def main(): -- cgit v1.2.3-54-g00ecf From bbdc83f638ed1a8e263a3efac0da8a901c1a1420 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 12 Dec 2022 13:37:07 +0100 Subject: Fix lint/ci --- scripts/asciidoc2html.py | 2 +- scripts/dev/changelog_urls.json | 3 ++- scripts/mkvenv.py | 2 +- tox.ini | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/asciidoc2html.py b/scripts/asciidoc2html.py index 560faa0cd..6f3b170af 100755 --- a/scripts/asciidoc2html.py +++ b/scripts/asciidoc2html.py @@ -20,7 +20,7 @@ """Generate the html documentation based on the asciidoc files.""" -from typing import List, Optional +from typing import Optional import re import os import sys diff --git a/scripts/dev/changelog_urls.json b/scripts/dev/changelog_urls.json index 53d8d4845..7ad9328d9 100644 --- a/scripts/dev/changelog_urls.json +++ b/scripts/dev/changelog_urls.json @@ -155,5 +155,6 @@ "ply": "https://github.com/dabeaz/ply/blob/master/CHANGES", "pyobjc-core": "https://pyobjc.readthedocs.io/en/latest/changelog.html", "pyobjc-framework-Cocoa": "https://pyobjc.readthedocs.io/en/latest/changelog.html", - "trove-classifiers": "https://github.com/pypa/trove-classifiers/commits/main" + "trove-classifiers": "https://github.com/pypa/trove-classifiers/commits/main", + "asciidoc": "https://asciidoc-py.github.io/CHANGELOG.html" } diff --git a/scripts/mkvenv.py b/scripts/mkvenv.py index 6b37bc9cb..08174abc4 100755 --- a/scripts/mkvenv.py +++ b/scripts/mkvenv.py @@ -31,7 +31,7 @@ import shutil import venv as pyvenv import subprocess import platform -from typing import List, Optional, Tuple, Dict, Union +from typing import List, Tuple, Dict, Union sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir)) from scripts import utils, link_pyqt diff --git a/tox.ini b/tox.ini index f9c7aab45..14ad03caa 100644 --- a/tox.ini +++ b/tox.ini @@ -159,6 +159,7 @@ whitelist_externals = git passenv = CI GITHUB_REF deps = -r{toxinidir}/requirements.txt + -r{toxinidir}/misc/requirements/requirements-docs.txt -r{toxinidir}/misc/requirements/requirements-pyqt.txt commands = {envpython} scripts/dev/src2asciidoc.py {posargs} -- cgit v1.2.3-54-g00ecf From 21ac559a6505452609b7c305d7e2c6479cefd22c Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 12 Dec 2022 13:42:32 +0100 Subject: More adjustments for tox 4 subtleties --- .github/workflows/ci.yml | 7 ++++++- tox.ini | 16 ++++++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3bebcfbc4..9e1b8fc3c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,7 +73,12 @@ jobs: python -m pip install -U pip python -m pip install -U -r misc/requirements/requirements-tox.txt - name: "Run ${{ matrix.testenv }}" - run: "dbus-run-session -- tox -e ${{ matrix.testenv}} -- ${{ matrix.args }}" + run: | + if [[ -z "${{ matrix.args }}" ]]; then + dbus-run-session -- tox -e ${{ matrix.testenv }} + else + dbus-run-session -- tox -e ${{ matrix.testenv }} -- ${{ matrix.args }} + fi tests-docker: if: "!contains(github.event.head_commit.message, '[ci skip]')" diff --git a/tox.ini b/tox.ini index 14ad03caa..7e4bcf5c1 100644 --- a/tox.ini +++ b/tox.ini @@ -155,8 +155,9 @@ commands = [testenv:docs] basepython = {env:PYTHON:python3} -whitelist_externals = git -passenv = CI GITHUB_REF +passenv = + CI + GITHUB_REF deps = -r{toxinidir}/requirements.txt -r{toxinidir}/misc/requirements/requirements-docs.txt @@ -168,7 +169,10 @@ commands = [testenv:pyinstaller-{64,32}] basepython = {env:PYTHON:python3} -passenv = APPDATA HOME PYINSTALLER_DEBUG +passenv = + APPDATA + HOME + PYINSTALLER_DEBUG deps = -r{toxinidir}/requirements.txt -r{toxinidir}/misc/requirements/requirements-pyinstaller.txt @@ -180,14 +184,14 @@ commands = basepython = python3 deps = passenv = TERM -whitelist_externals = eslint +allowlist_externals = eslint changedir = {toxinidir}/qutebrowser/javascript commands = eslint --report-unused-disable-directives . [testenv:shellcheck] basepython = python3 deps = -whitelist_externals = bash +allowlist_externals = bash commands = bash scripts/dev/run_shellcheck.sh {posargs} [testenv:mypy] @@ -212,7 +216,7 @@ commands = [testenv:actionlint] basepython = python3 deps = -whitelist_externals = actionlint +allowlist_externals = actionlint commands = actionlint -- cgit v1.2.3-54-g00ecf From 7ef74dc82d3d9bb12b8b4699d8640a2489ab70e6 Mon Sep 17 00:00:00 2001 From: qutebrowser bot Date: Mon, 12 Dec 2022 12:52:23 +0000 Subject: Update dependencies --- misc/requirements/requirements-check-manifest.txt | 5 ++--- misc/requirements/requirements-dev.txt | 5 ++--- misc/requirements/requirements-flake8.txt | 2 +- misc/requirements/requirements-mypy.txt | 4 ++-- misc/requirements/requirements-pylint.txt | 6 +++--- misc/requirements/requirements-pyroma.txt | 5 ++--- misc/requirements/requirements-sphinx.txt | 5 ++--- misc/requirements/requirements-tests.txt | 9 ++++----- misc/requirements/requirements-tox.txt | 17 +++++++++-------- misc/requirements/requirements-yamllint.txt | 2 +- requirements.txt | 2 +- 11 files changed, 29 insertions(+), 33 deletions(-) diff --git a/misc/requirements/requirements-check-manifest.txt b/misc/requirements/requirements-check-manifest.txt index 2e804cbeb..f35ba3f3f 100644 --- a/misc/requirements/requirements-check-manifest.txt +++ b/misc/requirements/requirements-check-manifest.txt @@ -1,8 +1,7 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py build==0.9.0 -check-manifest==0.48 -packaging==21.3 +check-manifest==0.49 +packaging==22.0 pep517==0.13.0 -pyparsing==3.0.9 tomli==2.0.1 diff --git a/misc/requirements/requirements-dev.txt b/misc/requirements/requirements-dev.txt index c82fb8663..7eca59878 100644 --- a/misc/requirements/requirements-dev.txt +++ b/misc/requirements/requirements-dev.txt @@ -3,7 +3,7 @@ bleach==5.0.1 build==0.9.0 bump2version==1.0.1 -certifi==2022.9.24 +certifi==2022.12.7 cffi==1.15.1 charset-normalizer==2.1.1 commonmark==0.9.1 @@ -18,7 +18,7 @@ jeepney==0.8.0 keyring==23.11.0 manhole==1.8.0 more-itertools==9.0.0 -packaging==21.3 +packaging==22.0 pep517==0.13.0 pkginfo==1.9.2 ply==3.11 @@ -26,7 +26,6 @@ pycparser==2.21 Pygments==2.13.0 PyJWT==2.6.0 Pympler==1.0.1 -pyparsing==3.0.9 PyQt-builder==1.14.0 python-dateutil==2.8.2 readme-renderer==37.3 diff --git a/misc/requirements/requirements-flake8.txt b/misc/requirements/requirements-flake8.txt index 482a6e50d..e67ce883d 100644 --- a/misc/requirements/requirements-flake8.txt +++ b/misc/requirements/requirements-flake8.txt @@ -2,7 +2,7 @@ attrs==22.1.0 flake8==6.0.0 -flake8-bugbear==22.10.27 +flake8-bugbear==22.12.6 flake8-builtins==2.0.1 flake8-comprehensions==3.10.1 flake8-debugger==4.1.2 diff --git a/misc/requirements/requirements-mypy.txt b/misc/requirements/requirements-mypy.txt index 59f9c1359..dbd21d0b4 100644 --- a/misc/requirements/requirements-mypy.txt +++ b/misc/requirements/requirements-mypy.txt @@ -1,9 +1,9 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py chardet==5.1.0 -diff-cover==7.2.0 +diff-cover==7.3.0 importlib-metadata==5.1.0 -importlib-resources==5.10.0 +importlib-resources==5.10.1 Jinja2==3.1.2 lxml==4.9.1 MarkupSafe==2.1.1 diff --git a/misc/requirements/requirements-pylint.txt b/misc/requirements/requirements-pylint.txt index 593dbc34d..12457a850 100644 --- a/misc/requirements/requirements-pylint.txt +++ b/misc/requirements/requirements-pylint.txt @@ -1,7 +1,7 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py astroid==2.12.13 -certifi==2022.9.24 +certifi==2022.12.7 cffi==1.15.1 charset-normalizer==2.1.1 cryptography==38.0.4 @@ -13,10 +13,10 @@ isort==5.10.1 lazy-object-proxy==1.8.0 mccabe==0.7.0 pefile==2022.5.30 -platformdirs==2.5.4 +platformdirs==2.6.0 pycparser==2.21 PyJWT==2.6.0 -pylint==2.15.7 +pylint==2.15.8 python-dateutil==2.8.2 ./scripts/dev/pylint_checkers requests==2.28.1 diff --git a/misc/requirements/requirements-pyroma.txt b/misc/requirements/requirements-pyroma.txt index 92aa62e5b..5702eafe8 100644 --- a/misc/requirements/requirements-pyroma.txt +++ b/misc/requirements/requirements-pyroma.txt @@ -1,14 +1,13 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py build==0.9.0 -certifi==2022.9.24 +certifi==2022.12.7 charset-normalizer==2.1.1 docutils==0.19 idna==3.4 -packaging==21.3 +packaging==22.0 pep517==0.13.0 Pygments==2.13.0 -pyparsing==3.0.9 pyroma==4.1 requests==2.28.1 tomli==2.0.1 diff --git a/misc/requirements/requirements-sphinx.txt b/misc/requirements/requirements-sphinx.txt index 7ff7940ce..98d43093f 100644 --- a/misc/requirements/requirements-sphinx.txt +++ b/misc/requirements/requirements-sphinx.txt @@ -2,7 +2,7 @@ alabaster==0.7.12 Babel==2.11.0 -certifi==2022.9.24 +certifi==2022.12.7 charset-normalizer==2.1.1 docutils==0.19 idna==3.4 @@ -10,9 +10,8 @@ imagesize==1.4.1 importlib-metadata==5.1.0 Jinja2==3.1.2 MarkupSafe==2.1.1 -packaging==21.3 +packaging==22.0 Pygments==2.13.0 -pyparsing==3.0.9 pytz==2022.6 requests==2.28.1 snowballstemmer==2.2.0 diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt index 1e8cf1c82..bd944c934 100644 --- a/misc/requirements/requirements-tests.txt +++ b/misc/requirements/requirements-tests.txt @@ -2,17 +2,17 @@ attrs==22.1.0 beautifulsoup4==4.11.1 -certifi==2022.9.24 +certifi==2022.12.7 charset-normalizer==2.1.1 cheroot==9.0.0 click==8.1.3 coverage==6.5.0 exceptiongroup==1.0.4 execnet==1.9.0 -filelock==3.8.0 +filelock==3.8.2 Flask==2.2.2 hunter==3.5.1 -hypothesis==6.60.0 +hypothesis==6.61.0 idna==3.4 importlib-metadata==5.1.0 iniconfig==1.1.1 @@ -23,13 +23,12 @@ Mako==1.2.4 manhole==1.8.0 # MarkupSafe==2.1.1 more-itertools==9.0.0 -packaging==21.3 +packaging==22.0 parse==1.19.0 parse-type==0.6.0 pluggy==1.0.0 py-cpuinfo==9.0.0 Pygments==2.13.0 -pyparsing==3.0.9 pytest==7.2.0 pytest-bdd==6.1.1 pytest-benchmark==4.0.0 diff --git a/misc/requirements/requirements-tox.txt b/misc/requirements/requirements-tox.txt index 569783c6e..814faeae4 100644 --- a/misc/requirements/requirements-tox.txt +++ b/misc/requirements/requirements-tox.txt @@ -1,16 +1,17 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py +cachetools==5.2.0 +chardet==5.1.0 +colorama==0.4.6 distlib==0.3.6 -filelock==3.8.0 -packaging==21.3 +filelock==3.8.2 +packaging==22.0 pip==22.3.1 -platformdirs==2.5.4 +platformdirs==2.6.0 pluggy==1.0.0 -py==1.11.0 -pyparsing==3.0.9 +pyproject_api==1.2.1 setuptools==65.6.3 -six==1.16.0 tomli==2.0.1 -tox==3.27.1 -virtualenv==20.17.0 +tox==4.0.8 +virtualenv==20.17.1 wheel==0.38.4 diff --git a/misc/requirements/requirements-yamllint.txt b/misc/requirements/requirements-yamllint.txt index 2dccc1085..f825718e9 100644 --- a/misc/requirements/requirements-yamllint.txt +++ b/misc/requirements/requirements-yamllint.txt @@ -1,5 +1,5 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py -pathspec==0.10.2 +pathspec==0.10.3 PyYAML==6.0 yamllint==1.28.0 diff --git a/requirements.txt b/requirements.txt index 9b74b46b6..2e993e977 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ adblock==0.6.0 colorama==0.4.6 importlib-metadata==5.1.0 ; python_version=="3.7.*" -importlib-resources==5.10.0 ; python_version=="3.7.*" or python_version=="3.8.*" +importlib-resources==5.10.1 ; python_version=="3.7.*" or python_version=="3.8.*" Jinja2==3.1.2 MarkupSafe==2.1.1 Pygments==2.13.0 -- cgit v1.2.3-54-g00ecf From 2d7f1b65951be031688bc72cb46469f874983975 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 12 Dec 2022 13:56:30 +0100 Subject: Update changelog URLs for tox 4 --- scripts/dev/changelog_urls.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/dev/changelog_urls.json b/scripts/dev/changelog_urls.json index 7ad9328d9..095d6ea7a 100644 --- a/scripts/dev/changelog_urls.json +++ b/scripts/dev/changelog_urls.json @@ -1,5 +1,4 @@ { - "pyparsing": "https://github.com/pyparsing/pyparsing/blob/master/CHANGES", "pylint": "https://pylint.pycqa.org/en/latest/whatsnew/2/index.html", "tomlkit": "https://github.com/sdispater/tomlkit/blob/master/CHANGELOG.md", "dill": "https://github.com/uqfoundation/dill/commits/master", @@ -30,6 +29,8 @@ "pytest": "https://docs.pytest.org/en/latest/changelog.html", "iniconfig": "https://github.com/pytest-dev/iniconfig/blob/master/CHANGELOG", "tox": "https://tox.readthedocs.io/en/latest/changelog.html", + "cachetools": "https://github.com/tkem/cachetools/blob/master/CHANGELOG.rst", + "pyproject_api": "https://pyproject-api.readthedocs.io/en/latest/changelog.html", "PyYAML": "https://github.com/yaml/pyyaml/blob/master/CHANGES", "pytest-bdd": "https://github.com/pytest-dev/pytest-bdd/blob/master/CHANGES.rst", "snowballstemmer": "https://github.com/snowballstem/snowball/blob/master/NEWS", @@ -77,7 +78,6 @@ "sphinxcontrib-serializinghtml": "https://www.sphinx-doc.org/en/master/changes.html", "jaraco.functools": "https://github.com/jaraco/jaraco.functools/blob/main/CHANGES.rst", "parse": "https://github.com/r1chardj0n3s/parse#potential-gotchas", - "py": "https://py.readthedocs.io/en/latest/changelog.html#changelog", "Pympler": "https://github.com/pympler/pympler/blob/master/CHANGELOG.md", "pytest-mock": "https://github.com/pytest-dev/pytest-mock/blob/main/CHANGELOG.rst", "pytest-qt": "https://github.com/pytest-dev/pytest-qt/blob/master/CHANGELOG.rst", -- cgit v1.2.3-54-g00ecf From 549aec310089ace34d039b132a8190cdd05ebc84 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 13 Dec 2022 08:38:00 +0100 Subject: ci: Adjust for asciidoc changes --- .github/workflows/nightly.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 5aaafb666..a3e78977e 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -75,25 +75,16 @@ jobs: uses: actions/setup-python@v4 with: python-version: "3.10" - - name: Get asciidoc - uses: actions/checkout@v3 - with: - repository: asciidoc-py/asciidoc-py - ref: '9.x' - path: asciidoc - persist-credentials: false - - name: Move asciidoc out of the repo - run: mv asciidoc .. - name: Install dependencies run: | python -m pip install -U pip - python -m pip install -U -r misc/requirements/requirements-tox.txt + python -m pip install -U -r misc/requirements/requirements-tox.txt -r misc/requirements/requirements-docs.txt - name: Patch qutebrowser for debugging if: "contains(matrix.args, '--debug')" run: | sed -i '' '/.-d., .--debug.,/s/$/ default=True,/' qutebrowser/qutebrowser.py - name: Run tox - run: "tox -e ${{ matrix.toxenv }} -- --asciidoc ../asciidoc/asciidoc.py --gh-token ${{ secrets.GITHUB_TOKEN }} ${{ matrix.args }}" + run: "tox -e ${{ matrix.toxenv }} -- --gh-token ${{ secrets.GITHUB_TOKEN }} ${{ matrix.args }}" - name: Gather info id: info run: | -- cgit v1.2.3-54-g00ecf From 65440f3f1e709a7a14575197cd91c8391f12c870 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 13 Dec 2022 08:49:06 +0100 Subject: ci: I shouldn't push changes before my first coffee --- .github/workflows/nightly.yml | 2 +- tox.ini | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index a3e78977e..3d046615d 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -78,7 +78,7 @@ jobs: - name: Install dependencies run: | python -m pip install -U pip - python -m pip install -U -r misc/requirements/requirements-tox.txt -r misc/requirements/requirements-docs.txt + python -m pip install -U -r misc/requirements/requirements-tox.txt - name: Patch qutebrowser for debugging if: "contains(matrix.args, '--debug')" run: | diff --git a/tox.ini b/tox.ini index 7e4bcf5c1..560274d7f 100644 --- a/tox.ini +++ b/tox.ini @@ -246,6 +246,7 @@ usedevelop = true deps = -r{toxinidir}/requirements.txt -r{toxinidir}/misc/requirements/requirements-tox.txt + -r{toxinidir}/misc/requirements/requirements-docs.txt -r{toxinidir}/misc/requirements/requirements-pyqt.txt -r{toxinidir}/misc/requirements/requirements-dev.txt -r{toxinidir}/misc/requirements/requirements-pyinstaller.txt -- cgit v1.2.3-54-g00ecf From 5afc8a68191160f8d5c74b92874a0032d3c1996e Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 13 Dec 2022 08:59:48 +0100 Subject: Make shellcheck happy again about password_fill v0.9.0 seems to add SC2317 ("Command appears to be unreachable."): https://www.shellcheck.net/wiki/SC2317 This adds various false-positives in password_fill, let's just ignore those... Also see: https://github.com/koalaman/shellcheck/issues/2613 --- misc/userscripts/password_fill | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/misc/userscripts/password_fill b/misc/userscripts/password_fill index 3ea8fd9f6..b63d36276 100755 --- a/misc/userscripts/password_fill +++ b/misc/userscripts/password_fill @@ -143,6 +143,7 @@ no_entries_found() { # expected to write the username of that entry to the $username variable and # the corresponding password to $password +# shellcheck disable=SC2317 reset_backend() { init() { true ; } query_entries() { true ; } @@ -198,7 +199,7 @@ choose_entry_zenity() { } choose_entry_zenity_radio() { - zenity_helper() { + zenity_helper() { # shellcheck disable=SC2317 awk '{ print $0 ; print $0 }' \ | zenity --list --radiolist \ --title "qutebrowser password fill" \ @@ -278,6 +279,7 @@ pass_backend() { # ======================================================= # backend: secret +# shellcheck disable=SC2317 secret_backend() { init() { return -- cgit v1.2.3-54-g00ecf