Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated imp module #81

Merged
merged 1 commit into from
Nov 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# - git commit -a -m "post-release"
# - git push

from imp import load_source
import importlib.util
from os import path
try:
# setuptools supports bdist_wheel
Expand All @@ -55,7 +55,10 @@
with open('README.rst') as fp:
LONG_DESCRIPTION = fp.read()

ptrace = load_source("version", path.join("ptrace", "version.py"))
ptrace_spec = importlib.util.spec_from_file_location("version", path.join("ptrace", "version.py"))
ptrace = importlib.util.module_from_spec(ptrace_spec)
ptrace_spec.loader.exec_module(ptrace)

PACKAGES = {}
for name in MODULES:
PACKAGES[name] = name.replace(".", "/")
Expand Down
Loading