1{ lib
2, python
3, buildPythonPackage
4, fetchFromGitHub
5, fetchpatch
6, pytestCheckHook
7
8# for passthru.tests
9, distributed
10, jupyter-server
11, jupyterlab
12, matplotlib
13, mitmproxy
14, pytest-tornado
15, pytest-tornasync
16, pyzmq
17, sockjs-tornado
18, urllib3
19}:
20
21buildPythonPackage rec {
22 pname = "tornado";
23 version = "6.2.0";
24
25 src = fetchFromGitHub {
26 owner = "tornadoweb";
27 repo = "tornado";
28 rev = "v${version}";
29 hash = "sha256-IV0QN3GqoclFo9kWJVc21arypmBkvUClo86Zmt/Gv6E=";
30 };
31
32 patches = [
33 (fetchpatch {
34 name = "CVE-2023-28370.patch";
35 url = "https://github.com/tornadoweb/tornado/commit/32ad07c54e607839273b4e1819c347f5c8976b2f.patch";
36 hash = "sha256-2dpPHkNThOaZD8T2g1vb/I5WYZ/vy/t690539uprJyc=";
37 })
38 ];
39
40 nativeCheckInputs = [
41 pytestCheckHook
42 ];
43
44 disabledTestPaths = [
45 # additional tests that have extra dependencies, run slowly, or produce more output than a simple pass/fail
46 # https://github.com/tornadoweb/tornado/blob/v6.2.0/maint/test/README
47 "maint/test"
48
49 # AttributeError: 'TestIOStreamWebMixin' object has no attribute 'io_loop'
50 "tornado/test/iostream_test.py"
51 ];
52
53 disabledTests = [
54 # Exception: did not get expected log message
55 "test_unix_socket_bad_request"
56 ];
57
58 pythonImportsCheck = [ "tornado" ];
59
60 __darwinAllowLocalNetworking = true;
61
62 passthru.tests = {
63 inherit
64 distributed
65 jupyter-server
66 jupyterlab
67 matplotlib
68 mitmproxy
69 pytest-tornado
70 pytest-tornasync
71 pyzmq
72 sockjs-tornado
73 urllib3;
74 };
75
76 meta = with lib; {
77 description = "A web framework and asynchronous networking library";
78 homepage = "https://www.tornadoweb.org/";
79 license = licenses.asl20;
80 maintainers = with maintainers; [ SuperSandro2000 ];
81 };
82}