From af32ea0b9449a2f4aeb858f546cdfea7254342fb Mon Sep 17 00:00:00 2001 From: David Lord Date: Tue, 6 Feb 2018 08:03:09 -0800 Subject: [PATCH] bump dependency versions --- CHANGES.rst | 7 ++++--- flask/helpers.py | 19 +++++++------------ setup.py | 29 +++++++++++++++-------------- tox.ini | 6 +++--- 4 files changed, 29 insertions(+), 32 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index b352dc42..b1b65a45 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -8,9 +8,9 @@ Version 1.0 unreleased - **Python 2.6 and 3.3 are no longer supported.** (`pallets/meta#24`_) -- Minimum Werkzeug version bumped to 0.14, but please use the latest - version. -- Minimum Click version bumped to 4, but please use the latest version. +- Bump minimum dependency versions to the latest stable versions: + Werkzeug >= 0.14, Jinja >= 2.10, itsdangerous >= 0.24, Click >= 5.1. + (`#2586`_) - Make ``app.run()`` into a noop if a Flask application is run from the development server on the command line. This avoids some behavior that was confusing to debug for newcomers. @@ -159,6 +159,7 @@ unreleased .. _#2450: https://github.com/pallets/flask/pull/2450 .. _#2526: https://github.com/pallets/flask/issues/2526 .. _#2529: https://github.com/pallets/flask/pull/2529 +.. _#2586: https://github.com/pallets/flask/issues/2586 .. _#2581: https://github.com/pallets/flask/pull/2581 .. _#2606: https://github.com/pallets/flask/pull/2606 .. _#2607: https://github.com/pallets/flask/pull/2607 diff --git a/flask/helpers.py b/flask/helpers.py index 922509cf..49968bfc 100644 --- a/flask/helpers.py +++ b/flask/helpers.py @@ -608,18 +608,13 @@ def send_file(filename_or_fp, mimetype=None, as_attachment=False, 'headers' % filename, stacklevel=2) if conditional: - if callable(getattr(Range, 'to_content_range_header', None)): - # Werkzeug supports Range Requests - # Remove this test when support for Werkzeug <0.12 is dropped - try: - rv = rv.make_conditional(request, accept_ranges=True, - complete_length=fsize) - except RequestedRangeNotSatisfiable: - if file is not None: - file.close() - raise - else: - rv = rv.make_conditional(request) + try: + rv = rv.make_conditional(request, accept_ranges=True, + complete_length=fsize) + except RequestedRangeNotSatisfiable: + if file is not None: + file.close() + raise # make sure we don't send x-sendfile for servers that # ignore the 304 status code for x-sendfile. if rv.status_code == 304: diff --git a/setup.py b/setup.py index bf2d0bc6..2ece939a 100644 --- a/setup.py +++ b/setup.py @@ -68,28 +68,26 @@ setup( include_package_data=True, zip_safe=False, platforms='any', + python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*', install_requires=[ - 'Werkzeug>=0.9', - 'Jinja2>=2.4', - 'itsdangerous>=0.21', - 'click>=4.0', + 'Werkzeug>=0.14', + 'Jinja2>=2.10', + 'itsdangerous>=0.24', + 'click>=5.1', ], extras_require={ 'dotenv': ['python-dotenv'], 'dev': [ - 'blinker', - 'python-dotenv', - 'greenlet', 'pytest>=3', 'coverage', 'tox', 'sphinx', - 'sphinxcontrib-log-cabinet' ], }, classifiers=[ - 'Development Status :: 4 - Beta', + 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', + 'Framework :: Flask', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', @@ -101,10 +99,13 @@ setup( 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', - 'Topic :: Software Development :: Libraries :: Python Modules' + 'Topic :: Internet :: WWW/HTTP :: WSGI :: Application', + 'Topic :: Software Development :: Libraries :: Application Frameworks', + 'Topic :: Software Development :: Libraries :: Python Modules', ], - entry_points=''' - [console_scripts] - flask=flask.cli:main - ''' + entry_points={ + 'console_scripts': [ + 'flask = flask.cli:main', + ], + }, ) diff --git a/tox.ini b/tox.ini index a88f5fff..d74c8758 100644 --- a/tox.ini +++ b/tox.ini @@ -17,9 +17,9 @@ deps = python-dotenv lowest: Werkzeug==0.14 - lowest: Jinja2==2.4 - lowest: itsdangerous==0.21 - lowest: Click==4.0 + lowest: Jinja2==2.10 + lowest: itsdangerous==0.24 + lowest: Click==5.1 devel: https://github.com/pallets/werkzeug/archive/master.tar.gz devel: https://github.com/pallets/markupsafe/archive/master.tar.gz