Merge pull request #1638 from efahl/patch-1

Eliminate deprecation warning
This commit is contained in:
Robin Dunn
2020-05-20 14:15:16 -07:00
committed by GitHub

View File

@@ -3,7 +3,7 @@
__author__ = "Patrick K. O'Brien <pobrien@orbtech.com>"
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: