drop Python 3.6
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by David Lord · committed by David Lord · parent 3c36d04 · Browse files · 9 files·+11 added−33 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
9 files+11 added−33 removed
- tests:+0 added−13 removed
- other:+11 added−20 removed
Provenance
- Commit
e609ddd- Tree
38f4e2a- Author
David Lord <davidism@gmail.com>- Committer
David Lord <davidism@gmail.com>- Parent
3c36d04
9 files changed+11 added−33 removed
modified:.github/workflows/tests.yaml-1 removed
29 unmodified lines30313233343435363718 unmodified lines29 unmodified lines - {name: '3.11-dev', python: '3.11-dev', os: ubuntu-latest, tox: py311} - {name: '3.9', python: '3.9', os: ubuntu-latest, tox: py39} - {name: '3.8', python: '3.8', os: ubuntu-latest, tox: py38} - {name: '3.7', python: '3.7', os: ubuntu-latest, tox: py37} - {name: '3.6', python: '3.6', os: ubuntu-latest, tox: py36} - {name: 'PyPy', python: 'pypy-3.7', os: ubuntu-latest, tox: pypy37} - {name: Typing, python: '3.10', os: ubuntu-latest, tox: typing} steps: - uses: actions/checkout@v218 unmodified linesmodified:docs/cli.rst+3 added-4 removed
110 unmodified lines111 shell with the :func:`shell <cli.shell_command>` command. An application112 context will be active, and the app instance will be imported. ::113 114 $ flask shell115- Python 3.6.2 (default, Jul 20 2017, 03:52:27)116- [GCC 7.1.1 20170630] on linux117- App: example118- Instance: /home/user/Projects/hello/instance115+ Python 3.10.0 (default, Oct 27 2021, 06:59:51) [GCC 11.1.0] on linux116+ App: example [production]117+ Instance: /home/david/Projects/pallets/flask/instance118 >>>119 120 Use :meth:`~Flask.shell_context_processor` to add other automatic imports.121 532 unmodified linesmodified:docs/extensiondev.rst+3 added-3 removed
320 unmodified lines321 6. The documentation must use the ``flask`` theme from the322 `Official Pallets Themes`_. A link to the documentation or project323 website must be in the PyPI metadata or the readme.324 7. For maximum compatibility, the extension should support the same325- versions of Python that Flask supports. 3.6+ is recommended as of326- 2020. Use ``python_requires=">= 3.6"`` in ``setup.py`` to indicate327- supported versions.325+ versions of Python that Flask supports. 3.7+ is recommended as of326+ December 2021. Use ``python_requires=">= 3.7"`` in ``setup.py`` to327+ indicate supported versions.328 329 .. _PyPI: https://pypi.org/search/?c=Framework+%3A%3A+Flask330 .. _mailinglist: https://mail.python.org/mailman/listinfo/flask331 .. _Discord server: https://discord.gg/pallets1 unmodified linemodified:docs/installation.rst+1 added-3 removed
4 unmodified lines5 Python Version6 --------------7 8 We recommend using the latest version of Python. Flask supports Python9-3.6 and newer.9+3.7 and newer.10 11-``async`` support in Flask requires Python 3.7+ for ``contextvars.ContextVar``.11 13-12 Dependencies13 ------------14 15 These distributions will be installed automatically when installing Flask.118 unmodified linesmodified:src/flask/json/__init__.py+1 added-6 removed
1+import dataclasses2 import decimal3 import io4 import json as _json5 import typing as t10 unmodified lines16 if t.TYPE_CHECKING:17 from ..app import Flask18 from ..wrappers import Response19 19-try:20- import dataclasses21-except ImportError:22- # Python < 3.723- dataclasses = None # type: ignore20 25-21 class JSONEncoder(_json.JSONEncoder):22 """The default JSON encoder. Handles extra types compared to the23 built-in :class:`json.JSONEncoder`.24 328 unmodified linesmodified:tests/test_async.py-11 removed
1 import asyncio2-import sys2 3 import pytest4 5 from flask import Blueprint71 unmodified lines77 78 return app79 80 82-@pytest.mark.skipif(sys.version_info < (3, 7), reason="requires Python >= 3.7")81 @pytest.mark.parametrize("path", ["/", "/home", "/bp/", "/view", "/methodview"])82 def test_async_route(path, async_app):83 test_client = async_app.test_client()84 response = test_client.get(path)1 unmodified line86 response = test_client.post(path)87 assert b"POST" in response.get_data()88 89 92-@pytest.mark.skipif(sys.version_info < (3, 7), reason="requires Python >= 3.7")90 @pytest.mark.parametrize("path", ["/error", "/bp/error"])91 def test_async_error_handler(path, async_app):92 test_client = async_app.test_client()93 response = test_client.get(path)94 assert response.status_code == 41295 96 100-@pytest.mark.skipif(sys.version_info < (3, 7), reason="requires Python >= 3.7")97 def test_async_before_after_request():98 app_first_called = False99 app_before_called = False100 app_after_called = False48 unmodified lines149 assert app_after_called150 test_client.get("/bp/")151 assert bp_before_called152 assert bp_after_called157-158-159-@pytest.mark.skipif(sys.version_info >= (3, 7), reason="should only raise Python < 3.7")160-def test_async_runtime_error():161- app = Flask(__name__)162- with pytest.raises(RuntimeError):163- app.async_to_sync(None)modified:tests/test_basic.py-2 removed
1 import gc2 import re3-import sys3 import time4 import uuid5 import weakref6 from datetime import datetime1314 unmodified lines1321 rv = flask.make_response(flask.jsonify(msg), 200)1322 assert rv.mimetype == "application/vnd.api+json"1323 1324 1326-@pytest.mark.skipif(sys.version_info < (3, 7), reason="requires Python >= 3.7")1325 def test_json_dump_dataclass(app, req_ctx):1326 from dataclasses import make_dataclass1327 1328 Data = make_dataclass("Data", [("name", str)])698 unmodified linesmodified:setup.cfg+2 added-2 removed
33 unmodified lines34 [options]35 packages = find:36 package_dir = = src37 include_package_data = true38-python_requires = >= 3.638+python_requires = >= 3.739 # Dependencies are in setup.py for GitHub's dependency graph.40 41 [options.packages.find]42 where = src44 unmodified lines87 src/flask/__init__.py: F40188 89 [mypy]90 files = src/flask91-python_version = 3.691+python_version = 3.792 allow_redefinition = True93 disallow_subclassing_any = True94 # disallow_untyped_calls = True95 # disallow_untyped_defs = True22 unmodified linesmodified:tox.ini+1 added-1 removed
1 [tox]2 envlist =3- py3{11,10,9,8,7,6},pypy373+ py3{11,10,9,8,7},pypy3{8,7}4 py39-click75 style6 typing7 docs24 unmodified lines