Browse Source

Drop unsupported Python 2.6

pull/2486/head
hugovk 7 years ago
parent
commit
816dab7f52
  1. 2
      .travis.yml
  2. 2
      CONTRIBUTING.rst
  3. 2
      docs/deploying/fastcgi.rst
  4. 2
      docs/installation.rst
  5. 3
      flask/cli.py
  6. 2
      scripts/flaskext_tester.py
  7. 1
      setup.py
  8. 5
      tests/test_regression.py
  9. 8
      tox.ini

2
.travis.yml

@ -13,8 +13,6 @@ matrix:
env: TOXENV=py,codecov env: TOXENV=py,codecov
- python: 2.7 - python: 2.7
env: TOXENV=py,codecov env: TOXENV=py,codecov
- python: 2.6
env: TOXENV=py,codecov
- python: pypy - python: pypy
env: TOXENV=py,codecov env: TOXENV=py,codecov
- python: nightly - python: nightly

2
CONTRIBUTING.rst

@ -109,7 +109,7 @@ depends on which part of Flask you're working on. Travis-CI will run the full
suite when you submit your pull request. suite when you submit your pull request.
The full test suite takes a long time to run because it tests multiple The full test suite takes a long time to run because it tests multiple
combinations of Python and dependencies. You need to have Python 2.6, 2.7, 3.3, combinations of Python and dependencies. You need to have Python 2.7, 3.3,
3.4, 3.5 3.6, and PyPy 2.7 installed to run all of the environments. Then run:: 3.4, 3.5 3.6, and PyPy 2.7 installed to run all of the environments. Then run::
tox tox

2
docs/deploying/fastcgi.rst

@ -111,7 +111,7 @@ Set yourapplication.fcgi::
#!/usr/bin/python #!/usr/bin/python
#: optional path to your local python site-packages folder #: optional path to your local python site-packages folder
import sys import sys
sys.path.insert(0, '<your_local_path>/lib/python2.6/site-packages') sys.path.insert(0, '<your_local_path>/lib/python2.7/site-packages')
from flup.server.fcgi import WSGIServer from flup.server.fcgi import WSGIServer
from yourapplication import app from yourapplication import app

2
docs/installation.rst

@ -7,7 +7,7 @@ Python Version
-------------- --------------
We recommend using the latest version of Python 3. Flask supports Python 3.3 We recommend using the latest version of Python 3. Flask supports Python 3.3
and newer, Python 2.6 and newer, and PyPy. and newer, Python 2.7 and PyPy.
Dependencies Dependencies
------------ ------------

3
flask/cli.py

@ -724,9 +724,6 @@ def main(as_module=False):
if as_module: if as_module:
this_module = 'flask' this_module = 'flask'
if sys.version_info < (2, 7):
this_module += '.cli'
name = 'python -m ' + this_module name = 'python -m ' + this_module
# Python rewrites "python -m flask" to the path to the file in argv. # Python rewrites "python -m flask" to the path to the file in argv.

2
scripts/flaskext_tester.py

@ -284,7 +284,7 @@ def main():
help='run against all extensions, not just approved') help='run against all extensions, not just approved')
parser.add_argument('--browse', dest='browse', action='store_true', parser.add_argument('--browse', dest='browse', action='store_true',
help='show browser with the result summary') help='show browser with the result summary')
parser.add_argument('--env', dest='env', default='py25,py26,py27', parser.add_argument('--env', dest='env', default='py27',
help='the tox environments to run against') help='the tox environments to run against')
parser.add_argument('--extension=', dest='extension', default=None, parser.add_argument('--extension=', dest='extension', default=None,
help='tests a single extension') help='tests a single extension')

1
setup.py

@ -95,7 +95,6 @@ setup(
'Operating System :: OS Independent', 'Operating System :: OS Independent',
'Programming Language :: Python', 'Programming Language :: Python',
'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.3',

5
tests/test_regression.py

@ -62,9 +62,8 @@ def test_memory_consumption():
# Trigger caches # Trigger caches
fire() fire()
# This test only works on CPython 2.7. # This test only works on CPython.
if sys.version_info >= (2, 7) and \ if not hasattr(sys, 'pypy_translation_info'):
not hasattr(sys, 'pypy_translation_info'):
with assert_no_leak(): with assert_no_leak():
for x in range(10): for x in range(10):
fire() fire()

8
tox.ini

@ -1,9 +1,9 @@
[tox] [tox]
envlist = envlist =
py{36,35,34,33,27,26,py} py{36,35,34,33,27,py}
py{36,27,py}-simplejson py{36,27,py}-simplejson
py{36,33,27,26,py}-devel py{36,33,27,py}-devel
py{36,33,27,26,py}-lowest py{36,33,27,py}-lowest
docs-html docs-html
coverage-report coverage-report
@ -59,8 +59,6 @@ passenv = CI TRAVIS TRAVIS_*
deps = codecov deps = codecov
skip_install = true skip_install = true
commands = commands =
# install argparse for 2.6
python -c 'import sys, pip; sys.version_info < (2, 7) and pip.main(["install", "argparse", "-q"])'
coverage combine coverage combine
coverage report coverage report
codecov codecov

Loading…
Cancel
Save