From 3f81582d5dc75537dcedfd5f9b6dd36715a12d91 Mon Sep 17 00:00:00 2001 From: David Lord Date: Thu, 26 Apr 2018 15:15:55 -0700 Subject: [PATCH 01/23] fix docs index sidebar --- docs/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/conf.py b/docs/conf.py index 818315ec..cddb7c83 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -53,6 +53,7 @@ html_sidebars = { 'index': [ 'project.html', 'versions.html', + 'carbon_ads.html', 'searchbox.html', ], '**': [ From a2536e1bdb2e42656325a57d727da4b666e6390d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hampus=20Dunstr=C3=B6m?= Date: Fri, 27 Apr 2018 11:40:12 +0200 Subject: [PATCH 02/23] Added short note about Werkzeug redirect behaviour --- docs/api.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/api.rst b/docs/api.rst index 982c07ba..7b03a41a 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -719,6 +719,8 @@ definition for a URL that accepts an optional page:: This specifies that ``/users/`` will be the URL for page one and ``/users/page/N`` will be the URL for page `N`. +Note: Underlying behaviour in Werkzeug redirect URLs containing a default value to its simpler form with a 301 redirect. + Here are the parameters that :meth:`~flask.Flask.route` and :meth:`~flask.Flask.add_url_rule` accept. The only difference is that with the route parameter the view function is defined with the decorator From 4d4294e94e67f97101c7da39d1092ca9a6fd9e12 Mon Sep 17 00:00:00 2001 From: David Lord Date: Fri, 27 Apr 2018 07:34:20 -0700 Subject: [PATCH 03/23] format changelog --- CHANGES.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 9ad5bb36..94ccd88a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -9,7 +9,11 @@ Version 1.0.1 unreleased -- Fix registering partials (with no ``__name__``) as view functions +- Fix registering partials (with no ``__name__``) as view functions. + (`#2730`_) + +.. _#2730: https://github.com/pallets/flask/pull/2730 + Version 1.0 ----------- From a22d143f96ee3c7d14887e871b34a84683835a3f Mon Sep 17 00:00:00 2001 From: wim glenn Date: Thu, 26 Apr 2018 15:47:42 -0500 Subject: [PATCH 04/23] Add `python_requires` metadata for PyPI --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index a97d4212..f476c583 100755 --- a/setup.py +++ b/setup.py @@ -32,6 +32,7 @@ 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.14', 'Jinja2>=2.10', From 78b56dbf2cc5834eb66ae7634241eaf9da99b04b Mon Sep 17 00:00:00 2001 From: David Lord Date: Fri, 27 Apr 2018 07:41:19 -0700 Subject: [PATCH 05/23] Revert "Add `python_requires` metadata for PyPI" This reverts commit a22d143f96ee3c7d14887e871b34a84683835a3f. --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index f476c583..a97d4212 100755 --- a/setup.py +++ b/setup.py @@ -32,7 +32,6 @@ 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.14', 'Jinja2>=2.10', From 5d00869aa57ed50f4f10953efbc0f2b3a5fd3905 Mon Sep 17 00:00:00 2001 From: David Lord Date: Fri, 27 Apr 2018 09:53:29 -0700 Subject: [PATCH 06/23] expand explantion about default redirects --- docs/api.rst | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/api.rst b/docs/api.rst index 7b03a41a..cdb05638 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -717,9 +717,18 @@ definition for a URL that accepts an optional page:: pass This specifies that ``/users/`` will be the URL for page one and -``/users/page/N`` will be the URL for page `N`. +``/users/page/N`` will be the URL for page ``N``. -Note: Underlying behaviour in Werkzeug redirect URLs containing a default value to its simpler form with a 301 redirect. +If a URL contains a default value, it will be redirected to its simpler +form with a 301 redirect. In the above example, ``/users/page/1`` will +be redirected to ``/users/``. If your route handles ``GET`` and ``POST`` +requests, make sure the default route only handles ``GET``, as redirects +can't preserve form data. :: + + @app.route('/region/', defaults={'id': 1}) + @app.route('/region/', methods=['GET', 'POST']) + def region(id): + pass Here are the parameters that :meth:`~flask.Flask.route` and :meth:`~flask.Flask.add_url_rule` accept. The only difference is that From 9394c389bf02af8bb3dde20fb6363992a885690f Mon Sep 17 00:00:00 2001 From: Vik Date: Fri, 27 Apr 2018 15:37:13 +0100 Subject: [PATCH 07/23] Update config.rst Fix Debug Default: By default Debug is only True when ENV is 'development' --- docs/config.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/config.rst b/docs/config.rst index d521ab72..c2958bf7 100644 --- a/docs/config.rst +++ b/docs/config.rst @@ -112,7 +112,7 @@ The following configuration values are used internally by Flask: **Do not enable debug mode when deploying in production.** - Default: ``True`` if :data:`ENV` is ``'production'``, or ``False`` + Default: ``True`` if :data:`ENV` is ``'development'``, or ``False`` otherwise. .. py:data:: TESTING From 3666a584fd24dc14585648f215a82ce1e8b71baa Mon Sep 17 00:00:00 2001 From: Jesse Roberts Date: Fri, 27 Apr 2018 11:05:37 -0600 Subject: [PATCH 08/23] fix #2736 - allow lists to be passed through to response_class init --- flask/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flask/app.py b/flask/app.py index c482484b..2de526e2 100644 --- a/flask/app.py +++ b/flask/app.py @@ -1923,7 +1923,7 @@ class Flask(_PackageBoundObject): status = headers = None # unpack tuple returns - if isinstance(rv, (tuple, list)): + if isinstance(rv, tuple): len_rv = len(rv) # a 3-tuple is unpacked directly From 9b6878af5a31583c9ed177f4c63789a66acd89c7 Mon Sep 17 00:00:00 2001 From: Yao Long Date: Fri, 27 Apr 2018 15:28:38 +0800 Subject: [PATCH 09/23] document error on fileupload after file uploaded, it should redirect for uploaded_file page instead of upload page --- docs/patterns/fileuploads.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/patterns/fileuploads.rst b/docs/patterns/fileuploads.rst index 3f6ee937..fef92c57 100644 --- a/docs/patterns/fileuploads.rst +++ b/docs/patterns/fileuploads.rst @@ -65,7 +65,7 @@ the file and redirects the user to the URL for the uploaded file:: if file and allowed_file(file.filename): filename = secure_filename(file.filename) file.save(os.path.join(app.config['UPLOAD_FOLDER'], filename)) - return redirect(url_for('upload_file', + return redirect(url_for('uploaded_file', filename=filename)) return ''' From 4d0cdf95e616d09b9cab0cc35c11b1d3ba1a109e Mon Sep 17 00:00:00 2001 From: David Lord Date: Fri, 27 Apr 2018 12:27:31 -0700 Subject: [PATCH 10/23] merge slashes between blueprint prefix and rule --- flask/blueprints.py | 8 +++----- tests/test_blueprints.py | 19 ++++++++++++------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/flask/blueprints.py b/flask/blueprints.py index 0a6ccfb7..8311e580 100644 --- a/flask/blueprints.py +++ b/flask/blueprints.py @@ -49,12 +49,10 @@ class BlueprintSetupState(object): url_prefix = self.options.get('url_prefix') if url_prefix is None: url_prefix = self.blueprint.url_prefix - + if url_prefix: + url_prefix = url_prefix.rstrip('/') #: The prefix that should be used for all URLs defined on the #: blueprint. - if url_prefix and url_prefix[-1] == '/': - url_prefix = url_prefix[:-1] - self.url_prefix = url_prefix #: A dictionary with URL defaults that is added to each and every @@ -68,7 +66,7 @@ class BlueprintSetupState(object): blueprint's name. """ if self.url_prefix: - rule = self.url_prefix + rule + rule = '/'.join((self.url_prefix, rule.lstrip('/'))) options.setdefault('subdomain', self.subdomain) if endpoint is None: endpoint = _endpoint_from_view_func(view_func) diff --git a/tests/test_blueprints.py b/tests/test_blueprints.py index a2631241..46364cab 100644 --- a/tests/test_blueprints.py +++ b/tests/test_blueprints.py @@ -115,17 +115,22 @@ def test_blueprint_app_error_handling(app, client): assert client.get('/nope').data == b'you shall not pass' -def test_blueprint_prefix_slash(app, client): - bp = flask.Blueprint('test', __name__, url_prefix='/bar/') +@pytest.mark.parametrize(('prefix', 'rule', 'url'), ( + ('/foo/', '/bar', '/foo/bar'), + ('/foo/', 'bar', '/foo/bar'), + ('/foo', '/bar', '/foo/bar'), + ('/foo/', '//bar', '/foo/bar'), + ('/foo//', '/bar', '/foo/bar'), +)) +def test_blueprint_prefix_slash(app, client, prefix, rule, url): + bp = flask.Blueprint('test', __name__, url_prefix=prefix) - @bp.route('/foo') - def foo(): + @bp.route(rule) + def index(): return '', 204 app.register_blueprint(bp) - app.register_blueprint(bp, url_prefix='/spam/') - assert client.get('/bar/foo').status_code == 204 - assert client.get('/spam/foo').status_code == 204 + assert client.get(url).status_code == 204 def test_blueprint_url_defaults(app, client): From b573a86977161b93152dddb5bfc43195335b3c59 Mon Sep 17 00:00:00 2001 From: David Lord Date: Sat, 28 Apr 2018 06:51:08 -0700 Subject: [PATCH 11/23] trap key errors in debug, not all 400 errors --- flask/app.py | 10 ++++++++-- tests/test_basic.py | 25 +++++++++++++++++++------ 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/flask/app.py b/flask/app.py index 2de526e2..3c106ee8 100644 --- a/flask/app.py +++ b/flask/app.py @@ -1663,8 +1663,14 @@ class Flask(_PackageBoundObject): trap_bad_request = self.config['TRAP_BAD_REQUEST_ERRORS'] - # if unset, trap based on debug mode - if (trap_bad_request is None and self.debug) or trap_bad_request: + # if unset, trap key errors in debug mode + if ( + trap_bad_request is None and self.debug + and isinstance(e, BadRequestKeyError) + ): + return True + + if trap_bad_request: return isinstance(e, BadRequest) return False diff --git a/tests/test_basic.py b/tests/test_basic.py index 9d6c58c1..c0168ae3 100644 --- a/tests/test_basic.py +++ b/tests/test_basic.py @@ -1027,21 +1027,34 @@ def test_errorhandler_precedence(app, client): def test_trapping_of_bad_request_key_errors(app, client): - @app.route('/fail') + @app.route('/key') def fail(): flask.request.form['missing_key'] - rv = client.get('/fail') + @app.route('/abort') + def allow_abort(): + flask.abort(400) + + rv = client.get('/key') assert rv.status_code == 400 assert b'missing_key' not in rv.data + rv = client.get('/abort') + assert rv.status_code == 400 - app.config['TRAP_BAD_REQUEST_ERRORS'] = True - + app.debug = True with pytest.raises(KeyError) as e: - client.get("/fail") - + client.get("/key") assert e.errisinstance(BadRequest) assert 'missing_key' in e.value.description + rv = client.get('/abort') + assert rv.status_code == 400 + + app.debug = False + app.config['TRAP_BAD_REQUEST_ERRORS'] = True + with pytest.raises(KeyError): + client.get('/key') + with pytest.raises(BadRequest): + client.get('/abort') def test_trapping_of_all_http_exceptions(app, client): From bac5d6b9f458c7876163add793bdc53c2f8f413e Mon Sep 17 00:00:00 2001 From: Hsiaoming Yang Date: Fri, 27 Apr 2018 08:01:48 +0900 Subject: [PATCH 12/23] Use FLASK_DONT_LOAD_ENV flag to disable load .env --- flask/cli.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flask/cli.py b/flask/cli.py index b3a89968..74457d92 100644 --- a/flask/cli.py +++ b/flask/cli.py @@ -544,7 +544,10 @@ class FlaskGroup(AppGroup): # script that is loaded here also attempts to start a server. os.environ['FLASK_RUN_FROM_CLI'] = 'true' - if self.load_dotenv: + val = os.environ.get('FLASK_DONT_LOAD_ENV') + load_dotenv = not val or val in ('0', 'false', 'no') + + if self.load_dotenv and load_dotenv: load_dotenv() obj = kwargs.get('obj') From 5965cb7e1cfcaa329d811d133af373deb8090ec3 Mon Sep 17 00:00:00 2001 From: David Lord Date: Sat, 28 Apr 2018 08:07:53 -0700 Subject: [PATCH 13/23] rename to FLASK_SKIP_DOTENV, add docs, test --- docs/cli.rst | 24 ++++++++++++++++++++++++ flask/cli.py | 10 +++------- flask/helpers.py | 15 +++++++++++++++ tests/test_cli.py | 8 ++++++++ 4 files changed, 50 insertions(+), 7 deletions(-) diff --git a/docs/cli.rst b/docs/cli.rst index b857fe9b..7ce63fd2 100644 --- a/docs/cli.rst +++ b/docs/cli.rst @@ -201,6 +201,30 @@ These can be added to the ``.flaskenv`` file just like ``FLASK_APP`` to control default command options. +Disable dotenv +~~~~~~~~~~~~~~ + +The ``flask`` command will show a message if it detects dotenv files but +python-dotenv is not installed. + +.. code-block:: none + + flask run + * Tip: There are .env files present. Do "pip install python-dotenv" to use them. + +You can tell Flask not to load dotenv files even when python-dotenv is +installed by setting the ``FLASK_SKIP_DOTENV`` environment variable. +This can be useful if you want to load them manually, or if you're using +a project runner that loads them already. Keep in mind that the +environment variables must be set before the app loads or it won't +configure as expected. + +.. code-block:: none + + export FLASK_SKIP_DOTENV=1 + flask run + + Environment Variables From virtualenv ------------------------------------- diff --git a/flask/cli.py b/flask/cli.py index 74457d92..635abb13 100644 --- a/flask/cli.py +++ b/flask/cli.py @@ -28,7 +28,7 @@ from werkzeug.utils import import_string from . import __version__ from ._compat import getargspec, iteritems, reraise, text_type from .globals import current_app -from .helpers import get_debug_flag, get_env +from .helpers import get_debug_flag, get_env, get_load_dotenv try: import dotenv @@ -544,10 +544,7 @@ class FlaskGroup(AppGroup): # script that is loaded here also attempts to start a server. os.environ['FLASK_RUN_FROM_CLI'] = 'true' - val = os.environ.get('FLASK_DONT_LOAD_ENV') - load_dotenv = not val or val in ('0', 'false', 'no') - - if self.load_dotenv and load_dotenv: + if get_load_dotenv(self.load_dotenv): load_dotenv() obj = kwargs.get('obj') @@ -586,12 +583,11 @@ def load_dotenv(path=None): .. versionadded:: 1.0 """ - if dotenv is None: if path or os.path.exists('.env') or os.path.exists('.flaskenv'): click.secho( ' * Tip: There are .env files present.' - ' Do "pip install python-dotenv" to use them', + ' Do "pip install python-dotenv" to use them.', fg='yellow') return diff --git a/flask/helpers.py b/flask/helpers.py index 88f2302a..df0b91fc 100644 --- a/flask/helpers.py +++ b/flask/helpers.py @@ -68,6 +68,21 @@ def get_debug_flag(): return val.lower() not in ('0', 'false', 'no') +def get_load_dotenv(default=True): + """Get whether the user has disabled loading dotenv files by setting + :envvar:`FLASK_SKIP_DOTENV`. The default is ``True``, load the + files. + + :param default: What to return if the env var isn't set. + """ + val = os.environ.get('FLASK_SKIP_DOTENV') + + if not val: + return default + + return val.lower() in ('0', 'false', 'no') + + def _endpoint_from_view_func(view_func): """Internal helper that returns the default endpoint for a given function. This always is the function name. diff --git a/tests/test_cli.py b/tests/test_cli.py index f7755258..387eeeba 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -474,6 +474,14 @@ def test_dotenv_optional(monkeypatch): assert 'FOO' not in os.environ +@need_dotenv +def test_disable_dotenv_from_env(monkeypatch, runner): + monkeypatch.chdir(test_path) + monkeypatch.setitem(os.environ, 'FLASK_SKIP_DOTENV', '1') + runner.invoke(FlaskGroup()) + assert 'FOO' not in os.environ + + def test_run_cert_path(): # no key with pytest.raises(click.BadParameter): From 104808b480aa33ed4df47a9ff0c202d9e11b1306 Mon Sep 17 00:00:00 2001 From: Daiana Marasquin Date: Sun, 29 Apr 2018 17:24:00 -0300 Subject: [PATCH 14/23] fix syntax error and typo in quickstart.rst --- docs/quickstart.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/quickstart.rst b/docs/quickstart.rst index 50db1dff..8f055d40 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -293,7 +293,7 @@ Python shell. See :ref:`context-locals`. :: @app.route('/user/') def profile(username): - return '{}'s profile'.format(username) + return '{}\'s profile'.format(username) with app.test_request_context(): print(url_for('index')) @@ -315,6 +315,8 @@ a route only answers to ``GET`` requests. You can use the ``methods`` argument of the :meth:`~flask.Flask.route` decorator to handle different HTTP methods. :: + from flask import request + @app.route('/login', methods=['GET', 'POST']) def login(): if request.method == 'POST': @@ -323,7 +325,7 @@ of the :meth:`~flask.Flask.route` decorator to handle different HTTP methods. return show_the_login_form() If ``GET`` is present, Flask automatically adds support for the ``HEAD`` method -and handles ``HEAD`` requests according to the the `HTTP RFC`_. Likewise, +and handles ``HEAD`` requests according to the `HTTP RFC`_. Likewise, ``OPTIONS`` is automatically implemented for you. .. _HTTP RFC: https://www.ietf.org/rfc/rfc2068.txt From f13870731c100d3ed7daa5d96a75b697973def77 Mon Sep 17 00:00:00 2001 From: David Lord Date: Sun, 29 Apr 2018 15:32:12 -0700 Subject: [PATCH 15/23] allow empty prefix and no lead slash in bp route --- flask/blueprints.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flask/blueprints.py b/flask/blueprints.py index 8311e580..3bdb3d9e 100644 --- a/flask/blueprints.py +++ b/flask/blueprints.py @@ -65,7 +65,7 @@ class BlueprintSetupState(object): to the application. The endpoint is automatically prefixed with the blueprint's name. """ - if self.url_prefix: + if self.url_prefix is not None: rule = '/'.join((self.url_prefix, rule.lstrip('/'))) options.setdefault('subdomain', self.subdomain) if endpoint is None: From b147d42a275272e1e0c968b0f6c619030d95871a Mon Sep 17 00:00:00 2001 From: David Lord Date: Sun, 29 Apr 2018 18:22:05 -0700 Subject: [PATCH 16/23] release 0.12.4 --- CHANGES | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGES b/CHANGES index c3069100..0b497a2b 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,14 @@ Flask Changelog =============== +Version 0.12.4 +-------------- + +Released on April 29 2018 + +- Repackage 0.12.3 to fix package layout issue. (`#2728`_) + + Version 0.12.3 -------------- From 5beb3be536cc743962de6cd2bd95a6e036d11f52 Mon Sep 17 00:00:00 2001 From: David Lord Date: Sun, 29 Apr 2018 18:23:30 -0700 Subject: [PATCH 17/23] Bump version number to 0.12.4 --- flask/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flask/__init__.py b/flask/__init__.py index 268ecd0b..0f5da598 100644 --- a/flask/__init__.py +++ b/flask/__init__.py @@ -10,7 +10,7 @@ :license: BSD, see LICENSE for more details. """ -__version__ = '0.12.4.dev' +__version__ = '0.12.4' # utilities we import from Werkzeug and Jinja2 that are unused # in the module but are exported as public interface. From e8fd06a0a7611e4ac46a26cab79d3f16d2d72884 Mon Sep 17 00:00:00 2001 From: David Lord Date: Sun, 29 Apr 2018 18:24:00 -0700 Subject: [PATCH 18/23] Bump version number to 0.12.5.dev --- flask/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flask/__init__.py b/flask/__init__.py index 0f5da598..ade8fc78 100644 --- a/flask/__init__.py +++ b/flask/__init__.py @@ -10,7 +10,7 @@ :license: BSD, see LICENSE for more details. """ -__version__ = '0.12.4' +__version__ = '0.12.5.dev' # utilities we import from Werkzeug and Jinja2 that are unused # in the module but are exported as public interface. From 6e1e3e03ca188a4d9b3aef493e572157c8ae2313 Mon Sep 17 00:00:00 2001 From: David Lord Date: Sun, 29 Apr 2018 18:45:50 -0700 Subject: [PATCH 19/23] check FLASK_SKIP_DOTENV in app.run --- flask/app.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/flask/app.py b/flask/app.py index 3c106ee8..87c59003 100644 --- a/flask/app.py +++ b/flask/app.py @@ -27,9 +27,11 @@ from ._compat import integer_types, reraise, string_types, text_type from .config import Config, ConfigAttribute from .ctx import AppContext, RequestContext, _AppCtxGlobals from .globals import _request_ctx_stack, g, request, session -from .helpers import _PackageBoundObject, \ - _endpoint_from_view_func, find_package, get_env, get_debug_flag, \ - get_flashed_messages, locked_cached_property, url_for +from .helpers import ( + _PackageBoundObject, + _endpoint_from_view_func, find_package, get_env, get_debug_flag, + get_flashed_messages, locked_cached_property, url_for, get_load_dotenv +) from .logging import create_logger from .sessions import SecureCookieSessionInterface from .signals import appcontext_tearing_down, got_request_exception, \ @@ -904,7 +906,7 @@ class Flask(_PackageBoundObject): explain_ignored_app_run() return - if load_dotenv: + if get_load_dotenv(load_dotenv): cli.load_dotenv() # if set, let env vars override previous values From 7567cc0d92563f514ece89a32dc81a4b5630f4b0 Mon Sep 17 00:00:00 2001 From: David Lord Date: Sun, 29 Apr 2018 18:46:54 -0700 Subject: [PATCH 20/23] release 1.0.1 --- CHANGES.rst | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index c1d0275e..5bf4c9d2 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,12 +7,27 @@ Flask Changelog Version 1.0.1 ------------- -unreleased +Released on April 29 2018 - Fix registering partials (with no ``__name__``) as view functions. (`#2730`_) +- Don't treat lists returned from view functions the same as tuples. + Only tuples are interpreted as response data. (`#2736`_) +- Extra slashes between a blueprint's ``url_prefix`` and a route URL + are merged. This fixes some backwards compatibility issues with the + change in 1.0. (`#2731`_, `#2742`_) +- Only trap ``BadRequestKeyError`` errors in debug mode, not all + ``BadRequest`` errors. This allows ``abort(400)`` to continue + working as expected. (`#2735`_) +- The ``FLASK_SKIP_DOTENV`` environment variable can be set to ``1`` + to skip automatically loading dotenv files. (`#2722`_) +.. _#2722: https://github.com/pallets/flask/issues/2722 .. _#2730: https://github.com/pallets/flask/pull/2730 +.. _#2731: https://github.com/pallets/flask/issues/2731 +.. _#2735: https://github.com/pallets/flask/issues/2735 +.. _#2736: https://github.com/pallets/flask/issues/2736 +.. _#2742: https://github.com/pallets/flask/issues/2742 Version 1.0 @@ -224,6 +239,8 @@ Released on April 26th 2018 .. _#2691: https://github.com/pallets/flask/pull/2691 .. _#2693: https://github.com/pallets/flask/pull/2693 .. _#2709: https://github.com/pallets/flask/pull/2709 + + Version 0.12.4 -------------- From a15795c99e24c50e2dc85393a8904f3093742646 Mon Sep 17 00:00:00 2001 From: David Lord Date: Sun, 29 Apr 2018 19:08:16 -0700 Subject: [PATCH 21/23] Bump version number to 1.0.1 --- flask/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flask/__init__.py b/flask/__init__.py index 6e01caa9..a5a2f334 100644 --- a/flask/__init__.py +++ b/flask/__init__.py @@ -10,7 +10,7 @@ :license: BSD, see LICENSE for more details. """ -__version__ = '1.0.1.dev' +__version__ = '1.0.1' # utilities we import from Werkzeug and Jinja2 that are unused # in the module but are exported as public interface. From c9ab9ef5db0bfdec4eb3d819be6d10a365dd6ca6 Mon Sep 17 00:00:00 2001 From: David Lord Date: Sun, 29 Apr 2018 19:09:23 -0700 Subject: [PATCH 22/23] Bump version number to 1.0.2.dev --- flask/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flask/__init__.py b/flask/__init__.py index a5a2f334..497f687a 100644 --- a/flask/__init__.py +++ b/flask/__init__.py @@ -10,7 +10,7 @@ :license: BSD, see LICENSE for more details. """ -__version__ = '1.0.1' +__version__ = '1.0.2.dev' # utilities we import from Werkzeug and Jinja2 that are unused # in the module but are exported as public interface. From 4f155fb647bb9c5b7a17b13d2266522d97919229 Mon Sep 17 00:00:00 2001 From: David Lord Date: Sun, 29 Apr 2018 19:10:48 -0700 Subject: [PATCH 23/23] start 1.0.2 changelog --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 5bf4c9d2..5e0617ef 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,12 @@ Flask Changelog =============== +Version 1.0.2 +------------- + +Unreleased + + Version 1.0.1 -------------