diff --git a/pkgs/development/python-modules/tornado/4.nix b/pkgs/development/python-modules/tornado/4.nix index e4f59c148735..7476a22792ee 100644 --- a/pkgs/development/python-modules/tornado/4.nix +++ b/pkgs/development/python-modules/tornado/4.nix @@ -2,6 +2,7 @@ , unittestCheckHook , buildPythonPackage , fetchPypi +, fetchpatch , isPy27 , pythonAtLeast }: @@ -16,6 +17,14 @@ buildPythonPackage rec { sha256 = "02jzd23l4r6fswmwxaica9ldlyc2p6q8dk6dyff7j58fmdzf853d"; }; + patches = [ + (fetchpatch { + name = "CVE-2023-28370.patch"; + url = "https://github.com/tornadoweb/tornado/commit/32ad07c54e607839273b4e1819c347f5c8976b2f.patch"; + hash = "sha256-2dpPHkNThOaZD8T2g1vb/I5WYZ/vy/t690539uprJyc="; + }) + ]; + nativeCheckInputs = [ unittestCheckHook ]; # We specify the name of the test files to prevent diff --git a/pkgs/development/python-modules/tornado/5.nix b/pkgs/development/python-modules/tornado/5.nix index d3961d06c405..8ba3a8c073ba 100644 --- a/pkgs/development/python-modules/tornado/5.nix +++ b/pkgs/development/python-modules/tornado/5.nix @@ -2,6 +2,7 @@ , unittestCheckHook , buildPythonPackage , fetchPypi +, fetchpatch , isPy27 , pythonAtLeast }: @@ -16,6 +17,14 @@ buildPythonPackage rec { sha256 = "4e5158d97583502a7e2739951553cbd88a72076f152b4b11b64b9a10c4c49409"; }; + patches = [ + (fetchpatch { + name = "CVE-2023-28370.patch"; + url = "https://github.com/tornadoweb/tornado/commit/32ad07c54e607839273b4e1819c347f5c8976b2f.patch"; + hash = "sha256-2dpPHkNThOaZD8T2g1vb/I5WYZ/vy/t690539uprJyc="; + }) + ]; + nativeCheckInputs = [ unittestCheckHook ]; # We specify the name of the test files to prevent diff --git a/pkgs/development/python-modules/tornado/default.nix b/pkgs/development/python-modules/tornado/default.nix index e255e603b9a1..ac57f212d229 100644 --- a/pkgs/development/python-modules/tornado/default.nix +++ b/pkgs/development/python-modules/tornado/default.nix @@ -3,17 +3,29 @@ , buildPythonPackage , fetchFromGitHub , pytestCheckHook + +# for passthru.tests +, distributed +, jupyter-server +, jupyterlab +, matplotlib +, mitmproxy +, pytest-tornado +, pytest-tornasync +, pyzmq +, sockjs-tornado +, urllib3 }: buildPythonPackage rec { pname = "tornado"; - version = "6.2.0"; + version = "6.3.3"; src = fetchFromGitHub { owner = "tornadoweb"; repo = "tornado"; rev = "v${version}"; - hash = "sha256-IV0QN3GqoclFo9kWJVc21arypmBkvUClo86Zmt/Gv6E="; + hash = "sha256-l9Ce/c2wDSmsySr9yXu5Fl/+63QkQay46aDSUTJmetA="; }; nativeCheckInputs = [ @@ -38,6 +50,20 @@ buildPythonPackage rec { __darwinAllowLocalNetworking = true; + passthru.tests = { + inherit + distributed + jupyter-server + jupyterlab + matplotlib + mitmproxy + pytest-tornado + pytest-tornasync + pyzmq + sockjs-tornado + urllib3; + }; + meta = with lib; { description = "A web framework and asynchronous networking library"; homepage = "https://www.tornadoweb.org/";