python3Packages.uvloop: 0.14.0 -> 0.15.0
Reenable all tests, drop darwin sandbox patch, cleanup. This unbreaks uvloop on python3.9.
This commit is contained in:
parent
cc0da25d94
commit
fe0892d030
|
@ -1,28 +0,0 @@
|
||||||
diff --git a/tests/test_pipes.py b/tests/test_pipes.py
|
|
||||||
index d883abf..2e74d7a 100644
|
|
||||||
--- a/tests/test_pipes.py
|
|
||||||
+++ b/tests/test_pipes.py
|
|
||||||
@@ -2,6 +2,7 @@ import asyncio
|
|
||||||
import io
|
|
||||||
import os
|
|
||||||
import socket
|
|
||||||
+import unittest
|
|
||||||
|
|
||||||
from uvloop import _testbase as tb
|
|
||||||
|
|
||||||
@@ -96,6 +97,7 @@ class _BasePipeTest:
|
|
||||||
# extra info is available
|
|
||||||
self.assertIsNotNone(proto.transport.get_extra_info('pipe'))
|
|
||||||
|
|
||||||
+ @unittest.skip("darwin sandbox")
|
|
||||||
def test_read_pty_output(self):
|
|
||||||
proto = MyReadPipeProto(loop=self.loop)
|
|
||||||
|
|
||||||
@@ -198,6 +200,7 @@ class _BasePipeTest:
|
|
||||||
self.loop.run_until_complete(proto.done)
|
|
||||||
self.assertEqual('CLOSED', proto.state)
|
|
||||||
|
|
||||||
+ @unittest.skip("darwin sandbox")
|
|
||||||
def test_write_pty(self):
|
|
||||||
master, slave = os.openpty()
|
|
||||||
os.set_blocking(master, False)
|
|
|
@ -1,69 +1,69 @@
|
||||||
{ lib
|
{ lib
|
||||||
, stdenv
|
, stdenv
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
|
, pythonOlder
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
, pyopenssl
|
|
||||||
, libuv
|
, libuv
|
||||||
, psutil
|
|
||||||
, isPy27
|
|
||||||
, pythonAtLeast
|
|
||||||
, CoreServices
|
, CoreServices
|
||||||
, ApplicationServices
|
, ApplicationServices
|
||||||
# Check Inputs
|
# Check Inputs
|
||||||
|
, aiohttp
|
||||||
|
, psutil
|
||||||
|
, pyopenssl
|
||||||
, pytestCheckHook
|
, pytestCheckHook
|
||||||
# , pytest-asyncio
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "uvloop";
|
pname = "uvloop";
|
||||||
version = "0.14.0";
|
version = "0.15.0";
|
||||||
disabled = isPy27;
|
disabled = pythonOlder "3.7";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "07j678z9gf41j98w72ysrnb5sa41pl5yxd7ib17lcwfxqz0cjfhj";
|
sha256 = "0rfhr84km8k5gj0036b2pznwmc8macx56vkxc3aksvns95dksl0s";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = lib.optional stdenv.isDarwin ./darwin_sandbox.patch;
|
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
libuv
|
libuv
|
||||||
] ++ lib.optionals stdenv.isDarwin [ CoreServices ApplicationServices ];
|
] ++ lib.optionals stdenv.isDarwin [
|
||||||
|
CoreServices
|
||||||
pythonImportsCheck = [
|
ApplicationServices
|
||||||
"uvloop"
|
|
||||||
"uvloop.loop"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
dontUseSetuptoolsCheck = true;
|
dontUseSetuptoolsCheck = true;
|
||||||
checkInputs = [ pytestCheckHook pyopenssl psutil ];
|
checkInputs = [
|
||||||
|
aiohttp
|
||||||
|
pytestCheckHook
|
||||||
|
pyopenssl
|
||||||
|
psutil
|
||||||
|
];
|
||||||
|
|
||||||
pytestFlagsArray = [
|
pytestFlagsArray = [
|
||||||
# from pytest.ini, these are NECESSARY to prevent failures
|
# from pytest.ini, these are NECESSARY to prevent failures
|
||||||
"--capture=no"
|
"--capture=no"
|
||||||
"--assert=plain"
|
"--assert=plain"
|
||||||
|
"--strict"
|
||||||
"--tb=native"
|
"--tb=native"
|
||||||
# ignore code linting tests
|
# ignore code linting tests
|
||||||
"--ignore=tests/test_sourcecode.py"
|
"--ignore=tests/test_sourcecode.py"
|
||||||
];
|
];
|
||||||
|
|
||||||
disabledTests = [
|
|
||||||
"test_sock_cancel_add_reader_race" # asyncio version of test is supposed to be skipped but skip doesn't happen. uvloop version runs fine
|
|
||||||
] ++ lib.optionals (pythonAtLeast "3.8") [ "test_write_to_closed_transport" ]; # https://github.com/MagicStack/uvloop/issues/355
|
|
||||||
|
|
||||||
# force using installed/compiled uvloop vs source by moving tests to temp dir
|
# force using installed/compiled uvloop vs source by moving tests to temp dir
|
||||||
preCheck = ''
|
preCheck = ''
|
||||||
export TEST_DIR=$(mktemp -d)
|
export TEST_DIR=$(mktemp -d)
|
||||||
cp -r tests $TEST_DIR
|
cp -r tests $TEST_DIR
|
||||||
pushd $TEST_DIR
|
pushd $TEST_DIR
|
||||||
'' + lib.optionalString stdenv.isDarwin ''
|
|
||||||
# Some tests fail on Darwin
|
|
||||||
rm tests/test_[stu]*.py
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postCheck = ''
|
postCheck = ''
|
||||||
popd
|
popd
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
pythonImportsCheck = [
|
||||||
|
"uvloop"
|
||||||
|
"uvloop.loop"
|
||||||
|
];
|
||||||
|
|
||||||
# Some of the tests use localhost networking.
|
# Some of the tests use localhost networking.
|
||||||
__darwinAllowLocalNetworking = true;
|
__darwinAllowLocalNetworking = true;
|
||||||
|
|
||||||
|
@ -72,6 +72,5 @@ buildPythonPackage rec {
|
||||||
homepage = "https://github.com/MagicStack/uvloop";
|
homepage = "https://github.com/MagicStack/uvloop";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
maintainers = with maintainers; [ costrouc ];
|
maintainers = with maintainers; [ costrouc ];
|
||||||
broken = pythonAtLeast "3.9"; # see: https://github.com/MagicStack/uvloop/issues/365
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue