From 2e83bd1f502f9cc745d1928a27a24ab592eccc14 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Fri, 28 May 2010 20:48:21 +0200 Subject: [PATCH 1/5] This branch will be 0.3.1 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 66ef6a66..47b6c3d7 100644 --- a/setup.py +++ b/setup.py @@ -43,7 +43,7 @@ from setuptools import setup setup( name='Flask', - version='0.4', + version='0.3.1', url='http://github.com/mitsuhiko/flask/', license='BSD', author='Armin Ronacher', From 218178164f68562a1f368ff925ec508999731cc5 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Fri, 28 May 2010 21:06:39 +0200 Subject: [PATCH 2/5] Fixed an error reporting bug with flask.Config.from_envvar --- CHANGES | 7 +++++++ flask.py | 3 ++- tests/flask_tests.py | 20 ++++++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index d01577cc..451ec9af 100644 --- a/CHANGES +++ b/CHANGES @@ -8,6 +8,13 @@ Version 0.4 Release date to be announced, codename to be selected. +Version 0.3.1 +------------- + +Bugfix release, released May 28th + +- fixed a error reporting bug with :meth:`flask.Config.from_envvar` + Version 0.3 ----------- diff --git a/flask.py b/flask.py index 5e3367bb..a8e06bd3 100644 --- a/flask.py +++ b/flask.py @@ -698,7 +698,8 @@ class Config(dict): raise RuntimeError('The environment variable %r is not set ' 'and as such configuration could not be ' 'loaded. Set this variable and make it ' - 'point to a configuration file') + 'point to a configuration file' % + variable_name) self.from_pyfile(rv) return True diff --git a/tests/flask_tests.py b/tests/flask_tests.py index 3673453a..ff95364f 100644 --- a/tests/flask_tests.py +++ b/tests/flask_tests.py @@ -717,6 +717,26 @@ class ConfigTestCase(unittest.TestCase): app.config.from_object(Test) self.common_object_test(app) + def test_config_from_envvar(self): + import os + env = os.environ + try: + os.environ = {} + app = flask.Flask(__name__) + try: + app.config.from_envvar('FOO_SETTINGS') + except RuntimeError, e: + assert "'FOO_SETTINGS' is not set" in str(e) + else: + assert 0, 'expected exception' + not app.config.from_envvar('FOO_SETTINGS', silent=True) + + os.environ = {'FOO_SETTINGS': 'flask_tests.py'} + assert app.config.from_envvar('FOO_SETTINGS') + self.common_object_test(app) + finally: + os.environ = env + def suite(): from minitwit_tests import MiniTwitTestCase From a1cd92e459ba5b481d183d3923e8829fec988775 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Fri, 28 May 2010 21:07:06 +0200 Subject: [PATCH 3/5] Removed some unused code --- flask.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/flask.py b/flask.py index a8e06bd3..bf4451c7 100644 --- a/flask.py +++ b/flask.py @@ -1424,8 +1424,3 @@ current_app = LocalProxy(lambda: _request_ctx_stack.top.app) request = LocalProxy(lambda: _request_ctx_stack.top.request) session = LocalProxy(lambda: _request_ctx_stack.top.session) g = LocalProxy(lambda: _request_ctx_stack.top.g) - - -# script interface to run a development server -if __name__ == '__main__': - sys.exit(main(sys.argv)) From bf2b2f25f93f068792415cacf0917d7192a2d89d Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Fri, 28 May 2010 21:07:28 +0200 Subject: [PATCH 4/5] Added missing message --- CHANGES | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES b/CHANGES index 451ec9af..d3fac153 100644 --- a/CHANGES +++ b/CHANGES @@ -14,6 +14,7 @@ Version 0.3.1 Bugfix release, released May 28th - fixed a error reporting bug with :meth:`flask.Config.from_envvar` +- removed some unused code from flask Version 0.3 ----------- From 6b3e616cf905fd19c37fca93d1198cad1490567b Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Fri, 28 May 2010 21:21:28 +0200 Subject: [PATCH 5/5] Fixed build process --- CHANGES | 3 +++ MANIFEST.in | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index d3fac153..98e94a1d 100644 --- a/CHANGES +++ b/CHANGES @@ -15,6 +15,9 @@ Bugfix release, released May 28th - fixed a error reporting bug with :meth:`flask.Config.from_envvar` - removed some unused code from flask +- release does no longer include development leftover files (.git + folder for themes, built documentation in zip and pdf file and + some .pyc files) Version 0.3 ----------- diff --git a/MANIFEST.in b/MANIFEST.in index aee76e91..709e1791 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,10 @@ include Makefile CHANGES LICENSE AUTHORS recursive-include tests * +recursive-include examples * recursive-include docs * -prune docs/_build/doctrees +recursive-exclude docs *.pyc +recursive-exclude docs *.pyo +recursive-exclude examples *.pyc +recursive-exclude examples *.pyo +prune docs/_build +prune docs/_themes/.git