Merge staging-next into staging

This commit is contained in:
Frederik Rietdijk
2020-11-01 10:11:12 +01:00
362 changed files with 5122 additions and 3783 deletions

View File

@@ -0,0 +1,58 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, idna
, sniffio
, typing-extensions
, curio
, hypothesis
, pytestCheckHook
, trio
, trustme
, uvloop
}:
buildPythonPackage rec {
pname = "anyio";
version = "2.0.2";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "agronholm";
repo = pname;
rev = version;
sha256 = "06nazfrm2sclp3lpgsn9wl8vmqxvx36s3gr2gnqz3zhjpf3glkxv";
};
propagatedBuildInputs = [
idna
sniffio
] ++ lib.optionals (pythonOlder "3.8") [
typing-extensions
];
checkInputs = [
curio
hypothesis
pytestCheckHook
trio
trustme
uvloop
];
pytestFlagsArray = [
# lots of DNS lookups
"--ignore=tests/test_sockets.py"
];
pythonImportsCheck = [ "anyio" ];
meta = with lib; {
description = "High level compatibility layer for multiple asynchronous event loop implementations on Python";
homepage = "https://github.com/agronholm/anyio";
license = licenses.mit;
maintainers = with maintainers; [ hexa ];
};
}

View File

@@ -1,8 +1,8 @@
{ stdenv, buildPythonPackage, isPy27, fetchFromGitHub, itsdangerous, python-multipart
, pytest, starlette, httpx, pytest-asyncio }:
, pytestCheckHook, starlette, httpx, pytest-asyncio }:
buildPythonPackage rec {
version = "0.7";
version = "0.7.1";
pname = "asgi-csrf";
disabled = isPy27;
@@ -11,15 +11,26 @@ buildPythonPackage rec {
owner = "simonw";
repo = pname;
rev = version;
sha256 = "1vf4lh007790836cp3hd6wf8wsgj045dcg0w1cm335p08zz6j4k7";
sha256 = "1hhqrb9r46y6i3d3w6hc9zm6yyikdyd2k5pcbyw0r9fl959yi4hf";
};
propagatedBuildInputs = [ itsdangerous python-multipart ];
propagatedBuildInputs = [
itsdangerous
python-multipart
];
checkInputs = [
httpx
pytest-asyncio
pytestCheckHook
starlette
];
# tests fail while importing a private module from httpx
# E ModuleNotFoundError: No module named 'httpx._content_streams'
# https://github.com/simonw/asgi-csrf/issues/18
doCheck = false;
checkInputs = [ pytest starlette httpx pytest-asyncio ];
checkPhase = ''
pytest test_asgi_csrf.py
'';
pythonImportsCheck = [ "asgi_csrf" ];
meta = with stdenv.lib; {

View File

@@ -0,0 +1,44 @@
{ lib
, buildPythonPackage
, fetchPypi
, fetchpatch
, pythonOlder
, pytestCheckHook
, pytest-asyncio
, pytest-mock
}:
buildPythonPackage rec {
pname = "async_stagger";
version = "0.3.0";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "007l54fbk2dfzv3vmqz98m1i37mzxkkva5r4fiwq2pg8nb61fy0w";
};
patches = [
(fetchpatch {
# Fix test failures on Python 3.8
# https://github.com/twisteroidambassador/async_stagger/issues/4
url = "https://github.com/twisteroidambassador/async_stagger/commit/736ab20ff9c172628d911f1e6f72420399ec9631.patch";
sha256 = "1ygqd9n56sj83lvgmv6nrx3m0sp3646s5k7z697qx43xslixj731";
})
];
checkInputs = [
pytestCheckHook
pytest-asyncio
pytest-mock
];
pythonImportsCheck = [ "async_stagger" ];
meta = with lib; {
description = "Happy Eyeballs connection algorithm and underlying scheduling logic in asyncio";
homepage = "https://github.com/twisteroidambassador/async_stagger";
license = licenses.mit;
maintainers = with maintainers; [ hexa ];
};
}

View File

@@ -0,0 +1,34 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, pytestCheckHook
, pytest-asyncio
}:
buildPythonPackage rec {
pname = "asyncio-throttle";
version = "1.0.1";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "hallazzang";
repo = pname;
rev = "v${version}";
sha256 = "0raqnrnp42cn1c7whbm7ajbgaczx33k6hbxsj30nh998pqxhh4sj";
};
checkInputs = [
pytest-asyncio
pytestCheckHook
];
pythonImportsCheck = [ "asyncio_throttle" ];
meta = with lib; {
description = "Simple, easy-to-use throttler for asyncio";
homepage = "https://github.com/hallazzang/asyncio-throttle";
license = licenses.mit;
maintainers = with maintainers; [ hexa ];
};
}

View File

@@ -4,14 +4,14 @@
, ply, python_magic, pytest, requests }:
buildPythonPackage rec {
version = "2.3.2";
version = "2.3.3";
pname = "beancount";
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "1wfpf2b0sha84rz0qgkanc82wharjqr2nr7xxg1rngrci2h0aqhd";
sha256 = "0767ap2n9vk9dz40njndfhaprajr75fvzx7igbd1szc6x8wri8nr";
};
# Tests require files not included in the PyPI archive.

View File

@@ -4,12 +4,12 @@
}:
buildPythonPackage rec {
version = "1.5.6";
version = "1.5.7";
pname = "bids-validator";
src = fetchPypi {
inherit pname version;
sha256 = "ef9476ded8226c86fe1d6e6b9f380666ada7a0f4ae39bd5afd7eabbbc6979ab7";
sha256 = "624fade609636c64e7829ff072bdf12f93512948a803059b059e5c90df894be2";
};
# needs packages which are not available in nixpkgs

View File

@@ -27,6 +27,6 @@ buildPythonPackage rec {
description = "Convenience class for doing maths with explicit coordinates";
homepage = "https://github.com/clbarnes/coordinates";
license = licenses.mit;
maintainers = [ maintainers.mildlyincompetent ];
maintainers = [ ];
};
}

View File

@@ -4,13 +4,13 @@
buildPythonPackage rec {
pname = "hass-nabucasa";
version = "0.34.6";
version = "0.37.1";
src = fetchFromGitHub {
owner = "nabucasa";
repo = pname;
rev = version;
sha256 = "1lkqwj58qr0vn7zf5mhrhaz973ahj9wjp4mgzvyja1gcdh6amv34";
sha256 = "/GFNrLi1I69gUDIwnHa2q/pxkiRl9PKxpKtb56JrmuA=";
};
postPatch = ''
@@ -18,24 +18,12 @@ buildPythonPackage rec {
sed -i 's/"cryptography.*"/"cryptography"/' setup.py
'';
patches = [
# relax pytz dependency
(fetchpatch {
url = "https://github.com/NabuCasa/hass-nabucasa/commit/419e80feddc36c68384c032feda0057515b53eaa.patch";
sha256 = "14dgwci8615cwcf27hg7b42s7da50xhyjys3yx446q7ipk8zw4x6";
})
];
propagatedBuildInputs = [
acme aiohttp atomicwrites snitun attrs warrant pycognito
];
checkInputs = [ pytest pytest-aiohttp asynctest ];
# Asynctest's mocking is broken with python3.8
# https://github.com/Martiusweb/asynctest/issues/132
doCheck = pythonOlder "3.8";
checkPhase = ''
pytest tests/
'';

View File

@@ -1,34 +1,52 @@
{ stdenv
{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, isPy27
, h11
, h2
, pproxy
, pytestCheckHook
, pytestcov
, sniffio
, uvicorn
}:
buildPythonPackage rec {
pname = "httpcore";
version = "0.10.2";
disabled = isPy27;
version = "0.12.0";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "encode";
repo = pname;
rev = version;
sha256 = "00gn8nfv814rg6fj7xv97mrra3fvx6fzjcgx9y051ihm6hxljdsi";
sha256 = "0bwxn7m7r7h6k41swxj0jqj3nzi76wqxwbnry6y7d4qfh4m26g2j";
};
propagatedBuildInputs = [ h11 sniffio ];
propagatedBuildInputs = [
h11
h2
sniffio
];
checkInputs = [
pproxy
pytestCheckHook
pytestcov
uvicorn
];
pytestFlagsArray = [
# these tests fail during dns lookups: httpcore.ConnectError: [Errno -2] Name or service not known
"--ignore=tests/sync_tests/test_interfaces.py"
];
# tests require pythonic access to mitmproxy, which isn't (yet?) packaged as
# a pythonPackage.
doCheck = false;
pythonImportsCheck = [ "httpcore" ];
meta = with stdenv.lib; {
description = "A minimal HTTP client";
meta = with lib; {
description = "A minimal low-level HTTP client";
homepage = "https://github.com/encode/httpcore";
license = licenses.bsd3;
maintainers = [ maintainers.ris ];
maintainers = with maintainers; [ ris ];
};
}

View File

@@ -1,71 +1,61 @@
{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, fetchpatch
, brotli
, certifi
, chardet
, h11
, h2
, httpcore
, idna
, rfc3986
, sniffio
, isPy27
, pytest
, pytestCheckHook
, pytest-asyncio
, pytest-trio
, pytestcov
, trustme
, uvicorn
, brotli
}:
buildPythonPackage rec {
pname = "httpx";
version = "0.14.2";
disabled = isPy27;
version = "0.16.1";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "encode";
repo = pname;
rev = version;
sha256 = "08b6k5g8car3bic90aw4ysb2zvsa5nm8qk3hk4dgamllnnxzl5br";
sha256 = "00gmq45fckcqkj910bvd7pyqz1mvgsdvz4s0k7dzbnc5czzq1f4a";
};
patches = [
(fetchpatch {
name = "fix-cookie-test-timestamp.patch";
url = "https://github.com/encode/httpx/pull/1270.patch";
sha256 = "1hgrynac6226sgnyzmsr1nr15rn49gbfmk4c2kx3dwkbh6vr7jpd";
})
];
propagatedBuildInputs = [
brotli
certifi
chardet
h11
h2
httpcore
idna
rfc3986
sniffio
];
checkInputs = [
pytest
pytestCheckHook
pytest-asyncio
pytest-trio
pytestcov
trustme
uvicorn
brotli
];
checkPhase = ''
PYTHONPATH=.:$PYTHONPATH pytest -k 'not (test_connect_timeout or test_elapsed_timer)'
'';
pythonImportsCheck = [ "httpx" ];
disabledTests = [
# httpcore.ConnectError: [Errno 101] Network is unreachable
"test_connect_timeout"
# httpcore.ConnectError: [Errno -2] Name or service not known
"test_async_proxy_close"
"test_sync_proxy_close"
];
meta = with lib; {
description = "The next generation HTTP client";
homepage = "https://github.com/encode/httpx";

View File

@@ -0,0 +1,52 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, anyio
, asyncio-throttle
, dataclasses
, ircstates
, async_stagger
, async-timeout
, python
}:
buildPythonPackage rec {
pname = "ircrobots";
version = "0.3.3";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "jesopo";
repo = pname;
rev = "v${version}";
sha256 = "0ykn6ch7aazv2cx13q2gr94arh6f96d8hwjwnrcjai3i3x4q2pkq";
};
patches = [
./relax-dependencies.patch
];
propagatedBuildInputs = [
anyio
asyncio-throttle
ircstates
async_stagger
async-timeout
] ++ lib.optionals (pythonOlder "3.7") [
dataclasses
];
checkPhase = ''
${python.interpreter} -m unittest test
'';
pythonImportsCheck = [ "ircrobots" ];
meta = with lib; {
description = "Asynchronous bare-bones IRC bot framework for python3";
license = licenses.mit;
homepage = "https://github.com/jesopo/ircrobots";
maintainers = with maintainers; [ hexa ];
};
}

View File

@@ -0,0 +1,14 @@
diff --git a/requirements.txt b/requirements.txt
index 87a2d31..4e0efb1 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,6 +1,6 @@
-anyio ==1.3.0
+anyio
asyncio-throttle ==1.0.1
-dataclasses ==0.6
-ircstates ==0.11.2
+dataclasses; python_version < "3.7"
+ircstates >=0.11.2
async_stagger ==0.3.0
async_timeout ==3.0.1

View File

@@ -0,0 +1,48 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, pythonOlder
, irctokens
, pendulum
, python
}:
buildPythonPackage rec {
pname = "ircstates";
version = "0.11.3";
disabled = pythonOlder "3.6"; # f-strings
src = fetchFromGitHub {
owner = "jesopo";
repo = pname;
rev = "v${version}";
sha256 = "1v8r6ma8gzvn5ym3xx9qlb0rc4l67pxr3z8njzk1ffxn1x3mxd3i";
};
patches = [
(fetchpatch {
name = "relax-pendulum-version.patch";
url = "https://github.com/jesopo/ircstates/commit/f51f1b689e592020d1c91ccab6c03927aadb9f94.patch";
sha256 = "0qbp3b9hlqbbx7b474q1mcgnzzzwcm4g89x26iqgmlgxzmv3y5xp";
})
];
propagatedBuildInputs = [
irctokens
pendulum
];
checkPhase = ''
${python.interpreter} -m unittest test
'';
pythonImportsCheck = [ "ircstates" ];
meta = with lib; {
description = "sans-I/O IRC session state parsing library";
license = licenses.mit;
homepage = "https://github.com/jesopo/ircstates";
maintainers = with maintainers; [ hexa ];
};
}

View File

@@ -0,0 +1,34 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, pyyaml
, python
}:
buildPythonPackage rec {
pname = "irctokens";
version = "2.0.0";
disabled = pythonOlder "3.6"; # f-strings
src = fetchFromGitHub {
owner = "jesopo";
repo = pname;
rev = "v${version}";
sha256 = "0kpxn5paailm4xpdlnzxrhjrfgvvg5pp327wd8kl41a0wbqkj4zb";
};
checkInputs = [ pyyaml ];
checkPhase = ''
${python.interpreter} -m unittest test
'';
pythonImportsCheck = [ "irctokens" ];
meta = with lib; {
description = "RFC1459 and IRCv3 protocol tokeniser library for python3";
license = licenses.mit;
homepage = "https://github.com/jesopo/irctokens";
maintainers = with maintainers; [ hexa ];
};
}

View File

@@ -8,11 +8,11 @@
buildPythonPackage rec {
pname = "py_stringmatching";
version = "0.4.1";
version = "0.4.2";
src = fetchPypi {
inherit pname version;
sha256 = "c46db1e855cef596dfbbe1bd48fcabb30736479eff602c2bf88af10f998f1532";
sha256 = "c87f62698fba1612a18f8f44bd57f0c4e70aac2d7ca6dfb6ed46dabd2194453c";
};
checkInputs = [ nose ];

View File

@@ -12,13 +12,13 @@
buildPythonPackage rec {
pname = "pycognito";
version = "0.1.3";
version = "0.1.4";
src = fetchFromGitHub {
owner = "pvizeli";
repo = "pycognito";
rev = version;
sha256 = "0wy6d274xda7v6dazv10h2vwig2avfyz8mh2lpd1a5k7i06r335r";
sha256 = "HLzPrRon+ipcUZlD1l4nYSwSbdDLwOALy4ejGunjK0w=";
};
postPatch = ''

View File

@@ -80,13 +80,19 @@ buildPythonPackage rec {
--deselect tests/AlignmentFileHeader_test.py::TestHeaderBAM::test_header_content_is_as_expected \
--deselect tests/AlignmentFileHeader_test.py::TestHeaderCRAM::test_dictionary_access_works \
--deselect tests/AlignmentFileHeader_test.py::TestHeaderCRAM::test_header_content_is_as_expected \
--deselect tests/AlignmentFile_test.py::TestIO::testBAM2SAM \
--deselect tests/AlignmentFile_test.py::TestIO::testSAM2BAM \
--deselect tests/AlignmentFile_test.py::TestIO::testWriteUncompressedBAMFile \
--deselect tests/AlignmentFile_test.py::TestDeNovoConstruction::testBAMWholeFile \
--deselect tests/AlignmentFile_test.py::TestEmptyHeader::testEmptyHeader \
--deselect tests/AlignmentFile_test.py::TestHeaderWithProgramOptions::testHeader \
--deselect tests/AlignmentFile_test.py::TestIO::testBAM2BAM \
--deselect tests/AlignmentFile_test.py::TestIO::testBAM2CRAM \
--deselect tests/AlignmentFile_test.py::TestIO::testBAM2SAM \
--deselect tests/AlignmentFile_test.py::TestIO::testFetchFromClosedFileObject \
--deselect tests/AlignmentFile_test.py::TestIO::testOpenFromFilename \
--deselect tests/AlignmentFile_test.py::TestIO::testSAM2BAM \
--deselect tests/AlignmentFile_test.py::TestIO::testWriteUncompressedBAMFile \
--deselect tests/AlignmentFile_test.py::TestIteratorRowAllBAM::testIterate \
--deselect tests/StreamFiledescriptors_test.py::StreamTest::test_text_processing \
--deselect tests/compile_test.py::BAMTest::testCount \
tests/
'';

View File

@@ -6,13 +6,13 @@
buildPythonPackage rec {
pname = "python-jose";
version = "3.1.0";
version = "3.2.0";
src = fetchFromGitHub {
owner = "mpdavis";
repo = "python-jose";
rev = version;
sha256 = "1gnn0zy03pywj65ammy3sd07knzhjv8n5jhx1ir9bikgra9v0iqh";
sha256 = "cSPIZrps0xFd4pPcQ4w/jFWOk2XYgd3mtE/sDzlytvY=";
};
checkInputs = [
@@ -23,6 +23,13 @@ buildPythonPackage rec {
cryptography # optional dependency, but needed in tests
];
# relax ecdsa deps
patchPhase = ''
substituteInPlace setup.py \
--replace 'ecdsa<0.15' 'ecdsa' \
--replace 'ecdsa <0.15' 'ecdsa'
'';
disabledTests = [
# https://github.com/mpdavis/python-jose/issues/176
"test_key_too_short"

View File

@@ -4,8 +4,11 @@
, appdirs
, click
, construct
, croniter
, cryptography
, importlib-metadata
, pytest
, pytest-mock
, zeroconf
, attrs
, pytz
@@ -13,6 +16,7 @@
, netifaces
}:
buildPythonPackage rec {
pname = "python-miio";
version = "0.5.3";
@@ -22,8 +26,17 @@ buildPythonPackage rec {
sha256 = "3be5275b569844dfa267c80a1e23dc0957411dd501cae0ed3cccf43467031ceb";
};
checkInputs = [ pytest ];
propagatedBuildInputs = [ appdirs click construct cryptography zeroconf attrs pytz tqdm netifaces ];
postPatch = ''
substituteInPlace setup.py \
--replace "zeroconf>=0.25.1,<0.26.0" "zeroconf"
substituteInPlace setup.py \
--replace "pytz>=2019.3,<2020.0" "pytz"
substituteInPlace setup.py \
--replace "cryptography>=2.9,<3.0" "cryptography"
'';
checkInputs = [ pytest pytest-mock];
propagatedBuildInputs = [ appdirs click construct croniter cryptography importlib-metadata zeroconf attrs pytz tqdm netifaces ];
checkPhase = ''
pytest

View File

@@ -1,28 +1,32 @@
{ stdenv, buildPythonPackage, fetchPypi, requests, six, mock }:
{ lib
, buildPythonPackage
, fetchPypi
, requests
, six }:
buildPythonPackage rec {
pname = "spotipy";
version = "2.16.0";
version = "2.16.1";
src = fetchPypi {
inherit pname version;
sha256 = "315eadd1248053ed336b4d3adbf2e3c32895fdbb0cfcd170542c848c8fd45649";
sha256 = "1f50xczv8kgly6wz6zrvqzwdj6nvhdlgx8wnrhmbipjrb6qacr25";
};
propagatedBuildInputs = [ requests six ];
checkInputs = [ mock ];
preConfigure = ''
substituteInPlace setup.py \
--replace "mock==2.0.0" "mock"
'';
# tests want to access the spotify API
doCheck = false;
pythonImportsCheck = [
"spotipy"
"spotipy.oauth2"
];
pythonImportsCheck = [ "spotipy" ];
meta = with stdenv.lib; {
meta = with lib; {
homepage = "https://spotipy.readthedocs.org/";
changelog = "https://github.com/plamere/spotipy/blob/${version}/CHANGELOG.md";
description = "A light weight Python library for the Spotify Web API";
license = licenses.mit;
maintainers = [ maintainers.rvolosatovs ];
maintainers = with maintainers; [ rvolosatovs ];
};
}

View File

@@ -445,5 +445,7 @@ in buildPythonPackage {
libtensorflow = bazel-build.out;
};
inherit (bazel-build) meta;
meta = bazel-build.meta // {
broken = gast.version != "0.3.2";
};
}

View File

@@ -0,0 +1,28 @@
{ lib
, buildPythonPackage
, fetchPypi
, nose
}:
buildPythonPackage rec {
pname = "toolz";
version = "0.10.0";
src = fetchPypi {
inherit pname version;
sha256 = "08fdd5ef7c96480ad11c12d472de21acd32359996f69a5259299b540feba4560";
};
checkInputs = [ nose ];
checkPhase = ''
nosetests toolz/tests
'';
meta = with lib; {
homepage = "https://github.com/pytoolz/toolz";
description = "List processing tools and functional utilities";
license = licenses.bsd3;
maintainers = with maintainers; [ fridh ];
};
}

View File

@@ -6,18 +6,16 @@
buildPythonPackage rec {
pname = "toolz";
version = "0.10.0";
version = "0.11.1";
src = fetchPypi {
inherit pname version;
sha256 = "08fdd5ef7c96480ad11c12d472de21acd32359996f69a5259299b540feba4560";
sha256 = "1grz3zvw5ixwqqlbv0n7j11mlcxb66cirh5i9x9zw8kqy0hpk967";
};
checkInputs = [ nose ];
checkPhase = ''
# https://github.com/pytoolz/toolz/issues/357
rm toolz/tests/test_serialization.py
nosetests toolz/tests
'';

View File

@@ -1,4 +1,5 @@
{ lib
{ stdenv
, lib
, buildPythonPackage
, fetchPypi
, isPy3k
@@ -49,6 +50,7 @@ buildPythonPackage rec {
rlp
shamir-mnemonic
typing-extensions
] ++ lib.optionals stdenv.isLinux [
trezor-udev-rules
];