Skip to content

Commit 5fa0830

Browse files
committed
build: replace distutils with setuptools
1 parent de1fcfb commit 5fa0830

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

pdm.lock

Lines changed: 12 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pydumpling/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def validate_file_name(file_name: str) -> str:
1111
if not file_name.endswith(DUMP_FILE_EXTENSION):
1212
raise argparse.ArgumentTypeError("File must be .dump file")
1313
if not os.path.exists(file_name):
14-
raise argparse.ArgumentTypeError(f"File {file_name} not found")
14+
raise argparse.ArgumentTypeError(f"File {file_name} not found")
1515
return file_name
1616

1717

pydumpling/debug_dumpling.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import pdb
55
import dill
66
import pickle
7-
from distutils.version import StrictVersion
7+
from packaging.version import parse
88
import inspect
99
import types
1010
from .fake_types import FakeFrame, FakeTraceback, FakeCode
@@ -26,7 +26,7 @@ def debug_dumpling(dump_file, pdb=pdb):
2626
inspect.iscode = lambda obj: isinstance(
2727
obj, types.CodeType) or obj.__class__ == FakeCode
2828
dumpling = load_dumpling(dump_file)
29-
if not StrictVersion("0.0.1") <= StrictVersion(dumpling["version"]) < StrictVersion("1.0.0"):
29+
if not parse("0.0.1") <= parse(dumpling["version"]) < parse("1.0.0"):
3030
raise ValueError("Unsupported dumpling version: %s" %
3131
dumpling["version"])
3232
tb = dumpling["traceback"]

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ authors = [
2828
dependencies = [
2929
"dill<1.0.0,>=0.3.2",
3030
"six<2.0.0,>=1.16.0",
31+
"setuptools>=68.0.0",
3132
]
3233
requires-python = ">=3.7"
3334
readme = "README.md"

0 commit comments

Comments
 (0)