biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / trio-websocket / default.nix
blob2804bcaa76e59cadb54565d75a2e6d679204eba8
2   lib,
3   stdenv,
4   buildPythonPackage,
5   fetchFromGitHub,
6   pythonOlder,
7   setuptools,
8   exceptiongroup,
9   pytest-trio,
10   pytestCheckHook,
11   trio,
12   trustme,
13   wsproto,
16 buildPythonPackage rec {
17   pname = "trio-websocket";
18   version = "0.11.1";
19   pyproject = true;
21   src = fetchFromGitHub {
22     owner = "HyperionGray";
23     repo = "trio-websocket";
24     rev = version;
25     hash = "sha256-ddLbYkb1m9zRjv3Lb7YwUzj26gYbK4nYN6jN+FAuiOs=";
26   };
28   build-system = [ setuptools ];
30   dependencies = [
31     trio
32     wsproto
33   ] ++ lib.optionals (pythonOlder "3.11") [ exceptiongroup ];
35   nativeCheckInputs = [
36     pytest-trio
37     pytestCheckHook
38     trustme
39   ];
41   disabledTests =
42     [
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"
51     ]
52     ++ lib.optionals stdenv.hostPlatform.isDarwin [
53       # Failed: DID NOT RAISE <class 'ValueError'>
54       "test_finalization_dropped_exception"
55       # Timing related
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"
61     ];
63   __darwinAllowLocalNetworking = true;
65   pythonImportsCheck = [ "trio_websocket" ];
67   meta = with lib; {
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;
72     maintainers = [ ];
73   };