Commit Graph

622 Commits

Author SHA1 Message Date
Florian Bruhin 391623d5ec tox: Don't use environment names ending in digits
This fails now with 'failed with env name pyinstaller-32 conflicting with base python C:\hostedtoolcache\windows\Python\3.10.9\x86\python.exe'

See https://github.com/tox-dev/tox/pull/2824
2023-01-19 09:58:06 +01:00
Florian Bruhin b4d32e04f4 Merge branch 'master' into qt6-v2 2022-12-13 09:05:32 +01:00
Florian Bruhin 65440f3f1e ci: I shouldn't push changes before my first coffee 2022-12-13 08:49:06 +01:00
Florian Bruhin 21ac559a65 More adjustments for tox 4 subtleties 2022-12-12 13:42:32 +01:00
Florian Bruhin bbdc83f638 Fix lint/ci 2022-12-12 13:37:07 +01:00
Florian Bruhin 4c9050d4be Update tox.ini syntax for tox 4 compat
See https://tox.wiki/en/4.0.3/faq.html#tox-4-changed-ini-rules
2022-12-12 09:29:56 +01:00
Florian Bruhin a497ce69be tox/ci: Add PyQt 6.4 2022-11-24 09:26:30 +01:00
toofar 819d56043b doc: add some contributor notes about mypy
also update the default tox env list which I forgot to do when changing
the mypy targets.
2022-10-14 15:49:28 +13:00
Florian Bruhin 8dd2bd5b54 tox: Use more unique env var name
(Ab)using an environment variable indeed seems like the easiest way
forward here, but since it is exposed in the environment for the called
processes, let's give it a name which is less likely to clash, and more
easily identifyable.

Follow-up to c1738ca550.
2022-09-16 14:26:33 +02:00
Florian Bruhin 46ebef5644 mypy: Use tox.ini to install PyQt6 conditionally
The changes in requirements-mypy.txt would get overwritten on the next
dependency update. Also, it looks like we don't actually need PyQt6 (or
the PyQt6 stubs) available for checking PyQt 5 code if all Qt 6 imports
are appropriately gated by conditionals mypy knows about.

Follow-up to c1738ca550.
2022-09-16 14:13:50 +02:00
toofar 4b3ec40eb0 mypy: re-enable CI jobs for pyqt5
We'll be going forward with type checking on PyQt5 for now while
figuring out what to do with PyQt6 type checking.

See https://github.com/qutebrowser/qutebrowser/discussions/7372#discussioncomment-3502200
2022-09-11 17:31:52 +12:00
toofar c1738ca550 tox: split mypy env into mypy-{qt5,qt6}
Would be nice to have a bare `mypy` env which ran both the more specific ones
in sequence but I don't know how to do that.

Not sure if there is a way to pull the CONSTANTS_ARGS stuff out to a non-env
parameter and pass it into commands but I couldn't figure out a way. So via
the environment it is.

TODO: compare PyQt6 as-is with the WIP PyQt6-Stub
2022-09-11 10:19:44 +12:00
Florian Bruhin a516ad98fd tox: Simplify tox syntax
We can use negative factors now, and Qt 6.2/6.3 can be simplified too.

See https://tox.wiki/en/latest/config.html#complex-factor-conditions
2022-08-23 18:31:42 +02:00
Florian Bruhin c0ffd6d327 scripts: Pass through Qt 6 to PyInstaller 2022-08-23 18:31:41 +02:00
Florian Bruhin a5a824f234 scripts: Initial Qt 6 support for build_release.py 2022-08-23 18:31:41 +02:00
Florian Bruhin 5d671a1d2b tox: Add a build-release-qt6 environment
This raises our minimum tox version from 3.15 to 3.20 to properly
support the environment name with empty factors:
https://github.com/tox-dev/tox/issues/1636

Distribution-wise, this hopefully isn't a problem: Debian Buster
(oldstable) had tox 3.7, Debian bullseye (stable) has 3.21. Similar
story for Ubuntu: 20.04 LTS has 3.13, 21.10 (and thus 22.04 LTS) has
3.21.
2022-08-23 18:31:41 +02:00
Florian Bruhin c5a51eb0bc Drop Qt < 5.15
Fixes #7091

TODO: Add changelog
2022-08-23 18:31:41 +02:00
Florian Bruhin 0428ede31e Add test environments for Qt 6.2 and 6.3 2022-08-23 18:31:40 +02:00
Florian Bruhin dc7dad5de8 ci: Add actionlint 2022-07-11 10:23:27 +02:00
Florian Bruhin de0aa69b9a ci: Update Python versions 2022-04-26 17:14:38 +02:00
Jimmy 060e4fbf80 Drop python3.6 support.
Commits for dropping 3.5 support to copy from:

c245b7d855ccd "Initial drop of Python 3.5"
ccdfb44b85 "Drop support for Python 3.6.0"

Anything needed to update regarding OS version support in
doc/install.asciidoc?
TODO: remove 3.6/7 annotations in requirements files and
  rebuild

workflows: not sure I updated it right (run 5.12 with 3.7, same 18.04 OS) but
18.04 seems to have 3.7 on it too so it should work. It'll all change when we
drop <5.15 anyway. Not sure what the minimum ubuntu version will be going
forward.

Regarding mimetype overrides (ebb3046822) the doctring says they can all go
in 3.7 but .h5 is still missing on py39, not sure if we should care.

There are a bunch of old(?) warning messages still ignored in tests/end2end/fixtures/quteprocess.py.
2022-04-04 12:08:19 +12:00
Florian Bruhin e494100582 ci: Switch to FORCE_COLOR
pytest understands that since a while: https://pytest.org/en/7.0.x/reference/reference.html#environment-variables and other tools are adopting it: https://github.com/sphinx-doc/sphinx/pull/10260
2022-03-30 09:57:53 +02:00
Florian Bruhin 2957c5ccb8 Switch to newer Python for linters
We originally used Python 3.8 for pylint for https://github.com/PyCQA/pylint/issues/3760 which is long fixed... See 214dd63441
2022-03-29 17:52:21 +02:00
Philipp Albrecht afd78ad248 Enable backend auto-detection
Setting QUTE_BDD_WEBENGINE=true overrides the auto-detection mechanism.
2021-11-05 15:33:53 +01:00
Florian Bruhin 959c388984 tox: Use newest PyQt for pyinstaller
See #6611
2021-10-21 16:51:55 +02:00
Florian Bruhin 2f592f7ce6 Merge remote-tracking branch 'origin/pr/5457' into dev 2021-03-24 14:12:36 +01:00
Florian Bruhin 7b24ac9df7 tox: Add a bleeding environment
See #6298
2021-03-17 14:18:21 +01:00
Florian Bruhin f84b74823c tox: Force PyQt 5.15.3 for PyInstaller
See #6269
2021-03-12 13:31:52 +01:00
Florian Bruhin ab01b3970f ci: Add Python 3.10
Needs a couple of follow-up commits for workarounds, which hopefully
aren't needed anymore at a later point.

Fixes #6068
2021-01-26 20:32:57 +01:00
Florian Bruhin 1a4fff1a42 doc: Switch URLs to https 2021-01-26 15:19:01 +01:00
Florian Bruhin 4a9dea0aef tox: Don't run mypy over tests/
With https://github.com/python/mypy/pull/9614, mypy now tries to collect
all files in tests/, but it fails due to:

    tests/end2end/conftest.py: error: Duplicate module named 'conftest' (also at 'tests/end2end/features/conftest.py')
    tests/end2end/conftest.py: error: Are you missing an __init__.py?  [misc]

We should probably add __init__.py files to tests/ at some point...

See #6059 and #5249
2021-01-25 11:12:37 +01:00
Florian Bruhin 23198a1592 check-manifest: Ignore generated cheatsheet images 2020-12-30 12:53:01 +01:00
Florian Bruhin 214dd63441 tox: Use Python 3.8 for pylint
See https://github.com/PyCQA/pylint/issues/3760
2020-12-19 22:01:36 +01:00
Florian Bruhin 9774208b63 tox: Actually support -e py 2020-12-03 11:27:28 +01:00
Florian Bruhin 7ded49d326 tox: Allow posargs for misc_checks.py 2020-12-03 11:08:34 +01:00
Florian Bruhin 64c1c03d5b ci: Add Qt 5.15.0
We test Qt 5.15.2, but that's based on a newer Chromium version:

Qt 5.14.x -> Chromium 77
Qt 5.15.0 -> Chromium 80
Qt 5.15.2 -> Chromium 83

Some behavior changes between Chromium versions (see e.g. #5915), so it
makes sense to test both.

Picking 5.15.0 rather than .1 due to renderer process crashes in
5.15.1 (#5721). Doesn't matter much on the CI as we don't use WebRTC,
but if someone wants to downgrade with mkvenv.py for some reason, .0
will be more useful than .1.
2020-12-03 10:15:14 +01:00
Florian Bruhin 298e559714 tox: Remove pip-version and venv plugins
Since the virtualenv v20.0.0 rewrite, those are hopefully not needed
anymore.

Closes #5373
2020-11-20 16:20:51 +01:00
Florian Bruhin cc2d73b061 old qt: Drop CI 2020-11-04 11:30:54 +01:00
Florian Bruhin 0a5c2114c1 scripts: Add 'all' to misc_checks 2020-11-02 16:29:02 +01:00
Florian Bruhin 685a66280a Initial drop of Python 3.5
See #4800
2020-10-26 15:50:54 +01:00
Florian Bruhin 51428a03dc Add tox environment for build-release 2020-09-16 21:12:36 +02:00
Florian Bruhin defd18d963 Use Python 3.9 on CI 2020-08-11 13:18:35 +02:00
Florian Bruhin 41bcada133 Merge branch 'master' into pr/5457 2020-07-31 14:35:59 +02:00
Florian Bruhin dd5c9c7893 Revert "tox: Combine setenv lines"
This reverts commit 1b13ee9429.

This worked locally, but apparently not on CI. Not worth the trouble.
2020-07-30 19:53:40 +02:00
Florian Bruhin 1b13ee9429 tox: Combine setenv lines 2020-07-30 16:27:48 +02:00
Florian Bruhin 76eed0aa9c tox: Simplify pyinstaller envs 2020-07-30 16:23:05 +02:00
Florian Bruhin 1d061a0b97 tox: Update default envs 2020-07-27 15:48:59 +02:00
Florian Bruhin 1daa863218 Add yamllint 2020-07-23 11:21:04 +02:00
Florian Bruhin 1aeefe1968 ci: Disable mypy coloring again
Looks like mypy uses curses to get colors, so there's really nothing we can do
here on GitHub Actions.
2020-07-13 22:34:51 +02:00
Florian Bruhin f82c8cb5fe ci: Improve mypy output
- Set MYPY_FORCE_TERMINAL_WIDTH to get 180-column output (rather than 80), so
  that error messages fit on one line.
- Set MYPY_FORCE_COLOR to get colored output
- Adjust problemmatcher regex accordingly
2020-07-13 22:16:42 +02:00
Ash 2f6a48c74b Run tests inside dbus-run-session.
We need a dbus server, and this is the easiest way to make sure we have
one.
2020-07-08 19:02:05 -07:00
Florian Bruhin 2130af688a ci: Use PY_COLORS to force colored output
This should also color tox output, and it doesn't conflict with PYTEST_ADDOPTS
being used for coverage options.
2020-07-08 17:20:43 +02:00
Florian Bruhin ad645bba52 Add PYINSTALLER_DEBUG 2020-07-06 12:04:01 +02:00
Florian Bruhin a4de4ef6a4 ci: Remove remaining Travis/AppVeyor specific code
Also reenables some tests which have been problematic on Travis/AppVeyor but
maybe work fine nowadays.
2020-07-03 18:55:46 +02:00
Florian Bruhin 7f1ced0e43 ci: Set up nightly Python 2020-07-03 15:04:31 +02:00
Florian Bruhin 8d1a8540c5 ci: Force pytest colors for CI
For some reason, pytest on GitHub doesn't display any colors.
2020-07-02 22:21:07 +02:00
Florian Bruhin 35d0797b82 ci: Run shellcheck via tox 2020-07-02 22:21:07 +02:00
Florian Bruhin 75b4a069cb ci: Run eslint via tox
With GitHub Actions, we can now easily install tox *and* eslint in the same
environment.
2020-07-02 22:21:07 +02:00
Florian Bruhin 491fc4a35a tox: Use "passenv = TERM" to get colors
TERM being missing was the reason that eslint doesn't output colors unless
--color was given.

For some reason, forcing color via --color breaks GitHub Action's problem
matchers, while this approach works just fine.
2020-07-02 22:21:07 +02:00
Florian Bruhin 76e8debbc0 ci: Switch from TRAVIS to CI env vars 2020-06-24 19:36:30 +02:00
Florian Bruhin 0e2db8eadc Add "tox -e mypy-diff"
Not done by default with "tox -e mypy" because it disables mypy's caching,
causing its runtime to go from <1s to ~15s:
https://github.com/python/mypy/issues/9041

See #1456
2020-06-24 15:01:16 +02:00
Florian Bruhin f971cc041f ci: Switch to Qt 5.15 2020-06-01 13:54:58 +02:00
Florian Bruhin 2afda2ed1a mypy: Switch back to upstream stubs
See #5368
2020-05-09 16:45:30 +02:00
Florian Bruhin 14fd4860e4 build_release: Separate 32/64-bit pyinstaller envs on Windows
For some reason, pip fails now when trying to "update" the existing source
clone...
2020-04-27 16:29:00 +02:00
Florian Bruhin 58a14ba3b0 Remove deprecated features
- tox -e mkvenv and friends
- config.bind(key, None)
- :yank markdown
2020-04-27 16:13:59 +02:00
Florian Bruhin 3c30e30721 tox: Use Qt 5.14 for PyInstaller
Fixes #4918
2020-01-15 15:31:01 +01:00
Florian Bruhin a5d1dfd4b1 tox: Remove old workaround 2020-01-10 17:06:20 +01:00
Florian Bruhin 30fdde8a45 Replace tox -e mkvenv by a mkvenv.py script
This was mainly needed because PyQt 5.14.1 is a manylinux2014 wheel and needs
an updated pip, see #5013
2020-01-10 17:06:20 +01:00
Florian Bruhin fe3d3acfa7 tox: Add tox-pip-version
This is needed to upgrade pip so it can install PyQt 5.14.1 manylinux2014
wheels.
2020-01-09 22:09:03 +01:00
Florian Bruhin a4ae33b4e7 travis/tox: Use Qt 5.14 2020-01-09 22:09:03 +01:00
Florian Bruhin 3fe89ce84f tox: Add Qt 5.14
Also use Qt 5.14 for linters/etc. as it seems to work fine there.
2019-12-20 11:24:25 +01:00
Florian Bruhin ede2dcf4c2 Run mypy over tests as well
Rationale: https://twitter.com/codewithanthony/status/1188958327318794241
2019-10-29 12:10:32 +01:00
Florian Bruhin 039375a7c9 Fix broken tox.ini 2019-10-21 09:42:27 +02:00
Florian Bruhin a33770d50e Fix test_webview.py without QtWebKit 2019-10-20 22:19:31 +02:00
Florian Bruhin c09c1fb006 Update to mypy 0.730
We can't use specific type ignores yet as there is no pyflakes release with
this change in: https://github.com/PyCQA/pyflakes/pull/455
2019-09-26 22:29:22 +02:00
Florian Bruhin c397e9326b Go back to Qt 5.12 for tox/pyinstaller
This reverts commit 548b5a17d7.
This reverts commit fe32e00a4e.

Due to QTBUG-77364 (broken keyboard focus), we can't upgrade to qtbase 5.13.1.

However, with 5.13.0 (and QtWebEngine 5.13.1), we run into two more issues:

- Segfaults in QQuickWindowPrivate::updateDirtyNode() when logging into a
  Google account (especially on macOS).
- Qt 5.13.0 with the old PyQt5 exit scheme segfaults on exit on Windows.
  However, pyqt5_enable_new_onexit_scheme() was added in PyQt 5.13.1.

See https://bugreports.qt.io/browse/QTBUG-77364
See https://www.riverbankcomputing.com/news/pyqt-5131
Reopens #4918
2019-09-26 18:33:48 +02:00
Florian Bruhin fe32e00a4e Use Qt 5.13 with mkvenv-pypi 2019-09-25 18:58:08 +02:00
Florian Bruhin 548b5a17d7 Revert "Use Qt 5.12 for PyInstaller"
This reverts commit 56a2c50508.

Fixes #4918
2019-09-25 17:42:13 +02:00
Florian Bruhin ad83f4c340 Add check for missing userscript description 2019-09-25 16:03:42 +02:00
Florian Bruhin d1eda81a8c Add Python 3.8 to tox.ini
See #4928
2019-08-17 23:55:42 +02:00
Florian Bruhin 68a973567d Remove old tox workaround
Fixed in tox v3.4.0 (2018-09-20)
2019-07-18 09:52:23 +02:00
Florian Bruhin 56a2c50508 Use Qt 5.12 for PyInstaller
Mainly due to https://bugreports.qt.io/browse/QTBUG-76913
2019-07-18 09:50:05 +02:00
Florian Bruhin 2d7ed87c36 Avoid Qt 5.13
Let's stay with 5.12 for PyPI-installed virtualenvs for now, see:
https://bugreports.qt.io/browse/QTBUG-76913
2019-07-16 11:13:28 +02:00
Florian Bruhin 17c02cbddd Use separate requirements files for different Qt versions 2019-07-16 11:08:47 +02:00
Florian Bruhin 3c91dddd79 Rename requirements-optional to requirements-dev 2019-07-16 10:47:06 +02:00
Florian Bruhin f0a762d4e9 Update to PyQt 5.13 2019-07-05 12:14:40 +02:00
Florian Bruhin 8a8ff3d281 Upgrade to PyQt 5.12.3 2019-06-28 01:47:28 +02:00
Florian Bruhin 4be376e540 tox: Use PyQt 5.12.2 2019-05-30 14:27:11 +02:00
Florian Bruhin e6a84504b9 Update to PyQt 5.12.1 2019-03-19 23:02:43 +01:00
Florian Bruhin c964bfb4bf Finish Qt 5.12 work
Closes #4591
2019-02-25 10:36:08 +01:00
Florian Bruhin 05f22796f7 travis/tox: Add PyQt 5.12
See #4478
2019-02-16 23:16:08 +01:00
Florian Bruhin 7c486a76f8 tox: Use absolute sphinx paths 2018-12-13 10:45:01 +01:00
Florian Bruhin a9cac0895e tox: Set usedevelop for sphinx 2018-12-12 10:45:09 +01:00
Florian Bruhin a297e1e2a7 Customize sphinx commandline options 2018-12-12 10:42:15 +01:00
Florian Bruhin 24d45bfcba Move Sphinx to tox 2018-12-11 19:09:42 +01:00
Florian Bruhin 01b2c40272 Add requirements-optional.txt 2018-11-26 18:25:12 +01:00
Florian Bruhin bd731593ce mypy: Add {posargs} in tox.ini 2018-11-26 18:25:12 +01:00
Florian Bruhin 3cc2af909b mypy: Add PyQt5 stubs 2018-11-26 18:25:12 +01:00
Florian Bruhin 0999945af4 mypy: Run with --ignore-missing-imports 2018-11-22 13:52:01 +01:00
Florian Bruhin 85b2fb513b mypy: Add to tox 2018-11-22 13:51:55 +01:00