mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-20 00:53:12 +03:00
Merge pull request #123283 from fabaff/bump-websockets
python3Packages.websockets: 8.1 -> 9.1
This commit is contained in:
commit
76a8cd4a75
@ -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 = [
|
||||
|
@ -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 ];
|
||||
|
@ -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"
|
||||
|
@ -2,7 +2,6 @@
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, pytestCheckHook
|
||||
, httpcore
|
||||
, httpx
|
||||
, pytest-asyncio
|
||||
, sanic
|
||||
@ -11,22 +10,31 @@
|
||||
|
||||
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";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace 'httpx>=0.16, <0.18' 'httpx' \
|
||||
--replace 'httpcore==0.12.*' 'httpcore'
|
||||
'';
|
||||
propagatedBuildInputs = [
|
||||
httpx
|
||||
sanic
|
||||
websockets
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ httpx sanic websockets httpcore ];
|
||||
checkInputs = [
|
||||
pytest-asyncio
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# https://github.com/sanic-org/sanic-testing/issues/19
|
||||
substituteInPlace setup.py \
|
||||
--replace '"websockets==8.1",' '"websockets>=9.1",'
|
||||
'';
|
||||
|
||||
# `sanic` is explicitly set to null when building `sanic` itself
|
||||
# to prevent infinite recursion. In that case we skip running
|
||||
@ -34,7 +42,6 @@ buildPythonPackage rec {
|
||||
doCheck = sanic != null;
|
||||
dontUsePythonImportsCheck = sanic == null;
|
||||
|
||||
checkInputs = [ pytestCheckHook pytest-asyncio ];
|
||||
pythonImportsCheck = [ "sanic_testing" ];
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -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 ];
|
||||
|
@ -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 = [
|
||||
|
@ -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 = [
|
||||
|
@ -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 ];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user