ported some more stuff to py 3.3

removed init_jinja_globals hack from app.py after consulting mitsuhiko
(didn't work on py 3.3 "as is")

removed with_statement future imports, not needed any more

needs more work on 2.7 as well as on 3.3
This commit is contained in:
Thomas Waldmann 2013-05-22 01:33:04 +02:00
parent a503520ac5
commit e1d356fb71
24 changed files with 36 additions and 87 deletions

View file

@ -9,13 +9,12 @@
:license: BSD, see LICENSE for more details.
"""
from __future__ import with_statement
import imp
import os
import errno
from werkzeug.utils import import_string
from flask._compat import string_types
class ConfigAttribute(object):
@ -158,7 +157,7 @@ class Config(dict):
:param obj: an import name or object
"""
if isinstance(obj, basestring):
if isinstance(obj, string_types):
obj = import_string(obj)
for key in dir(obj):
if key.isupper():