16 buildPythonPackage rec {
17 pname = "trio-websocket";
21 src = fetchFromGitHub {
22 owner = "HyperionGray";
23 repo = "trio-websocket";
25 hash = "sha256-ddLbYkb1m9zRjv3Lb7YwUzj26gYbK4nYN6jN+FAuiOs=";
28 build-system = [ setuptools ];
33 ] ++ lib.optionals (pythonOlder "3.11") [ exceptiongroup ];
43 # https://github.com/python-trio/trio-websocket/issues/187
44 "test_handshake_exception_before_accept"
45 "test_reject_handshake"
46 "test_reject_handshake_invalid_info_status"
47 "test_client_open_timeout"
48 "test_client_close_timeout"
49 "test_client_connect_networking_error"
50 "test_finalization_dropped_exception"
52 ++ lib.optionals stdenv.hostPlatform.isDarwin [
53 # Failed: DID NOT RAISE <class 'ValueError'>
54 "test_finalization_dropped_exception"
56 "test_client_close_timeout"
57 "test_cm_exit_with_pending_messages"
58 "test_server_close_timeout"
59 "test_server_handler_exit"
60 "test_server_open_timeout"
63 __darwinAllowLocalNetworking = true;
65 pythonImportsCheck = [ "trio_websocket" ];
68 changelog = "https://github.com/HyperionGray/trio-websocket/blob/${version}/CHANGELOG.md";
69 description = "WebSocket client and server implementation for Python Trio";
70 homepage = "https://github.com/HyperionGray/trio-websocket";
71 license = licenses.mit;