Commit Graph

622 Commits

Author SHA1 Message Date
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
Florian Bruhin 3e07c4ce0f Remove mkvenv-pypi-old 2018-10-08 21:10:54 +02:00
Florian Bruhin cfffc628f3 Also update PyQt5 in tox.ini 2018-10-03 22:19:59 +02:00
Florian Bruhin 8211183567 Work around Travis CI crash
test_caret.py crashes on Travis with this stack:

    ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
    ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
    ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
    QSGBatchRenderer::Renderer::renderBatches() () from .../site-packages/PyQt5/Qt/lib/libQt5Quick.so.5
    QSGBatchRenderer::Renderer::render() () from .../site-packages/PyQt5/Qt/lib/libQt5Quick.so.5
    QSGRenderer::renderScene(QSGBindable const&) () from .../site-packages/PyQt5/Qt/lib/libQt5Quick.so.5
    QSGRenderer::renderScene(unsigned int) () from .../site-packages/PyQt5/Qt/lib/libQt5Quick.so.5
    QSGDefaultRenderContext::renderNextFrame(QSGRenderer*, unsigned int) () from .../site-packages/PyQt5/Qt/lib/libQt5Quick.so.5
    QQuickWindowPrivate::renderSceneGraph(QSize const&) () from .../site-packages/PyQt5/Qt/lib/libQt5Quick.so.5
    QQuickRenderControl::render() () from .../site-packages/PyQt5/Qt/lib/libQt5Quick.so.5
    ?? () from .../site-packages/PyQt5/Qt/lib/libQt5QuickWidgets.so.5
    ?? () from .../site-packages/PyQt5/Qt/lib/libQt5QuickWidgets.so.5
    QObject::event(QEvent*) () from .../site-packages/PyQt5/Qt/lib/libQt5Core.so.5
    QWidget::event(QEvent*) () from .../site-packages/PyQt5/Qt/lib/libQt5Widgets.so.5
    QQuickWidget::event(QEvent*) () from .../site-packages/PyQt5/Qt/lib/libQt5QuickWidgets.so.5
    ?? () from .../site-packages/PyQt5/Qt/lib/libQt5WebEngineWidgets.so.5
    QApplicationPrivate::notify_helper(QObject*, QEvent*) () from .../site-packages/PyQt5/Qt/lib/libQt5Widgets.so.5
    QApplication::notify(QObject*, QEvent*) () from .../site-packages/PyQt5/Qt/lib/libQt5Widgets.so.5
    sipQApplication::notify(QObject*, QEvent*) () from .../site-packages/PyQt5/QtWidgets.so
    QCoreApplication::notifyInternal2(QObject*, QEvent*) () from .../site-packages/PyQt5/Qt/lib/libQt5Core.so.5
    QTimerInfoList::activateTimers() () from .../site-packages/PyQt5/Qt/lib/libQt5Core.so.5
    ?? () from .../site-packages/PyQt5/Qt/lib/libQt5Core.so.5
    g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
    ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
    g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
    QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from .../site-packages/PyQt5/Qt/lib/libQt5Core.so.5
    QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from .../site-packages/PyQt5/Qt/lib/libQt5Core.so.5
2018-09-17 20:56:34 +02:00
Florian Bruhin e80e695a56 Add a mkvenv-pypi-old environment
Fixes #4038
See #3662
2018-07-04 14:08:04 +02:00
Florian Bruhin 8c11c516b4 tox: Always allow setting python via envvar 2018-07-03 13:32:53 +02:00
Florian Bruhin 8115e109db Update default env in tox.ini 2018-07-03 13:27:18 +02:00
Florian Bruhin f7ae7e7d40 Update for PyQt 5.11 2018-07-02 22:32:59 +02:00
Florian Bruhin 30ab1d0218 Force PyQt 5.10.0 with "tox -e mkvenv-pypi"
Fixes #3662
2018-03-11 20:47:01 +01:00
Florian Bruhin 69a58c9597 Remove Qt 5.8 support and tests
With QtWebKit it's probably okay to still use it (*cough* Hyperbola
GNU/Linux-libre^tm *cough*), and only blacklisting it with QtWebEngine would be
quite some effort.

Fixes #3608
2018-03-06 11:04:59 +01:00
Florian Bruhin 889b03169a Upgrade to PyQt 5.10.1 2018-02-28 06:28:01 +01:00
Florian Bruhin 80ee43beca Add Python 3.7 to tox.ini 2018-02-10 16:54:55 +01:00
Florian Bruhin b1c54f5706 Re-add Qt 5.10 to tox.ini only 2018-01-24 06:17:09 +01:00
Florian Bruhin e26e04985b Revert "Update to PyQt 5.10"
This reverts commit a701426703.
2018-01-23 20:36:31 +01:00
Florian Bruhin a701426703 Update to PyQt 5.10 2018-01-23 19:42:22 +01:00
Florian Bruhin 04d2004528 tox: Fix eslint environment
We need to set basepython there to not get InterpreterNotFound
2017-12-06 20:58:14 +01:00
Florian Bruhin 7ef64c0f87 Read $PYTHON in every tox.ini environment
See #2341
2017-12-04 06:45:47 +01:00
Florian Bruhin 2c2d7fe734 Copy-paste pylint commands for second environment
Otherwise, tox 2.3.1 (shipped with various distributions) fails with:

    tox.ConfigError: ConfigError: substitution key 'posargs' not found
2017-12-04 06:36:42 +01:00
Ryan Farley df6ff55b7a allow pytest to default to link_pyqt
link_pyqt now checks for LINK_PYQT_SKIP, allowing pytest env names like
`py36` to work properly without negative conditionals in tox.ini
2017-12-01 10:51:41 -06:00
Ryan Farley 49485ca220 tox.ini: fix conditional syntax errors
`{[testenv]deps}` was passing conditionals in their raw form; this
simply lists them manually to avoid this.
2017-11-30 16:58:14 -06:00
Ryan Farley a5d0b9851a tox.ini: remove pyqt5.6, use requirements-pyqt.txt 2017-11-30 14:14:11 -06:00
Ryan Farley f7b0ac503e generate pytest envs with tox factors
This eliminates all separate pytest envs in favor of conditionals in
[testenv]. This requires renaming some environments to make the lack of
certain functionality explicit:

- instead of omitting pyqt{version}, use pyqtlink to use host PyQt

tox.ini: eliminate -nocov

It is possible to set the `PYTEST_ADDOPTS` environment variable to
enable coverage checks, rather than a new command.
2017-11-30 08:29:00 -06:00
Florian Bruhin 15c7ede916 Update to PyQt 5.9.2 2017-11-24 14:24:15 +01:00
Florian Bruhin 4bca180a44 Pass HOME to PyInstaller environment
This prevents some weird Homebrew errors.
2017-10-11 14:09:45 +02:00
Florian Bruhin 1a381bf0a5 eslint: Report unused disables 2017-09-29 22:29:18 +02:00
Florian Bruhin e7dba338b5 Pass %APPDATA% to pyinstaller env
This hopefully helps with PyInstaller creating a ~ directory
2017-09-26 07:30:54 +02:00
Florian Bruhin 40882c4ce2 Fix python version for -cov envs 2017-09-13 00:53:33 +02:00
Florian Bruhin f6a0500bd3 Merge branch 'master' into new-config
This pulls the travis changes to drop the old Qt 5.2 environment.
2017-09-11 18:39:41 +02:00
Florian Bruhin e6864b6599 travis: Run eslint without tox on Travis 2017-09-11 18:32:23 +02:00
Florian Bruhin a11baeb84d travis: Fix some more issues 2017-09-11 18:32:23 +02:00
Florian Bruhin b4f30f6df2 Move coverage to QtWebEngine environment with PyPI-PyQt 2017-09-11 18:30:23 +02:00
Ryan Roden-Corrent 71b71dbc58 Merge remote-tracking branch 'upstream/master' into HEAD 2017-08-06 18:13:49 -04:00
Florian Bruhin 023bf82638 Update for PyQt 5.9.1 2017-07-04 17:31:09 +02:00
Florian Bruhin f92ccd4893 Show diff on Travis in check_doc_changes 2017-07-04 15:09:23 +02:00
Florian Bruhin 69337ed264 Update tox default envlist 2017-07-02 13:07:13 +02:00
Florian Bruhin 12520bf4ba Install PyQt from PyPI for pylint
This means we can be sure to have QtWebEngine available and won't have QtWebKit.
2017-05-17 19:08:59 +02:00
Florian Bruhin a4ddc9706a tox: Also use $PYTHON for pylint 2017-05-17 13:48:31 +02:00
Florian Bruhin 9898d80625 Remove legacy cx_Freeze code
This also removes frozen tests for now. They should be readded at some point...
2017-05-17 11:31:14 +02:00
Florian Bruhin 47bf261994 build_release: Different PyInstaller workaround 2017-05-17 11:10:32 +02:00
Florian Bruhin dc947bf9a9 build_release: Python version adjustments 2017-05-17 11:09:22 +02:00
Florian Bruhin 68bb0f557f Switch to xoviat pyinstaller branch 2017-05-17 11:05:27 +02:00
Florian Bruhin a6041834f8 Try adding a PyPI testenv on AppVeyor 2017-03-31 13:05:34 +02:00
Florian Bruhin 134155480e tox: Update PyQt5 to 5.8.2 2017-03-31 10:10:55 +02:00
Florian Bruhin 5d9cd98c0f tox: Add a mkvenv-win-pypi env 2017-03-28 20:42:23 +02:00
Florian Bruhin 1254f4d132 Add -bb when running tests
Fixes #1989
2017-03-18 21:08:07 +01:00
Florian Bruhin 069f908a61 Get rid of run_pytest.py
Fixes #2452
2017-03-18 21:03:52 +01:00
Florian Bruhin 3a88b70eca Fix PyQt5 version in tox.ini 2017-03-13 09:11:22 +01:00
Florian Bruhin 68247a1ef0 Fix PyQt5 requirements
See https://www.riverbankcomputing.com/pipermail/pyqt/2017-March/038964.html
2017-03-13 07:39:21 +01:00
Florian Bruhin 3925fa2872 Use separate requirements file for PyQt 2017-03-08 19:09:34 +01:00
Florian Bruhin ac0409c60d Don't install requirements-pip.txt
It causes stuff to blow up when something in there got upgraded, and we ask pip
to downgrade one of its dependencies.

We still keep the file around so we get notified about updates.
2017-03-08 07:42:08 +01:00
Florian Bruhin 93eab09574 Add a mkvenv-pypi environment to tox.ini 2017-02-25 18:17:32 +01:00
Florian Bruhin 00a8e79311 PyInstaller env: Remove link_pyqt call 2017-02-19 13:05:58 +01:00
Florian Bruhin 687f288453 Update PyInstaller env
We now use PyQt5 from PyPI and apply xoviat's patch for PyQt.
2017-02-19 12:58:58 +01:00
Florian Bruhin a86170f45d Drop PyQt < 5.7.1 support for QtWebEngine 2017-02-17 14:42:57 +01:00
Florian Bruhin abded2470a Reenable PyQt 5.6 PyPI tests
To avoid segfaults we need to hardcode the sip version.
We also need to write a Qt.conf as it was missing with PyQt 5.6 and QtWebEngine
can't find its resources.
2017-02-17 12:00:16 +01:00
Florian Bruhin 7596409962 Add PyQt 5.8 PyPI test envs 2017-02-17 07:02:13 +01:00
Florian Bruhin ce3e24163e Add test environments using PyQt from PyPI
Fixes #2083
2017-02-09 00:50:37 +01:00
Florian Bruhin 8afc215c3d Update recompile_requirements for newer pips
pip now depends on (instead of vendoring) its dependencies, so we needed some
updates there to only install the affected packages once.

Fixes #2255
2017-02-05 01:29:21 +01:00
Florian Bruhin 22fb3c3042 tox: Switch to Python 3.6 2017-01-13 18:25:26 +01:00
Florian Bruhin 5a89ee96d9 Merge branch 'pac' of https://github.com/abbradar/qutebrowser into abbradar-pac 2016-12-22 08:53:10 +01:00
Florian Bruhin c7970eb2ee Xfail tests which fail on Docker/Travis
See #2183
2016-12-20 21:32:46 +01:00
Nikolay Amiantov a7d96e0b85 Ignore ESLint warnings for Mozilla's PAC utils 2016-12-07 02:01:19 +03:00
Florian Bruhin b0e0b1d073 Get rid of requirements-pip.txt
While pinning setuptools/pip versions is still somewhat desirable, we
can't pin it everywhere easily, and the current solution will break
stuff on Windows.
2016-11-03 07:22:31 +01:00
Clayton Craft e9aaec6d0d Update tox.ini to support Windows, and adjust install instructions 2016-09-08 13:31:17 -07:00
Florian Bruhin cf070d48f2 WebEngine: Disable createWindow for Qt < 5.7.1
Fixes #1911.

The bugfix is backported in my qt5-webengine-debug package, and
QUTE_QTBUG54419_PATCHED can be set to force qutebrowser to use
createWindow.
2016-09-05 15:08:00 +02:00
Florian Bruhin 2cbb147e33 tox: Get flake8 to run again
Seems like when not passing a file path, flake8 does less (or nothing?!)
2016-08-09 17:12:42 +02:00
Florian Bruhin c8d39e8934 tox: Fix vulture environment
We set PYTHONPATH so we can import qutebrowser.app in run_vulture.py
without installing it.

We also need to make sure all dependencies are installed so we can
actually import qutebrowser.
2016-08-09 13:54:54 +02:00
Florian Bruhin 00673ef7da tox: Only install pip as dep when needed
misc/eslint don't actually install anything, so no point in updating pip
there.

pyroma/check-manifest should install pip though.
2016-08-09 11:10:50 +02:00
Florian Bruhin a4585bb3d5 tox: Don't install any deps for eslint 2016-08-09 11:09:15 +02:00
Florian Bruhin 2a2c49f507 tox: Set skipsdist = true
Since our tests don't actually run against the installed package, no
point in waiting for an sdist to be built.
2016-08-09 11:08:19 +02:00
Florian Bruhin 5a1910e24d tox: Enforce colors for eslint 2016-08-09 11:05:08 +02:00
Florian Bruhin 1d9113124b Move .eslintrc to qutebrowser/javascript 2016-08-09 11:04:50 +02:00
Florian Bruhin f218d5d4b6 Try harder to pin pip/setuptools 2016-07-29 09:03:31 +02:00
Florian Bruhin 5f2dc53d94 tox: Set distshare = {toxworkdir}
This is kind uf unorthodox and the "distshare" setting seems to be
deprecated, but we don't get a ~/.tox this way.

See #1637
2016-07-20 16:02:14 +02:00
Florian Bruhin 9898b1af37 pylint: Remove -j0
See https://github.com/PyCQA/pylint/issues/987

On my laptop I get about a 3m -> 2m20s speedup, which isn't really worth
the trouble...
2016-07-07 23:22:42 +02:00
Florian Bruhin 2562d57437 tox: Install requirements in pylint-master env 2016-06-02 09:54:51 +02:00
Florian Bruhin 17f54d0ef7 tox: Use -j0 when invoking pylint
This makes things a bit faster
2016-05-31 00:00:40 +02:00
Florian Bruhin 001670969b tests: Ignore segfaults on pytest exit
In various situations (especially on OS X), pytest segfaults on exit probably
due to Qt/PyQt bugs.

We now have a wrapper script which ignores those segfaults if pytest did run
successfully.
2016-05-29 22:06:24 +02:00
Florian Bruhin ca87b9e285 tox: Remove weird minus 2016-05-29 18:28:20 +02:00
Florian Bruhin 6f6303e0a6 Use requirements files for tox dependencies
While this makes things a little more complicated and means we'll need to use
`-r` to recreate tox environments, it has several advantages:

- Full support from requires.io (including PRs)
- Workaround for https://bitbucket.org/hpk42/tox/issues/332/ so we can update
  virtualenv/pip
2016-05-29 16:53:54 +02:00
Florian Bruhin 51122a8010 tox: Blacklist Flask 0.11.0 2016-05-29 14:35:48 +02:00
Florian Bruhin a921ee2a8f Revert "tox: Update Flask to 0.11.0"
This reverts commit 986288c408.
2016-05-29 14:35:37 +02:00
Florian Bruhin 986288c408 tox: Update Flask to 0.11.0
Released on May 29th 2016, codename Absinthe.

- Added support to serializing top-level arrays to
  :func:`flask.jsonify`. This introduces a security risk in ancient
  browsers. See :ref:`json-security` for details.
- Added before_render_template signal.
- Added `**kwargs` to :meth:`flask.Test.test_client` to support passing
  additional keyword arguments to the constructor of
  :attr:`flask.Flask.test_client_class`.
- Added ``SESSION_REFRESH_EACH_REQUEST`` config key that controls the
  set-cookie behavior.  If set to ``True`` a permanent session will be
  refreshed each request and get their lifetime extended, if set to
  ``False`` it will only be modified if the session actually modifies.
  Non permanent sessions are not affected by this and will always
  expire if the browser window closes.
- Made Flask support custom JSON mimetypes for incoming data.
- Added support for returning tuples in the form ``(response, headers)``
  from a view function.
- Added :meth:`flask.Config.from_json`.
- Added :attr:`flask.Flask.config_class`.
- Added :meth:`flask.config.Config.get_namespace`.
- Templates are no longer automatically reloaded outside of debug mode.
  This can be configured with the new ``TEMPLATES_AUTO_RELOAD`` config
  key.
- Added a workaround for a limitation in Python 3.3's namespace loader.
- Added support for explicit root paths when using Python 3.3's
  namespace packages.
- Added :command:`flask` and the ``flask.cli`` module to start the local
  debug server through the click CLI system. This is recommended over
  the old ``flask.run()`` method as it works faster and more reliable
  due to a different design and also replaces ``Flask-Script``.
- Error handlers that match specific classes are now checked first,
  thereby allowing catching exceptions that are subclasses of HTTP
  exceptions (in ``werkzeug.exceptions``).  This makes it possible
  for an extension author to create exceptions that will by default
  result in the HTTP error of their choosing, but may be caught with
  a custom error handler if desired.
- Added :meth:`flask.Config.from_mapping`.
- Flask will now log by default even if debug is disabled. The log
  format is now hardcoded but the default log handling can be disabled
  through the ``LOGGER_HANDLER_POLICY`` configuration key.
- Removed deprecated module functionality.
- Added the ``EXPLAIN_TEMPLATE_LOADING`` config flag which when enabled
  will instruct Flask to explain how it locates templates. This should
  help users debug when the wrong templates are loaded.
- Enforce blueprint handling in the order they were registered for
  template loading.
- Ported test suite to py.test.
- Deprecated ``request.json`` in favour of ``request.get_json()``.
- Add "pretty" and "compressed" separators definitions in jsonify()
  method.
  Reduces JSON response size when JSONIFY_PRETTYPRINT_REGULAR=False by
  removing unnecessary white space included by default after separators.
- JSON responses are now terminated with a newline character, because it
  is a convention that UNIX text files end with a newline and some
  clients don't deal well when this newline is missing. See
  https://github.com/pallets/flask/pull/1262 -- this came up originally
  as a part of https://github.com/kennethreitz/httpbin/issues/168
- The automatically provided ``OPTIONS`` method is now correctly
  disabled if the user registered an overriding rule with the
  lowercase-version ``options``.
- ``flask.json.jsonify`` now supports the ``datetime.date`` type.
- Don't leak exception info of already catched exceptions to context
  teardown handlers.
- Allow custom Jinja environment subclasses.
- ``flask.g`` now has ``pop()`` and ``setdefault`` methods.
- Turn on autoescape for ``flask.templating.render_template_string`` by
  default.
- ``flask.ext`` is now deprecated.
- ``send_from_directory`` now raises BadRequest if the filename is
  invalid on the server OS.
- Added the ``JSONIFY_MIMETYPE`` configuration variable.
- Exceptions during teardown handling will no longer leave bad
  application contexts lingering around.
2016-05-29 14:22:11 +02:00
Florian Bruhin 344569fb5b tox: Update flake8-string-format to 0.2.2
- Do not check simple expressions, except for docstrings, because they
  cannot be accessed anyway.
- Properly assert starred arguments in Python 3.5. Only the last element
  must be a vararg if varargs are present and not the complete list.
- Output correct column offset on Python 3.4.2, as that used the wrong
  offset inside calls.
2016-05-29 14:19:38 +02:00
Florian Bruhin c9d49177cc tox: Update sortedcontainers to 1.5.2 2016-05-29 14:17:48 +02:00
Florian Bruhin fc3e1b4ede tox: Update hypothesis to 3.4.0
models() strategies from hypothesis.extra.django will now respect much
more of Django's validations out of the box. Wherever possible
full_clean() should succeed.

In particular:

- The max_length, blank and choices kwargs are now respected.
- Add support for DecimalField.
- If a field includes validators, the list of validators are used to
  filter the field strategy.
2016-05-27 15:40:50 +02:00
Florian Bruhin ee848ce09e tox: Update sortedcontainers to 1.5.1 2016-05-26 21:42:34 +02:00
Florian Bruhin ce9324029e tox: Update werkzeug to 0.11.10
- Fixed a bug that occurs when running on Python 2.6 and using a broken
  locale.
- Fixed a crash when running the debugger on Google App Engine.
- Fixed an issue with multipart parsing that could cause memory
  exhaustion.
2016-05-24 15:45:19 +02:00
Florian Bruhin f5c67785c7 tox: Remove pytest-html
We don't use pytest-html anywhere anymore since switching from the
buildbot to Travis CI.
2016-05-24 15:44:39 +02:00
Florian Bruhin 153e955561 tox: Update pbr to 1.10.0 2016-05-24 15:43:09 +02:00
Florian Bruhin 40601adef0 tox: Update hypothesis to 3.2.0
All tests using @given now fix the global random seed. This removes the
health check for that. If a non-zero seed is required for the final
falsifying example, it will be reported. Otherwise Hypothesis will
assume randomization was not a significant factor for the test and be
silent on the subject. If you use the random_module() strategy this will
continue to work and will always display the seed.
2016-05-24 15:41:55 +02:00
Florian Bruhin 4066696956 tox/requirements: Update coverage to 4.1
Version 4.1 --- 2016-05-21

- The internal attribute Reporter.file_reporters was removed in 4.1b3.
  It should have come has no surprise that there were third-party tools
  out there using that attribute. It has been restored, but with a
  deprecation warning.

Version 4.1b3 --- 2016-05-10

- When running your program, execution can jump from an except X: line
  to some other line when an exception other than X happens. This jump
  is no longer considered a branch when measuring branch coverage.
- When measuring branch coverage, yield statements that were never
  resumed were incorrectly marked as missing. This is now fixed.
- During branch coverage of single-line callables like lambdas and
  generator expressions, coverage.py can now distinguish between them
  never being called, or being called but not completed.
- The HTML report now has a map of the file along the rightmost edge of
  the page, giving an overview of where the missed lines are. Thanks,
  Dmitry Shishov.
- The HTML report now uses different monospaced fonts, favoring Consolas
  over Courier. Along the way not properly handling one-space indents
  was fixed. The index page also has slightly different styling, to try
  to make the clickable detail pages more apparent.
- Missing branches reported with coverage report -m will now say ->exit
  for missed branches to the exit of a function, rather than a negative
  number.
- coverage --help and coverage --version now mention which tracer is
  installed, to help diagnose problems. The docs mention which features
  need the C extension.
- Officially support PyPy 5.1, which required no changes, just updates
  to the docs.
- The Coverage.report function had two parameters with non-None
  defaults, which have been changed. show_missing used to default to
  True, but now defaults to None. If you had been calling
  Coverage.report without specifying show_missing, you'll need to
  explicitly set it to True to keep the same behavior. skip_covered used
  to default to False. It is now None, which doesn't change the
  behavior.
- It's never been possible to pass a namespace module to one of the
  analysis functions, but now at least we raise a more specific error
  message, rather than getting confused.
- The coverage.process_startup function now returns the Coverage
  instance it creates.
- Make a small tweak to how we compare threads, to avoid buggy custom
  comparison code in thread classes.

Version 4.1b2 --- 2016-01-23

- Problems with the new branch measurement in 4.1 beta 1 were fixed:
  - Class docstrings were considered executable. Now they no longer are.
  - yield from and await were considered returns from functions, since
    they could tranfer control to the caller. This produced unhelpful
    "missing branch" reports in a number of circumstances. Now they no
    longer are considered returns.
  - In unusual situations, a missing branch to a negative number was
    reported.
- The XML report now produces correct package names for modules found in
  directories specified with source=.
- coverage report won't produce trailing whitespace.

Version 4.1b1 --- 2016-01-10

- Branch analysis has been rewritten: it used to be based on bytecode,
  but now uses AST analysis. This has changed a number of things:
  - More code paths are now considered runnable, especially in
    try/except structures. This may mean that coverage.py will identify
    more code paths as uncovered. This could either raise or lower your
    overall coverage number.
  - Python 3.5's async and await keywords are properly supported
  - Some long-standing branch coverage bugs were fixed:
    - functions with only a docstring for a body would incorrectly
      report a missing branch on the def line.
    - code in an except block could be incorrectly marked as a missing
      branch.
    - context managers (with statements) in a loop or try block could
      confuse the branch measurement, reporting incorrect partial
      branches.
    - In Python 3.5, an actual partial branch could be marked as
      complete.
- Pragmas to disable coverage measurement can now be used on decorator
  lines, and they will apply to the entire function or class being
  decorated.
- Multiprocessing support is now available on Windows.
- Files with two encoding declarations are properly supported.
- Non-ascii characters in regexes in the configuration file worked in
  3.7, but stopped working in 4.0. Now they work again.
- Form-feed characters would prevent accurate determination of the
  beginning of statements in the rest of the file. This is now fixed.
2016-05-22 14:35:26 +02:00
Florian Bruhin 7898507775 tox: Update pytest-mock to 1.0.0
Fix AttributeError with mocker.spy when spying on inherited methods
2016-05-20 13:10:48 +02:00
Florian Bruhin 33236b5314 Make tox -e mkenv work
This is a common typo, so let's just make things work. It does the exact
same thing as tox -e mkvenv.
2016-05-15 09:59:44 +02:00
Florian Bruhin 42460c3c04 tox: Update pyparsing to 2.1.4
- Split out the '==' behavior in ParserElement, now implemented
  as the ParserElement.matches() method. Using '==' for string test
  purposes will be removed in a future release.

- Expanded capabilities of runTests(). Will now accept embedded
  comments (default is Python style, leading '#' character, but
  customizable). Comments will be emitted along with the tests and
  test output. Useful during test development, to create a test string
  consisting only of test case description comments separated by
  blank lines, and then fill in the test cases. Will also highlight
  ParseFatalExceptions with "(FATAL)".

- Added a 'pyparsing_common' class containing common/helpful little
  expressions such as integer, float, identifier, etc. I used this
  class as a sort of embedded namespace, to contain these helpers
  without further adding to pyparsing's namespace bloat.

- Minor enhancement to traceParseAction decorator, to retain the
  parse action's name for the trace output.

- Added optional 'fatal' keyword arg to addCondition, to indicate that
  a condition failure should halt parsing immediately.
2016-05-13 21:21:14 +02:00
Florian Bruhin a7ece80d34 Merge branch 'pyinstaller' 2016-05-13 06:21:28 +02:00
Florian Bruhin d507727bb3 tox: Update PyInstaller to 3.2
- Even the “main” script is now byte-compiled
- The manual is on readthedocs.io now
- On installation try to compile the bootloader if there is none for the
  current plattform
- (Unix) Use objcopy to create a valid ELF file
- (Linux): Compile with _FORTIFY_SOURCE
- New, updated and fixed hooks: CherryPy, Cryptography, enchant,
  gi.repository.GdkPixbuf, gst, Lib2to3, PyQt4, PyQt5, PySide, SciPy,
  sphinx, sqlalchemy, traitlets, wx.lib.pubsub
- For windowed mode add isatty() for our dummy NullWriter
- Suppress “Failed to execute script” in case of SystemExit
- Do not apply Upx compressor for bootloader files
- Fix absolute path for lib used via ctypes
- (OSX) Fix binary cache on NFS
- (Windows) Fix message in grab_version
- (Windows) Fix wrong icon paramter in Windows example
- (Windows) Fix win32 unicode handling
- (Windows) Fix unnecessary rebuilds caused by rebuilding winmanifest
- (Cygwin) Fix finding the Python library for Cygwin 64-bit
- (OSX) Fix compilation issue
- (Windows) No longer bundle pefile, use package from for windows
- (Windows) Provide a more robust means of executing a Python script
- AIX fixes.
- Update waf to version 1.8.20
- Fix excludedimports, more predictable order how hooks are applied
- Internal impovements and code clean-up
- Clean-ups fixes and improvements for the test suite
2016-05-13 05:23:19 +02:00
Florian Bruhin af1880fc1d tox: Update pyflakes to 1.2.3 2016-05-12 21:11:14 +02:00
Florian Bruhin 768ff8b193 tox: update pyparsing to 2.1.3
- _trim_arity fix in 2.1.2 was very version-dependent on Py 3.5.0.
  Now works for Python 2.x, 3.3, 3.4, 3.5.0, and 3.5.1 (and hopefully
  beyond).

This fixes pyparsing/flake8-putyt/flake8 being broken with python 3.4:

    >>> import pyparsing
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File ".../pyparsing.py", line 3478, in <module>
        _escapedPunc = Word( _bslash, r"\[]-*.$+^?()~ ", exact=2 ).setParseAction(lambda s,l,t:t[0][1])
      File ".../pyparsing.py", line 948, in setParseAction
        self.parseAction = list(map(_trim_arity, list(fns)))
      File ".../pyparsing.py", line 808, in _trim_arity
        this_line = extract_stack()[-1]
      File ".../pyparsing.py", line 793, in extract_stack
        return [(frame_summary.filename, frame_summary.lineno)]
    AttributeError: 'tuple' object has no attribute 'filename'

See https://sourceforge.net/p/pyparsing/bugs/95/
2016-05-12 20:32:03 +02:00
Florian Bruhin e095f9ded2 tox: Downgrade pyparsing to 2.1.1
It seems pyparsing 2.1.2 is broken with Python 3.4:

    >>> import pyparsing
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File ".../pyparsing.py", line 3478, in <module>
        _escapedPunc = Word( _bslash, r"\[]-*.$+^?()~ ", exact=2 ).setParseAction(lambda s,l,t:t[0][1])
      File ".../pyparsing.py", line 948, in setParseAction
        self.parseAction = list(map(_trim_arity, list(fns)))
      File ".../pyparsing.py", line 808, in _trim_arity
        this_line = extract_stack()[-1]
      File ".../pyparsing.py", line 793, in extract_stack
        return [(frame_summary.filename, frame_summary.lineno)]
    AttributeError: 'tuple' object has no attribute 'filename'

That breaks flake8-putty and thus flake8.
See https://sourceforge.net/p/pyparsing/bugs/95/
2016-05-11 08:15:12 +02:00
Florian Bruhin 3098d1fd8c tox: Hardcode more indirect deps for flake8 env
We added more flake8 checkers but never regenerated those, causing some
updates to happen silently and (probably?) breaking stuff.
2016-05-11 06:34:19 +02:00