From 2c571edc23058def97326744ffe409042e48e9af Mon Sep 17 00:00:00 2001 From: efahl <36704995+efahl@users.noreply.github.com> Date: Thu, 14 May 2020 12:00:56 -0700 Subject: [PATCH] Eliminate deprecation warning Remove import of 'imp' module to eliminate deprecation warning. --- wx/py/buffer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wx/py/buffer.py b/wx/py/buffer.py index 87db6084..8ef2b627 100644 --- a/wx/py/buffer.py +++ b/wx/py/buffer.py @@ -3,7 +3,7 @@ __author__ = "Patrick K. O'Brien " from .interpreter import Interpreter -import imp +import types import os import sys @@ -111,7 +111,7 @@ class Buffer: text = text.replace('\r\n', '\n') text = text.replace('\r', '\n') name = self.modulename or self.name - module = imp.new_module(name) + module = types.ModuleType(name) newspace = module.__dict__.copy() try: try: