[PATCH 1/2] gnu: python-pycurl: Fix build by running the tests single-threaded.

  • Done
  • quality assurance status badge
Details
2 participants
  • attila.lendvai
  • Sharlatan Hellseher
Owner
unassigned
Submitted by
attila.lendvai
Severity
normal
A
A
attila.lendvai wrote on 16 Sep 22:53 +0200
(address . guix-patches@gnu.org)(name . Attila Lendvai)(address . attila@lendvai.name)
f392dfea88bd56784b44ab3e9500e28b6d052877.1726520027.git.attila@lendvai.name
From: Attila Lendvai <attila@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(-)

Toggle diff (43 lines)
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
A
A
attila.lendvai wrote on 16 Sep 22:55 +0200
[PATCH 2/2] gnu: python-pycurl: Build from git.
(address . 73305@debbugs.gnu.org)(name . Attila Lendvai)(address . attila@lendvai.name)
196054ea15207a26c7d9f3daf24334418333caf4.1726520125.git.attila@lendvai.name
From: Attila Lendvai <attila@lendvai.name>

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

Toggle diff (25 lines)
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
A
A
attila.lendvai wrote on 24 Nov 12:28 +0100
[PATCH v2 1/2] gnu: python-pycurl: Fix build by running the tests single-threaded.
(address . 73305@debbugs.gnu.org)(name . Attila Lendvai)(address . attila@lendvai.name)
9877ca71d1919b41b32f3fbd2058d996d3b02053.1732447697.git.attila@lendvai.name
From: Attila Lendvai <attila@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(-)

Toggle diff (42 lines)
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
A
A
attila.lendvai wrote on 24 Nov 12:28 +0100
[PATCH v2 2/2] gnu: python-pycurl: Build from git.
(address . 73305@debbugs.gnu.org)(name . Attila Lendvai)(address . attila@lendvai.name)
5002234a8b312381fd91d7d8a8db32a2b28b95f0.1732447697.git.attila@lendvai.name
From: Attila Lendvai <attila@lendvai.name>

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

Toggle diff (25 lines)
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
S
S
Sharlatan Hellseher wrote on 24 Nov 15:28 +0100
[PATCH 1/2] gnu: python-pycurl: Fix build by running the tests single-threaded.
(address . 73305@debbugs.gnu.org)
871pz0ogdb.fsf@gmail.com
Hi,

Thanks for reporting that.

I wonder, how did it work in place first place as "-n" was "auto" e.g.
all availalbe threads.
Toggle snippet (12 lines)
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))

Reviving the patches.

--
Oleg
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEmEeB3micIcJkGAhndtcnv/Ys0rUFAmdDOCAACgkQdtcnv/Ys
0rX9eg/+J17T8ABWpgifYCnStQVxxkyH4WJdlI4Trl7b0KCFoxyicwojnAaCJX72
zVHiz3L7BdwBv7gAzQ+fGOHkPQKIKSFU44UfRrlstLRBs+KpUnh9SxT5QWfWUktq
lk73Z5I5Yr/t+RxVf2Maa1BgDWYn+dpjHURMEO+tBcEs8ND8roitNVdLA33vYJwl
DjDx3buCIDlZ/czJrgscggUUAT4yfLMn8x+PPZ4nNvddI1jvGF5sj1PwxsBSaWM+
Bxe1JUEzEAoDm9oveaeRvn4LpWonMjgHGhm4oU/HJPZjvn5Wi7ffnmlfSx3EvkQh
wXiw+WHCPSo4N35mc6tuxGPUDMrr8CsQiBkHoEW3u/B+uKv5aGAwGyt+pHFWfmSS
rX/7vGOamzBs/0TlPEEMf0yyb+3Yo4Coa5efrmkQKJ/46gipAqLZ7pJRcPq0sl29
Z4DEJ8LlEfpzyiTiVUXt+DPVh9MZxlTJkBDy51cJXdTKs9Wvtg+JK/9D8kPQrakq
GqV+gYdbejWTjTqriQx4OZoCHwV2Q0YIdlNCjE2myHA3jDdfnVQYXcvBjj28OsuE
u8ZbsFcuuLh8tr9T+P2D2rHF/OjzwTbSOjvlAUzs2aRVBXZLm5IYHuSJlq60xGQO
OZILcyL0oTlz25FGAu9n39VtPbl49Bm6KmGbsHRaeNhmWb+hViM=
=vNa6
-----END PGP SIGNATURE-----

S
S
Sharlatan Hellseher wrote on 24 Nov 15:53 +0100
(address . 73305-done@debbugs.gnu.org)
87y118n0o7.fsf@gmail.com
Hi,

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

Toggle snippet (8 lines)
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

--
Thanks,
Oleg
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEmEeB3micIcJkGAhndtcnv/Ys0rUFAmdDPdgACgkQdtcnv/Ys
0rWk+A//Uc5i3S8ChmuXlqX7p+hJwIH20f5z6BagmHu+N+ChYz43Zrnib19BhvBH
Ts4w2WtO0mpQhT7a0oh+R05DHQKPd30yq8BYK+olIHHgAf5/hIZW/qGo0If7ijjb
zjBmgAPmFzLfLTc+6nxuhq3nPODHS3exn9WLnHKkLLy3PppmVdL4lS+yNss6E5LA
9lW7basb6K6BwLZ0YWEAsQvdwFiGR+Y171HovmjYjWHutIqxVu9pW/p3wG8fgbxD
L6PhzUgKrzndgIABdjGCqBud/7Kd9NIYBaotWjs2bwi3BhzsjRIxEcP3WtxiT8zt
XxdRIJl9/UeRnE7zDpwKMkl/YXgPaAAnNuNLhn07Ciznwojw5LEbOaVhwuVMaTTB
sNg3oZNNs/GOwLerql4OiatZxXoOIps1xDyjI/trlRInIteOqZMgM/AFK8Fo1309
jykUCT7ChqFAW9nQpFKi1kuQVvjx/iW4nA7TkMOWO18ViV8VOj+gyhDQTzZdgi0Y
VWKXiFy5ce+Yetf3QP4aj39n2UsdImsPYFPT9j9wY9i5dNb1oL5Y1YM6DDOBBvGb
h7kzV3BT5pp3ZZdTeAnMQukAIBX6mw7ZY8J85skOduO7JJBS/1VdsWkB5qdAqrHi
wzPDN7MOKyd34wm0a4nURp2t7be8y1BDl68CQiNYUg6Tnk23Cb8=
=oTQ1
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 73305
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