importlib deprecated in 3.5.
Replace the use of importlib by types.ModuleType that seem to be available since at least 2.6 closes gh-1449
This commit is contained in:
parent
73c833568d
commit
2de525c720
2 changed files with 4 additions and 4 deletions
|
|
@ -9,8 +9,8 @@
|
|||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
import imp
|
||||
import os
|
||||
import types
|
||||
import errno
|
||||
|
||||
from werkzeug.utils import import_string
|
||||
|
|
@ -123,7 +123,7 @@ class Config(dict):
|
|||
`silent` parameter.
|
||||
"""
|
||||
filename = os.path.join(self.root_path, filename)
|
||||
d = imp.new_module('config')
|
||||
d = types.ModuleType('config')
|
||||
d.__file__ = filename
|
||||
try:
|
||||
with open(filename) as config_file:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue