From 36e68a439a073e927b1801704fc7921be58262e1 Mon Sep 17 00:00:00 2001 From: David Lord Date: Thu, 26 Apr 2018 12:22:45 -0700 Subject: [PATCH 1/7] release 1.0 --- CHANGES.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 5210a0d7..75d8a516 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,7 +7,7 @@ Flask Changelog Version 1.0 ----------- -unreleased +Released on April 26th 2018 - **Python 2.6 and 3.3 are no longer supported.** (`pallets/meta#24`_) - Bump minimum dependency versions to the latest stable versions: @@ -213,6 +213,8 @@ unreleased .. _#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.3 -------------- From 291f3c338c4d302dbde01ab9153a7817e5a780f5 Mon Sep 17 00:00:00 2001 From: David Lord Date: Thu, 26 Apr 2018 12:25:54 -0700 Subject: [PATCH 2/7] Bump version number to 1.0 --- flask/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flask/__init__.py b/flask/__init__.py index 9414ecee..c01533e7 100644 --- a/flask/__init__.py +++ b/flask/__init__.py @@ -10,7 +10,7 @@ :license: BSD, see LICENSE for more details. """ -__version__ = '1.0-dev' +__version__ = '1.0' # utilities we import from Werkzeug and Jinja2 that are unused # in the module but are exported as public interface. From d60f213fdbcf7fe0648a80fe6c23683377fd7c44 Mon Sep 17 00:00:00 2001 From: David Lord Date: Thu, 26 Apr 2018 12:31:25 -0700 Subject: [PATCH 3/7] Bump version number to 1.0.1.dev --- flask/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flask/__init__.py b/flask/__init__.py index c01533e7..6e01caa9 100644 --- a/flask/__init__.py +++ b/flask/__init__.py @@ -10,7 +10,7 @@ :license: BSD, see LICENSE for more details. """ -__version__ = '1.0' +__version__ = '1.0.1.dev' # utilities we import from Werkzeug and Jinja2 that are unused # in the module but are exported as public interface. From 987b0098d85aeef8493f3a6d779b11fed5660ca4 Mon Sep 17 00:00:00 2001 From: David Lord Date: Thu, 26 Apr 2018 13:06:15 -0700 Subject: [PATCH 4/7] fix docs logo --- docs/index.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index 0c1a39ca..64ed4e92 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -6,7 +6,6 @@ Welcome to Flask .. image:: _static/logo-full.png :alt: Flask: web development, one drop at a time :align: right - :align: right Welcome to Flask's documentation. Get started with :ref:`installation` and then get an overview with the :ref:`quickstart`. There is also a From 9ed0d068ca8c842dc8fd886aaca298029ce1b9fd Mon Sep 17 00:00:00 2001 From: David Lord Date: Thu, 26 Apr 2018 14:14:44 -0700 Subject: [PATCH 5/7] start 1.0.1 changelog --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 75d8a516..c6415447 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,12 @@ Flask Changelog =============== +Version 1.0.1 +------------- + +unreleased + + Version 1.0 ----------- From 8ceff653c58b7fb038b31ae96cc96fcad3999020 Mon Sep 17 00:00:00 2001 From: David Lord Date: Thu, 26 Apr 2018 15:15:31 -0700 Subject: [PATCH 6/7] fix docs index sidebar --- docs/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/conf.py b/docs/conf.py index e8c6b9a4..04172441 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -58,6 +58,7 @@ html_sidebars = { 'index': [ 'project.html', 'versions.html', + 'carbon_ads.html', 'searchbox.html', ], '**': [ From 6663bf1f7d5a43633e6434a5dd8ea8f8eccdd616 Mon Sep 17 00:00:00 2001 From: ThiefMaster Date: Fri, 27 Apr 2018 13:38:35 +0200 Subject: [PATCH 7/7] Fix registering partials as view functions --- CHANGES.rst | 1 + flask/blueprints.py | 2 +- tests/test_blueprints.py | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index c6415447..9ad5bb36 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -9,6 +9,7 @@ Version 1.0.1 unreleased +- Fix registering partials (with no ``__name__``) as view functions Version 1.0 ----------- diff --git a/flask/blueprints.py b/flask/blueprints.py index d633685f..0a6ccfb7 100644 --- a/flask/blueprints.py +++ b/flask/blueprints.py @@ -201,7 +201,7 @@ class Blueprint(_PackageBoundObject): """ if endpoint: assert '.' not in endpoint, "Blueprint endpoints should not contain dots" - if view_func: + if view_func and hasattr(view_func, '__name__'): assert '.' not in view_func.__name__, "Blueprint view function name should not contain dots" self.record(lambda s: s.add_url_rule(rule, endpoint, view_func, **options)) diff --git a/tests/test_blueprints.py b/tests/test_blueprints.py index 7984a815..a2631241 100644 --- a/tests/test_blueprints.py +++ b/tests/test_blueprints.py @@ -9,6 +9,7 @@ :license: BSD, see LICENSE for more details. """ +import functools import pytest import flask @@ -382,6 +383,8 @@ def test_route_decorator_custom_endpoint_with_dots(app, client): ) ) + bp.add_url_rule('/bar/456', endpoint='foofoofoo', view_func=functools.partial(foo_foo_foo)) + app.register_blueprint(bp, url_prefix='/py') assert client.get('/py/foo').data == b'bp.foo'