diff options
| author | Nicolas Graves <ngraves@ngraves.fr> | 2025-07-23 18:34:04 +0200 |
|---|---|---|
| committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-07-27 00:25:39 +0100 |
| commit | b960746197c3edd09837353adcd7d6a1e921287e (patch) | |
| tree | a14d46b51c13f82ab110284c04730d6db75d6805 /gnu/packages/python-web.scm | |
| parent | 60b8b302d6d20273503d2544e41f93bb2faab45f (diff) | |
gnu: python-eventlet: Set EVENTLET_NO_GREENDNS=yes by default.
This error propagates and pollutes user experience in Guix. Until
someone tackles how to actually fix it, if it's even fixable in Guix,
change the hardcoded default.
* gnu/packages/python-web.scm (python-eventlet):
[arguments]<#:phases>: Set EVENTLET_NO_GREENDNS=yes by default in
phase 'avoid-OSError.
[description]: Update the description to warn about the changed
default.
(python-httpretty)[arguments]: Remove uneeded field.
* gnu/packages/python-xyz.scm (python-pydevd)[arguments]<#:phases>:
Unset the variable in phase 'pre-check.
* gnu/packages/tor.scm (onionshare, onionshare-cli)[arguments]
<#:phases>: Unset the variable in phase 'pre-check.
Change-Id: Ic3897a9e0006338c3bc8b4bcddab0948e76a5d87
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Diffstat (limited to 'gnu/packages/python-web.scm')
| -rw-r--r-- | gnu/packages/python-web.scm | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 7558a108fab..5f2beb729e9 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm | |||
| @@ -623,13 +623,17 @@ Dropbox API v2.") | |||
| 623 | " and not test_patcher_existing_locks" | 623 | " and not test_patcher_existing_locks" |
| 624 | " and not test_dns_methods_are_green")) | 624 | " and not test_dns_methods_are_green")) |
| 625 | #:phases | 625 | #:phases |
| 626 | '(modify-phases %standard-phases | 626 | #~(modify-phases %standard-phases |
| 627 | (add-after 'unpack 'avoid-OSError | 627 | (add-after 'unpack 'avoid-OSError |
| 628 | (lambda _ | 628 | (lambda _ |
| 629 | ;; If eventlet tries to load greendns, an OSError is thrown when | 629 | ;; If eventlet tries to load greendns, an OSError is thrown when |
| 630 | ;; getprotobyname is called. Thankfully there is an environment | 630 | ;; getprotobyname is called. Thankfully there is an environment |
| 631 | ;; variable to disable the greendns import, so use it: | 631 | ;; variable to disable the greendns import, so use it. Note that |
| 632 | (setenv "EVENTLET_NO_GREENDNS" "yes")))))) | 632 | ;; this error is propagated to child packages too, so enforce the |
| 633 | ;; changed default. | ||
| 634 | (substitute* "eventlet/green/socket.py" | ||
| 635 | (("os\\.environ\\.get\\(\"EVENTLET_NO_GREENDNS\", ''\\)") | ||
| 636 | "os.environ.get(\"EVENTLET_NO_GREENDNS\", \"yes\")"))))))) | ||
| 633 | (native-inputs | 637 | (native-inputs |
| 634 | (list python-hatch-vcs | 638 | (list python-hatch-vcs |
| 635 | python-hatchling | 639 | python-hatchling |
| @@ -648,7 +652,11 @@ It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O. | |||
| 648 | Coroutines ensure that the developer uses a blocking style of programming | 652 | Coroutines ensure that the developer uses a blocking style of programming |
| 649 | that is similar to threading, but provide the benefits of non-blocking I/O. | 653 | that is similar to threading, but provide the benefits of non-blocking I/O. |
| 650 | The event dispatch is implicit, which means you can easily use @code{Eventlet} | 654 | The event dispatch is implicit, which means you can easily use @code{Eventlet} |
| 651 | from the Python interpreter, or as a small part of a larger application.") | 655 | from the Python interpreter, or as a small part of a larger application. |
| 656 | |||
| 657 | Note: In Guix, this package assumes the environment variable | ||
| 658 | @code{EVENTLET_NO_GREENDNS} defaults to @code{yes}. To try to use it, set it | ||
| 659 | to anything else.") | ||
| 652 | (license license:expat))) | 660 | (license license:expat))) |
| 653 | 661 | ||
| 654 | (define-public python-globus-sdk | 662 | (define-public python-globus-sdk |
| @@ -781,12 +789,7 @@ of a fake DNS resolver.") | |||
| 781 | "test_request_parse_querystring" | 789 | "test_request_parse_querystring" |
| 782 | "test_request_string_representation" | 790 | "test_request_string_representation" |
| 783 | "test_request_stubs_internals") | 791 | "test_request_stubs_internals") |
| 784 | " and not ")) | 792 | " and not ")))) |
| 785 | #:phases | ||
| 786 | #~(modify-phases %standard-phases | ||
| 787 | (add-before 'check 'pre-check | ||
| 788 | (lambda _ | ||
| 789 | (setenv"EVENTLET_NO_GREENDNS" "yes")))))) | ||
| 790 | (native-inputs | 793 | (native-inputs |
| 791 | (list nss-certs-for-test | 794 | (list nss-certs-for-test |
| 792 | python-freezegun | 795 | python-freezegun |
