Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
120a841e
Commit
120a841e
authored
Feb 10, 2020
by
Matti Picus
Committed by
Stefan Behnel
Feb 12, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove deprecated import of imp module (#3350)
parent
6496c017
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
Cython/Build/Inline.py
Cython/Build/Inline.py
+9
-1
No files found.
Cython/Build/Inline.py
View file @
120a841e
...
@@ -35,6 +35,14 @@ if sys.version_info[0] < 3:
...
@@ -35,6 +35,14 @@ if sys.version_info[0] < 3:
else
:
else
:
to_unicode
=
lambda
x
:
x
to_unicode
=
lambda
x
:
x
if
sys
.
version_info
[:
2
]
<
(
3
,
3
):
import
imp
def
load_dynamic
(
name
,
module_path
):
return
imp
.
load_dynamic
(
name
,
module_path
)
else
:
from
importlib.machinery
import
ExtensionFileLoader
def
load_dynamic
(
name
,
module_path
):
return
ExtensionFileLoader
(
name
,
module_path
).
load_module
()
class
UnboundSymbols
(
EnvTransform
,
SkipDeclarations
):
class
UnboundSymbols
(
EnvTransform
,
SkipDeclarations
):
def
__init__
(
self
):
def
__init__
(
self
):
...
@@ -249,7 +257,7 @@ def __invoke(%(params)s):
...
@@ -249,7 +257,7 @@ def __invoke(%(params)s):
build_extension.build_lib = lib_dir
build_extension.build_lib = lib_dir
build_extension.run()
build_extension.run()
module =
imp.
load_dynamic(module_name, module_path)
module = load_dynamic(module_name, module_path)
_cython_inline_cache[orig_code, arg_sigs] = module.__invoke
_cython_inline_cache[orig_code, arg_sigs] = module.__invoke
arg_list = [kwds[arg] for arg in arg_names]
arg_list = [kwds[arg] for arg in arg_names]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment