mirror of
https://github.com/powerline/powerline.git
synced 2025-07-23 13:55:45 +02:00
Remove imp module from tests to make them compatible with python 3.12 (#2251)
This commit is contained in:
parent
14cc0d2df8
commit
c04a8dd5a1
@ -1,7 +1,6 @@
|
||||
# vim:fileencoding=utf-8:noet
|
||||
from __future__ import (unicode_literals, division, absolute_import, print_function)
|
||||
|
||||
import imp
|
||||
import sys
|
||||
|
||||
|
||||
@ -100,7 +99,7 @@ def replace_module(name, new=None, **kwargs):
|
||||
|
||||
|
||||
def new_module(name, **kwargs):
|
||||
module = imp.new_module(name)
|
||||
module = types.ModuleType(name)
|
||||
for k, v in kwargs.items():
|
||||
setattr(module, k, v)
|
||||
return module
|
||||
|
Loading…
x
Reference in New Issue
Block a user