GNU bug report logs - #73305
[PATCH 1/2] gnu: python-pycurl: Fix build by running the tests single-threaded.

Previous Next

Package: guix-patches;

Reported by: attila.lendvai <at> gmail.com

Date: Mon, 16 Sep 2024 20:55:01 UTC

Severity: normal

Tags: patch

Done: Sharlatan Hellseher <sharlatanus <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 73305 in the body.
You can then email your comments to 73305 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to lars <at> 6xq.net, marius <at> gnu.org, me <at> bonfacemunyoki.com, sharlatanus <at> gmail.com, tanguy <at> bioneland.org, jgart <at> dismail.de, guix-patches <at> gnu.org:
bug#73305; Package guix-patches. (Mon, 16 Sep 2024 20:55:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to attila.lendvai <at> gmail.com:
New bug report received and forwarded. Copy sent to lars <at> 6xq.net, marius <at> gnu.org, me <at> bonfacemunyoki.com, sharlatanus <at> gmail.com, tanguy <at> bioneland.org, jgart <at> dismail.de, guix-patches <at> gnu.org. (Mon, 16 Sep 2024 20:55:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: attila.lendvai <at> gmail.com
To: guix-patches <at> gnu.org
Cc: Attila Lendvai <attila <at> lendvai.name>
Subject: [PATCH 1/2] gnu: python-pycurl: Fix build by running the tests
 single-threaded.
Date: Mon, 16 Sep 2024 22:53:47 +0200
From: Attila Lendvai <attila <at> lendvai.name>

* gnu/packages/python-web.scm (python-pycurl): Make test run single-threaded.
Reenable some tests that used to fail due to threading.
[test_request_without_certinfo]: Disable test/timebomb that probably uses an
expired CA.

Change-Id: I62bc60757cf2e005ed55768c84d8c178f63c35ec
---
 gnu/packages/python-web.scm | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 8b29f1cd936..94e349bedb0 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -2024,15 +2024,18 @@ (define-public python-pycurl
     (build-system pyproject-build-system)
     (arguments
      '(#:test-flags
-       (list "-n" "auto"
+       (list
+        ;; The test suite is not thread safe:
+        ;; - some tests want to use the same port: address already in use
+        ;; - some tests use signal.Signal, i.e. main-thread only
+        "-n" "1"
              "-k" (string-append
                    ;; Disable hanginging tests
                    "not test_multi_socket_select"
                    ;; E assert None is not None
                    ;; E+ where None =
                    ;; <tests.multi_callback_test.MultiCallbackTest
-                   ;; testMethod=test_easy_pause_unpause>.socket_result
-                   " and not test_easy_pause_unpause"
+                   ;; testMethod=test_multi_socket_action>.timer_result
                    " and not test_multi_socket_action"
                    ;; E pycurl.error: (1, '')
                    " and not test_http_version_3"
@@ -2045,9 +2048,9 @@ (define-public python-pycurl
                    ;; OSError: tests/fake-curl/libcurl/with_openssl.so: cannot
                    ;; open shared object file: No such file or directory
                    " and not test_libcurl_ssl_openssl"
-                   ;; pycurl.error: (56, 'Recv failure: Connection reset by
-                   ;; peer')
-                   " and not test_post_with_read_callback"))
+                   ;; Probably due to an expired CA
+                   " and not test_request_without_certinfo"
+                   ))
        #:phases (modify-phases %standard-phases
                   (add-before 'build 'configure-tls-backend
                     (lambda _

base-commit: 4f86fa20179ded1e6314eeba7da17309d501a32f
-- 
2.46.0





Information forwarded to lars <at> 6xq.net, marius <at> gnu.org, me <at> bonfacemunyoki.com, sharlatanus <at> gmail.com, tanguy <at> bioneland.org, jgart <at> dismail.de, guix-patches <at> gnu.org:
bug#73305; Package guix-patches. (Mon, 16 Sep 2024 20:58:02 GMT) Full text and rfc822 format available.

Message #8 received at 73305 <at> debbugs.gnu.org (full text, mbox):

From: attila.lendvai <at> gmail.com
To: 73305 <at> debbugs.gnu.org
Cc: Attila Lendvai <attila <at> lendvai.name>
Subject: [PATCH 2/2] gnu: python-pycurl: Build from git.
Date: Mon, 16 Sep 2024 22:55:26 +0200
From: Attila Lendvai <attila <at> lendvai.name>

Change-Id: I1b347c04022970ffe42a87530e525a83745ff84c
---
 gnu/packages/python-web.scm | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 94e349bedb0..2dfbf5b66e5 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -2017,10 +2017,15 @@ (define-public python-pycurl
     (version "7.45.2")
     (source
      (origin
-       (method url-fetch)
-       (uri (pypi-uri "pycurl" version))
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/pycurl/pycurl")
+             (commit (string-append
+                      "REL_" (string-replace-substring version "." "_")))))
+       (file-name (git-file-name name version))
        (sha256
-        (base32 "1ji46b924caa4saxvjxs9h673yy0kif297nxpnjn84r7w05mjc2p"))))
+        (base32
+         "1dzdramcgf63m1zg8glhqa3ik9anzjy954mshk7s3z3gsi21n8fp"))))
     (build-system pyproject-build-system)
     (arguments
      '(#:test-flags
-- 
2.46.0





Information forwarded to lars <at> 6xq.net, marius <at> gnu.org, me <at> bonfacemunyoki.com, sharlatanus <at> gmail.com, tanguy <at> bioneland.org, jgart <at> dismail.de, guix-patches <at> gnu.org:
bug#73305; Package guix-patches. (Sun, 24 Nov 2024 11:31:01 GMT) Full text and rfc822 format available.

Message #11 received at 73305 <at> debbugs.gnu.org (full text, mbox):

From: attila.lendvai <at> gmail.com
To: 73305 <at> debbugs.gnu.org
Cc: Attila Lendvai <attila <at> lendvai.name>
Subject: [PATCH v2 1/2] gnu: python-pycurl: Fix build by running the tests
 single-threaded.
Date: Sun, 24 Nov 2024 12:28:17 +0100
From: Attila Lendvai <attila <at> lendvai.name>

* gnu/packages/python-web.scm (python-pycurl): Make test run single-threaded.
Reenable some tests that used to fail due to threading.
[test_request_without_certinfo]: Disable test/timebomb that probably uses an
expired CA.

Change-Id: I62bc60757cf2e005ed55768c84d8c178f63c35ec
---
 gnu/packages/python-web.scm | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index cf3c15857c..2270ccdd14 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -2026,15 +2026,17 @@ (define-public python-pycurl
     (build-system pyproject-build-system)
     (arguments
      '(#:test-flags
-       (list "--n" (number->string (parallel-job-count))
+       ;; The test suite is not thread safe, therefore --numprocesses 1:
+       ;; - some tests want to use the same port: address already in use
+       ;; - some tests use signal.Signal, i.e. main-thread only
+       (list "--numprocesses" "1" ; (number->string (parallel-job-count))
              "-k" (string-append
                    ;; Disable hanginging tests
                    "not test_multi_socket_select"
                    ;; E assert None is not None
                    ;; E+ where None =
                    ;; <tests.multi_callback_test.MultiCallbackTest
-                   ;; testMethod=test_easy_pause_unpause>.socket_result
-                   " and not test_easy_pause_unpause"
+                   ;; testMethod=test_multi_socket_action>.timer_result
                    " and not test_multi_socket_action"
                    ;; E pycurl.error: (1, '')
                    " and not test_http_version_3"
@@ -2047,9 +2049,9 @@ (define-public python-pycurl
                    ;; OSError: tests/fake-curl/libcurl/with_openssl.so: cannot
                    ;; open shared object file: No such file or directory
                    " and not test_libcurl_ssl_openssl"
-                   ;; pycurl.error: (56, 'Recv failure: Connection reset by
-                   ;; peer')
-                   " and not test_post_with_read_callback"))
+                   ;; Probably due to an expired CA
+                   " and not test_request_without_certinfo"
+                   ))
        #:phases (modify-phases %standard-phases
                   (add-before 'build 'configure-tls-backend
                     (lambda _

base-commit: 047967c42f237695d5af2af53321c70f157685a3
-- 
2.46.0





Information forwarded to lars <at> 6xq.net, marius <at> gnu.org, me <at> bonfacemunyoki.com, sharlatanus <at> gmail.com, tanguy <at> bioneland.org, jgart <at> dismail.de, guix-patches <at> gnu.org:
bug#73305; Package guix-patches. (Sun, 24 Nov 2024 11:32:02 GMT) Full text and rfc822 format available.

Message #14 received at 73305 <at> debbugs.gnu.org (full text, mbox):

From: attila.lendvai <at> gmail.com
To: 73305 <at> debbugs.gnu.org
Cc: Attila Lendvai <attila <at> lendvai.name>
Subject: [PATCH v2 2/2] gnu: python-pycurl: Build from git.
Date: Sun, 24 Nov 2024 12:28:19 +0100
From: Attila Lendvai <attila <at> lendvai.name>

Change-Id: I1b347c04022970ffe42a87530e525a83745ff84c
---
 gnu/packages/python-web.scm | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 2270ccdd14..0d484da959 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -2019,10 +2019,15 @@ (define-public python-pycurl
     (version "7.45.2")
     (source
      (origin
-       (method url-fetch)
-       (uri (pypi-uri "pycurl" version))
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/pycurl/pycurl")
+             (commit (string-append
+                      "REL_" (string-replace-substring version "." "_")))))
+       (file-name (git-file-name name version))
        (sha256
-        (base32 "1ji46b924caa4saxvjxs9h673yy0kif297nxpnjn84r7w05mjc2p"))))
+        (base32
+         "1dzdramcgf63m1zg8glhqa3ik9anzjy954mshk7s3z3gsi21n8fp"))))
     (build-system pyproject-build-system)
     (arguments
      '(#:test-flags
-- 
2.46.0





Information forwarded to guix-patches <at> gnu.org:
bug#73305; Package guix-patches. (Sun, 24 Nov 2024 14:30:04 GMT) Full text and rfc822 format available.

Message #17 received at 73305 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 73305 <at> debbugs.gnu.org
Subject: [PATCH 1/2] gnu: python-pycurl: Fix build by running the tests
 single-threaded.
Date: Sun, 24 Nov 2024 14:28:48 +0000
[Message part 1 (text/plain, inline)]
Hi,

Thanks for reporting that.

I wonder, how did it work in place first place as "-n" was "auto" e.g.
all availalbe threads.
--8<---------------cut here---------------start------------->8---
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index c030deeb12..cf3c15857c 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -2026,7 +2026,7 @@ Amazon S3 compatible object storage server.")
     (build-system pyproject-build-system)
     (arguments
      '(#:test-flags
-       (list "-n" "auto"
+       (list "--n" (number->string (parallel-job-count))
--8<---------------cut here---------------end--------------->8---

Reviving the patches.

--
Oleg
[signature.asc (application/pgp-signature, inline)]

Reply sent to Sharlatan Hellseher <sharlatanus <at> gmail.com>:
You have taken responsibility. (Sun, 24 Nov 2024 14:55:01 GMT) Full text and rfc822 format available.

Notification sent to attila.lendvai <at> gmail.com:
bug acknowledged by developer. (Sun, 24 Nov 2024 14:55:01 GMT) Full text and rfc822 format available.

Message #22 received at 73305-done <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 73305-done <at> debbugs.gnu.org
Subject: [PATCH 1/2] gnu: python-pycurl: Fix build by running the tests
 single-threaded.
Date: Sun, 24 Nov 2024 14:53:12 +0000
[Message part 1 (text/plain, inline)]
Hi,

Pushed with minor commit message adjustments, and add follow up commit
removing pytest-xdist and nose completely.

--8<---------------cut here---------------start------------->8---
bdbf3ab4f0 * master gnu: python-pycurl: Adjust inputs.
e30c169bec * gnu: python-pycurl: Build from git.
851f0662a5 * gnu: python-pycurl: Fix build by running the tests single-threaded.

> ./pre-inst-env guix build python-pycurl --rounds=2
/gnu/store/pv1m7xfmgjb5aqfy94ppl0k3d1h9paxl-python-pycurl-7.45.22
--8<---------------cut here---------------end--------------->8---

--
Thanks,
Oleg
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 23 Dec 2024 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 176 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.