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
Provenance
- Commit
a0a61ac- Tree
a7a3669- Author
David Lord <davidism@gmail.com>- Committer
David Lord <davidism@gmail.com>- Parent
7673835
7 files changed+51 added−127 removed
modified:src/flask/__init__.py+1 added-1 removed
55 unmodified lines56 from .signals import template_rendered57 from .templating import render_template58 from .templating import render_template_string59 60-__version__ = "1.2.0.dev"60+__version__ = "2.0.0.dev"modified:tests/test_instance_config.py+3 added-1 removed
22 unmodified lines23 app = flask.Flask(__name__, instance_path=str(modules_tmpdir))24 assert app.instance_path == str(modules_tmpdir)25 26 27-@pytest.mark.xfail(reason="TODO: weird interaction with tox")27+@pytest.mark.xfail(reason="weird interaction with tox")28 def 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 lines35 here = os.path.abspath(os.getcwd())36 assert app.instance_path == os.path.join(here, "instance")37 38 39+@pytest.mark.xfail(reason="weird interaction with tox")40 def 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 lines50 51 assert app.instance_path == str(modules_tmpdir.join("instance"))52 53 54+@pytest.mark.xfail(reason="weird interaction with tox")55 def 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 linesmodified:.azure-pipelines.yml+36 added-77 removed
12234567891056781191314151617181920212223242526272829303132333435363738394041101112131415161718192021222324252627282930434431323346474849503435363738395253404142555657585960616263646566676869707172737475767778798081828384854344trigger: - 'master' - master - '*.x'
jobs: - job: Tests variables: vmImage: 'ubuntu-latest' python.version: '3.8' TOXENV: 'py,coverage-ci'variables: vmImage: ubuntu-latest python.version: '3.8' TOXENV: py hasTestResults: 'true'
strategy: matrix: Python 3.8 Linux: vmImage: 'ubuntu-latest' Python 3.8 Windows: vmImage: 'windows-latest' Python 3.8 Mac: vmImage: 'macos-latest' PyPy 3 Linux: python.version: 'pypy3' Python 3.7 Linux: python.version: '3.7' Python 3.6 Linux: python.version: '3.6' Python 3.5 Linux: python.version: '3.5' Python 2.7 Linux: python.version: '2.7' Python 2.7 Windows: python.version: '2.7' vmImage: 'windows-latest' Docs: TOXENV: 'docs' hasTestResults: 'false' Style: TOXENV: 'style' hasTestResults: 'false' VersionRange: TOXENV: 'devel,lowest,coverage-ci'strategy: matrix: Linux: vmImage: ubuntu-latest Windows: vmImage: windows-latest Mac: vmImage: macos-latest Python 3.7: python.version: '3.7' Python 3.6: python.version: '3.6' PyPy 3: python.version: pypy3 Version Range: TOXENV: 'devel,lowest' Docs: TOXENV: docs Style: TOXENV: style
pool: vmImage: $[ variables.vmImage ]pool: vmImage: $[ variables.vmImage ]
steps: - task: UsePythonVersion@0 inputs: versionSpec: $(python.version) displayName: Use Python $(python.version)steps: - task: UsePythonVersion@0 inputs: versionSpec: $(python.version) displayName: Use Python $(python.version)
- script: pip --disable-pip-version-check install -U tox displayName: Install tox - script: pip --disable-pip-version-check install -U tox displayName: Install tox
- script: tox -s false -- --junitxml=test-results.xml tests examples displayName: Run tox
- task: PublishTestResults@2 inputs: testResultsFiles: test-results.xml testRunTitle: $(Agent.JobName) condition: eq(variables['hasTestResults'], 'true') displayName: Publish test results
- task: PublishCodeCoverageResults@1 inputs: codeCoverageTool: Cobertura summaryFileLocation: coverage.xml condition: eq(variables['hasTestResults'], 'true') displayName: Publish coverage results
# Test on the nightly version of Python. # Use a container since Azure Pipelines may not have the latest build. - job: FlaskOnNightly pool: vmImage: ubuntu-latest container: python:rc-stretch steps: - script: | echo "##vso[task.prependPath]$HOME/.local/bin" pip --disable-pip-version-check install --user -U tox displayName: Install tox
- script: tox -e nightly displayName: Run tox - script: tox displayName: Run toxmodified:CHANGES.rst+2 added-1 removed
1 .. currentmodule:: flask2 3-Version 1.2.03+Version 2.0.04 -------------5 6 Unreleased7 8+- 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 linesmodified:setup.cfg+4 added-6 removed
1-[bdist_wheel]2-universal = true3-1 [tool:pytest]2 testpaths = tests3+filterwarnings =4+ error5 6 [coverage:run]7 branch = True8 source =1 unmodified line10 tests11 12 [coverage:paths]13 source =15- src/flask16- .tox/*/lib/python*/site-packages/flask17- .tox/*/site-packages/flask14+ src15+ */site-packages16 17 [flake8]18 # B = bugbear19 # E = pycodestyle errors21 unmodified linesmodified:setup.py+1 added-10 removed
32 unmodified lines33 "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 linesmodified:tox.ini+4 added-31 removed
1 [tox]2 envlist =3- py{38,37,36,35,27,py3,py}3+ py{38,37,36,py3}4 py38-{simplejson,devel,lowest}5+ style6 docs6- coverage7 skip_missing_interpreters = true8 9 [testenv]10-passenv = LANG10 deps =11 pytest13- coverage12 greenlet13 blinker14 python-dotenv15 10 unmodified lines26 27 simplejson: simplejson28 29 commands =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]32 36- # 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}34 39-[testenv:nightly]40-# courtesy Python nightly test, don't fail the build in CI41-ignore_outcome = true42-commands =43- coverage run -p -m pytest --tb=short -Werror --junitxml=test-results.xml tests44-35 [testenv:style]36 deps = pre-commit37 skip_install = true38 commands = pre-commit run --all-files --show-diff-on-failure39 40 [testenv:docs]51-deps =52- -r docs/requirements.txt41+deps = -r docs/requirements.txt42 commands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html54-55-[testenv:coverage]56-deps = coverage57-skip_install = true58-commands =59- coverage combine60- coverage html61- coverage report62-63-[testenv:coverage-ci]64-deps = coverage65-skip_install = true66-commands =67- coverage combine68- coverage xml69- coverage report