Skip to content

Commit

Permalink
Replace usages of the imp module (mhammond#2113)
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam authored Sep 21, 2023
1 parent 4445881 commit 03a8bb1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions com/win32comext/axscript/client/pyscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"""

import re
import types

import pythoncom
import win32api
Expand Down Expand Up @@ -210,10 +211,9 @@ def __init__(self):

def InitNew(self):
framework.COMScript.InitNew(self)
import imp

self.scriptDispatch = None
self.globalNameSpaceModule = imp.new_module("__ax_main__")
self.globalNameSpaceModule = types.ModuleType("__ax_main__")
self.globalNameSpaceModule.__dict__["ax"] = AXScriptAttribute(self)

self.codeBlocks = []
Expand Down
4 changes: 2 additions & 2 deletions isapi/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# this code adapted from "Tomcat JK2 ISAPI redirector", part of Apache
# Created July 2004, Mark Hammond.
import imp
import importlib.machinery
import os
import shutil
import stat
Expand Down Expand Up @@ -39,7 +39,7 @@
_DEFAULT_ENABLE_DIR_BROWSING = False
_DEFAULT_ENABLE_DEFAULT_DOC = False

_extensions = [ext for ext, _, _ in imp.get_suffixes()]
_extensions = [ext for ext, _, _ in importlib.machinery.EXTENSION_SUFFIXES]
is_debug_build = "_d.pyd" in _extensions

this_dir = os.path.abspath(os.path.dirname(__file__))
Expand Down

0 comments on commit 03a8bb1

Please sign in to comment.