Skip to content
Myr

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

9 files+11 added−33 removed

modified:.github/workflows/tests.yaml-1 removed
modified:docs/cli.rst+3 added-4 removed
110 unmodified lines
111shell with the :func:`shell <cli.shell_command>` command. An application112context will be active, and the app instance will be imported. ::113114 $ 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 >>>119120Use :meth:`~Flask.shell_context_processor` to add other automatic imports.121
532 unmodified lines
modified:docs/extensiondev.rst+3 added-3 removed
320 unmodified lines
3216. 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.3247. 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.328329.. _PyPI: https://pypi.org/search/?c=Framework+%3A%3A+Flask330.. _mailinglist: https://mail.python.org/mailman/listinfo/flask331.. _Discord server: https://discord.gg/pallets
1 unmodified line
modified:docs/installation.rst+1 added-3 removed
4 unmodified lines
5Python Version6--------------78We recommend using the latest version of Python. Flask supports Python93.6 and newer.93.7 and newer.1011``async`` support in Flask requires Python 3.7+ for ``contextvars.ContextVar``.111312Dependencies13------------1415These distributions will be installed automatically when installing Flask.
118 unmodified lines
modified:src/flask/json/__init__.py+1 added-6 removed
1import dataclasses2import decimal3import io4import json as _json5import typing as t
10 unmodified lines
16if t.TYPE_CHECKING:17 from ..app import Flask18 from ..wrappers import Response1919try:20 import dataclasses21except ImportError:22 # Python < 3.723 dataclasses = None # type: ignore202521class JSONEncoder(_json.JSONEncoder):22 """The default JSON encoder. Handles extra types compared to the23 built-in :class:`json.JSONEncoder`.24
328 unmodified lines
modified:tests/test_async.py-11 removed
1import asyncio2import sys23import pytest45from flask import Blueprint
71 unmodified lines
7778 return app798082@pytest.mark.skipif(sys.version_info < (3, 7), reason="requires Python >= 3.7")81@pytest.mark.parametrize("path", ["/", "/home", "/bp/", "/view", "/methodview"])82def test_async_route(path, async_app):83 test_client = async_app.test_client()84 response = test_client.get(path)
1 unmodified line
86 response = test_client.post(path)87 assert b"POST" in response.get_data()888992@pytest.mark.skipif(sys.version_info < (3, 7), reason="requires Python >= 3.7")90@pytest.mark.parametrize("path", ["/error", "/bp/error"])91def 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 == 4129596100@pytest.mark.skipif(sys.version_info < (3, 7), reason="requires Python >= 3.7")97def test_async_before_after_request():98 app_first_called = False99 app_before_called = False100 app_after_called = False
48 unmodified lines
149 assert app_after_called150 test_client.get("/bp/")151 assert bp_before_called152 assert bp_after_called157158159@pytest.mark.skipif(sys.version_info >= (3, 7), reason="should only raise Python < 3.7")160def 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
1import gc2import re3import sys3import time4import uuid5import weakref6from datetime import datetime
1314 unmodified lines
1321 rv = flask.make_response(flask.jsonify(msg), 200)1322 assert rv.mimetype == "application/vnd.api+json"132313241326@pytest.mark.skipif(sys.version_info < (3, 7), reason="requires Python >= 3.7")1325def test_json_dump_dataclass(app, req_ctx):1326 from dataclasses import make_dataclass13271328 Data = make_dataclass("Data", [("name", str)])
698 unmodified lines
modified:setup.cfg+2 added-2 removed
33 unmodified lines
34[options]35packages = find:36package_dir = = src37include_package_data = true38python_requires = >= 3.638python_requires = >= 3.739# Dependencies are in setup.py for GitHub's dependency graph.4041[options.packages.find]42where = src
44 unmodified lines
87 src/flask/__init__.py: F4018889[mypy]90files = src/flask91python_version = 3.691python_version = 3.792allow_redefinition = True93disallow_subclassing_any = True94# disallow_untyped_calls = True95# disallow_untyped_defs = True
22 unmodified lines
modified:tox.ini+1 added-1 removed
1[tox]2envlist =3 py3{11,10,9,8,7,6},pypy373 py3{11,10,9,8,7},pypy3{8,7}4 py39-click75 style6 typing7 docs
24 unmodified lines