From 060e4fbf8054996b98c60e2f97938945c88cf103 Mon Sep 17 00:00:00 2001 From: Jimmy Date: Mon, 4 Apr 2022 10:30:11 +1200 Subject: Drop python3.6 support. Commits for dropping 3.5 support to copy from: c245b7d855ccd "Initial drop of Python 3.5" ccdfb44b8568b "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 (ebb3046822adb) 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. --- .flake8 | 2 +- .github/workflows/ci.yml | 6 +++--- .mypy.ini | 2 +- .pylintrc | 2 +- README.asciidoc | 5 ++--- doc/contributing.asciidoc | 18 +++++++++--------- doc/install.asciidoc | 4 ++-- qutebrowser/browser/webkit/http.py | 4 ---- qutebrowser/completion/models/filepathcategory.py | 2 +- qutebrowser/misc/checkpyver.py | 4 ++-- qutebrowser/misc/earlyinit.py | 2 +- qutebrowser/utils/utils.py | 23 +++-------------------- setup.py | 4 +--- tests/end2end/test_invocations.py | 4 ++-- tests/unit/config/test_configtypes.py | 9 ++------- tests/unit/misc/test_checkpyver.py | 4 ++-- tox.ini | 1 - 17 files changed, 33 insertions(+), 63 deletions(-) diff --git a/.flake8 b/.flake8 index 9110dc54c..4ef393a9f 100644 --- a/.flake8 +++ b/.flake8 @@ -57,7 +57,7 @@ ignore = PT004, PT011, PT012 -min-version = 3.6.1 +min-version = 3.7.0 max-complexity = 12 per-file-ignores = qutebrowser/api/hook.py : N801 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index afcf720e4..06863ab10 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -105,10 +105,10 @@ jobs: fail-fast: false matrix: include: - ### PyQt 5.12 (Python 3.6) - - testenv: py36-pyqt512 + ### PyQt 5.12 (Python 3.7) + - testenv: py37-pyqt512 os: ubuntu-18.04 - python: 3.6 + python: 3.7 ### PyQt 5.13 (Python 3.7) - testenv: py37-pyqt513 os: ubuntu-20.04 diff --git a/.mypy.ini b/.mypy.ini index 501ab747e..b347323f5 100644 --- a/.mypy.ini +++ b/.mypy.ini @@ -1,5 +1,5 @@ [mypy] -python_version = 3.6 +python_version = 3.7 ### --strict warn_unused_configs = True diff --git a/.pylintrc b/.pylintrc index 4ff4f2080..c5a1289fb 100644 --- a/.pylintrc +++ b/.pylintrc @@ -18,7 +18,7 @@ load-plugins=qute_pylint.config, pylint.extensions.private_import, persistent=n -py-version=3.6 +py-version=3.7 [MESSAGES CONTROL] enable=all diff --git a/README.asciidoc b/README.asciidoc index bb1f2562c..30e504032 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -74,7 +74,7 @@ Requirements The following software and libraries are required to run qutebrowser: -* https://www.python.org/[Python] 3.6.1 or newer +* https://www.python.org/[Python] 3.7 or newer * https://www.qt.io/[Qt] 5.12.0 or newer (5.12 LTS or 5.15 recommended, Qt 6 is not supported yet) with the following modules: - QtCore / qtbase @@ -96,10 +96,9 @@ websites and using it for transmission of sensitive data._ * https://palletsprojects.com/p/jinja/[jinja2] * https://github.com/yaml/pyyaml[PyYAML] -On older Python versions (3.6/3.7/3.8), the following backports are also required: +On older Python versions (3.7/3.8), the following backports are also required: * https://importlib-resources.readthedocs.io/[importlib_resources] (Python 3.8 or older) -* https://github.com/ericvsmith/dataclasses[dataclasses] (Python 3.6 only) The following libraries are optional: diff --git a/doc/contributing.asciidoc b/doc/contributing.asciidoc index 75c19045e..de7389feb 100644 --- a/doc/contributing.asciidoc +++ b/doc/contributing.asciidoc @@ -111,9 +111,9 @@ unittests and several linters/checkers. Currently, the following tox environments are available: * Tests using https://www.pytest.org[pytest]: - - `py36`, `py37`, ...: Run pytest for python 3.6/3.7/... with the system-wide PyQt. - - `py36-pyqt512`, ..., `py36-pyqt515`: Run pytest with the given PyQt version (`py35-*` also works). - - `py36-pyqt515-cov`: Run with coverage support (other Python/PyQt versions work too). + - `py37`, `py38`, ...: Run pytest for python 3.7/3.8/... with the system-wide PyQt. + - `py37-pyqt512`, ..., `py37-pyqt515`: Run pytest with the given PyQt version (`py37-*` also works). + - `py37-pyqt515-cov`: Run with coverage support (other Python/PyQt versions work too). * `flake8`: Run various linting checks via https://pypi.python.org/pypi/flake8[flake8]. * `vulture`: Run https://pypi.python.org/pypi/vulture[vulture] to find unused code portions. @@ -168,16 +168,16 @@ Examples: ---- # run only pytest tests which failed in last run: -tox -e py35 -- --lf +tox -e py37 -- --lf # run only the end2end feature tests: -tox -e py35 -- tests/end2end/features +tox -e py37 -- tests/end2end/features # run everything with undo in the generated name, based on the scenario text -tox -e py35 -- tests/end2end/features/test_tabs_bdd.py -k undo +tox -e py37 -- tests/end2end/features/test_tabs_bdd.py -k undo # run coverage test for specific file (updates htmlcov/index.html) -tox -e py35-cov -- tests/unit/browser/test_webelem.py +tox -e py37-cov -- tests/unit/browser/test_webelem.py ---- Profiling @@ -544,11 +544,11 @@ ____ Setting up a Windows Development Environment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -* Install https://www.python.org/downloads/release/python-362/[Python 3.6]. +* Install https://www.python.org/downloads/release/python-3911/[Python 3.9]. * Install PyQt via `pip install PyQt5`. * Create a file at `C:\Windows\system32\python3.bat` with the following content (adjust the path as necessary): `@C:\Python36\python %*`. - This will make the Python 3.6 interpreter available as `python3`, which is used by various development scripts. + This will make the Python 3.9 interpreter available as `python3`, which is used by various development scripts. * Install git from the https://git-scm.com/download/win[git-scm downloads page]. Try not to enable `core.autocrlf`, since that will cause `flake8` to complain a lot. Use an editor that can deal with plain line feeds instead. * Clone your favourite qutebrowser repository. diff --git a/doc/install.asciidoc b/doc/install.asciidoc index dd284fb9a..bb4e08f5a 100644 --- a/doc/install.asciidoc +++ b/doc/install.asciidoc @@ -38,7 +38,7 @@ version (Qt 5.7, based on a Chromium from March 2016). Furthermore, it packages Ubuntu 16.04 doesn't come with an up-to-date engine (a new enough QtWebKit, or QtWebEngine) and also comes with Python 3.5. -You should be able to install a newer Python (3.6+) using the +You should be able to install a newer Python (3.7+) using the https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa[deadsnakes PPA] or https://github.com/pyenv/pyenv[pyenv], and then proceed to <>. However, this is currently untested. If you @@ -447,7 +447,7 @@ This installs all needed Python dependencies in a `.venv` subfolder This comes with an up-to-date Qt/PyQt including a pre-compiled QtWebEngine binary, but has a few caveats: -- Make sure your `python3` is Python 3.6 or newer, otherwise you'll get a "No +- Make sure your `python3` is Python 3.7 or newer, otherwise you'll get a "No matching distribution found" error and/or qutebrowser will not run. - It only works on 64-bit x86 systems, with other architectures you'll get the same error. diff --git a/qutebrowser/browser/webkit/http.py b/qutebrowser/browser/webkit/http.py index fed357e62..08a4509eb 100644 --- a/qutebrowser/browser/webkit/http.py +++ b/qutebrowser/browser/webkit/http.py @@ -88,10 +88,6 @@ class ContentDisposition: reg = email.headerregistry.HeaderRegistry() try: parsed = reg('Content-Disposition', decoded) - except IndexError: # pragma: no cover - # WORKAROUND for https://bugs.python.org/issue37491 - # Fixed in Python 3.7.5 and 3.8.0. - raise ContentDispositionError("Missing closing quote character") except ValueError: # pragma: no cover # WORKAROUND for https://bugs.python.org/issue42946 raise ContentDispositionError("Non-ASCII digit") diff --git a/qutebrowser/completion/models/filepathcategory.py b/qutebrowser/completion/models/filepathcategory.py index b7d74f57a..fd2cb58ce 100644 --- a/qutebrowser/completion/models/filepathcategory.py +++ b/qutebrowser/completion/models/filepathcategory.py @@ -65,7 +65,7 @@ class FilePathCategory(QAbstractListModel): try: return glob.glob(glob.escape(val) + '*') except ValueError as e: # pragma: no cover - # e.g. "embedded null byte" with \x00 on Python 3.6 and 3.7 + # e.g. "embedded null byte" with \x00 on Python 3.7 log.completion.debug(f"Failed to glob: {e}") return [] diff --git a/qutebrowser/misc/checkpyver.py b/qutebrowser/misc/checkpyver.py index e9a7a1eef..7d6a524c3 100644 --- a/qutebrowser/misc/checkpyver.py +++ b/qutebrowser/misc/checkpyver.py @@ -43,11 +43,11 @@ except ImportError: # pragma: no cover # to stderr. def check_python_version(): """Check if correct python version is run.""" - if sys.hexversion < 0x03060100: + if sys.hexversion < 0x03070000: # We don't use .format() and print_function here just in case someone # still has < 2.6 installed. version_str = '.'.join(map(str, sys.version_info[:3])) - text = ("At least Python 3.6.1 is required to run qutebrowser, but " + + text = ("At least Python 3.7 is required to run qutebrowser, but " + "it's running with " + version_str + ".\n") if Tk and '--no-err-windows' not in sys.argv: # pragma: no cover root = Tk() diff --git a/qutebrowser/misc/earlyinit.py b/qutebrowser/misc/earlyinit.py index 034d7ff74..45266fd40 100644 --- a/qutebrowser/misc/earlyinit.py +++ b/qutebrowser/misc/earlyinit.py @@ -19,7 +19,7 @@ """Things which need to be done really early (e.g. before importing Qt). -At this point we can be sure we have all python 3.6.1 features available. +At this point we can be sure we have all python 3.7 features available. """ try: diff --git a/qutebrowser/utils/utils.py b/qutebrowser/utils/utils.py index 9c68932f3..a28d662b3 100644 --- a/qutebrowser/utils/utils.py +++ b/qutebrowser/utils/utils.py @@ -784,30 +784,13 @@ def mimetype_extension(mimetype: str) -> Optional[str]: This mostly delegates to Python's mimetypes.guess_extension(), but backports some changes (via a simple override dict) which are missing from earlier Python versions. - Most likely, this can be dropped once the minimum Python version is raised to 3.7. + Most likely, this can be dropped once the minimum Python version is raised to 3.10. """ overrides = { + # Added in 3.10 + "application/x-hdf5": ".h5", # Added around 3.8 "application/manifest+json": ".webmanifest", - "application/x-hdf5": ".h5", - - # Added in Python 3.7 - "application/wasm": ".wasm", - - # Wrong values for Python 3.6 - # https://bugs.python.org/issue1043134 - # https://github.com/python/cpython/pull/14375 - "application/octet-stream": ".bin", # not .a - "application/postscript": ".ps", # not .ai - "application/vnd.ms-excel": ".xls", # not .xlb - "application/vnd.ms-powerpoint": ".ppt", # not .pot - "application/xml": ".xsl", # not .rdf - "audio/mpeg": ".mp3", # not .mp2 - "image/jpeg": ".jpg", # not .jpe - "image/tiff": ".tiff", # not .tif - "text/html": ".html", # not .htm - "text/plain": ".txt", # not .bat - "video/mpeg": ".mpeg", # not .m1v } if mimetype in overrides: return overrides[mimetype] diff --git a/setup.py b/setup.py index 4c4bd3243..cb088e04c 100755 --- a/setup.py +++ b/setup.py @@ -72,9 +72,8 @@ try: ['qutebrowser = qutebrowser.qutebrowser:main']}, zip_safe=True, install_requires=['jinja2', 'PyYAML', - 'dataclasses; python_version < "3.7"', 'importlib_resources>=1.1.0; python_version < "3.9"'], - python_requires='>=3.6', + python_requires='>=3.7', name='qutebrowser', version=_get_constant('version'), description=_get_constant('description'), @@ -96,7 +95,6 @@ try: 'Operating System :: MacOS', 'Operating System :: POSIX :: BSD', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', diff --git a/tests/end2end/test_invocations.py b/tests/end2end/test_invocations.py index 43809cfd4..0d49ff109 100644 --- a/tests/end2end/test_invocations.py +++ b/tests/end2end/test_invocations.py @@ -336,7 +336,7 @@ def test_command_on_start(request, quteproc_new): quteproc_new.wait_for_quit() -@pytest.mark.parametrize('python', ['python2', 'python3.5']) +@pytest.mark.parametrize('python', ['python2', 'python3.6']) def test_launching_with_old_python(python): try: proc = subprocess.run( @@ -346,7 +346,7 @@ def test_launching_with_old_python(python): except FileNotFoundError: pytest.skip(f"{python} not found") assert proc.returncode == 1 - error = "At least Python 3.6.1 is required to run qutebrowser" + error = "At least Python 3.7 is required to run qutebrowser" assert proc.stderr.decode('ascii').startswith(error) diff --git a/tests/unit/config/test_configtypes.py b/tests/unit/config/test_configtypes.py index ef3007f71..c34efce54 100644 --- a/tests/unit/config/test_configtypes.py +++ b/tests/unit/config/test_configtypes.py @@ -19,7 +19,6 @@ """Tests for qutebrowser.config.configtypes.""" import re -import sys import json import math import warnings @@ -1501,12 +1500,8 @@ class TestRegex: pytest.param('(' * 500, id='too many parens'), pytest.param(r'foo\Xbar', id='invalid escape X'), pytest.param(r'foo\Cbar', id='invalid escape C'), - pytest.param(r'[[]]', id='nested set', marks=pytest.mark.skipif( - sys.hexversion < 0x03070000, - reason="Warning was added in Python 3.7")), - pytest.param(r'[a||b]', id='set operation', marks=pytest.mark.skipif( - sys.hexversion < 0x03070000, - reason="Warning was added in Python 3.7")), + pytest.param(r'[[]]', id='nested set'), + pytest.param(r'[a||b]', id='set operation'), ]) def test_to_py_invalid(self, klass, val): with pytest.raises(configexc.ValidationError): diff --git a/tests/unit/misc/test_checkpyver.py b/tests/unit/misc/test_checkpyver.py index 52e022a44..a23d02e1c 100644 --- a/tests/unit/misc/test_checkpyver.py +++ b/tests/unit/misc/test_checkpyver.py @@ -28,12 +28,12 @@ import pytest from qutebrowser.misc import checkpyver -TEXT = (r"At least Python 3.6.1 is required to run qutebrowser, but it's " +TEXT = (r"At least Python 3.7 is required to run qutebrowser, but it's " r"running with \d+\.\d+\.\d+.") @pytest.mark.not_frozen -@pytest.mark.parametrize('python', ['python2', 'python3.5']) +@pytest.mark.parametrize('python', ['python2', 'python3.6']) def test_old_python(python): """Run checkpyver with old python versions.""" try: diff --git a/tox.ini b/tox.ini index 370adbc9e..0990b1b4a 100644 --- a/tox.ini +++ b/tox.ini @@ -18,7 +18,6 @@ passenv = PYTHON DISPLAY XAUTHORITY HOME USERNAME USER CI XDG_* QUTE_* DOCKER QT basepython = py: {env:PYTHON:python3} py3: {env:PYTHON:python3} - py36: {env:PYTHON:python3.6} py37: {env:PYTHON:python3.7} py38: {env:PYTHON:python3.8} py39: {env:PYTHON:python3.9} -- cgit v1.2.3-54-g00ecf From cd4429db25746acbec3ef434935959d0f5f66224 Mon Sep 17 00:00:00 2001 From: Jimmy Date: Mon, 4 Apr 2022 11:00:51 +1200 Subject: Remove 3.6 pins from requirements files. Then regenerate the relevant files. Also drop dataclasses from requirements files. TODO: should we drop the dataclasses-types requirement for mypy too? --- misc/requirements/requirements-pylint.txt | 3 +- misc/requirements/requirements-pylint.txt-raw | 4 -- misc/requirements/requirements-qutebrowser.txt-raw | 13 ------- misc/requirements/requirements-tests.txt | 45 ++++++++-------------- misc/requirements/requirements-tests.txt-raw | 32 --------------- misc/requirements/requirements-tox.txt | 12 ++---- misc/requirements/requirements-tox.txt-raw | 10 ----- qutebrowser/misc/earlyinit.py | 1 - requirements.txt | 12 ++---- scripts/dev/changelog_urls.json | 1 - 10 files changed, 23 insertions(+), 110 deletions(-) diff --git a/misc/requirements/requirements-pylint.txt b/misc/requirements/requirements-pylint.txt index 3e5ebea9e..3df5e6a5c 100644 --- a/misc/requirements/requirements-pylint.txt +++ b/misc/requirements/requirements-pylint.txt @@ -13,7 +13,7 @@ isort==5.10.1 lazy-object-proxy==1.7.1 mccabe==0.7.0 pefile==2021.9.3 -platformdirs==2.5.1 ; python_version>="3.7" +platformdirs==2.5.1 pycparser==2.21 PyJWT==2.3.0 pylint==2.13.3 @@ -27,4 +27,3 @@ typing_extensions==4.1.1 uritemplate==4.1.1 # urllib3==1.26.9 wrapt==1.14.0 -platformdirs==2.4.0 ; python_version=="3.6.*" diff --git a/misc/requirements/requirements-pylint.txt-raw b/misc/requirements/requirements-pylint.txt-raw index 52633ec1a..54e12a02a 100644 --- a/misc/requirements/requirements-pylint.txt-raw +++ b/misc/requirements/requirements-pylint.txt-raw @@ -10,7 +10,3 @@ pefile # Already included via test requirements #@ ignore: urllib3 - -# Python 3.6 -#@ markers: platformdirs python_version>="3.7" -#@ add: platformdirs==2.4.0 ; python_version=="3.6.*" diff --git a/misc/requirements/requirements-qutebrowser.txt-raw b/misc/requirements/requirements-qutebrowser.txt-raw index b260fa16c..2025280fc 100644 --- a/misc/requirements/requirements-qutebrowser.txt-raw +++ b/misc/requirements/requirements-qutebrowser.txt-raw @@ -3,7 +3,6 @@ PyYAML ## stdlib backports importlib-resources -dataclasses ## Optional dependencies Pygments # For :view-source --pygments or on QtWebKit @@ -17,15 +16,3 @@ typing_extensions # from importlib-metadata #@ markers: importlib-resources python_version=="3.7.*" or python_version=="3.8.*" #@ markers: importlib-metadata python_version=="3.7.*" #@ markers: typing_extensions python_version<"3.8" -#@ markers: dataclasses python_version<"3.7" - -# Python 3.6 -#@ add: importlib-resources<5.6.0 ; python_version=="3.6.*" -#@ add: importlib-metadata<4.9 ; python_version=="3.6.*" -# -#@ markers: zipp python_version>="3.7" -#@ add: zipp<3.7 ; python_version=="3.6.*" -#@ markers: MarkupSafe python_version>="3.7" -#@ add: MarkupSafe<2.1.0 ; python_version=="3.6.*" -#@ markers: Jinja2 python_version>="3.7" -#@ add: Jinja2<3.1.0 ; python_version=="3.6.*" diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt index 787d2791b..4ba82712c 100644 --- a/misc/requirements/requirements-tests.txt +++ b/misc/requirements/requirements-tests.txt @@ -5,22 +5,22 @@ beautifulsoup4==4.10.0 certifi==2021.10.8 charset-normalizer==2.0.12 cheroot==8.6.0 -click==8.1.0 ; python_version>="3.7" -coverage==6.3.2 ; python_version>="3.7" +click==8.1.0 +coverage==6.3.2 execnet==1.9.0 -filelock==3.6.0 ; python_version>="3.7" -Flask==2.1.0 ; python_version>="3.7" +filelock==3.6.0 +Flask==2.1.0 glob2==0.7 hunter==3.4.3 -hypothesis==6.40.0 ; python_version>="3.7" +hypothesis==6.40.0 icdiff==2.0.4 idna==3.3 -importlib-metadata==4.11.3 ; python_version=="3.7.*" +importlib-metadata==4.11.3 iniconfig==1.1.1 -itsdangerous==2.1.2 ; python_version>="3.7" -jaraco.functools==3.5.0 ; python_version>="3.7" +itsdangerous==2.1.2 +jaraco.functools==3.5.0 # Jinja2==3.1.1 -Mako==1.2.0 ; python_version>="3.7" +Mako==1.2.0 manhole==1.8.0 # MarkupSafe==2.1.1 more-itertools==8.12.0 @@ -33,14 +33,14 @@ py==1.11.0 py-cpuinfo==8.0.0 Pygments==2.11.2 pyparsing==3.0.7 -pytest==7.1.1 ; python_version>="3.7" +pytest==7.1.1 pytest-bdd==4.1.0 pytest-benchmark==3.4.1 pytest-cov==3.0.0 pytest-forked==1.4.0 pytest-icdiff==0.5 pytest-instafail==0.4.2 -pytest-mock==3.7.0 ; python_version>="3.7" +pytest-mock==3.7.0 pytest-qt==4.0.2 pytest-repeat==0.9.1 pytest-rerunfailures==10.2 @@ -52,25 +52,10 @@ requests-file==1.5.1 six==1.16.0 sortedcontainers==2.4.0 soupsieve==2.3.1 -tldextract==3.2.0 ; python_version>="3.7" +tldextract==3.2.0 toml==0.10.2 -tomli==2.0.1 ; python_version>="3.7" +tomli==2.0.1 urllib3==1.26.9 vulture==2.3 -Werkzeug==2.1.0 ; python_version>="3.7" -zipp==3.7.0 ; python_version>="3.7" -jaraco.functools<3.5 ; python_version=="3.6.*" -tomli<2 ; python_version=="3.6.*" -filelock==3.4.1 ; python_version=="3.6.*" -hypothesis<6.32 ; python_version=="3.6.*" -coverage<6.3 ; python_version=="3.6.*" -pytest-mock<3.7 ; python_version=="3.6.*" -itsdangerous<2.1.0 ; python_version=="3.6.*" -tldextract<3.2.0 ; python_version=="3.6.*" -Mako<1.2.0 ; python_version=="3.6.*" -pytest<7.1.0 ; python_version=="3.6.*" -click<8.1.0 ; python_version=="3.6.*" -Flask<2.1.0 ; python_version=="3.6.*" -Werkzeug<2.1.0 ; python_version=="3.6.*" -zipp<3.7 ; python_version=="3.6.*" -importlib-metadata<4.9 ; python_version=="3.6.*" +Werkzeug==2.1.0 +zipp==3.7.0 diff --git a/misc/requirements/requirements-tests.txt-raw b/misc/requirements/requirements-tests.txt-raw index 6338a1a97..5586a86ef 100644 --- a/misc/requirements/requirements-tests.txt-raw +++ b/misc/requirements/requirements-tests.txt-raw @@ -35,35 +35,3 @@ pytest-icdiff tldextract #@ ignore: Jinja2, MarkupSafe, colorama - -# Python 3.6 -#@ markers: jaraco.functools python_version>="3.7" -#@ add: jaraco.functools<3.5 ; python_version=="3.6.*" -#@ markers: tomli python_version>="3.7" -#@ add: tomli<2 ; python_version=="3.6.*" -#@ markers: filelock python_version>="3.7" -#@ add: filelock==3.4.1 ; python_version=="3.6.*" -#@ markers: hypothesis python_version>="3.7" -#@ add: hypothesis<6.32 ; python_version=="3.6.*" -#@ markers: coverage python_version>="3.7" -#@ add: coverage<6.3 ; python_version=="3.6.*" -#@ markers: pytest-mock python_version>="3.7" -#@ add: pytest-mock<3.7 ; python_version=="3.6.*" -#@ markers: itsdangerous python_version>="3.7" -#@ add: itsdangerous<2.1.0 ; python_version=="3.6.*" -#@ markers: tldextract python_version>="3.7" -#@ add: tldextract<3.2.0 ; python_version=="3.6.*" -#@ markers: Mako python_version>="3.7" -#@ add: Mako<1.2.0 ; python_version=="3.6.*" -#@ markers: pytest python_version>="3.7" -#@ add: pytest<7.1.0 ; python_version=="3.6.*" -#@ markers: click python_version>="3.7" -#@ add: click<8.1.0 ; python_version=="3.6.*" -#@ markers: Flask python_version>="3.7" -#@ add: Flask<2.1.0 ; python_version=="3.6.*" -#@ markers: Werkzeug python_version>="3.7" -#@ add: Werkzeug<2.1.0 ; python_version=="3.6.*" -#@ markers: zipp python_version>="3.7" -#@ add: zipp<3.7 ; python_version=="3.6.*" -#@ markers: importlib-metadata python_version=="3.7.*" -#@ add: importlib-metadata<4.9 ; python_version=="3.6.*" diff --git a/misc/requirements/requirements-tox.txt b/misc/requirements/requirements-tox.txt index a87519740..cdc49ff7f 100644 --- a/misc/requirements/requirements-tox.txt +++ b/misc/requirements/requirements-tox.txt @@ -1,20 +1,16 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py distlib==0.3.4 -filelock==3.6.0 ; python_version>="3.7" +filelock==3.6.0 packaging==21.3 -pip==22.0.4 ; python_version>="3.7" -platformdirs==2.5.1 ; python_version>="3.7" +pip==22.0.4 +platformdirs==2.5.1 pluggy==1.0.0 py==1.11.0 pyparsing==3.0.7 -setuptools==61.2.0 ; python_version>="3.7" +setuptools==61.2.0 six==1.16.0 toml==0.10.2 tox==3.24.5 virtualenv==20.14.0 wheel==0.37.1 -setuptools<60 ; python_version=="3.6.*" -filelock==3.4.1 ; python_version=="3.6.*" -platformdirs==2.4.0 ; python_version=="3.6.*" -pip==21.3.1 ; python_version=="3.6.*" diff --git a/misc/requirements/requirements-tox.txt-raw b/misc/requirements/requirements-tox.txt-raw index 2a9f30c5a..27d58e1f4 100644 --- a/misc/requirements/requirements-tox.txt-raw +++ b/misc/requirements/requirements-tox.txt-raw @@ -1,12 +1,2 @@ tox wheel - -# Python 3.6 -#@ markers: setuptools python_version>="3.7" -#@ add: setuptools<60 ; python_version=="3.6.*" -#@ markers: filelock python_version>="3.7" -#@ add: filelock==3.4.1 ; python_version=="3.6.*" -#@ markers: platformdirs python_version>="3.7" -#@ add: platformdirs==2.4.0 ; python_version=="3.6.*" -#@ markers: pip python_version>="3.7" -#@ add: pip==21.3.1 ; python_version=="3.6.*" diff --git a/qutebrowser/misc/earlyinit.py b/qutebrowser/misc/earlyinit.py index 45266fd40..4b3df4db2 100644 --- a/qutebrowser/misc/earlyinit.py +++ b/qutebrowser/misc/earlyinit.py @@ -235,7 +235,6 @@ def check_libraries(): modules = { 'jinja2': _missing_str("jinja2"), 'yaml': _missing_str("PyYAML"), - 'dataclasses': _missing_str("dataclasses"), 'PyQt5.QtQml': _missing_str("PyQt5.QtQml"), 'PyQt5.QtSql': _missing_str("PyQt5.QtSql"), 'PyQt5.QtOpenGL': _missing_str("PyQt5.QtOpenGL"), diff --git a/requirements.txt b/requirements.txt index 25c1bd98f..b7ba35e6f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,17 +2,11 @@ adblock==0.5.2 colorama==0.4.4 -dataclasses==0.6 ; python_version<"3.7" importlib-metadata==4.11.3 ; python_version=="3.7.*" importlib-resources==5.6.0 ; python_version=="3.7.*" or python_version=="3.8.*" -Jinja2==3.1.1 ; python_version>="3.7" -MarkupSafe==2.1.1 ; python_version>="3.7" +Jinja2==3.1.1 +MarkupSafe==2.1.1 Pygments==2.11.2 PyYAML==6.0 typing_extensions==4.1.1 ; python_version<"3.8" -zipp==3.7.0 ; python_version>="3.7" -importlib-resources<5.6.0 ; python_version=="3.6.*" -importlib-metadata<4.9 ; python_version=="3.6.*" -zipp<3.7 ; python_version=="3.6.*" -MarkupSafe<2.1.0 ; python_version=="3.6.*" -Jinja2<3.1.0 ; python_version=="3.6.*" +zipp==3.7.0 diff --git a/scripts/dev/changelog_urls.json b/scripts/dev/changelog_urls.json index 0de1d68d9..f4f82ea58 100644 --- a/scripts/dev/changelog_urls.json +++ b/scripts/dev/changelog_urls.json @@ -140,7 +140,6 @@ "importlib-resources": "https://importlib-resources.readthedocs.io/en/latest/history.html", "importlib-metadata": "https://github.com/python/importlib_metadata/blob/main/CHANGES.rst", "zipp": "https://github.com/jaraco/zipp/blob/main/CHANGES.rst", - "dataclasses": "https://github.com/ericvsmith/dataclasses#release-history", "pip": "https://pip.pypa.io/en/stable/news/", "wheel": "https://wheel.readthedocs.io/en/stable/news.html", "setuptools": "https://setuptools.readthedocs.io/en/latest/history.html", -- cgit v1.2.3-54-g00ecf From f15d6e88a9ad5c5c3f7eb0c77de05b1609549680 Mon Sep 17 00:00:00 2001 From: Jimmy Date: Mon, 4 Apr 2022 11:59:20 +1200 Subject: Add back empty header indexerror workaround The test case on the bug works for me on py37 but CI is failing on 3.10, maybe this isn't quite the same issue. Anyway, we are getting rid of webkit soon. --- qutebrowser/browser/webkit/http.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qutebrowser/browser/webkit/http.py b/qutebrowser/browser/webkit/http.py index 08a4509eb..5a7cd8b34 100644 --- a/qutebrowser/browser/webkit/http.py +++ b/qutebrowser/browser/webkit/http.py @@ -88,6 +88,11 @@ class ContentDisposition: reg = email.headerregistry.HeaderRegistry() try: parsed = reg('Content-Disposition', decoded) + except IndexError: # pragma: no cover + # WORKAROUND for https://bugs.python.org/issue37491 + # Fixed in Python 3.7.5 and 3.8.0. + # Still getting failures on 3.10 on CI though + raise ContentDispositionError("Missing closing quote character") except ValueError: # pragma: no cover # WORKAROUND for https://bugs.python.org/issue42946 raise ContentDispositionError("Non-ASCII digit") -- cgit v1.2.3-54-g00ecf