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

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

The mypy output before this commit was:

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

[1.7]: https://mypy-lang.blogspot.com/2023/11/mypy-17-released.html
2023-11-13 20:23:06 +13:00
..
README.md Flask updates, pin for py37 and add blinker 2023-05-07 12:29:15 +12:00
requirements-check-manifest.txt Update dependencies 2023-10-02 04:22:42 +00:00
requirements-check-manifest.txt-raw Rename raw-requirements files 2016-06-07 23:21:50 +02:00
requirements-dev.txt Update dependencies 2023-11-13 18:45:18 +13:00
requirements-dev.txt-raw scripts: Handle packaging dependencies via tox 2021-12-03 15:28:04 +01:00
requirements-docs.txt scripts: Use pip-installed asciidoc 2022-12-12 11:06:28 +01:00
requirements-docs.txt-raw scripts: Use pip-installed asciidoc 2022-12-12 11:06:28 +01:00
requirements-flake8.txt Update dependencies 2023-11-13 18:45:18 +13:00
requirements-flake8.txt-raw requirements: Drop flake8-copyright for now 2022-11-28 10:40:48 +01:00
requirements-mypy.txt Downgrade mypy for now 2023-11-13 20:23:06 +13:00
requirements-mypy.txt-raw mypy: Switch to upstream stubs for PyQt6 2023-07-09 01:02:33 +02:00
requirements-pyinstaller.txt Update dependencies 2023-11-13 04:24:22 +00:00
requirements-pyinstaller.txt-raw un-pin pyinstaller 2023-10-28 10:44:44 +13:00
requirements-pylint.txt Update dependencies 2023-11-13 18:45:18 +13:00
requirements-pylint.txt-raw unpin astroid 2023-02-05 18:48:59 +13:00
requirements-pyqt-5.15.2.txt Update dependencies 2023-10-16 04:24:13 +00:00
requirements-pyqt-5.15.2.txt-raw Drop Qt < 5.15 2022-08-23 18:31:41 +02:00
requirements-pyqt-5.15.txt Update dependencies 2023-10-16 04:24:13 +00:00
requirements-pyqt-5.15.txt-raw requirements: Initial upgrade to PyQt5 5.15.3 2021-02-25 09:22:10 +01:00
requirements-pyqt-5.txt Update dependencies 2023-10-16 04:24:13 +00:00
requirements-pyqt-5.txt-raw scripts: Allow linking/installing pyqt-5 or pyqt-6 2022-08-23 18:31:41 +02:00
requirements-pyqt-6.2.txt Update dependencies 2023-10-16 04:24:13 +00:00
requirements-pyqt-6.2.txt-raw Add test environments for Qt 6.2 and 6.3 2022-08-23 18:31:40 +02:00
requirements-pyqt-6.3.txt Update dependencies 2023-10-16 04:24:13 +00:00
requirements-pyqt-6.3.txt-raw Add test environments for Qt 6.2 and 6.3 2022-08-23 18:31:40 +02:00
requirements-pyqt-6.4.txt Update dependencies 2023-10-16 04:24:13 +00:00
requirements-pyqt-6.4.txt-raw tox/ci: Add PyQt 6.4 2022-11-24 09:26:30 +01:00
requirements-pyqt-6.5.txt Update dependencies 2023-10-16 04:24:13 +00:00
requirements-pyqt-6.5.txt-raw ci: Add PyQt 6.5 2023-04-10 23:25:15 +02:00
requirements-pyqt-6.6.txt add pyqt6.6 requirements file 2023-11-13 18:45:18 +13:00
requirements-pyqt-6.6.txt-raw add pyqt6.6 requirements file 2023-11-13 18:45:18 +13:00
requirements-pyqt-6.txt Update dependencies 2023-11-13 18:45:18 +13:00
requirements-pyqt-6.txt-raw scripts: Allow linking/installing pyqt-5 or pyqt-6 2022-08-23 18:31:41 +02:00
requirements-pyqt.txt Update dependencies 2023-11-13 18:45:18 +13:00
requirements-pyqt.txt-raw qt6: Switch most tooling/linting to Qt 6 2023-06-30 19:29:28 +02:00
requirements-pyroma.txt Update dependencies 2023-11-13 18:45:18 +13:00
requirements-pyroma.txt-raw Rename raw-requirements files 2016-06-07 23:21:50 +02:00
requirements-qutebrowser.txt-raw Initial Python 3.7 drop 2023-06-26 14:39:54 +02:00
requirements-sphinx.txt Update dependencies 2023-11-13 18:45:18 +13:00
requirements-sphinx.txt-raw Move Sphinx to tox 2018-12-11 19:09:42 +01:00
requirements-tests-bleeding.txt bleeding requirements: Switch back to pytest-instafail master 2022-11-20 10:35:21 +01:00
requirements-tests.txt Update dependencies 2023-11-13 18:45:18 +13:00
requirements-tests.txt-raw Initial Python 3.7 drop 2023-06-26 14:39:54 +02:00
requirements-tox.txt Update dependencies 2023-11-13 18:45:18 +13:00
requirements-tox.txt-raw Remove 3.6 pins from requirements files. 2022-04-04 12:08:19 +12:00
requirements-vulture.txt Update dependencies 2023-10-09 04:25:45 +00:00
requirements-vulture.txt-raw Rename raw-requirements files 2016-06-07 23:21:50 +02:00
requirements-yamllint.txt Update dependencies 2023-11-13 04:24:22 +00:00
requirements-yamllint.txt-raw Add yamllint 2020-07-23 11:21:04 +02:00

README.md

This directory contains various requirements files which are used by tox to have reproducible tests with pinned versions.

The files are generated based on unpinned requirements in *.txt-raw files.

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>
  • Add a new line: #@ add: <line>
  • Add environment markers to a line: #@ markers: <package> <markers>

Some examples:

#@ comment: mypkg blah blub
#@ filter: mypkg != 1.0.0
#@ ignore: mypkg, otherpkg
#@ replace: foo bar

## Use the marker line to restrict the unpinned Flask requirement to python
## 3.7. For python 3.7 add a specific version into the output.
Flask
# Python 3.7
#@ markers: Flask python_version>="3.7"
#@ add: Flask==2.2.5 ; python_version=="3.7.*"