diff --git a/PKG-INFO b/PKG-INFO index 69aea8e..24cc8c1 100644 --- a/PKG-INFO +++ b/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: PasteDeploy -Version: 1.3 +Version: 1.3.1 Summary: Load, configure, and compose WSGI applications and servers Home-page: http://pythonpaste.org/deploy/ Author: Ian Bicking diff --git a/PasteDeploy.egg-info/PKG-INFO b/PasteDeploy.egg-info/PKG-INFO index 69aea8e..24cc8c1 100644 --- a/PasteDeploy.egg-info/PKG-INFO +++ b/PasteDeploy.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: PasteDeploy -Version: 1.3 +Version: 1.3.1 Summary: Load, configure, and compose WSGI applications and servers Home-page: http://pythonpaste.org/deploy/ Author: Ian Bicking diff --git a/docs/news.txt b/docs/news.txt index 4427640..df1ae24 100644 --- a/docs/news.txt +++ b/docs/news.txt @@ -1,8 +1,15 @@ Paste Deployment News ===================== -svn trunk ---------- +1.3.1 +----- + +* Fix ``appconfig`` config loading when using a config file with + ``filter-with`` in it (previously you'd get TypeError: iteration + over non-sequence) + +1.3 +--- * Added ``scheme`` option to ``PrefixMiddleware``, so you can force a scheme (E.g., when proxying an HTTPS connection over HTTP). diff --git a/paste/deploy/loadwsgi.py b/paste/deploy/loadwsgi.py index 3894bec..3bb820f 100644 --- a/paste/deploy/loadwsgi.py +++ b/paste/deploy/loadwsgi.py @@ -317,7 +317,7 @@ class ConfigLoader(_Loader): def __init__(self, filename): - self.filename = filename + self.filename = filename = filename.strip() self.parser = NicerConfigParser(self.filename) # Don't lower-case keys: self.parser.optionxform = str @@ -325,7 +325,7 @@ # we have to add an extra check: if not os.path.exists(filename): raise OSError( - "File %s not found" % filename) + "File %r not found" % filename) self.parser.read(filename) self.parser._defaults.setdefault( 'here', os.path.dirname(os.path.abspath(filename))) @@ -400,7 +400,7 @@ obj=None, object_type=FILTER_WITH, protocol=None, - global_conf=None, local_conf=None, + global_conf=global_conf, local_conf=local_conf, loader=self) filter_with_context.filter_context = self.filter_context( name=filter_with, global_conf=global_conf) diff --git a/setup.cfg b/setup.cfg index 2637508..57c451d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,19 +1,22 @@ [pudge] highlighter = pygments +title = Paste Deploy +dest = docs/html +docs = docs/index.txt docs/news.txt settings = no_about=true link1=/deploy/ paste.deploy link2=/script/ paster script link3=/download/ Download extra_credits=Hosting courtesy of Tummy.com -dest = docs/html -docs = docs/index.txt docs/news.txt -title = Paste Deploy modules = paste.deploy theme = pythonpaste.org mailing_list_url = http://pythonpaste.org/community/mailing-list.html organization = Python Paste organization_url = http://pythonpaste.org/ trac_url = http://pythonpaste.org/trac/ + +[global] +command_packages = buildutils.pudge_command, buildutils.publish_command [egg_info] tag_build = @@ -25,3 +28,6 @@ make-dirs = 1 doc-dir = docs/html +[aliases] +distribute = register sdist bdist_egg upload pudge publish + diff --git a/setup.py b/setup.py index dc6dc67..c85bfe9 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import setup, find_packages -version = '1.3' +version = '1.3.1' setup( name="PasteDeploy", diff --git a/tests/sample_configs/test_filter_with.ini b/tests/sample_configs/test_filter_with.ini index ec6592b..118804f 100644 --- a/tests/sample_configs/test_filter_with.ini +++ b/tests/sample_configs/test_filter_with.ini @@ -1,5 +1,6 @@ [app:main] use = egg:FakeApp#basic_app +example = test filter-with = filter1 [filter:filter1] diff --git a/tests/test_config.py b/tests/test_config.py index cf19cf5..6fffe82 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -94,6 +94,10 @@ 'here': config_path, '__file__': config_filename,} +def test_appconfig_filter_with(): + conf = appconfig('config:test_filter_with.ini', relative_to=config_path) + assert conf['example'] == 'test' + def test_global_conf(): conf = appconfig(ini_file, relative_to=here, name='test_global_conf', global_conf={'def2': 'TEST DEF 2', 'inherit': 'bazbar'}) pprint(conf)