diff options
author | Lembrun <amadeusk7@free.fr> | 2021-03-01 20:23:02 +0100 |
---|---|---|
committer | Lembrun <amadeusk7@free.fr> | 2021-03-01 20:23:02 +0100 |
commit | 858ac241c57e16b02d2f62cef03213b563ff87be (patch) | |
tree | 4fed061ce97f53594ab6b955f7f978481a0c21cb | |
parent | f767188abfaad6b5d798c93297e0fe2ac0e3486c (diff) | |
parent | 5a62c73d0719a063c5fc74271f737ddf42ce49f3 (diff) | |
download | qutebrowser-858ac241c57e16b02d2f62cef03213b563ff87be.tar.gz qutebrowser-858ac241c57e16b02d2f62cef03213b563ff87be.zip |
Merge remote-tracking branch 'upstream/master' into qbot-snake-case
-rw-r--r-- | doc/changelog.asciidoc | 2 | ||||
-rw-r--r-- | misc/requirements/README.md | 4 | ||||
-rw-r--r-- | misc/requirements/requirements-dev.txt | 4 | ||||
-rw-r--r-- | misc/requirements/requirements-mypy.txt | 4 | ||||
-rw-r--r-- | misc/requirements/requirements-tests.txt | 5 | ||||
-rw-r--r-- | misc/requirements/requirements-tests.txt-raw | 4 | ||||
-rw-r--r-- | misc/requirements/requirements-tox.txt | 2 | ||||
-rwxr-xr-x | misc/userscripts/readability-js | 18 | ||||
-rw-r--r-- | qutebrowser/browser/hints.py | 2 | ||||
-rw-r--r-- | requirements.txt | 2 | ||||
-rw-r--r-- | scripts/dev/recompile_requirements.py | 8 | ||||
-rw-r--r-- | tests/unit/misc/test_editor.py | 5 | ||||
-rw-r--r-- | tests/unit/misc/test_ipc.py | 14 |
13 files changed, 48 insertions, 26 deletions
diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc index 22a6d26fb..c23d94a05 100644 --- a/doc/changelog.asciidoc +++ b/doc/changelog.asciidoc @@ -46,6 +46,8 @@ Changed - When PyQtWebEngine >= 5.15.3 is installed via `pip` (as is e.g. the case with `mkvenv.py`), qutebrowser now queries the associated metadata to find out the QtWebEngine version. +- When doing `:hint links yank --rapid`, the messages shown now replace each + other, thus being less noisy. Fixed ~~~~~ diff --git a/misc/requirements/README.md b/misc/requirements/README.md index 6ae986279..330233bca 100644 --- a/misc/requirements/README.md +++ b/misc/requirements/README.md @@ -8,7 +8,9 @@ Those files can also contain some special commands: - Add an additional comment to a line: `#@ comment: <package> <comment here>` - Filter a line for requirements.io: `#@ filter: <package> <filter>` - Don't include a package in the output: `#@ ignore: <package>` (or multiple packages) -- Replace a part of a frozen package specification with another: `#@ replace <regex> <replacement>` +- Replace a part of a frozen package specification with another: `#@ replace: <regex> <replacement>` +- Add a new line: `#@ add: <line>` +- Add environment markers to a line: `#@ markers: <package> <markers>` Some examples: diff --git a/misc/requirements/requirements-dev.txt b/misc/requirements/requirements-dev.txt index 7b257dc0b..5e679e879 100644 --- a/misc/requirements/requirements-dev.txt +++ b/misc/requirements/requirements-dev.txt @@ -15,10 +15,10 @@ packaging==20.9 pycparser==2.20 Pympler==0.9 pyparsing==2.4.7 -PyQt-builder==1.8.0 +PyQt-builder==1.9.0 python-dateutil==2.8.1 requests==2.25.1 -sip==6.0.1 +sip==6.0.2 six==1.15.0 toml==0.10.2 uritemplate==3.0.1 diff --git a/misc/requirements/requirements-mypy.txt b/misc/requirements/requirements-mypy.txt index a8fa2cecd..070339ed6 100644 --- a/misc/requirements/requirements-mypy.txt +++ b/misc/requirements/requirements-mypy.txt @@ -3,8 +3,8 @@ chardet==4.0.0 diff-cover==4.2.1 importlib-metadata==3.7.0 -importlib-resources==5.1.0 -inflect==5.0.2 +importlib-resources==5.1.1 +inflect==5.2.0 Jinja2==2.11.3 jinja2-pluralize==0.3.0 lxml==4.6.2 diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt index bb91444f3..c93b5896d 100644 --- a/misc/requirements/requirements-tests.txt +++ b/misc/requirements/requirements-tests.txt @@ -8,14 +8,14 @@ chardet==4.0.0 cheroot==8.5.2 click==7.1.2 # colorama==0.4.4 -coverage==5.4 +coverage==5.5 ; python_version!="3.10" EasyProcess==0.3 execnet==1.8.0 filelock==3.0.12 Flask==1.1.2 glob2==0.7 hunter==3.3.1 -hypothesis==6.3.0 +hypothesis==6.3.4 icdiff==1.9.1 idna==2.10 iniconfig==1.1.1 @@ -59,3 +59,4 @@ toml==0.10.2 urllib3==1.26.3 vulture==2.3 Werkzeug==1.0.1 +coverage==5.4; python_version=="3.10" diff --git a/misc/requirements/requirements-tests.txt-raw b/misc/requirements/requirements-tests.txt-raw index ab580ac4b..196a80753 100644 --- a/misc/requirements/requirements-tests.txt-raw +++ b/misc/requirements/requirements-tests.txt-raw @@ -34,3 +34,7 @@ pytest-icdiff tldextract #@ ignore: Jinja2, MarkupSafe, colorama + +# WORKAROUND for https://github.com/nedbat/coveragepy/issues/1129 +#@ markers: coverage python_version!="3.10" +#@ add: coverage==5.4; python_version=="3.10" diff --git a/misc/requirements/requirements-tox.txt b/misc/requirements/requirements-tox.txt index ebb9c256d..1e6382e1e 100644 --- a/misc/requirements/requirements-tox.txt +++ b/misc/requirements/requirements-tox.txt @@ -8,7 +8,7 @@ pip==21.0.1 pluggy==0.13.1 py==1.10.0 pyparsing==2.4.7 -setuptools==53.0.0 +setuptools==54.0.0 six==1.15.0 toml==0.10.2 tox==3.22.0 diff --git a/misc/userscripts/readability-js b/misc/userscripts/readability-js index 5f5c85a78..2f24e065d 100755 --- a/misc/userscripts/readability-js +++ b/misc/userscripts/readability-js @@ -7,11 +7,19 @@ // // # Prerequisites // -// - Setting NODE_PATH might be required to point qutebrowser to your global node libraries: -// export NODE_PATH=$NODE_PATH:$(npm root -g) -// - Mozilla's readability library (npm install -g @mozilla/readability) -// - jsdom (npm install -g jsdom) -// - qutejs (npm install -g qutejs) +// - Mozilla's readability library (npm install -g @mozilla/readability) +// - jsdom (npm install -g jsdom) +// - qutejs (npm install -g qutejs) +// +// - Ensure that node knows where to find your globally installed modules by adding +// the following to ~/.profile or /etc/profile: +// +// export NODE_PATH=$NODE_PATH:$(npm root -g) +// +// *Note*: On some Linux distros and macOS, it may be easier to set NODE_PATH using qutebrowser's +// qt.environ setting. For instance, if 'npm root -g' returns /usr/lib/node_modules, then run: +// +// :set qt.environ '{"NODE_PATH": "/usr/lib/node_modules"}' // // # Usage // diff --git a/qutebrowser/browser/hints.py b/qutebrowser/browser/hints.py index 84474b6b0..0e71f2373 100644 --- a/qutebrowser/browser/hints.py +++ b/qutebrowser/browser/hints.py @@ -270,7 +270,7 @@ class HintActions: msg = "Yanked URL to {}: {}".format( "primary selection" if sel else "clipboard", urlstr) - message.info(msg) + message.info(msg, replace=context.rapid) def run_cmd(self, url: QUrl, context: HintContext) -> None: """Run the command based on a hint URL.""" diff --git a/requirements.txt b/requirements.txt index 410b296ff..c6eb86d6f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ adblock==0.4.2 ; python_version!="3.10" colorama==0.4.4 dataclasses==0.6 ; python_version<"3.7" importlib-metadata==3.7.0 ; python_version<"3.8" -importlib-resources==5.1.0 ; python_version<"3.9" +importlib-resources==5.1.1 ; python_version<"3.9" Jinja2==2.11.3 MarkupSafe==1.1.1 Pygments==2.8.0 diff --git a/scripts/dev/recompile_requirements.py b/scripts/dev/recompile_requirements.py index 8fd23b3f2..cafb393aa 100644 --- a/scripts/dev/recompile_requirements.py +++ b/scripts/dev/recompile_requirements.py @@ -374,10 +374,12 @@ def parse_versioned_line(line): if '==' in line: if line[0] == '#': # ignored dependency line = line[1:].strip() - line = line.rsplit('#', maxsplit=1)[0] # Strip comments + + # Strip comments and pip environment markers + line = line.rsplit('#', maxsplit=1)[0] + line = line.split(';')[0].strip() + name, version = line.split('==') - if ';' in version: # pip environment markers - version = version.split(';')[0].strip() elif line.startswith('-e'): rest, name = line.split('#egg=') version = rest.split('@')[1][:7] diff --git a/tests/unit/misc/test_editor.py b/tests/unit/misc/test_editor.py index d27c2f885..ee167e8bb 100644 --- a/tests/unit/misc/test_editor.py +++ b/tests/unit/misc/test_editor.py @@ -223,12 +223,13 @@ def _update_file(filename, contents): This might write the file multiple times, but different systems have different mtime's, so we can't be sure how long to wait otherwise. """ - old_mtime = new_mtime = os.stat(filename).st_mtime + file_path = pathlib.Path(filename) + old_mtime = new_mtime = file_path.stat().st_mtime while old_mtime == new_mtime: time.sleep(0.1) with open(filename, 'w', encoding='utf-8') as f: f.write(contents) - new_mtime = os.stat(filename).st_mtime + new_mtime = file_path.stat().st_mtime def test_modify_watch(qtbot): diff --git a/tests/unit/misc/test_ipc.py b/tests/unit/misc/test_ipc.py index fe32f3976..c19d0bc42 100644 --- a/tests/unit/misc/test_ipc.py +++ b/tests/unit/misc/test_ipc.py @@ -306,10 +306,10 @@ class TestListen: @pytest.mark.posix def test_permissions_posix(self, ipc_server): ipc_server.listen() - sockfile = ipc_server._server.fullServerName() - sockdir = pathlib.Path(sockfile).parent + sockfile_path = pathlib.Path(ipc_server._server.fullServerName()) + sockdir = sockfile_path.parent - file_stat = os.stat(sockfile) + file_stat = sockfile_path.stat() dir_stat = sockdir.stat() # pylint: disable=no-member,useless-suppression @@ -322,7 +322,7 @@ class TestListen: print('sockdir: {} / owner {} / mode {:o}'.format( sockdir, dir_stat.st_uid, dir_stat.st_mode)) print('sockfile: {} / owner {} / mode {:o}'.format( - sockfile, file_stat.st_uid, file_stat.st_mode)) + sockfile_path, file_stat.st_uid, file_stat.st_mode)) assert file_owner_ok or dir_owner_ok assert file_mode_ok or dir_mode_ok @@ -331,7 +331,9 @@ class TestListen: def test_atime_update(self, qtbot, ipc_server): ipc_server._atime_timer.setInterval(500) # We don't want to wait ipc_server.listen() - old_atime = os.stat(ipc_server._server.fullServerName()).st_atime_ns + + sockfile_path = pathlib.Path(ipc_server._server.fullServerName()) + old_atime = sockfile_path.stat().st_atime_ns with qtbot.wait_signal(ipc_server._atime_timer.timeout, timeout=2000): pass @@ -340,7 +342,7 @@ class TestListen: with qtbot.wait_signal(ipc_server._atime_timer.timeout, timeout=2000): pass - new_atime = os.stat(ipc_server._server.fullServerName()).st_atime_ns + new_atime = sockfile_path.stat().st_atime_ns assert old_atime != new_atime |