python3Packages.trio: 0.22.0 -> 0.22.2

https://github.com/python-trio/trio/releases/tag/v0.22.1
https://github.com/python-trio/trio/releases/tag/v0.22.2

The package now requires pytest-trio for its tests to succeed, which
resulted in an infinite recursion. Crimes have therefore been committed
to resolve this unfortunate situation.
This commit is contained in:
Martin Weinelt 2023-09-15 14:07:17 +02:00
parent deaf8440ae
commit 755bd6e98d

View file

@ -6,6 +6,7 @@
, idna
, outcome
, pytestCheckHook
, pytest-trio
, pyopenssl
, trustme
, sniffio
@ -16,15 +17,24 @@
, coreutils
}:
let
# escape infinite recursion with pytest-trio
pytest-trio' = (pytest-trio.override {
trio = null;
}).overrideAttrs {
doCheck = false;
pythonImportsCheck = [];
};
in
buildPythonPackage rec {
pname = "trio";
version = "0.22.0";
version = "0.22.2";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-zmjxxUAKR7E3xaTecsfJAb1OeiT73r/ptB3oxsBOqs8=";
hash = "sha256-OIfPGMi8yJRDNCAwVGg4jax2ky6WaK+hxJqjgGtqzLM=";
};
propagatedBuildInputs = [
@ -46,13 +56,16 @@ buildPythonPackage rec {
jedi
pyopenssl
pytestCheckHook
pytest-trio'
trustme
yapf
];
preCheck = ''
substituteInPlace trio/tests/test_subprocess.py \
substituteInPlace trio/_tests/test_subprocess.py \
--replace "/bin/sleep" "${coreutils}/bin/sleep"
export HOME=$TMPDIR
'';
# It appears that the build sandbox doesn't include /etc/services, and these tests try to use it.
@ -64,6 +77,8 @@ buildPythonPackage rec {
"static_tool_sees_all_symbols"
# tests pytest more than python
"fallback_when_no_hook_claims_it"
# requires mypy
"test_static_tool_sees_class_members"
];
pytestFlagsArray = [