From 381477f0ab37baafa9c41ee3e04d4fd44b37eb3b Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Tue, 28 Jun 2011 23:36:39 +0200 Subject: [PATCH 1/7] Added changelog entry --- CHANGES | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES b/CHANGES index e02a393b..1e559167 100644 --- a/CHANGES +++ b/CHANGES @@ -3,6 +3,13 @@ Flask Changelog Here you can see the full list of changes between each Flask release. +Version 0.7.1 +------------- + +Bugfix release, release date to be decided. + +- Added missing future import that broke 2.5 compatibility. + Version 0.7 ----------- From c84e1f7855e3903a91151cd8b66e76e22b0ee1a1 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Tue, 28 Jun 2011 23:37:03 +0200 Subject: [PATCH 2/7] Bumped version number for this branch to 0.7.1 --- flask/__init__.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flask/__init__.py b/flask/__init__.py index 1c5e3ba2..e675eacf 100644 --- a/flask/__init__.py +++ b/flask/__init__.py @@ -10,7 +10,7 @@ :license: BSD, see LICENSE for more details. """ -__version__ = '0.8-dev' +__version__ = '0.7.1-dev' # utilities we import from Werkzeug and Jinja2 that are unused # in the module but are exported as public interface. diff --git a/setup.py b/setup.py index 1809e05e..7d2d4158 100644 --- a/setup.py +++ b/setup.py @@ -86,7 +86,7 @@ def run_tests(): setup( name='Flask', - version='0.8-dev', + version='0.7.1-dev', url='http://github.com/mitsuhiko/flask/', license='BSD', author='Armin Ronacher', From 988143b07ba4b3ff373a57e5e7941889fce3a142 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Wed, 29 Jun 2011 18:31:48 +0200 Subject: [PATCH 3/7] Worked around a werkzeug bug with redirects Signed-off-by: Armin Ronacher --- CHANGES | 1 + flask/app.py | 6 ++++++ tests/flask_tests.py | 15 +++++++++++++++ 3 files changed, 22 insertions(+) diff --git a/CHANGES b/CHANGES index 1e559167..e611c4ab 100644 --- a/CHANGES +++ b/CHANGES @@ -9,6 +9,7 @@ Version 0.7.1 Bugfix release, release date to be decided. - Added missing future import that broke 2.5 compatibility. +- Fixed an infinite redirect issue with blueprints. Version 0.7 ----------- diff --git a/flask/app.py b/flask/app.py index eb7ba023..dff4272b 100644 --- a/flask/app.py +++ b/flask/app.py @@ -706,6 +706,12 @@ class Flask(_PackageBoundObject): if 'OPTIONS' not in methods: methods = tuple(methods) + ('OPTIONS',) provide_automatic_options = True + + # due to a werkzeug bug we need to make sure that the defaults are + # None if they are an empty dictionary. This should not be necessary + # with Werkzeug 0.7 + options['defaults'] = options.get('defaults') or None + rule = self.url_rule_class(rule, methods=methods, **options) rule.provide_automatic_options = provide_automatic_options self.url_map.add(rule) diff --git a/tests/flask_tests.py b/tests/flask_tests.py index e04c2458..fc99cd16 100644 --- a/tests/flask_tests.py +++ b/tests/flask_tests.py @@ -1364,6 +1364,21 @@ class BlueprintTestCase(unittest.TestCase): self.assertEqual(c.get('/fe2').data.strip(), '/fe') self.assertEqual(c.get('/be').data.strip(), '/fe') + def test_empty_url_defaults(self): + bp = flask.Blueprint('bp', __name__) + + @bp.route('/', defaults={'page': 1}) + @bp.route('/page/') + def something(page): + return str(page) + + app = flask.Flask(__name__) + app.register_blueprint(bp) + + c = app.test_client() + self.assertEqual(c.get('/').data, '1') + self.assertEqual(c.get('/page/2').data, '2') + class SendfileTestCase(unittest.TestCase): From 2295bd072e56fb13998f57f7ecea325e39a6983c Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Wed, 29 Jun 2011 18:35:11 +0200 Subject: [PATCH 4/7] Fixed a bug in the release script --- scripts/make-release.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/make-release.py b/scripts/make-release.py index 9955b13e..301e4d6d 100644 --- a/scripts/make-release.py +++ b/scripts/make-release.py @@ -33,7 +33,7 @@ def parse_changelog(): if change_info: break - match = re.match(r'^released on (\w+\s+\d+\w+\s+\d+)' + match = re.match(r'released on (\w+\s+\d+\w+\s+\d+)' r'(?:, codename (.*))?(?i)', change_info) if match is None: continue From c0a9ec43a14b5d52eb70ef4e366f622f6e666d5d Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Wed, 29 Jun 2011 18:35:31 +0200 Subject: [PATCH 5/7] Added release date for 0.7.1 --- CHANGES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index e611c4ab..277fe11b 100644 --- a/CHANGES +++ b/CHANGES @@ -6,7 +6,7 @@ Here you can see the full list of changes between each Flask release. Version 0.7.1 ------------- -Bugfix release, release date to be decided. +Bugfix release, released on June 29th 2011 - Added missing future import that broke 2.5 compatibility. - Fixed an infinite redirect issue with blueprints. From 1033a9757d4a51f4ab53501ee6bcd805a4ddc91a Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Wed, 29 Jun 2011 18:37:08 +0200 Subject: [PATCH 6/7] Another fix for the script --- scripts/make-release.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/make-release.py b/scripts/make-release.py index 301e4d6d..574cb75d 100644 --- a/scripts/make-release.py +++ b/scripts/make-release.py @@ -33,8 +33,8 @@ def parse_changelog(): if change_info: break - match = re.match(r'released on (\w+\s+\d+\w+\s+\d+)' - r'(?:, codename (.*))?(?i)', change_info) + match = re.search(r'released on (\w+\s+\d+\w+\s+\d+)' + r'(?:, codename (.*))?(?i)', change_info) if match is None: continue From 9682d6b371d8c1ce1fd0e58424e836d27d2317b3 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Wed, 29 Jun 2011 18:37:22 +0200 Subject: [PATCH 7/7] Bump version number to 0.7.1 --- flask/__init__.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flask/__init__.py b/flask/__init__.py index e675eacf..45aa84d7 100644 --- a/flask/__init__.py +++ b/flask/__init__.py @@ -10,7 +10,7 @@ :license: BSD, see LICENSE for more details. """ -__version__ = '0.7.1-dev' +__version__ = '0.7.1' # utilities we import from Werkzeug and Jinja2 that are unused # in the module but are exported as public interface. diff --git a/setup.py b/setup.py index 7d2d4158..5b47f060 100644 --- a/setup.py +++ b/setup.py @@ -86,7 +86,7 @@ def run_tests(): setup( name='Flask', - version='0.7.1-dev', + version='0.7.1', url='http://github.com/mitsuhiko/flask/', license='BSD', author='Armin Ronacher',