File: drop_distutils.patch

package info (click to toggle)
pydevd 3.4.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,892 kB
  • sloc: python: 77,580; cpp: 1,873; sh: 374; makefile: 50; ansic: 4
file content (61 lines) | stat: -rw-r--r-- 2,143 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
From: Julian Gilbey <jdg@debian.org>
Date: Tue, 28 Oct 2025 12:16:56 -0700
Subject: Drop usage of deprecated distutils package

Forwarded: https://github.com/fabioz/PyDev.Debugger/pull/301
Last-Update: 2025-02-24

 The pull request uses packaging.version.Version instead of
 distutils.version.LooseVersion, but as explained there, the version
 check is unnecessary and is not included here.
---
 pydev_ipython/inputhook.py | 6 ------
 setup.py                   | 3 +--
 setup_pydevd_cython.py     | 2 +-
 3 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/pydev_ipython/inputhook.py b/pydev_ipython/inputhook.py
index db606e3..54aab40 100644
--- a/pydev_ipython/inputhook.py
+++ b/pydev_ipython/inputhook.py
@@ -147,12 +147,6 @@ class InputHookManager(object):
             app = wx.App(redirect=False, clearSigInt=False)
         """
         import wx
-        from distutils.version import LooseVersion as V
-
-        wx_version = V(wx.__version__).version  # @UndefinedVariable
-
-        if wx_version < [2, 8]:
-            raise ValueError("requires wxPython >= 2.8, but you have %s" % wx.__version__)  # @UndefinedVariable
 
         from pydev_ipython.inputhookwx import inputhook_wx
 
diff --git a/setup.py b/setup.py
index 456a69b..72141fb 100644
--- a/setup.py
+++ b/setup.py
@@ -21,9 +21,8 @@ build_tools\pydevd_release_process.txt
 for release process.
 """
 
-from setuptools import setup
+from setuptools import Extension, setup
 from setuptools.dist import Distribution
-from distutils.extension import Extension
 import os
 
 
diff --git a/setup_pydevd_cython.py b/setup_pydevd_cython.py
index 14f73f4..5d6ca0d 100644
--- a/setup_pydevd_cython.py
+++ b/setup_pydevd_cython.py
@@ -181,7 +181,7 @@ def build_extension(dir_name, extension_name, target_pydevd_name, force_cython,
                     stream.write(c_file_contents)
 
         # Always compile the .c (and not the .pyx) file (which we should keep up-to-date by running build_tools/build.py).
-        from distutils.extension import Extension
+        from setuptools import Extension
 
         extra_compile_args = []
         extra_link_args = []