[PATCH 0/3] gnu: python-pydevd: Update to 2.9.6.

  • Open
  • quality assurance status badge
Details
2 participants
  • Maxim Cournoyer
  • Nicolas Graves
Owner
unassigned
Submitted by
Nicolas Graves
Severity
normal
Blocked by
N
N
Nicolas Graves wrote on 18 May 14:35 +0200
(address . guix-patches@gnu.org)(address . ngraves@ngraves.fr)
20240518123734.9898-1-ngraves@ngraves.fr
Nicolas Graves (3):
gnu: python-pydevd: Move to pyproject-build-system.
gnu: python-pydevd: Update to 2.9.6.
gnu: python-pydevd: Improve package style.

gnu/packages/python-xyz.scm | 210 ++++++++++++++++++------------------
1 file changed, 102 insertions(+), 108 deletions(-)

--
2.41.0
N
N
Nicolas Graves wrote on 18 May 14:43 +0200
[PATCH 1/3] gnu: python-pydevd: Move to pyproject-build-system.
(address . 71037@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240518124316.19861-1-ngraves@ngraves.fr
* gnu/packages/python-xyz.scm (python-pydevd):
[build-system]: Move to pyproject-build-system.
[arguments]: Replace 'check phase by 'pre-check phase and
<#:test-flags>.

Change-Id: I8227ac8b1b6031c30c6d09480cacaa3347df21a7
---
gnu/packages/python-xyz.scm | 46 ++++++++++++++++++-------------------
1 file changed, 23 insertions(+), 23 deletions(-)

Toggle diff (70 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 8151355a418..c2039273429 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -16717,9 +16717,29 @@ (define-public python-pydevd
(sha256
(base32
"1yd017dh6xgxrqcyf8kk8jrr0a3zw895yfjih0z5jghyf0rck38q"))))
- (build-system python-build-system)
+ (build-system pyproject-build-system)
(arguments
(list
+ #:test-flags
+ #~(list "-n" (number->string (parallel-job-count))
+ "-k"
+ (string-append
+ ;; The two "break_01" tests have been failing on
+ ;; Python 3.10:
+ ;; <https://github.com/fabioz/PyDev.Debugger/issues/222>.
+ "not test_set_pydevd_break_01 "
+ ;; This one fails for unknown reasons.
+ "and not test_completion_sockets_and_messages "
+ ;; the GUI event loop requires an X server.
+ "and not test_gui_event_loop_custom "
+ ;; This test validates that 'pydevd' is not in the
+ ;; exception message, but it is due to being part
+ ;; of the build file name present in the message.
+ "and not test_evaluate_exception_trace "
+ ;; These fail on systems with YAMA LSM’s ptrace
+ ;; scope > 0. Upstream issue:
+ ;; https://github.com/fabioz/PyDev.Debugger/issues/218
+ "and not test_attach_to_pid"))
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'fix-tests
@@ -16758,30 +16778,10 @@ (define-public python-pydevd
(invoke #+(cxx-for-target) "-shared" "-o" "attach.so"
"-fPIC" "-nostartfiles"
"pydevd_attach_to_process/linux_and_mac/attach.cpp")))
- (replace 'check
+ (add-before 'check 'pre-check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
- (setenv "PYDEVD_USE_CYTHON" "YES")
- (invoke "pytest" "-vv"
- "-n" (number->string (parallel-job-count))
- "-k"
- (string-append
- ;; The two "break_01" tests have been failing on
- ;; Python 3.10:
- ;; <https://github.com/fabioz/PyDev.Debugger/issues/222>.
- "not test_set_pydevd_break_01 "
- ;; This one fails for unknown reasons.
- "and not test_completion_sockets_and_messages "
- ;; the GUI event loop requires an X server.
- "and not test_gui_event_loop_custom "
- ;; This test validates that 'pydevd' is not in the
- ;; exception message, but it is due to being part
- ;; of the build file name present in the message.
- "and not test_evaluate_exception_trace "
- ;; These fail on systems with YAMA LSM’s ptrace
- ;; scope > 0. Upstream issue:
- ;; https://github.com/fabioz/PyDev.Debugger/issues/218
- "and not test_attach_to_pid")))))
+ (setenv "PYDEVD_USE_CYTHON" "YES"))))
(add-after 'install 'install-attach-binary
(lambda _
(install-file "attach.so"
--
2.41.0
N
N
Nicolas Graves wrote on 18 May 14:43 +0200
[PATCH 2/3] gnu: python-pydevd: Update to 2.9.6.
(address . 71037@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240518124316.19861-2-ngraves@ngraves.fr
* gnu/packages/python-xyz.scm (python-pydevd): Update to 2.9.6.
[arguments]<#:test-flags>: Adapt value.

Change-Id: I55cc8129fb78f0ee54519f45b31746a54881d84e
---
gnu/packages/python-xyz.scm | 22 ++++++++--------------
1 file changed, 8 insertions(+), 14 deletions(-)

Toggle diff (69 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c2039273429..fb12aba967f 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -16694,19 +16694,17 @@ (define-public python-file
libmagic.")))
(define-public python-pydevd
- ;; Use the latest commit, which includes cleanups that removes Python 2
- ;; syntax that would fail to build.
- (let ((revision "0")
- (commit "47e298499ef19563bb2ef5941a57046a35ae6868"))
(package
(name "python-pydevd")
- (version (git-version "2.8.0" revision commit))
+ (version "2.9.6")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/fabioz/PyDev.Debugger")
- (commit commit)))
+ (commit (string-append
+ "pydev_debugger_"
+ (string-join (string-split version #\.) "_")))))
(modules '((guix build utils)))
(snippet '(begin
;; Delete pre-built binaries.
@@ -16716,7 +16714,7 @@ (define-public python-pydevd
(file-name (git-file-name name version))
(sha256
(base32
- "1yd017dh6xgxrqcyf8kk8jrr0a3zw895yfjih0z5jghyf0rck38q"))))
+ "1niqb6l3m03arfjh14k9k5i5bi56m8qmc3pyi1qkbvqqp5bkydac"))))
(build-system pyproject-build-system)
(arguments
(list
@@ -16728,18 +16726,14 @@ (define-public python-pydevd
;; Python 3.10:
;; <https://github.com/fabioz/PyDev.Debugger/issues/222>.
"not test_set_pydevd_break_01 "
- ;; This one fails for unknown reasons.
- "and not test_completion_sockets_and_messages "
;; the GUI event loop requires an X server.
"and not test_gui_event_loop_custom "
;; This test validates that 'pydevd' is not in the
;; exception message, but it is due to being part
;; of the build file name present in the message.
"and not test_evaluate_exception_trace "
- ;; These fail on systems with YAMA LSM’s ptrace
- ;; scope > 0. Upstream issue:
- ;; https://github.com/fabioz/PyDev.Debugger/issues/218
- "and not test_attach_to_pid"))
+ ;; This test fail with TimeoutError, no message on stderr.
+ "and not test_soft_terminate "))
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'fix-tests
@@ -16802,7 +16796,7 @@ (define-public python-pydevd
(synopsis "Python debugger")
(description "PyDev.Debugger is a capable Python debugger used in PyDev
and other @acronym{IDEs, Integrated Development Environments}.")
- (license license:epl1.0))))
+ (license license:epl1.0)))
(define-public python-debugpy
(package
--
2.41.0
N
N
Nicolas Graves wrote on 18 May 14:43 +0200
[PATCH 3/3] gnu: python-pydevd: Improve package style.
(address . 71037@debbugs.gnu.org)(address . ngraves@ngraves.fr)
20240518124316.19861-3-ngraves@ngraves.fr
* gnu/packages/python-xyz.scm (python-pydevd): Indent properly.

Change-Id: I854d32943416e5f9b7c8dd3602d975dde0d31153
---
gnu/packages/python-xyz.scm | 204 ++++++++++++++++++------------------
1 file changed, 102 insertions(+), 102 deletions(-)

Toggle diff (218 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index fb12aba967f..aaca34e0e29 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -16694,109 +16694,109 @@ (define-public python-file
libmagic.")))
(define-public python-pydevd
- (package
- (name "python-pydevd")
- (version "2.9.6")
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/fabioz/PyDev.Debugger")
- (commit (string-append
- "pydev_debugger_"
- (string-join (string-split version #\.) "_")))))
- (modules '((guix build utils)))
- (snippet '(begin
- ;; Delete pre-built binaries.
- (for-each delete-file (find-files "." "\\.(so|dylib|dll)"))
- ;; This source is generated via Cython.
- (delete-file "_pydevd_bundle/pydevd_cython.c")))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "1niqb6l3m03arfjh14k9k5i5bi56m8qmc3pyi1qkbvqqp5bkydac"))))
- (build-system pyproject-build-system)
- (arguments
- (list
- #:test-flags
- #~(list "-n" (number->string (parallel-job-count))
- "-k"
- (string-append
- ;; The two "break_01" tests have been failing on
- ;; Python 3.10:
- ;; <https://github.com/fabioz/PyDev.Debugger/issues/222>.
- "not test_set_pydevd_break_01 "
- ;; the GUI event loop requires an X server.
- "and not test_gui_event_loop_custom "
- ;; This test validates that 'pydevd' is not in the
- ;; exception message, but it is due to being part
- ;; of the build file name present in the message.
- "and not test_evaluate_exception_trace "
- ;; This test fail with TimeoutError, no message on stderr.
- "and not test_soft_terminate "))
- #:phases
- #~(modify-phases %standard-phases
- (add-after 'unpack 'fix-tests
- (lambda _
- (substitute* "tests_python/test_convert_utilities.py"
- ;; Add missing trailing '/'.
- (("'\\\\\\\\usr\\\\\\\\bin\\\\\\\\') == '/usr/bin" all)
- (string-append all "/")))))
- (add-after 'unpack 'patch-command-paths
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "_pydevd_bundle/pydevd_api.py"
- (("'kill'")
- (format #f "~s" (search-input-file inputs "bin/kill")))
- (("'pgrep'")
- (format #f "~s" (search-input-file inputs "bin/pgrep"))))))
- (add-after 'unpack 'generate-sources
- (lambda _
- (setenv "PYTHONPATH" (getcwd))
- (invoke "python" "build_tools/build.py")))
- (add-after 'unpack 'adjust-attach-binary-name
- (lambda _
- (substitute*
- '("pydevd_tracing.py"
- "pydevd_attach_to_process/add_code_to_python_process.py")
- (("def get_(target|python_helper_lib)_filename.*" all)
- (format #f "~a return ~s~%" all
- (string-append #$output "/lib/attach.so"))))))
- (add-after 'unpack 'patch-gdb
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute*
- "pydevd_attach_to_process/add_code_to_python_process.py"
- (("'gdb',")
- (format #f "~s," (search-input-file inputs "bin/gdb"))))))
- (add-after 'build 'build-attach-linux-binary
- (lambda _
- (invoke #+(cxx-for-target) "-shared" "-o" "attach.so"
- "-fPIC" "-nostartfiles"
- "pydevd_attach_to_process/linux_and_mac/attach.cpp")))
- (add-before 'check 'pre-check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (setenv "PYDEVD_USE_CYTHON" "YES"))))
- (add-after 'install 'install-attach-binary
- (lambda _
- (install-file "attach.so"
- (string-append #$output "/lib"))))
- ;; Some modules aren't designed to be loadable by themselves, such
- ;; as 'pydev_app_engine_debug_startup' and fail.
- (delete 'sanity-check))))
- (native-inputs
- (list python-cython
- python-numpy
- python-psutil
- python-pytest
- python-pytest-xdist
- python-trio
- python-untangle))
- (inputs (list coreutils gdb/pinned procps))
- (home-page "https://github.com/fabioz/PyDev.Debugger/")
- (synopsis "Python debugger")
- (description "PyDev.Debugger is a capable Python debugger used in PyDev
+ (package
+ (name "python-pydevd")
+ (version "2.9.6")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/fabioz/PyDev.Debugger")
+ (commit (string-append
+ "pydev_debugger_"
+ (string-join (string-split version #\.) "_")))))
+ (modules '((guix build utils)))
+ (snippet '(begin
+ ;; Delete pre-built binaries.
+ (for-each delete-file (find-files "." "\\.(so|dylib|dll)"))
+ ;; This source is generated via Cython.
+ (delete-file "_pydevd_bundle/pydevd_cython.c")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1niqb6l3m03arfjh14k9k5i5bi56m8qmc3pyi1qkbvqqp5bkydac"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:test-flags
+ #~(list "-n" (number->string (parallel-job-count))
+ "-k"
+ (string-append
+ ;; The two "break_01" tests have been failing on
+ ;; Python 3.10:
+ ;; <https://github.com/fabioz/PyDev.Debugger/issues/222>.
+ "not test_set_pydevd_break_01 "
+ ;; the GUI event loop requires an X server.
+ "and not test_gui_event_loop_custom "
+ ;; This test validates that 'pydevd' is not in the
+ ;; exception message, but it is due to being part
+ ;; of the build file name present in the message.
+ "and not test_evaluate_exception_trace "
+ ;; This test fail with TimeoutError, no message on stderr.
+ "and not test_soft_terminate "))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-tests
+ (lambda _
+ (substitute* "tests_python/test_convert_utilities.py"
+ ;; Add missing trailing '/'.
+ (("'\\\\\\\\usr\\\\\\\\bin\\\\\\\\') == '/usr/bin" all)
+ (string-append all "/")))))
+ (add-after 'unpack 'patch-command-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "_pydevd_bundle/pydevd_api.py"
+ (("'kill'")
+ (format #f "~s" (search-input-file inputs "bin/kill")))
+ (("'pgrep'")
+ (format #f "~s" (search-input-file inputs "bin/pgrep"))))))
+ (add-after 'unpack 'generate-sources
+ (lambda _
+ (setenv "PYTHONPATH" (getcwd))
+ (invoke "python" "build_tools/build.py")))
+ (add-after 'unpack 'adjust-attach-binary-name
+ (lambda _
+ (substitute*
+ '("pydevd_tracing.py"
+ "pydevd_attach_to_process/add_code_to_python_process.py")
+ (("def get_(target|python_helper_lib)_filename.*" all)
+ (format #f "~a return ~s~%" all
+ (string-append #$output "/lib/attach.so"))))))
+ (add-after 'unpack 'patch-gdb
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute*
+ "pydevd_attach_to_process/add_code_to_python_process.py"
+ (("'gdb',")
+ (format #f "~s," (search-input-file inputs "bin/gdb"))))))
+ (add-after 'build 'build-attach-linux-binary
+ (lambda _
+ (invoke #+(cxx-for-target) "-shared" "-o" "attach.so"
+ "-fPIC" "-nostartfiles"
+ "pydevd_attach_to_process/linux_and_mac/attach.cpp")))
+ (add-before 'check 'pre-check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (setenv "PYDEVD_USE_CYTHON" "YES"))))
+ (add-after 'install 'install-attach-binary
+ (lambda _
+ (install-file "attach.so"
+ (string-append #$output "/lib"))))
+ ;; Some modules aren't designed to be loadable by themselves, such
+ ;; as 'pydev_app_engine_debug_startup' and fail.
+ (delete 'sanity-check))))
+ (native-inputs
+ (list python-cython
+ python-numpy
+ python-psutil
+ python-pytest
+ python-pytest-xdist
+ python-trio
+ python-untangle))
+ (inputs (list coreutils gdb/pinned procps))
+ (home-page "https://github.com/fabioz/PyDev.Debugger/")
+ (synopsis "Python debugger")
+ (description "PyDev.Debugger is a capable Python debugger used in PyDev
and other @acronym{IDEs, Integrated Development Environments}.")
- (license license:epl1.0)))
+ (license license:epl1.0)))
(define-public python-debugpy
(package
--
2.41.0
N
N
Nicolas Graves wrote on 18 May 14:49 +0200
control message for bug #71037
(address . control@debbugs.gnu.org)
87zfsncmkf.fsf@ngraves.fr
block 71037 by 70393
quit


--
Best regards,
Nicolas Graves
N
N
Nicolas Graves wrote on 18 May 15:08 +0200
control message for bug #70995
(address . control@debbugs.gnu.org)
87wmnrclnl.fsf@ngraves.fr
block 70995 by 71037
quit


--
Best regards,
Nicolas Graves
M
M
Maxim Cournoyer wrote on 21 May 04:40 +0200
Re: [bug#71037] [PATCH 0/3] gnu: python-pydevd: Update to 2.9.6.
(name . Nicolas Graves)(address . ngraves@ngraves.fr)(address . 71037@debbugs.gnu.org)
87a5kjvqdq.fsf@gmail.com
Hello!

Nicolas Graves <ngraves@ngraves.fr> writes:

Toggle quote (6 lines)
> Nicolas Graves (3):
> gnu: python-pydevd: Move to pyproject-build-system.
> gnu: python-pydevd: Update to 2.9.6.
> gnu: python-pydevd: Improve package style.
>

Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail>

Also, thanks for refreshing/resubmitting the pydevd patch to upstream!

--
Thanks,
Maxim
N
N
Nicolas Graves wrote on 21 May 09:51 +0200
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 71037@debbugs.gnu.org)
87bk4zsiv4.fsf@ngraves.fr
On 2024-05-20 22:40, Maxim Cournoyer wrote:

Toggle quote (14 lines)
> Hello!
>
> Nicolas Graves <ngraves@ngraves.fr> writes:
>
>> Nicolas Graves (3):
>> gnu: python-pydevd: Move to pyproject-build-system.
>> gnu: python-pydevd: Update to 2.9.6.
>> gnu: python-pydevd: Improve package style.
>>
>
> Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail>
>
> Also, thanks for refreshing/resubmitting the pydevd patch to upstream!

As a comment for my debugpy patch : we should probably care about that

Until this gets a proper answer, we should probably only update to
1.8.0, although I don't see why this should really diverge given the
commits.

I can't work on this today, but feel free to rebase the patch in 1.8.0
(should be easy, not much changes). Otherwise, I'll do it, but probably
not before next week.

--
Best regards,
Nicolas Graves
M
M
Maxim Cournoyer wrote on 22 May 02:07 +0200
(name . Nicolas Graves)(address . ngraves@ngraves.fr)(address . 71037@debbugs.gnu.org)
87zfsi4skn.fsf@gmail.com
Hi Nicolas,

Nicolas Graves <ngraves@ngraves.fr> writes:

Toggle quote (27 lines)
> On 2024-05-20 22:40, Maxim Cournoyer wrote:
>
>> Hello!
>>
>> Nicolas Graves <ngraves@ngraves.fr> writes:
>>
>>> Nicolas Graves (3):
>>> gnu: python-pydevd: Move to pyproject-build-system.
>>> gnu: python-pydevd: Update to 2.9.6.
>>> gnu: python-pydevd: Improve package style.
>>>
>>
>> Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail>
>>
>> Also, thanks for refreshing/resubmitting the pydevd patch to upstream!
>
> As a comment for my debugpy patch : we should probably care about that
> too: https://github.com/microsoft/debugpy/issues/1585
>
> Until this gets a proper answer, we should probably only update to
> 1.8.0, although I don't see why this should really diverge given the
> commits.
>
> I can't work on this today, but feel free to rebase the patch in 1.8.0
> (should be easy, not much changes). Otherwise, I'll do it, but probably
> not before next week.

I'm not in a position to push on this right now, so I'll let you lead
the charge, even if that's in a week or two. Thanks for doing so!

--
Thanks,
Maxim
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 71037@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 71037
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch