gnu: python-trio: Update to 0.27.0.

* gnu/packages/python-xyz.scm (python-trio): Update to 0.27.0.
[arguments]<test-flags>: Disable more failing tests.
<phases>: Remove 'patch-sleep as resolved upstream. Remove change-home,
add 'set-env phase.
[native-inputs]: Remove python-ipython, python-pylint,
python-pytest-xdist, and python-pytest-cov; add python-isort and
python-pytest-asyncio.

Change-Id: I0f05649e05c76f556a9b23035c23c90b67ab8014
This commit is contained in:
Sharlatan Hellseher 2024-11-23 12:42:13 +00:00
parent 1c5a93389c
commit ecae6bb621
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -29939,24 +29939,27 @@ project.")
(define-public python-trio (define-public python-trio
(package (package
(name "python-trio") (name "python-trio")
(version "0.21.0") (version "0.27.0")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (pypi-uri "trio" version)) (uri (pypi-uri "trio" version))
(sha256 (sha256
(base32 "04qwzy4295ajxpns0hrmn3asma80sjpimzpb3i877vwynsvkjgsj")))) (base32 "0cb8qy1yj274xa21nf2jpmwssjzp39vgva7y982xmci62ymrbk0x"))))
(build-system pyproject-build-system) (build-system pyproject-build-system)
(arguments (arguments
(list (list
#:test-flags #:test-flags
'(list "-k" '(list "-k"
(string-append (string-append
;; This test times out. ;; This tests times out.
"not test_ki_protection_works" "not test_ki_protection_works"
" and not test_KI_interrupts"
;; This fails with: signal only works in main thread of the main interpreter ;; This fails with: signal only works in main thread of the main interpreter
" and not test_catch_signals_race_condition_on_exit" " and not test_catch_signals_race_condition_on_exit"
;; Assertion errors. ;; Assertion errors.
" and not test_named_thread_os"
" and not test_has_pthread_setname_np"
" and not test_guest_mode_ki" " and not test_guest_mode_ki"
" and not test_run_in_trio_thread_ki" " and not test_run_in_trio_thread_ki"
" and not test_simple_cancel_scope_usage_doesnt_create\ " and not test_simple_cancel_scope_usage_doesnt_create\
@ -29979,27 +29982,24 @@ _cyclic_garbage"
" and not test_getprotobyname" " and not test_getprotobyname"
;; EOFError: Ran out of input. ;; EOFError: Ran out of input.
" and not test_static_tool_sees_all_symbols") " and not test_static_tool_sees_all_symbols")
"trio/tests") ;; It rerquires black and ruff to generate a final report.
"--ignore=src/trio/_tests/tools/test_gen_exports.py"
"src/trio/_tests")
#:phases #:phases
'(modify-phases %standard-phases '(modify-phases %standard-phases
(add-after 'unpack 'patch-sleep (add-before 'check 'set-env
(lambda _
(substitute* "trio/tests/test_subprocess.py"
(("/bin/sleep")
(which "sleep")))))
(add-before 'check 'change-home
(lambda _ (lambda _
;; Tests require a writable home. ;; Tests require a writable home.
(setenv "HOME" "/tmp")))))) (setenv "HOME" "/tmp")
;; #$output is first in path which causes "import file mismatch"
(setenv "PYTHONPATH" (string-append (getcwd) "/src:$PYTHONPATH")))))))
(native-inputs (native-inputs
(list python-astor (list python-astor
python-ipython
python-jedi python-jedi
python-pylint
python-pyopenssl python-pyopenssl
python-pytest python-pytest
python-pytest-xdist python-isort
python-pytest-cov python-pytest-asyncio
python-trustme python-trustme
python-setuptools python-setuptools
python-wheel)) python-wheel))