Skip to content

Commit 4c0e09b

Browse files
Use sysconfig instead of distutils for Python 3.10 compatability (#2100)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent c5e7869 commit 4c0e09b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

docs/changelog/2100.misc.rst

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
``tox`` no longer shows deprecation warnings for ``distutils.sysconfig`` on
2+
Python 3.10 - by :user:`9999years`
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from __future__ import unicode_literals
22

3-
import distutils.sysconfig
43
import json
54
import sys
5+
import sysconfig
66

7-
data = json.dumps({"dir": distutils.sysconfig.get_python_lib(prefix=sys.argv[1])})
7+
data = json.dumps({"dir": sysconfig.get_path("purelib", vars={"base": sys.argv[1]})})
88
print(data)

0 commit comments

Comments
 (0)