about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2021-06-11 11:18:55 +0200
committerGitHub <noreply@github.com>2021-06-11 11:18:55 +0200
commit76a8cd4a755ce3eaab417cf49dd8f24b56b793c9 (patch)
tree0351dc077e15eb96eacf020f0bab0b0d8a9460b6 /pkgs
parent15807923f9a9f4dd29f29f37b454a07220bdc922 (diff)
parentf7827c4a4f5bde40c5167aba98d7057b5d70fb09 (diff)
Merge pull request #123283 from fabaff/bump-websockets
python3Packages.websockets: 8.1 -> 9.1
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/blockchains/chia/default.nix16
-rw-r--r--pkgs/development/python-modules/amqtt/default.nix4
-rw-r--r--pkgs/development/python-modules/pytest-sanic/default.nix10
-rw-r--r--pkgs/development/python-modules/sanic-testing/default.nix23
-rw-r--r--pkgs/development/python-modules/sanic/default.nix71
-rw-r--r--pkgs/development/python-modules/slack-sdk/default.nix4
-rw-r--r--pkgs/development/python-modules/systembridge/default.nix4
-rw-r--r--pkgs/development/python-modules/websockets/default.nix28
8 files changed, 116 insertions, 44 deletions
diff --git a/pkgs/applications/blockchains/chia/default.nix b/pkgs/applications/blockchains/chia/default.nix
index 22bb3d445ada6..7b85a242effab 100644
--- a/pkgs/applications/blockchains/chia/default.nix
+++ b/pkgs/applications/blockchains/chia/default.nix
@@ -1,4 +1,8 @@
-{ lib, fetchFromGitHub, python3Packages }:
+{ lib
+, fetchFromGitHub
+, fetchpatch
+, python3Packages
+}:
 
 python3Packages.buildPythonApplication rec {
   pname = "chia";
@@ -14,6 +18,12 @@ python3Packages.buildPythonApplication rec {
   patches = [
     # tweak version requirements to what's available in Nixpkgs
     ./dependencies.patch
+    # Allow later websockets release, https://github.com/Chia-Network/chia-blockchain/pull/6304
+    (fetchpatch {
+      name = "later-websockets.patch";
+      url = "https://github.com/Chia-Network/chia-blockchain/commit/a188f161bf15a30e8e2efc5eec824e53e2a98a5b.patch";
+      sha256 = "1s5qjhd4kmi28z6ni7pc5n09czxvh8qnbwmnqsmms7cpw700g78s";
+    })
   ];
 
   nativeBuildInputs = [
@@ -47,8 +57,8 @@ python3Packages.buildPythonApplication rec {
     websockets
   ];
 
-  checkInputs = [
-    python3Packages.pytestCheckHook
+  checkInputs = with python3Packages; [
+    pytestCheckHook
   ];
 
   disabledTests = [
diff --git a/pkgs/development/python-modules/amqtt/default.nix b/pkgs/development/python-modules/amqtt/default.nix
index 8ab0e7a7c0cc4..d0cc2bd5da563 100644
--- a/pkgs/development/python-modules/amqtt/default.nix
+++ b/pkgs/development/python-modules/amqtt/default.nix
@@ -15,7 +15,7 @@
 
 buildPythonPackage rec {
   pname = "amqtt";
-  version = "0.10.0-alpha.3";
+  version = "0.10.0-alpha.4";
   format = "pyproject";
   disabled = pythonOlder "3.7";
 
@@ -23,7 +23,7 @@ buildPythonPackage rec {
     owner = "Yakifo";
     repo = pname;
     rev = "v${version}";
-    sha256 = "0wz85ykjgi2174qcdgpakmc4m0p96v62az7pvc9hyallq1v1k4n6";
+    sha256 = "1v5hlcciyicnhwk1xslh3kxyjqaw526fb05pvhjpp3zqrmbxya4d";
   };
 
   nativeBuildInputs = [ poetry-core ];
diff --git a/pkgs/development/python-modules/pytest-sanic/default.nix b/pkgs/development/python-modules/pytest-sanic/default.nix
index 81e189c22c57c..3cea788643ca1 100644
--- a/pkgs/development/python-modules/pytest-sanic/default.nix
+++ b/pkgs/development/python-modules/pytest-sanic/default.nix
@@ -21,7 +21,9 @@ buildPythonPackage rec {
     sha256 = "sha256-OtyulpSHUWERtcIRT5j3YtHciIxFiIFYKqtlEd1NSFw=";
   };
 
-  buildInputs = [ pytest ];
+  buildInputs = [
+    pytest
+  ];
 
   propagatedBuildInputs = [
     aiohttp
@@ -36,6 +38,12 @@ buildPythonPackage rec {
     pytestCheckHook
   ];
 
+  postPatch = ''
+    # https://github.com/yunstanford/pytest-sanic/issues/55
+    substituteInPlace setup.py \
+      --replace "websockets>=8.1,<9.0" "websockets>=9.1,<10.0"
+  '';
+
   disabledTests = [
     # https://github.com/yunstanford/pytest-sanic/issues/51
     "test_fixture_sanic_client_get"
diff --git a/pkgs/development/python-modules/sanic-testing/default.nix b/pkgs/development/python-modules/sanic-testing/default.nix
index e5194e36bd230..71af4a0a11701 100644
--- a/pkgs/development/python-modules/sanic-testing/default.nix
+++ b/pkgs/development/python-modules/sanic-testing/default.nix
@@ -2,7 +2,6 @@
 , buildPythonPackage
 , fetchFromGitHub
 , pytestCheckHook
-, httpcore
 , httpx
 , pytest-asyncio
 , sanic
@@ -11,30 +10,38 @@
 
 buildPythonPackage rec {
   pname = "sanic-testing";
-  version = "0.3.1";
+  version = "0.4.0";
 
   src = fetchFromGitHub {
     owner = "sanic-org";
     repo = "sanic-testing";
     rev = "v${version}";
-    hash = "sha256-hBAq+/BKs0a01M89Nb8HaClqxB+W5PTfjVzef/m9SWs=";
+    sha256 = "0li984imqmqc001iw4m4b6cqik3d9nb4b3yvamvbwkb6hgd94sck";
   };
 
+  propagatedBuildInputs = [
+    httpx
+    sanic
+    websockets
+  ];
+
+  checkInputs = [
+    pytest-asyncio
+    pytestCheckHook
+  ];
+
   postPatch = ''
+    # https://github.com/sanic-org/sanic-testing/issues/19
     substituteInPlace setup.py \
-      --replace 'httpx>=0.16, <0.18' 'httpx' \
-      --replace 'httpcore==0.12.*' 'httpcore'
+      --replace '"websockets==8.1",' '"websockets>=9.1",'
   '';
 
-  propagatedBuildInputs = [ httpx sanic websockets httpcore ];
-
   # `sanic` is explicitly set to null when building `sanic` itself
   # to prevent infinite recursion.  In that case we skip running
   # the package at all.
   doCheck = sanic != null;
   dontUsePythonImportsCheck = sanic == null;
 
-  checkInputs = [ pytestCheckHook pytest-asyncio ];
   pythonImportsCheck = [ "sanic_testing" ];
 
   meta = with lib; {
diff --git a/pkgs/development/python-modules/sanic/default.nix b/pkgs/development/python-modules/sanic/default.nix
index 5f610f6feab0a..cc7be4c93dc62 100644
--- a/pkgs/development/python-modules/sanic/default.nix
+++ b/pkgs/development/python-modules/sanic/default.nix
@@ -1,24 +1,52 @@
-{ lib, buildPythonPackage, fetchPypi, doCheck ? true
-, aiofiles, httptools, multidict, sanic-routing, ujson, uvloop, websockets
-, pytestCheckHook, beautifulsoup4, gunicorn, uvicorn, sanic-testing
-, pytest-benchmark, pytest-sanic, pytest-sugar, pytestcov
+{ lib
+, aiofiles
+, beautifulsoup4
+, buildPythonPackage
+, doCheck ? true
+, fetchFromGitHub
+, fetchpatch
+, gunicorn
+, httptools
+, multidict
+, pytest-asyncio
+, pytest-benchmark
+, pytest-sanic
+, pytest-sugar
+, pytestCheckHook
+, sanic-routing
+, sanic-testing
+, ujson
+, uvicorn
+, uvloop
+, websockets
 }:
 
 buildPythonPackage rec {
   pname = "sanic";
   version = "21.3.4";
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "1cbd12b9138b3ca69656286b0be91fff02b826e8cb72dd76a2ca8c5eb1288d8e";
+  src = fetchFromGitHub {
+    owner = "sanic-org";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0vldlic8gqcf56fqb31igycqf11syd9csk66v34w6dim54lcny2b";
   };
 
+  patches = [
+    # Allow later websockets release, https://github.com/sanic-org/sanic/pull/2154
+    (fetchpatch {
+      name = "later-websockets.patch";
+      url = "https://github.com/sanic-org/sanic/commit/5fb820b5c1ce395e86a1ee11996790c65ec7bc65.patch";
+      sha256 = "1glvq23pf1sxqjnrz0w8rr7nsnyz82k1479b3rm8szfkjg9q5d1w";
+    })
+  ];
+
   postPatch = ''
     # Loosen dependency requirements.
     substituteInPlace setup.py \
       --replace '"pytest==5.2.1"' '"pytest"' \
       --replace '"gunicorn==20.0.4"' '"gunicorn"' \
-      --replace '"pytest-sanic",' ""
+      --replace '"pytest-sanic",' "" \
     # Patch a request headers test to allow brotli encoding
     # (we build httpx with brotli support, upstream doesn't).
     substituteInPlace tests/test_headers.py \
@@ -26,25 +54,36 @@ buildPythonPackage rec {
   '';
 
   propagatedBuildInputs = [
-    sanic-routing httptools uvloop ujson aiofiles websockets multidict
+    aiofiles
+    httptools
+    multidict
+    sanic-routing
+    ujson
+    uvloop
+    websockets
   ];
 
   checkInputs = [
-    sanic-testing gunicorn pytestcov beautifulsoup4 pytest-sanic pytest-sugar
-    pytest-benchmark pytestCheckHook uvicorn
+    beautifulsoup4
+    gunicorn
+    pytest-asyncio
+    pytest-benchmark
+    pytest-sanic
+    pytest-sugar
+    pytestCheckHook
+    sanic-testing
+    uvicorn
   ];
 
   inherit doCheck;
 
   disabledTests = [
-    # No "examples" directory in pypi distribution
-    "test_gunicorn"
-    "test_zero_downtime"
-    # flaky
+    # Tests are flaky
     "test_keep_alive_client_timeout"
     "test_check_timeouts_request_timeout"
     "test_check_timeouts_response_timeout"
     "test_reloader_live"
+    "test_zero_downtime"
   ];
 
   __darwinAllowLocalNetworking = true;
@@ -52,7 +91,7 @@ buildPythonPackage rec {
   pythonImportsCheck = [ "sanic" ];
 
   meta = with lib; {
-    description = "A microframework based on uvloop, httptools, and learnings of flask";
+    description = "Web server and web framework";
     homepage = "https://github.com/sanic-org/sanic/";
     license = licenses.mit;
     maintainers = with maintainers; [ costrouc AluisioASG ];
diff --git a/pkgs/development/python-modules/slack-sdk/default.nix b/pkgs/development/python-modules/slack-sdk/default.nix
index 9044ce19b5d87..d04fd24f2e971 100644
--- a/pkgs/development/python-modules/slack-sdk/default.nix
+++ b/pkgs/development/python-modules/slack-sdk/default.nix
@@ -21,14 +21,14 @@
 
 buildPythonPackage rec {
   pname = "slack-sdk";
-  version = "3.5.0";
+  version = "3.6.0";
   disabled = !isPy3k;
 
   src = fetchFromGitHub {
     owner = "slackapi";
     repo = "python-slack-sdk";
     rev = "v${version}";
-    sha256 = "sha256-5ZBaF/6p/eOWjAmo+IlF9zCb9xBr2bP6suPZblRogUg=";
+    sha256 = "sha256-OSRz8yH1yrWhN2a6ir4nxsPahwg8oHfVlJ020Swlb+Q=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/systembridge/default.nix b/pkgs/development/python-modules/systembridge/default.nix
index 94d41b7b673ba..6174e507d2a62 100644
--- a/pkgs/development/python-modules/systembridge/default.nix
+++ b/pkgs/development/python-modules/systembridge/default.nix
@@ -6,13 +6,13 @@
 
 buildPythonPackage rec {
   pname = "systembridge";
-  version = "1.1.1";
+  version = "1.2.4";
 
   src = fetchFromGitHub {
     owner = "timmo001";
     repo = "system-bridge-connector-py";
     rev = "v${version}";
-    sha256 = "0vyfi7nyzkzsgg84n5wh4hzwvx6fybgqdzbabnsmvszb9sm1vlb2";
+    sha256 = "sha256-dZOtvJXBXMKC+VOyQRMyaWAXg8lHjLcM2Zz9P0/ILT8=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/websockets/default.nix b/pkgs/development/python-modules/websockets/default.nix
index eeb12bd5b75b6..51df6c70235db 100644
--- a/pkgs/development/python-modules/websockets/default.nix
+++ b/pkgs/development/python-modules/websockets/default.nix
@@ -1,37 +1,45 @@
 { lib
-, fetchFromGitHub
 , buildPythonPackage
+, fetchFromGitHub
+, python
 , pythonOlder
-, pytest
 , stdenv
 }:
 
 buildPythonPackage rec {
   pname = "websockets";
-  version = "8.1";
+  version = "9.1";
+  disabled = pythonOlder "3.7";
 
   src = fetchFromGitHub {
     owner = "aaugustin";
     repo = pname;
     rev = version;
-    sha256 = "05jbqcbjg50ydwl0fijhdlqcq7fl6v99kjva66kmmzzza7vwa872";
+    sha256 = "sha256-7Y12IUG+ulD4+CTRlY+NE6qYZyI9gCPDydwpt+uyYZk=";
   };
 
-  disabled = pythonOlder "3.3";
-
   # Tests fail on Darwin with `OSError: AF_UNIX path too long`
   doCheck = !stdenv.isDarwin;
 
   # Disable all tests that need to terminate within a predetermined amount of
-  # time.  This is nondeterministic.
+  # time. This is nondeterministic.
   patchPhase = ''
     sed -i 's/with self.assertCompletesWithin.*:/if True:/' \
-      tests/test_protocol.py
+      tests/legacy/test_protocol.py
   '';
 
+  checkPhase = ''
+    runHook preCheck
+    ${python.interpreter} -m unittest discover
+    runHook postCheck
+  '';
+
+  pythonImportsCheck = [ "websockets" ];
+
   meta = with lib; {
-    description = "WebSocket implementation in Python 3";
-    homepage = "https://github.com/aaugustin/websockets";
+    description = "WebSocket implementation in Python";
+    homepage = "https://websockets.readthedocs.io/";
     license = licenses.bsd3;
+    maintainers = with maintainers; [ fab ];
   };
 }