Skip to content
Myr

drop support for Python 2.7 and 3.5

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 7673835 · Browse files · 7 files+51 added−127 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

7 files+51 added−127 removed

  • tests:+3 added−1 removed
  • other:+48 added−126 removed

7 files+51 added−127 removed

modified:src/flask/__init__.py+1 added-1 removed
55 unmodified lines
56from .signals import template_rendered57from .templating import render_template58from .templating import render_template_string5960__version__ = "1.2.0.dev"60__version__ = "2.0.0.dev"
modified:tests/test_instance_config.py+3 added-1 removed
22 unmodified lines
23 app = flask.Flask(__name__, instance_path=str(modules_tmpdir))24 assert app.instance_path == str(modules_tmpdir)252627@pytest.mark.xfail(reason="TODO: weird interaction with tox")27@pytest.mark.xfail(reason="weird interaction with tox")28def test_main_module_paths(modules_tmpdir, purge_module):29 app = modules_tmpdir.join("main_app.py")30 app.write('import flask\n\napp = flask.Flask("__main__")')31 purge_module("main_app")
3 unmodified lines
35 here = os.path.abspath(os.getcwd())36 assert app.instance_path == os.path.join(here, "instance")373839@pytest.mark.xfail(reason="weird interaction with tox")40def test_uninstalled_module_paths(modules_tmpdir, purge_module):41 app = modules_tmpdir.join("config_module_app.py").write(42 "import os\n"43 "import flask\n"
6 unmodified lines
5051 assert app.instance_path == str(modules_tmpdir.join("instance"))525354@pytest.mark.xfail(reason="weird interaction with tox")55def test_uninstalled_package_paths(modules_tmpdir, purge_module):56 app = modules_tmpdir.mkdir("config_package_app")57 init = app.join("__init__.py")58 init.write(
88 unmodified lines
modified:.azure-pipelines.yml+36 added-77 removed
modified:CHANGES.rst+2 added-1 removed
1.. currentmodule:: flask23Version 1.2.03Version 2.0.04-------------56Unreleased78- Drop support for Python 2 and 3.5.9- Add :meth:`sessions.SessionInterface.get_cookie_name` to allow10 setting the session cookie name dynamically. :pr:`3369`11- Add :meth:`Config.from_file` to load config using arbitrary file12 loaders, such as ``toml.load`` or ``json.load``.
1024 unmodified lines
modified:setup.cfg+4 added-6 removed
1[bdist_wheel]2universal = true31[tool:pytest]2testpaths = tests3filterwarnings =4 error56[coverage:run]7branch = True8source =
1 unmodified line
10 tests1112[coverage:paths]13source =15 src/flask16 .tox/*/lib/python*/site-packages/flask17 .tox/*/site-packages/flask14 src15 */site-packages1617[flake8]18# B = bugbear19# E = pycodestyle errors
21 unmodified lines
modified:setup.py+1 added-10 removed
32 unmodified lines
33 "Intended Audience :: Developers",34 "License :: OSI Approved :: BSD License",35 "Operating System :: OS Independent",36 "Programming Language :: Python",37 "Programming Language :: Python :: 2",38 "Programming Language :: Python :: 2.7",39 "Programming Language :: Python :: 3",40 "Programming Language :: Python :: 3.5",41 "Programming Language :: Python :: 3.6",42 "Programming Language :: Python :: 3.7",43 "Programming Language :: Python :: 3.8",44 "Programming Language :: Python :: Implementation :: CPython",45 "Programming Language :: Python :: Implementation :: PyPy",37 "Topic :: Internet :: WWW/HTTP :: Dynamic Content",38 "Topic :: Internet :: WWW/HTTP :: WSGI :: Application",39 "Topic :: Software Development :: Libraries :: Application Frameworks",40 "Topic :: Software Development :: Libraries :: Python Modules",41 ],42 packages=find_packages("src"),43 package_dir={"": "src"},44 include_package_data=True,54 python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*",45 python_requires=">=3.6",46 install_requires=[47 "Werkzeug>=0.15",48 "Jinja2>=2.10.1",49 "itsdangerous>=0.24",
22 unmodified lines
modified:tox.ini+4 added-31 removed
1[tox]2envlist =3 py{38,37,36,35,27,py3,py}3 py{38,37,36,py3}4 py38-{simplejson,devel,lowest}5 style6 docs6 coverage7skip_missing_interpreters = true89[testenv]10passenv = LANG10deps =11 pytest13 coverage12 greenlet13 blinker14 python-dotenv15
10 unmodified lines
2627 simplejson: simplejson2829commands =32 # the examples need to be installed to test successfully30 pip install -q -e examples/tutorial[test]31 pip install -q -e examples/javascript[test]3236 # pytest-cov doesn't seem to play nice with -p37 coverage run -p -m pytest --tb=short -Werror {posargs:tests examples}33 pytest --tb=short --basetemp={envtmpdir} {posargs:tests examples}3439[testenv:nightly]40# courtesy Python nightly test, don't fail the build in CI41ignore_outcome = true42commands =43 coverage run -p -m pytest --tb=short -Werror --junitxml=test-results.xml tests4435[testenv:style]36deps = pre-commit37skip_install = true38commands = pre-commit run --all-files --show-diff-on-failure3940[testenv:docs]51deps =52 -r docs/requirements.txt41deps = -r docs/requirements.txt42commands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html5455[testenv:coverage]56deps = coverage57skip_install = true58commands =59 coverage combine60 coverage html61 coverage report6263[testenv:coverage-ci]64deps = coverage65skip_install = true66commands =67 coverage combine68 coverage xml69 coverage report