Skip to content
Myr

Do not set dotted attributes on flask.ext

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent e8020e2 · Browse files · 2 files+7 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+7 added−1 removed

  • other:+7 added−1 removed

2 files+7 added−1 removed

modified:flask/ext/__init__.py+2 added-1 removed
56 unmodified lines
57 __import__(realname)58 except ImportError:59 continue60 module = modules[fullname] = modules[realname]61 if '.' not in modname:61 setattr(modules[__name__], modname, module)62 setattr(modules[__name__], modname, module)63 return module64 raise ImportError(fullname)6566
2 unmodified lines
modified:flask/testsuite/ext.py+5 added
29 unmodified lines
30 cls.__name__ == '_ExtensionImporter':31 import_hooks += 132 self.assert_equal(import_hooks, 1)3334 def teardown(self):35 from flask import ext36 for key in ext.__dict__:37 self.assert_('.' not in key)3839 def test_flaskext_new_simple_import_normal(self):40 from flask.ext.newext_simple import ext_id41 self.assert_equal(ext_id, 'newext_simple')42
47 unmodified lines