Merge pull request #166489 from NixOS/python-updates

This commit is contained in:
Martin Weinelt 2022-04-15 03:47:30 +02:00 committed by GitHub
commit 33425fdc96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
296 changed files with 2166 additions and 1134 deletions

View file

@ -17,6 +17,7 @@
let
# NOTE: check if we can drop any of these overrides when bumping the version
overrideVersions = [
"lxml"
"pyparsing"
"pyqt5"
];

View file

@ -27,7 +27,7 @@ mkDerivationWith python3Packages.buildPythonApplication rec {
pyparsing
pyqtgraph
spyder
pathpy
path
qtconsole
requests
];

View file

@ -7,8 +7,9 @@ let
version = "1.3.24";
src = oldAttrs.src.override {
inherit version;
sha256 = "ebbb777cbf9312359b897bf81ba00dae0f5cb69fba2a18265dcc18a6f5ef7519";
hash = "sha256-67t3fL+TEjWbiXv4G6ANrg9ctp+6KhgmXcwYpvXvdRk=";
};
doCheck = false;
});
sqlalchemy-utils = super.sqlalchemy-utils.overridePythonAttrs (oldAttrs: rec {
version = "0.36.6";

View file

@ -233,7 +233,7 @@ let
self: super: {
falcon = super.falcon.overridePythonAttrs (oldAttrs: rec {
#pytestFlagsArray = [ "-W ignore::DeprecationWarning" ];
disabledTestPaths = oldAttrs.disabledTestPaths ++ [
disabledTestPaths = oldAttrs.disabledTestPaths or [] ++ [
"tests/asgi/test_asgi_servers.py"
];
});
@ -244,7 +244,7 @@ let
(
self: super: {
sanic = super.sanic.overridePythonAttrs (oldAttrs: rec {
disabledTestPaths = oldAttrs.disabledTestPaths ++ [
disabledTestPaths = oldAttrs.disabledTestPaths or [] ++ [
"test_cli.py"
"test_cookies.py"
# requires network

View file

@ -1,14 +1,26 @@
{ lib, python3 }:
{ lib, python3, fetchpatch }:
python3.pkgs.buildPythonApplication rec {
pname = "fava";
version = "1.19";
version = "1.21";
format = "pyproject";
src = python3.pkgs.fetchPypi {
inherit pname version;
sha256 = "def7c0210bf0ce8dfffdb46ce21b3efcf71eba5a4e903565258419e4c53c2d43";
sha256 = "sha256-0aFCKEjmXn6yddgNMi9t4rzqHcN7VBLoz3LEg9apmNY=";
};
patches = [
(fetchpatch {
# Update werkzeug compatibility
url = "https://github.com/beancount/fava/commit/5a99417a42e1d739b1e57fae2d01ff1d146dcbc2.patch";
hash = "sha256-Y6IcxZAcFJEYgT8/xBIABdkP+pUdQX1EgSS5uNdSJUE=";
excludes = [
".pre-commit-config.yaml"
];
})
];
nativeBuildInputs = with python3.pkgs; [ setuptools-scm ];
propagatedBuildInputs = with python3.pkgs; [

View file

@ -1,23 +1,45 @@
{ lib
, buildPythonPackage
, pythonOlder
, fetchPypi
, isPyPy
# propagates
, markupsafe
# extras: Babel
, Babel
# tests
, mock
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "Mako";
version = "1.1.6";
version = "1.2.0";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
sha256 = "4e9e345a41924a954251b95b4b28e14a301145b544901332e658907a7464b6b2";
sha256 = "sha256-mnx+kiuH2zaGIQz0nV12cDOkHUAQsoTnR2gskr3dizk=";
};
propagatedBuildInputs = [ markupsafe ];
checkInputs = [ pytestCheckHook markupsafe mock ];
propagatedBuildInputs = [
markupsafe
];
passthru.extras-require = {
babel = [
Babel
];
};
checkInputs = [
pytestCheckHook
mock
] ++ passthru.extras-require.babel;
disabledTests = lib.optionals isPyPy [
# https://github.com/sqlalchemy/mako/issues/315
@ -29,6 +51,11 @@ buildPythonPackage rec {
"test_bytestring_passthru"
];
disabledTestPaths = [
# lingua dependency is not packaged
"test/ext/test_linguaplugin.py"
];
meta = with lib; {
description = "Super-fast templating language";
homepage = "https://www.makotemplates.org/";

View file

@ -18,13 +18,13 @@
buildPythonPackage rec {
pname = "aesara";
version = "2.4.0";
version = "2.5.3";
src = fetchFromGitHub {
owner = "aesara-devs";
repo = "aesara";
rev = "38d7a813646c1e350170c46bafade0e7d0e2427c";
sha256 = "sha256-933bM15BZi4sTjnIOGAg5dc5tXVWQ9lFzktOtzj5DNQ=";
rev = "refs/tags/rel-${version}";
sha256 = "sha256-20nc70gNdcGjtGxv2WxmYxmswNH8v7yGLkToP2iazjc=";
};
nativeBuildInputs = [

View file

@ -13,13 +13,13 @@
buildPythonPackage rec {
pname = "afdko";
version = "3.8.0";
version = "3.8.1";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
sha256 = "1404jdwyv16mri5jh6qly63nli2iw9yq2nn37h8iqvlbawfbjj0p";
sha256 = "sha256-BaSpw7TiBymCvoP0/z1zynWKQJH/PjbbGf85ZI9LOZw=";
};
format = "pyproject";

View file

@ -10,12 +10,12 @@
buildPythonPackage rec {
pname = "aiobotocore";
version = "2.1.2";
version = "2.2.0";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-AP1/Q8wEhNjtJ0/QvkkqoWp/6medvqlqYCu3IspMLSI=";
sha256 = "sha256-cTV5OcMCJnDXu5SDMZQUekTr/OJLFkPk5E/twe5zSbo=";
};
# relax version constraints: aiobotocore works with newer botocore versions

View file

@ -11,14 +11,14 @@
buildPythonPackage rec {
pname = "aioftp";
version = "0.20.1";
version = "0.21.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-6p3n5tNNQrbwHqGRXYNL4+cf31Blx2e9elxX6/wxj/4=";
sha256 = "sha256-TwORfChymaB4k5Q3CAPjsPaTXiQdjyi7s2fCN5qTT5I=";
};
propagatedBuildInputs = [

View file

@ -13,14 +13,14 @@
buildPythonPackage rec {
pname = "alembic";
version = "1.7.6";
version = "1.7.7";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-bAwF6XaKiW2AQ4fiCymYgP4BvFZIQkaw3/6AddbT2Ec=";
sha256 = "sha256-SWEkgXPq186KIe+z3jePE7g5jmYw+rDrJY3HSoryTFg=";
};
propagatedBuildInputs = [
@ -42,10 +42,6 @@ buildPythonPackage rec {
pytest-xdist
];
pytestFlagsArray = [
"--numprocesses" "$NIX_BUILD_CORES"
];
meta = with lib; {
homepage = "https://bitbucket.org/zzzeek/alembic";
description = "A database migration tool for SQLAlchemy";

View file

@ -9,14 +9,14 @@
buildPythonPackage rec {
pname = "amqp";
version = "5.0.9";
version = "5.1.0";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
hash = "sha256-Hl9wdCTlRAeMoZbnKuahSIfOdOAr0Sa+VLfAPJcb7xg=";
hash = "sha256-RGs+io68LOr9Qk/8qrHDU4MNSBYSVleO16ZUSOYB6+0=";
};
propagatedBuildInputs = [

View file

@ -57,10 +57,6 @@ buildPythonPackage rec {
pytestCheckHook
];
pytestFlagsArray = [
"--numprocesses" "$NIX_BUILD_CORES"
];
preCheck = ''
# ansible wants to write to $HOME and crashes if it can't
export HOME=$(mktemp -d)

View file

@ -5,6 +5,7 @@
, fetchPypi
, mock
, openssh
, pbr
, pexpect
, psutil
, pytest-mock
@ -26,6 +27,10 @@ buildPythonPackage rec {
hash = "sha256-2m5dD+gGDL5LnY7QbDYiGdu4GYu0C49WU29GZY2bnBo=";
};
nativeBuildInputs = [
pbr
];
propagatedBuildInputs = [
ansible
psutil

View file

@ -1,36 +1,58 @@
{ lib, buildPythonPackage, fetchFromGitHub
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
# propagates
, allpairspy
, beautifulsoup4
, empty-files
, numpy
, pyperclip
, pytest
# tests
, numpy
, pytestCheckHook
}:
buildPythonPackage rec {
version = "4.0.0";
version = "5.0.0";
pname = "approvaltests";
format = "setuptools";
disabled = pythonOlder "3.6.1";
# no tests included in PyPI tarball
src = fetchFromGitHub {
owner = "approvals";
repo = "ApprovalTests.Python";
rev = "v${version}";
sha256 = "sha256-4dg5xTswqLFRBaZagKrkilCvsAnky9donb03MT/PiWM=";
sha256 = "sha256-ku8J1ccX6LZZitlAOgc3eNCdsFx/FP1nqtdgPJF/jRg=";
};
propagatedBuildInputs = [
allpairspy
beautifulsoup4
empty-files
numpy
pyperclip
pytest
];
postPatch = ''
substituteInPlace setup.py \
--replace bs4 beautifulsoup4 \
--replace "pyperclip==1.5.27" "pyperclip>=1.5.27"
'';
checkInputs = [
numpy
pytestCheckHook
];
disabledTests = [
# tests expects paths below ApprovalTests.Python directory
"test_received_filename"
"test_pytest_namer"
];
pythonImportsCheck = [
"approvaltests.approvals"
"approvaltests.reporters.generic_diff_reporter_factory"
];
meta = with lib; {
description = "Assertion/verification library to aid testing";

View file

@ -6,6 +6,7 @@
, pytest-asyncio
, pytestCheckHook
, pythonOlder
, fetchpatch
}:
buildPythonPackage rec {
@ -22,6 +23,14 @@ buildPythonPackage rec {
sha256 = "sha256-eWDsd8iWK1C/X3t/fKAM1i4hyTM/daGTd8CDSgDTL/U=";
};
patches = [
(fetchpatch {
name = "remove-sock-nonblock-in-tests.patch";
url = "https://github.com/django/asgiref/commit/d451a724c93043b623e83e7f86743bbcd9a05c45.patch";
sha256 = "0whdsn5isln4dqbqqngvsy4yxgaqgpnziz0cndj1zdxim8cdicj7";
})
];
propagatedBuildInputs = [
async-timeout
];

View file

@ -5,11 +5,11 @@
buildPythonPackage rec {
pname = "asn1crypto";
version = "1.4.0";
version = "1.5.1";
src = fetchPypi {
inherit pname version;
sha256 = "f4f6e119474e58e04a2b1af817eb585b4fd72bdd89b998624712b5c99be7641c";
sha256 = "sha256-E644UCvmMhFav4oky+X02lLjtSMZkK/zESPIBTBsy5w=";
};
# No tests included

View file

@ -1,6 +1,7 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonAtLeast
, pythonOlder
, isPyPy
, lazy-object-proxy
@ -14,7 +15,7 @@
buildPythonPackage rec {
pname = "astroid";
version = "2.9.3"; # Check whether the version is compatible with pylint
version = "2.11.2"; # Check whether the version is compatible with pylint
disabled = pythonOlder "3.6.2";
@ -22,7 +23,7 @@ buildPythonPackage rec {
owner = "PyCQA";
repo = pname;
rev = "v${version}";
sha256 = "1x77faggk1dgxy48ng31xj9h6p51w312kvk5zqgvd5f19nvznxyi";
sha256 = "sha256-adnvJCchsMWQxsIlenndUb6Mw1MgCNAanZcTmssmsEc=";
};
SETUPTOOLS_SCM_PRETEND_VERSION = version;
@ -45,6 +46,9 @@ buildPythonPackage rec {
disabledTests = [
# assert (1, 1) == (1, 16)
"test_end_lineno_string"
] ++ lib.optionals (pythonAtLeast "3.10") [
# AssertionError: Lists differ: ['ABC[16 chars]yBase', 'Final', 'Generic', 'MyProtocol', 'Protocol', 'object'] != ['ABC[16 chars]yBase', 'Final', 'Generic', 'MyProtocol', 'object']
"test_mro_typing_extensions"
];
passthru.tests = {

View file

@ -19,7 +19,7 @@
let
pname = "astropy";
version = "5.0.1";
version = "5.0.3";
in
buildPythonPackage {
inherit pname version;
@ -29,7 +29,7 @@ buildPythonPackage {
src = fetchPypi {
inherit pname version;
sha256 = "sha256-Y4LN5qIFqgsWoNXmHAwBMevU8BdNbHPilk9L7hMqkCc=";
sha256 = "sha256-GxZOxV63HH8Pil8zVDOcWkLWEpg1ayFOT7n/JWqGgUc=";
};
SETUPTOOLS_SCM_PRETEND_VERSION = version;

View file

@ -22,10 +22,10 @@ buildPythonPackage rec {
propagatedBuildInputs = [
six
astroid
];
checkInputs = [
astroid
pytestCheckHook
];
@ -34,6 +34,11 @@ buildPythonPackage rec {
"test_slices"
];
disabledTestPaths = [
# incompatible with astroid 2.11.0, pins <= 2.5.3
"tests/test_astroid.py"
];
pythonImportsCheck = [ "asttokens" ];
meta = with lib; {

View file

@ -2,7 +2,6 @@
, buildPythonPackage
, fetchPypi
, pythonOlder
, pytest-asyncio
, pytestCheckHook
}:
@ -19,7 +18,6 @@ buildPythonPackage rec {
};
checkInputs = [
pytest-asyncio
pytestCheckHook
];

View file

@ -1,19 +1,45 @@
{ lib, buildPythonPackage, fetchPypi, future, cppy }:
{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools-scm
, future
, cppy
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "atom";
version = "0.7.0";
version = "0.8.0";
format = "pyproject";
src = fetchPypi {
inherit pname version;
sha256 = "4055fbdeeb692d3d52c6e3c628d7513fc71f147920cac7d0da05b6dbb5ec8c8d";
src = fetchFromGitHub {
owner = "nucleic";
repo = pname;
rev = version;
hash = "sha256-Xby3QopKw7teShMi80RMG8YdhOOvfQb5vwOuFEUTxHQ=";
};
buildInputs = [ cppy ];
propagatedBuildInputs = [ future ];
SETUPTOOLS_SCM_PRETEND_VERSION = version;
# Tests not released to pypi
doCheck = true;
nativeBuildInputs = [
setuptools-scm
];
buildInputs = [
cppy
];
preCheck = ''
rm -rf atom
'';
checkInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"atom.api"
];
meta = with lib; {
description = "Memory efficient Python objects";

View file

@ -5,6 +5,7 @@
, pyserial
, pytestCheckHook
, pythonOlder
, six
}:
buildPythonPackage rec {
@ -28,6 +29,7 @@ buildPythonPackage rec {
checkInputs = [
pytestCheckHook
six
];
pythonImportsCheck = [

View file

@ -23,14 +23,14 @@
buildPythonPackage rec {
pname = "autobahn";
version = "22.2.2";
version = "22.3.2";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-YOH0xgKqzQUv/j1GrkC2t1+ChrPEaSLCE7UjFi5YwX4=";
sha256 = "sha256-WKiHx6GWuwjYtmJMs2lfSTqeXJ8A/TUNjW+Cm0f/kDY=";
};
propagatedBuildInputs = [

View file

@ -15,19 +15,20 @@
}:
buildPythonPackage rec {
version = "1.22.1";
version = "1.23.1";
pname = "azure-core";
disabled = isPy27;
src = fetchPypi {
inherit pname version;
extension = "zip";
sha256 = "sha256-S25AUmijO4cxB3lklc7D8vGx/+k1Ykzg+93/NtONOk0=";
sha256 = "sha256-KKAd+68KaBLE4qgtFkLqMJVqlznyW8d8myO5H06mjw8=";
};
propagatedBuildInputs = [
requests
six
typing-extensions
];
checkInputs = [
@ -41,7 +42,6 @@ buildPythonPackage rec {
pytest-asyncio
pytestCheckHook
trio
typing-extensions
];
# test server needs to be available
@ -57,6 +57,8 @@ buildPythonPackage rec {
"response"
"request"
"timeout"
"test_sync_transport_short_read_download_stream"
"test_aio_transport_short_read_download_stream"
# disable 8 tests failing on some darwin machines with errors:
# azure.core.polling.base_polling.BadStatus: Invalid return status 403 for 'GET' operation
# azure.core.exceptions.HttpResponseError: Operation returned an invalid status 'Forbidden'

View file

@ -2,6 +2,7 @@
, buildPythonPackage
, fetchPypi
, azure-core
, typing-extensions
}:
buildPythonPackage rec {
@ -16,6 +17,7 @@ buildPythonPackage rec {
propagatedBuildInputs = [
azure-core
typing-extensions
];
pythonNamespaces = "azure.mgmt";

View file

@ -9,12 +9,12 @@
buildPythonPackage rec {
pname = "azure-mgmt-msi";
version = "1.0.0";
version = "6.0.0";
src = fetchPypi {
inherit pname version;
extension = "zip";
sha256 = "0n4gbwk843z66hhpcp1kcrnwqkzygbbc2ma01r9asgfv4nmklvyl";
sha256 = "sha256-RpmYeF6LRKqu0KrjNAFAaOGxyfPuK+TImOumP+FPX2w=";
};
propagatedBuildInputs = [

View file

@ -1,9 +1,19 @@
{ lib, buildPythonPackage, isPyPy, fetchPypi, pythonOlder
, cffi, pycparser, mock, pytest, py, six }:
{ lib
, buildPythonPackage
, setuptools
, isPyPy
, fetchPypi
, pythonOlder
, cffi
, pytestCheckHook
, six
}:
buildPythonPackage rec {
version = "3.2.0";
pname = "bcrypt";
version = "3.2.0";
format = "pyproject";
disabled = pythonOlder "3.6";
src = fetchPypi {
@ -11,16 +21,31 @@ buildPythonPackage rec {
sha256 = "5b93c1726e50a93a033c36e5ca7fdcd29a5c7395af50a6892f5d9e7c6cfbfb29";
};
buildInputs = [ pycparser mock pytest py ];
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = [ six ] ++ lib.optional (!isPyPy) cffi;
propagatedBuildInputs = [
six
cffi
];
propagatedNativeBuildInputs = lib.optional (!isPyPy) cffi;
propagatedNativeBuildInputs = [
cffi
];
checkInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"bcrypt"
];
meta = with lib; {
maintainers = with maintainers; [ domenkozar ];
description = "Modern password hashing for your software and your servers";
license = licenses.asl20;
homepage = "https://github.com/pyca/bcrypt/";
license = licenses.asl20;
maintainers = with maintainers; [ domenkozar ];
};
}

View file

@ -1,6 +1,7 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, wcwidth
, pytestCheckHook
}:
@ -15,6 +16,10 @@ buildPythonPackage rec {
sha256 = "12ci6jy8qmbphsvzvj98466nlhclfzs0a0pmbsv3mf5bfcdwvbh7";
};
propagatedBuildInputs = [
wcwidth
];
checkInputs = [
pytestCheckHook
];
@ -25,7 +30,7 @@ buildPythonPackage rec {
meta = with lib; {
description = "Python package for printing visually appealing tables";
homepage = "https://github.com/CERT-Polska/mwdblib";
homepage = "https://github.com/pri22296/beautifultable";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};

View file

@ -1,6 +1,6 @@
{ lib, stdenv, fetchFromGitHub
, buildPythonApplication, python
, pytestCheckHook, mock, pathpy, pyhamcrest, pytest-html
, pytestCheckHook, mock, path, pyhamcrest, pytest-html
, glibcLocales
, colorama, cucumber-tag-expressions, parse, parse-type, six
}:
@ -16,7 +16,7 @@ buildPythonApplication rec {
hash = "sha256-B8PUN1Q4UAsDWrHjPZDlpaPjCKjI/pAogCSI+BQnaWs=";
};
checkInputs = [ pytestCheckHook mock pathpy pyhamcrest pytest-html ];
checkInputs = [ pytestCheckHook mock path pyhamcrest pytest-html ];
# upstream tests are failing, so instead we only check if we can import it
doCheck = false;

View file

@ -6,11 +6,11 @@
buildPythonPackage rec {
pname = "bitarray";
version = "2.4.0";
version = "2.4.1";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-8SA+kC1R3zGRfXfuupw/540DKHOirXjHN+JkIPAIDlg=";
sha256 = "sha256-+uygP5eemSzHb3QGr365eVyxEbjYlpyJGgMr10l8h9o=";
};
checkPhase = ''

View file

@ -2,11 +2,11 @@
buildPythonPackage rec {
pname = "bitstruct";
version = "8.12.1";
version = "8.13.0";
src = fetchPypi {
inherit pname version;
sha256 = "45b2b932ce6681f5c6ce8cba39abdd423b579b0568c76fa48b1e09c88368ede7";
sha256 = "sha256-e4fZ5B/1UqjK4G6iNow3crbzECvatLZeeTvnWQ1p8Ds=";
};
meta = with lib; {

View file

@ -13,11 +13,11 @@
buildPythonPackage rec {
pname = "boto3";
version = "1.21.12"; # N.B: if you change this, change botocore and awscli to a matching version
version = "1.21.30"; # N.B: if you change this, change botocore and awscli to a matching version
src = fetchPypi {
inherit pname version;
sha256 = "sha256-yS7CCmcHIbWhvAE7MFqE2yt/nHFmU7MFbOfi+9KhgO8=";
sha256 = "sha256-8K+PTvX+Y1PHlM08zmJ9Rpphi1is58p1pjz9cZ32Fc4=";
};
propagatedBuildInputs = [ botocore jmespath s3transfer ] ++ lib.optionals (!isPy3k) [ futures ];

View file

@ -13,11 +13,11 @@
buildPythonPackage rec {
pname = "botocore";
version = "1.24.12"; # N.B: if you change this, change boto3 and awscli to a matching version
version = "1.24.33"; # N.B: if you change this, change boto3 and awscli to a matching version
src = fetchPypi {
inherit pname version;
sha256 = "sha256-AXSZmgSwouQkVxBgk6zps2+pR3KkQtm89gdQJj0dBz4=";
sha256 = "sha256-6l/RgAggMKbDP6Gb8BHXKXDz7SPP/xtBQTBp4yV2gQM=";
};
propagatedBuildInputs = [

View file

@ -18,11 +18,11 @@
buildPythonPackage rec {
pname = "boxx";
version = "0.9.10";
version = "0.9.11";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-Iw6jRhKAroqfWmbXhD7YTn4s8FrE/Iyd31EOP0tMdkQ=";
sha256 = "sha256-xB/bCSIzT0JF5ZPWqSn3P8soBJnzDTfCyan+iOrfWzw=";
};
propagatedBuildInputs = [

View file

@ -52,8 +52,6 @@ buildPythonPackage rec {
];
pytestFlagsArray = [
"-n"
"$NIX_BUILD_CORES"
"-W"
"ignore::DeprecationWarning"
];

View file

@ -31,11 +31,11 @@ let
package = buildPythonPackage rec {
pname = "buildbot";
version = "3.4.1";
version = "3.5.0";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-GmKMqejHjtEiEtlZffze7PGNjVwUKB/ZcvUgJ4DoeDQ=";
sha256 = "sha256-woGHdCan5qTp00toNkWa821EgVQMrPK+OWXoqFcgIDQ=";
};
propagatedBuildInputs = [

View file

@ -6,7 +6,7 @@ buildPythonPackage rec {
src = fetchPypi {
inherit pname version;
sha256 = "sha256-A2a5rEL5MN9jlu5vVnUIKx9ma2H6wuJAWjkqLpQgcfc=";
sha256 = "sha256-CYbMixfZZ1xypV0J7TW54n/fja9RGMlWiF7StJYFnqM=";
};
postPatch = ''

View file

@ -7,7 +7,7 @@
src = fetchPypi {
inherit pname version;
sha256 = "sha256-Hly1dwUbWblHoP+ufjxyz4boXby8kxeFSHLMHcCpc1o=";
sha256 = "sha256-boa/MWi/HAhNU3/n96i0fuoQ+jT5I+dWoe1Zd7f/Yvs=";
};
# Remove unneccessary circular dependency on buildbot
@ -34,7 +34,7 @@
src = fetchPypi {
inherit pname version;
sha256 = "sha256-QuV808Wg9epCgjehuUaMKCLLTLfFJVWBdKPy8sZfBYg=";
sha256 = "sha256-NUDTwgkQuasOlJxNTlvfIm99LNVCrRIdBmgeJnwkSU8=";
};
buildInputs = [ buildbot-pkg ];
@ -56,7 +56,7 @@
src = fetchPypi {
inherit pname version;
sha256 = "sha256-p8PRQaWrPb63RrF4FtTX65qM3HdzI4Gl4tR0zTOBFEI=";
sha256 = "sha256-EmiIDCG4iFIwFnwii8fjII7C7wsBifzeZeW7HyY04dE=";
};
buildInputs = [ buildbot-pkg ];
@ -78,7 +78,7 @@
src = fetchPypi {
inherit pname version;
sha256 = "sha256-cNYptEp98padbyoY1DmZbpaED7O5pfck9oMjst4RHnI=";
sha256 = "sha256-QcS8QJ17uzDvkynTczj05LojuIT6feGiQNCwCESbVLw=";
};
buildInputs = [ buildbot-pkg ];
@ -100,7 +100,7 @@
src = fetchPypi {
inherit pname version;
sha256 = "sha256-o747SIyqJom4ucZ7hmODcP0VC7i+ydgvi+oMxn/vupc=";
sha256 = "sha256-U9ecRxpDowzjD4GsrW4FUHcbNaWeAFGKDlqMrbIoTrQ=";
};
buildInputs = [ buildbot-pkg ];

View file

@ -1,5 +1,26 @@
{ lib, buildPythonPackage, fetchPypi, buildbot, setuptoolsTrial, mock, twisted,
future, coreutils, nixosTests }:
{ lib
, buildPythonPackage
, fetchPypi
, buildbot
# patch
, coreutils
# propagates
, autobahn
, future
, msgpack
, twisted
# tests
, mock
, parameterized
, psutil
, setuptoolsTrial
# passthru
, nixosTests
}:
buildPythonPackage (rec {
pname = "buildbot-worker";
@ -7,18 +28,31 @@ buildPythonPackage (rec {
src = fetchPypi {
inherit pname version;
sha256 = "sha256-9wdUvp00vuP7peJ+Oo4guHLfIz0YWHwp6q/zlKOOoXg=";
sha256 = "sha256-HZH3TdH5dhr3f6ev25O3SgPPNbiFGMmAp9DHwcb/2MA=";
};
propagatedBuildInputs = [ twisted future ];
checkInputs = [ setuptoolsTrial mock ];
postPatch = ''
substituteInPlace buildbot_worker/scripts/logwatcher.py \
--replace /usr/bin/tail "${coreutils}/bin/tail"
'';
nativeBuildInputs = [
setuptoolsTrial
];
propagatedBuildInputs = [
autobahn
future
msgpack
twisted
];
checkInputs = [
mock
parameterized
psutil
];
passthru.tests = {
smoke-test = nixosTests.buildbot;
};

View file

@ -52,9 +52,6 @@ buildPythonPackage rec {
ujson
];
pytestFlagsArray = [
"--numprocesses $NIX_BUILD_CORES"
];
postPatch = ''
substituteInPlace pyproject.toml \

View file

@ -19,11 +19,12 @@ if isPyPy then null else buildPythonPackage rec {
propagatedBuildInputs = [ pycparser ];
prePatch = lib.optionalString stdenv.isDarwin ''
postPatch = lib.optionalString stdenv.isDarwin ''
# Remove setup.py impurities
substituteInPlace setup.py --replace "'-iwithsysroot/usr/include/ffi'" ""
substituteInPlace setup.py --replace "'/usr/include/ffi'," ""
substituteInPlace setup.py --replace '/usr/include/libffi' '${lib.getDev libffi}/include'
substituteInPlace setup.py \
--replace "'-iwithsysroot/usr/include/ffi'" "" \
--replace "'/usr/include/ffi'," "" \
--replace '/usr/include/libffi' '${lib.getDev libffi}/include'
'';
# The tests use -Werror but with python3.6 clang detects some unreachable code.

View file

@ -62,7 +62,7 @@ buildPythonPackage rec {
sed -i setup.py -e "/pip>=/c\'pip',"
substituteInPlace setup.py \
--replace "typing==3.6.4" "typing" \
--replace "attrs>=19.3.0,<21.3.0" "attrs"
--replace "jmespath>=0.9.3,<1.0.0" "jmespath>=0.9.3,<2.0.0"
'';
disabledTestPaths = [

View file

@ -6,7 +6,7 @@
, jaraco_collections
, more-itertools
, objgraph
, pathpy
, path
, portend
, pytest-forked
, pytest-services
@ -51,7 +51,7 @@ buildPythonPackage rec {
checkInputs = [
objgraph
pathpy
path
pytest-forked
pytest-services
pytestCheckHook

View file

@ -10,12 +10,12 @@
buildPythonPackage rec {
pname = "ckcc-protocol";
version = "1.3.0";
version = "1.3.1";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-UVLKJHDPxi9ivY3JyIySmce0NUhxIIlIxVTdPoXMaKM=";
sha256 = "sha256-5wsVg7GX/9UygzpGI6DwrkAvexgcOmJyuv8GXiPPWvk=";
};
propagatedBuildInputs = [ click ecdsa hidapi pyaes ];

View file

@ -8,6 +8,7 @@
, pysmt
, pythonOlder
, pytestCheckHook
, six
, z3
}:
@ -36,6 +37,7 @@ buildPythonPackage rec {
checkInputs = [
nose
pytestCheckHook
six
];
postPatch = ''

View file

@ -2,11 +2,11 @@
buildPythonPackage rec {
pname = "click-log";
version = "0.3.2";
version = "0.4.0";
src = fetchPypi {
inherit pname version;
sha256 = "16fd1ca3fc6b16c98cea63acf1ab474ea8e676849dc669d86afafb0ed7003124";
sha256 = "sha256-OXD4VwrFRJEje82z2KtePu9sBX3yn4w9EVGlGpwjuXU=";
};
propagatedBuildInputs = [ click ];

View file

@ -3,7 +3,6 @@
, pythonOlder
, fetchPypi
, importlib-metadata
, locale
, pytestCheckHook
# large-rebuild downstream dependencies
@ -17,18 +16,14 @@
buildPythonPackage rec {
pname = "click";
version = "8.0.4";
version = "8.1.2";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-hFjXsSh8X7EoyQ4jOBz5nc3nS+r2x/9jhM6E1v4JCts=";
sha256 = "sha256-R5cH/hTZ7JoHV2GLehAKCuTE4jb6xbf4DKaAKBQaGnI=";
};
postPatch = ''
substituteInPlace src/click/_unicodefun.py \
--replace '"locale"' "'${locale}/bin/locale'"
'';
propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [
importlib-metadata
];

View file

@ -57,8 +57,6 @@ buildPythonPackage rec {
# some test in test_buffered_reader.py doesn't seem to return
disabledTestPaths = [ "tests/test_buffered_reader.py" ];
pytestFlagsArray = [ "-n" "$NIX_BUILD_CORES" ];
# most tests require `clickhouse`
# TODO: enable tests after `clickhouse` unbroken
doCheck = false;

View file

@ -1,12 +1,18 @@
{ lib
, buildPythonPackage
, fetchPypi
, python-dateutil
# propagtes
, sigtools
, six
, attrs
, od
, docutils
# extras: datetime
, python-dateutil
# tests
, pygments
, unittest2
, pytestCheckHook
@ -21,6 +27,25 @@ buildPythonPackage rec {
sha256 = "3177a028e4169d8865c79af82bdd441b24311d4bd9c0ae8803641882d340a51d";
};
postPatch = ''
substituteInPlace setup.py \
--replace "docutils ~= 0.17.0" "docutils"
'';
propagatedBuildInputs = [
attrs
docutils
od
sigtools
six
];
passthru.extras-require = {
datetime = [
python-dateutil
];
};
# repeated_test no longer exists in nixpkgs
# also see: https://github.com/epsy/clize/issues/74
doCheck = false;
@ -31,14 +56,6 @@ buildPythonPackage rec {
unittest2
];
propagatedBuildInputs = [
attrs
docutils
od
sigtools
six
];
pythonImportsCheck = [ "clize" ];
meta = with lib; {

View file

@ -8,12 +8,12 @@
buildPythonPackage rec {
pname = "cppy";
version = "1.2.0";
version = "1.2.1";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-leiGLk+CbD8qa3tlgzOxYvgMvp+UOqDQp6ay74UK7/w=";
sha256 = "sha256-g7Q78XsQhawVxd69tCFU8Ti5KCNLIURzWJgfadDW/hs=";
};
nativeBuildInputs = [

View file

@ -67,8 +67,6 @@ buildPythonPackage rec {
'';
pytestFlagsArray = [
# parallelize
"--numprocesses $NIX_BUILD_CORES"
# rerun failed tests up to three times
"--reruns 3"
# don't run tests that require network access

View file

@ -32,7 +32,7 @@ buildPythonPackage rec {
pname = "datasette";
version = "0.61.1";
disabled = pythonOlder "3.6";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "simonw";
@ -41,6 +41,17 @@ buildPythonPackage rec {
sha256 = "sha256-HVzMyF4ujYK12UQ25il/XROPo+iBldsMxOTx+duoc5o=";
};
postPatch = ''
substituteInPlace setup.py \
--replace '"pytest-runner"' "" \
--replace "click>=7.1.1,<8.1.0" "click>=7.1.1,<8.2.0" \
--replace "click-default-group~=1.2.2" "click-default-group" \
--replace "hupper~=1.9" "hupper" \
--replace "Jinja2>=2.10.3,<3.1.0" "Jinja2" \
--replace "pint~=0.9" "pint" \
--replace "uvicorn~=0.11" "uvicorn"
'';
propagatedBuildInputs = [
aiofiles
asgi-csrf
@ -70,17 +81,6 @@ buildPythonPackage rec {
trustme
];
postConfigure = ''
substituteInPlace setup.py \
--replace '"pytest-runner"' ""
substituteInPlace setup.py \
--replace "click-default-group~=1.2.2" "click-default-group" \
--replace "hupper~=1.9" "hupper" \
--replace "pint~=0.9" "pint" \
--replace "pluggy~=0.13.0" "pluggy" \
--replace "uvicorn~=0.11" "uvicorn" \
'';
# takes 30-180 mins to run entire test suite, not worth the CPU resources, slows down reviews
# with pytest-xdist, it still takes around 10 mins with 32 cores
# just run the csv tests, as this should give some indictation of correctness

View file

@ -70,7 +70,6 @@ buildPythonPackage rec {
'';
pytestFlagsArray = [
"-n $NIX_BUILD_CORES"
"datashader"
];

View file

@ -18,7 +18,7 @@
buildPythonPackage rec {
pname = "dateparser";
version = "1.1.0";
version = "1.1.1";
disabled = !isPy3k;
@ -26,7 +26,7 @@ buildPythonPackage rec {
owner = "scrapinghub";
repo = "dateparser";
rev = "v${version}";
sha256 = "sha256-RpQWDsj7vGtfu6wf4yETdswfXDfoTkburTl6aOA03Ww=";
sha256 = "sha256-bDup3q93Zq+pvwsy/lQy2byOMjG6C/+7813hWQMbZRU=";
};
propagatedBuildInputs = [

View file

@ -2,11 +2,11 @@
buildPythonPackage rec {
pname = "debtcollector";
version = "2.4.0";
version = "2.5.0";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-G8A+LZAX3kgMQc8+Wg2MyV8bDI8TOSgbTsqKIqz3aiM=";
sha256 = "sha256-3J0a0/dFxD9LvtvKMPn/6JBajAKMmSbmEHeEfV6iV6s=";
};
nativeBuildInputs = [ pbr ];

View file

@ -84,7 +84,6 @@ buildPythonPackage rec {
# Override default arguments in pytest.ini
pytestFlagsArray = [
"--timeout=0"
"-n=$NIX_BUILD_CORES"
];
disabledTests = lib.optionals (pythonAtLeast "3.10") [

View file

@ -2,6 +2,7 @@
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, six
}:
buildPythonPackage rec {
@ -21,6 +22,7 @@ buildPythonPackage rec {
checkInputs = [
pytestCheckHook
six
];
pythonImportsCheck = [ "dictpath" ];

View file

@ -45,10 +45,6 @@ buildPythonPackage rec {
"test_get_many"
];
pytestFlagsArray = [
"-n $NIX_BUILD_CORES"
];
pythonImportsCheck = [
"diskcache"
];

View file

@ -1,25 +1,43 @@
{ lib
, buildPythonPackage
, fetchPypi
, fetchFromGitHub
, django
, django-taggit
, pytz
, pythonOlder
, six
, python
}:
buildPythonPackage rec {
pname = "django-modelcluster";
version = "5.2";
src = fetchPypi {
inherit pname version;
sha256 = "e541a46a0a899ef4778a4708be22e71cac3efacc09a6ff44bc065c5c9194c054";
};
version = "6.0";
format = "setuptools";
disabled = pythonOlder "3.5";
doCheck = false;
src = fetchFromGitHub {
owner = "wagtail";
repo = pname;
rev = "v${version}";
hash = "sha256-p6hvOkPWRVJYLHvwyn9nS05wblikRFmlSYZuLiCcuqc=";
};
propagatedBuildInputs = [ pytz six ];
propagatedBuildInputs = [
django
pytz
];
passthru.extras-require.taggit = [
django-taggit
];
checkInputs = passthru.extras-require.taggit;
checkPhase = ''
runHook preCheck
${python.interpreter} ./runtests.py --noinput
runHook postCheck
'';
meta = with lib; {
description = "Django extension to allow working with 'clusters' of models as a single unit, independently of the database";

View file

@ -39,7 +39,6 @@ buildPythonPackage rec {
pytestCheckHook
tensorflow
];
pytestFlagsArray = [ "-n $NIX_BUILD_CORES" ];
pythonImportsCheck = [
"haiku"

View file

@ -8,11 +8,11 @@
buildPythonPackage rec {
pname = "docutils";
version = "0.17.1";
version = "0.18.1";
src = fetchPypi {
inherit pname version;
sha256 = "686577d2e4c32380bb50cbb22f575ed742d58168cee37e99117a854bcd88f125";
sha256 = "sha256-Z5mHyvNhp1OdduWEy+3cMR467pN4d8hzRvMd68Y+nQY=";
};
# Only Darwin needs LANG, but we could set it in general.

View file

@ -2,6 +2,7 @@
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, pythonAtLeast
, pytestCheckHook
}:
@ -21,6 +22,10 @@ buildPythonPackage rec {
pytestCheckHook
];
# Lots of tests hang during teardown with:
# ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:2396)
doCheck = pythonOlder "3.10";
pythonImportsCheck = [ "dugong" ];
meta = with lib; {

View file

@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchPypi, EasyProcess, pathpy, pytestCheckHook }:
{ lib, buildPythonPackage, fetchPypi, EasyProcess, path, pytestCheckHook }:
buildPythonPackage rec {
pname = "entrypoint2";
@ -11,7 +11,7 @@ buildPythonPackage rec {
pythonImportsCheck = [ "entrypoint2" ];
checkInputs = [ EasyProcess pathpy pytestCheckHook ];
checkInputs = [ EasyProcess path pytestCheckHook ];
meta = with lib; {
description = "Easy to use command-line interface for python modules";

View file

@ -0,0 +1,42 @@
{ lib
, stdenv
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
}:
let
pname = "ephemeral-port-reserve";
version = "1.1.4";
in
buildPythonPackage {
inherit pname version;
format = "setuptools";
src = fetchFromGitHub {
owner = "Yelp";
repo = "ephemeral-port-reserve";
rev = "v${version}";
hash = "sha256-R6NRpfaT05PO/cTWgCakiGfCuCyucjVOXbAezn5x1cU=";
};
checkInputs = [
pytestCheckHook
];
disabledTests = lib.optionals stdenv.isDarwin [
# can't find hostname in our darwin build environment
"test_fqdn"
];
pythonImportsCheck = [
"ephemeral_port_reserve"
];
meta = with lib; {
description = "Find an unused port, reliably";
homepage = "https://github.com/Yelp/ephemeral-port-reserve/";
license = licenses.mit;
maintainers = with maintainers; [ hexa ];
};
}

View file

@ -12,12 +12,12 @@
buildPythonPackage rec {
pname = "faker";
version = "13.3.0";
version = "13.3.4";
src = fetchPypi {
pname = "Faker";
inherit version;
hash = "sha256-YYsUDHdHV4bb46VAmtU1Ict2dGq3pcd7mcZj8+8bG8I=";
hash = "sha256-GIlhBl+1x46mOfQhdvVRAPcskMOjF5rGyVXEvXErBRE=";
};
propagatedBuildInputs = [

View file

@ -26,6 +26,11 @@ buildPythonPackage rec {
hash = "sha256-fCxLobQuCnUzfFS3d78GcQVrRWllDj/5J+S5s4WvyOw=";
};
postPatch = ''
substituteInPlace setup.cfg \
--replace "redis<4.2.0" "redis"
'';
propagatedBuildInputs = [
aioredis
lupa

View file

@ -1,22 +1,21 @@
{ lib
, buildPythonPackage
, pythonOlder
, fetchPypi
, pytestCheckHook
, isPyPy
, fetchFromGitHub
# build
, cython
# tests
, aiofiles
, cbor2
, ddt
, gunicorn
, httpx
, hypercorn
, jsonschema
, msgpack
, mujson
, nose
, orjson
, pecan
, pytest-asyncio
, python-mimeparse
, pytestCheckHook
, pyyaml
, rapidjson
, requests
@ -28,43 +27,57 @@
buildPythonPackage rec {
pname = "falcon";
version = "3.0.1";
version = "3.1.0";
format = "pyproject";
disabled = pythonOlder "3.5";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-xB2E2zJYgahw6LcSnV7P2XL6QyPPd7cRmh0qIZZu5oE=";
src = fetchFromGitHub {
owner = "falconry";
repo = pname;
rev = version;
hash = "sha256-Y6bD0GCXhqpvMV+/i1v59p2qWZ91f2ey7sPQrVALY54=";
};
checkInputs = [
aiofiles
cbor2
ddt
gunicorn
httpx
hypercorn
jsonschema
msgpack
mujson
nose
orjson
pecan
pytest-asyncio
pytestCheckHook
python-mimeparse
pyyaml
rapidjson
requests
testtools
ujson
uvicorn
websockets
nativeBuildInputs = lib.optionals (!isPyPy) [
cython
];
disabledTestPaths = [
# missing optional nuts package
"falcon/bench/nuts/nuts/tests/test_functional.py"
preCheck = ''
export HOME=$TMPDIR
cp -R tests examples $TMPDIR
pushd $TMPDIR
'';
postCheck = ''
popd
'';
checkInputs = [
# https://github.com/falconry/falcon/blob/master/requirements/tests
pytestCheckHook
pyyaml
requests
rapidjson
orjson
# ASGI specific
pytest-asyncio
aiofiles
httpx
uvicorn
websockets
# handler specific
cbor2
msgpack
mujson
ujson
] ++ lib.optionals (pythonOlder "3.10") [
testtools
];
pytestFlagsArray = [
"tests"
];
meta = with lib; {

View file

@ -2,6 +2,7 @@
, buildPythonPackage
, fetchFromGitHub
, diskcache
, more-itertools
, pytestCheckHook
}:
@ -19,6 +20,7 @@ buildPythonPackage rec {
checkInputs = [
diskcache
more-itertools
pytestCheckHook
];

View file

@ -13,13 +13,13 @@
buildPythonPackage rec {
pname = "fastparquet";
version = "0.7.1";
version = "0.8.1";
src = fetchFromGitHub {
owner = "dask";
repo = pname;
rev = version;
hash = "sha256-xV0AXNZSy4LSrHf11OP/+KDbeDQu8yF1ugX+W4mie1E=";
sha256 = "05qb4nz87p9vnrdsyl25hdp5sj35lki64gjza5dahc89fwfdnsmd";
};
postPatch = ''

View file

@ -15,7 +15,7 @@
let
pname = "findpython";
version = "0.1.3";
version = "0.1.4";
in
buildPythonPackage {
inherit pname version;
@ -25,7 +25,7 @@ buildPythonPackage {
src = fetchPypi {
inherit pname version;
hash = "sha256-tVpBa5/PLShyG/vqHOsqbLZ6APmexLlKdtoix6IAKHA=";
hash = "sha256-TOGYRUaW7lOcp5kNTq3NBHHKXvA7XE7y+SWJGsZPgok=";
};
nativeBuildInputs = [

View file

@ -1,6 +1,7 @@
{ lib
, fetchPypi
, buildPythonPackage
, pycodestyle
, pythonOlder
}:
@ -16,6 +17,10 @@ buildPythonPackage rec {
hash = "sha256-8lpXWp3LPus8dgv5wi22C4taIxICJO0fqppD913X3RY=";
};
propagatedBuildInputs = [
pycodestyle
];
# Module has no tests
doCheck = false;

View file

@ -25,7 +25,7 @@ buildPythonPackage rec {
postPatch = ''
substituteInPlace setup.cfg \
--replace "pyflakes >= 2.3.0, < 2.4.0" "pyflakes >= 2.3.0, < 2.5.0"
--replace "mccabe>=0.6.0,<0.7.0" "mccabe>=0.7.0,<0.8.0"
'';
propagatedBuildInputs = [

View file

@ -12,7 +12,7 @@
buildPythonPackage rec {
pname = "flask-login";
version = "0.5.0";
version = "0.6.0";
format = "setuptools";
disabled = pythonOlder "3.6";
@ -20,7 +20,7 @@ buildPythonPackage rec {
src = fetchPypi {
pname = "Flask-Login";
inherit version;
sha256 = "6d33aef15b5bcead780acc339464aae8a6e28f13c90d8b1cf9de8b549d1c0b4b";
sha256 = "sha256-qoT8+0w88JyljAjoFre85z8TSboc8T0A2N/8WHLV/PY=";
};
propagatedBuildInputs = [

View file

@ -7,13 +7,13 @@
buildPythonPackage rec {
pname = "flask-paranoid";
version = "0.2";
version = "0.3.0";
src = fetchFromGitHub {
owner = "miguelgrinberg";
repo = pname;
rev = "v${version}";
sha256 = "0WWc/ktAOuTk4A75xI1jCj/aef2+1TjLKBA9+PRfJO0=";
sha256 = "sha256-tikD8efc3Q3xIQnaC3SSBaCRQxMI1HzXxeupvYeNnE4=";
};
postPatch = ''

View file

@ -20,6 +20,10 @@ buildPythonPackage rec {
sha256 = "0gm5dz088v3d2k1dkcp9b3nnqpkk0fp2jly870hijj2xhc5nbv6c";
};
patches = [
./werkzeug-2.1.0-compat.patch
];
propagatedBuildInputs = [
aniso8601
flask

View file

@ -0,0 +1,114 @@
Fixes compatibility with Werkzeug 2.1.0 ported over from flask-restx#423.
https://github.com/python-restx/flask-restx/pull/423
diff --git a/flask_restful/reqparse.py b/flask_restful/reqparse.py
index 9bb3099..5c59594 100644
--- a/flask_restful/reqparse.py
+++ b/flask_restful/reqparse.py
@@ -114,7 +114,10 @@ class Argument(object):
:param request: The flask request object to parse arguments from
"""
if isinstance(self.location, six.string_types):
- value = getattr(request, self.location, MultiDict())
+ if self.location in {"json", "get_json"}:
+ value = request.get_json(silent=True)
+ else:
+ value = getattr(request, self.location, MultiDict())
if callable(value):
value = value()
if value is not None:
@@ -122,7 +125,10 @@ class Argument(object):
else:
values = MultiDict()
for l in self.location:
- value = getattr(request, l, None)
+ if l in {"json", "get_json"}:
+ value = request.get_json(silent=True)
+ else:
+ value = getattr(request, l, None)
if callable(value):
value = value()
if value is not None:
diff --git a/tests/test_api.py b/tests/test_api.py
index 15f12eb..9a9cceb 100644
--- a/tests/test_api.py
+++ b/tests/test_api.py
@@ -936,7 +936,7 @@ class APITestCase(unittest.TestCase):
app = app.test_client()
resp = app.get('/api')
self.assertEqual(resp.status_code, 302)
- self.assertEqual(resp.headers['Location'], 'http://localhost/')
+ self.assertEqual(resp.headers['Location'], '/')
def test_json_float_marshalled(self):
app = Flask(__name__)
diff --git a/tests/test_reqparse.py b/tests/test_reqparse.py
index 1d75e40..e5c586b 100644
--- a/tests/test_reqparse.py
+++ b/tests/test_reqparse.py
@@ -23,8 +23,9 @@ class ReqParseTestCase(unittest.TestCase):
with app.app_context():
parser = RequestParser()
parser.add_argument('foo', choices=('one', 'two'), help='Bad choice: {error_msg}')
- req = Mock(['values'])
+ req = Mock(["values", "get_json"])
req.values = MultiDict([('foo', 'three')])
+ req.get_json.return_value = None
parser.parse_args(req)
expected = {'foo': 'Bad choice: three is not a valid choice'}
abort.assert_called_with(400, message=expected)
@@ -35,8 +36,9 @@ class ReqParseTestCase(unittest.TestCase):
with app.app_context():
parser = RequestParser()
parser.add_argument('foo', choices=('one', 'two'), help=u'Bad choice: {error_msg}')
- req = Mock(['values'])
+ req = Mock(["values", "get_json"])
req.values = MultiDict([('foo', u'\xf0\x9f\x8d\x95')])
+ req.get_json.return_value = None
parser.parse_args(req)
expected = {'foo': u'Bad choice: \xf0\x9f\x8d\x95 is not a valid choice'}
abort.assert_called_with(400, message=expected)
@@ -47,8 +49,9 @@ class ReqParseTestCase(unittest.TestCase):
with app.app_context():
parser = RequestParser()
parser.add_argument('foo', choices=['one', 'two'], help='Please select a valid choice')
- req = Mock(['values'])
+ req = Mock(["values", "get_json"])
req.values = MultiDict([('foo', 'three')])
+ req.get_json.return_value = None
parser.parse_args(req)
expected = {'foo': 'Please select a valid choice'}
abort.assert_called_with(400, message=expected)
@@ -58,8 +61,9 @@ class ReqParseTestCase(unittest.TestCase):
def bad_choice():
parser = RequestParser()
parser.add_argument('foo', choices=['one', 'two'])
- req = Mock(['values'])
+ req = Mock(["values", "get_json"])
req.values = MultiDict([('foo', 'three')])
+ req.get_json.return_value = None
parser.parse_args(req)
abort.assert_called_with(400, message='three is not a valid choice')
app = Flask(__name__)
@@ -190,7 +194,8 @@ class ReqParseTestCase(unittest.TestCase):
self.assertTrue(len(arg.source(req)) == 0) # yes, basically you don't find it
def test_source_default_location(self):
- req = Mock(['values'])
+ req = Mock(['values', 'get_json'])
+ req.get_json.return_value = None
req._get_child_mock = lambda **kwargs: MultiDict()
arg = Argument('foo')
self.assertEqual(arg.source(req), req.values)
@@ -215,8 +220,9 @@ class ReqParseTestCase(unittest.TestCase):
args = parser.parse_args(req)
self.assertEqual(args['foo'], "bar")
- req = Mock()
+ req = Mock(['get_json'])
req.values = ()
+ req.get_json.return_value = None
req.json = None
req.view_args = {"foo": "bar"}
parser = RequestParser()

View file

@ -1,6 +1,7 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, aniso8601
, jsonschema
, flask
@ -28,6 +29,20 @@ buildPythonPackage rec {
sha256 = "18vrmknyxw6adn62pz3kr9kvazfgjgl4pgimdf8527fyyiwcqy15";
};
patches = [
# Fixes werkzeug 2.1 compatibility
(fetchpatch {
# https://github.com/python-restx/flask-restx/pull/427
url = "https://github.com/python-restx/flask-restx/commit/bb72a51860ea8a42c928f69bdd44ad20b1f9ee7e.patch";
hash = "sha256-DRH3lI6TV1m0Dq1VyscL7GQS26OOra9g88dXZNrNpmQ=";
})
(fetchpatch {
# https://github.com/python-restx/flask-restx/pull/427
url = "https://github.com/python-restx/flask-restx/commit/bb3e9dd83b9d4c0d0fa0de7d7ff713fae71eccee.patch";
hash = "sha256-HJpjG4aQWzEPCMfbXfkw4mz5TH9d89BCvGH2dE6Jfv0=";
})
];
propagatedBuildInputs = [
aniso8601
flask

View file

@ -1,29 +1,44 @@
{ lib
, buildPythonPackage
, fetchPypi
, flask
, blinker
, setuptools
, itsdangerous
, flask_principal
, passlib
, email_validator
, flask_wtf
, flask_login
, pytestCheckHook
# extras: babel
, Babel
, flask-babel
# extras: common
, bcrypt
, bleach
, flask_mail
, sqlalchemy
# extras: fsqla
, flask_sqlalchemy
, sqlalchemy
, sqlalchemy-utils
# extras: mfa
, cryptography
, phonenumbers
, pyqrcode
# propagates
, blinker
, email_validator
, flask
, flask_login
, flask_principal
, flask_wtf
, itsdangerous
, passlib
# tests
, flask-mongoengine
, mongoengine
, mongomock
, peewee
, pony
, pytestCheckHook
, zxcvbn
, mongoengine
, cryptography
, pyqrcode
, phonenumbers
, bleach
, mongomock
}:
buildPythonPackage rec {
@ -37,32 +52,73 @@ buildPythonPackage rec {
};
propagatedBuildInputs = [
blinker
email_validator
flask
flask_login
flask_principal
flask_wtf
email_validator
itsdangerous
passlib
blinker
setuptools
];
passthru.extras-require = {
babel = [
Babel
flask-babel
];
common = [
bcrypt
bleach
flask_mail
];
fsqla = [
flask_sqlalchemy
sqlalchemy
sqlalchemy-utils
];
mfa = [
cryptography
phonenumbers
pyqrcode
];
};
checkInputs = [
pytestCheckHook
flask_mail
sqlalchemy
flask_sqlalchemy
flask-mongoengine
mongoengine
mongomock
peewee
pony
pytestCheckHook
zxcvbn
mongoengine
cryptography
pyqrcode
phonenumbers
bleach
mongomock
]
++ passthru.extras-require.babel
++ passthru.extras-require.common
++ passthru.extras-require.fsqla
++ passthru.extras-require.mfa;
disabledTests = [
# flask 2.1.0 incompatibilities https://github.com/Flask-Middleware/flask-security/issues/594
"test_admin_setup_reset"
"test_authn_freshness"
"test_authn_freshness_nc"
"test_bad_sender"
"test_change_invalidates_auth_token"
"test_change_invalidates_session"
"test_default_authn_bp"
"test_default_unauthn"
"test_default_unauthn_bp"
"test_email_not_identity"
"test_next"
"test_post_security_with_application_root"
"test_post_security_with_application_root_and_views"
"test_recover_invalidates_session"
"test_two_factor_flag"
"test_unauthorized_access_with_referrer"
"test_verify"
"test_verify_link"
"test_view_configuration"
];
pythonImportsCheck = [ "flask_security" ];

View file

@ -9,13 +9,13 @@
buildPythonPackage rec {
pname = "Flask-SocketIO";
version = "5.0.1";
version = "5.1.1";
src = fetchFromGitHub {
owner = "miguelgrinberg";
repo = "Flask-SocketIO";
rev = "v${version}";
sha256 = "01zf6cy95pgc4flgn0740z2my90l7rxwliahp6rb2xbp7rh32cng";
sha256 = "sha256-PnNJEtcWaisOlt6OmYUl97TlZb9cK2ORvtEcmGPxSB0=";
};
propagatedBuildInputs = [
@ -28,6 +28,10 @@ buildPythonPackage rec {
pytestCheckHook
];
pytestFlagsArray = [
"test_socketio.py"
];
pythonImportsCheck = [ "flask_socketio" ];
meta = with lib; {

View file

@ -8,11 +8,11 @@
buildPythonPackage rec {
pname = "flask-talisman";
version = "0.8.1";
version = "1.0.0";
src = fetchPypi {
inherit pname version;
sha256 = "11gjgqkpj2yqydb0pfhjyx56iy4l9szgz33vg5d7bw8vqp02wl2x";
sha256 = "sha256-IF0958Xs+tZnyEEj9fvlgLH2jNmhsFjXNTzANI4Vsb8=";
};
buildInputs = [

View file

@ -3,21 +3,22 @@
, fetchPypi
, asgiref
, click
, importlib-metadata
, itsdangerous
, jinja2
, python-dotenv
, werkzeug
, setuptools
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
version = "2.0.3";
version = "2.1.1";
pname = "Flask";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-4RIMIoyi9VO0cN9KX6knq2YlhGdSYGmYGz6wqRkCaH0=";
sha256 = "sha256-qMm9PlWOyZZG0Xepc5xB3x3tBilIC0yNKXVBLzyVGcg=";
};
propagatedBuildInputs = [
@ -27,11 +28,7 @@ buildPythonPackage rec {
itsdangerous
jinja2
werkzeug
# required for CLI subcommand autodiscovery
# see: https://github.com/pallets/flask/blob/fdac8a5404e3e3a316568107a293f134707c75bb/src/flask/cli.py#L498
setuptools
];
] ++ lib.optional (pythonOlder "3.10") importlib-metadata;
checkInputs = [
pytestCheckHook
@ -48,5 +45,6 @@ buildPythonPackage rec {
Python web application frameworks.
'';
license = licenses.bsd3;
maintainers = with maintainers; [ SuperSandro2000 ];
};
}

View file

@ -42,7 +42,6 @@ buildPythonPackage rec {
pytestCheckHook
tensorflow
];
pytestFlagsArray = [ "-n $NIX_BUILD_CORES" ];
disabledTestPaths = [
# Docs test, needs extra deps + we're not interested in it.

View file

@ -1,20 +1,34 @@
{ lib, buildPythonPackage, fetchPypi }:
{ lib
, buildPythonPackage
, fetchpatch
, fetchPypi
}:
buildPythonPackage rec {
pname = "fn";
version = "0.4.3";
meta = {
src = fetchPypi {
inherit pname version;
sha256 = "1nmsjmn8jb4gp22ksx0j0hhdf4y0zm8rjykyy2i6flzimg6q1kgq";
};
patches = [
(fetchpatch {
url = "https://github.com/kachayev/fn.py/commit/a54fc0bd8aeae277de2db726131d249ce607c0c2.patch";
hash = "sha256-I0ZISOgVibsc1k7gwSfeW6qV9PspQqdaHlRLr/IusQ8=";
excludes = [
"fn/monad.py"
];
})
];
meta = with lib; {
description = ''
Functional programming in Python: implementation of missing
features to enjoy FP
'';
homepage = "https://github.com/kachayev/fn.py";
license = lib.licenses.asl20;
};
src = fetchPypi {
inherit pname version;
sha256 = "1nmsjmn8jb4gp22ksx0j0hhdf4y0zm8rjykyy2i6flzimg6q1kgq";
license = licenses.asl20;
};
}

View file

@ -6,6 +6,7 @@
, python
, pytestCheckHook
, pythonOlder
, six
}:
buildPythonPackage rec {
@ -28,6 +29,7 @@ buildPythonPackage rec {
checkInputs = [
pytestCheckHook
six
];
patches = [

View file

@ -11,12 +11,12 @@
buildPythonPackage rec {
pname = "GeoAlchemy2";
version = "0.10.2";
version = "0.11.1";
format = "setuptools";
src = fetchPypi {
inherit pname version;
sha256 = "3db833746e11bc802b754751ec94eaab81009a9ad8fe647d461fe76d1a47a3fd";
sha256 = "sha256-+SoPrdtbdDhNu/PHAAQzNYzo4HoYD+HWwoQ+qgQ3/wg=";
};
nativeBuildInputs = [

View file

@ -27,8 +27,6 @@ buildPythonPackage rec {
'';
homepage = "http://gehrcke.de/gipc";
license = licenses.mit;
# gipc only has support for older versions of gevent
broken = versionOlder "1.6" gevent.version;
};
}

View file

@ -26,6 +26,12 @@ buildPythonPackage rec {
hash = "sha256-PjOMNUnrz0kDfYEXv5Ni/9RIHn4Yylle6NJOK1Rb3SY=";
};
postPatch = ''
substituteInPlace setup.py \
--replace "pytest-runner" "" \
--replace "MarkupSafe==2.0.1" "MarkupSafe"
'';
nativeBuildInputs = [
setuptools-scm
];
@ -44,11 +50,6 @@ buildPythonPackage rec {
pytestCheckHook
];
postPatch = ''
substituteInPlace setup.py \
--replace "pytest-runner" ""
'';
disabledTests = [
# https://bugzilla.mozilla.org/show_bug.cgi?id=1741668
"test_validate_ping"

View file

@ -16,14 +16,14 @@
buildPythonPackage rec {
pname = "google-api-core";
version = "2.5.0";
version = "2.7.1";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-8zhjpnCWUXA7ixi2cJNRSDjHnysE0CqlASAwefJLgBg=";
sha256 = "sha256-sPpXflEvDI4GM4a5dHGLhhRYanmMWJTtNL7fJW2driQ=";
};
propagatedBuildInputs = [

View file

@ -13,14 +13,14 @@
buildPythonPackage rec {
pname = "google-api-python-client";
version = "2.39.0";
version = "2.42.0";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-QBFpIV7K+1r7aD0/4OQ8BZ62Jccf6hkp8WQD3acqLcE=";
sha256 = "sha256-e/WLZltjXQattHeXqaT3NILnOeAu0DbNlg3HwYM2H2c=";
};
propagatedBuildInputs = [

View file

@ -18,12 +18,12 @@
buildPythonPackage rec {
pname = "google-cloud-bigquery";
version = "2.34.2";
version = "3.0.1";
format = "setuptools";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-DriC3zCgD1oe89M5ojpnAjCACyqySUWVkafmharWcU8=";
sha256 = "sha256-UmW6BEV44Ucdg/hUGSQk/kyDnB+Hsyx4q3AXTQe89hI=";
};
propagatedBuildInputs = [

View file

@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchPypi, click, google-auth, six }:
{ lib, buildPythonPackage, fetchPypi, click, google-auth, packaging, six }:
buildPythonPackage rec {
pname = "google-cloud-testutils";
@ -9,7 +9,7 @@ buildPythonPackage rec {
sha256 = "sha256-X85NRgGZt7+OpL4poOyS+UWec4fuABiTxEYyFpkUpqs=";
};
propagatedBuildInputs = [ click google-auth six ];
propagatedBuildInputs = [ click google-auth packaging six ];
# does not contain tests
doCheck = false;

View file

@ -1,6 +1,5 @@
{ lib
, fetchFromGitHub
, fetchpatch
# Python bits:
, buildPythonPackage
, pytest
@ -16,23 +15,15 @@
buildPythonPackage rec {
pname = "grip";
version = "4.5.2";
version = "4.6.1";
src = fetchFromGitHub {
owner = "joeyespo";
repo = "grip";
rev = "v${version}";
sha256 = "0hphplnyi903jx7ghfxplg1qlj2kpcav1frr2js7p45pbh5ib9rm";
sha256 = "sha256-CHL2dy0H/i0pLo653F7aUHFvZHTeZA6jC/rwn1KrEW4=";
};
patches = [
# Render "front matter", used in our RFC template and elsewhere
(fetchpatch {
url = "https://github.com/joeyespo/grip/pull/249.patch";
sha256 = "07za5iymfv647dfrvi6hhj54a96hgjyarys51zbi08c51shqyzpg";
})
];
checkInputs = [ pytest responses ];
propagatedBuildInputs = [ docopt flask markdown path-and-address pygments requests tabulate ];

View file

@ -9,14 +9,14 @@
buildPythonPackage rec {
pname = "grpcio-status";
version = "1.44.0";
version = "1.45.0";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-rGE6t6RTgMv6PlKQItCzcxfYWPFyum5lwYiqc1VTk5g=";
sha256 = "sha256-S6rY6Ow8RHiOA4wk49fccCWeBroJ9ApbgXhThWO6Plo=";
};
propagatedBuildInputs = [

View file

@ -2,11 +2,11 @@
buildPythonPackage rec {
pname = "grpcio-tools";
version = "1.44.0";
version = "1.45.0";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-vjf0WOpRDJqPHKq7wrJY0S5V0YmlZ/Xtys6Q8n3A778=";
sha256 = "sha256-oBbPwh4NkbOwNtPU+WjR/eqGXfoDUkyx++yoRxn9RaI=";
};
outputs = [ "out" "dev" ];

View file

@ -11,11 +11,11 @@
buildPythonPackage rec {
pname = "hidapi";
version = "0.11.0.post2";
version = "0.11.2";
src = fetchPypi {
inherit pname version;
sha256 = "da815e0d1d4b2ef1ebbcc85034572105dca29627eb61881337aa39010f2ef8cb";
sha256 = "sha256-yYS37C/C6ph81EzwaUflVXJJjtLUPGSJC0q1iymvcrw=";
};
nativeBuildInputs = lib.optionals stdenv.isDarwin [ xcbuild ];

View file

@ -2,6 +2,7 @@
, brotlipy
, buildPythonPackage
, decorator
, fetchpatch
, fetchPypi
, flask
, flask-limiter
@ -22,6 +23,15 @@ buildPythonPackage rec {
hash = "sha256-y7N3kMkVdfTxV1f0KtQdn3KesifV7b6J5OwXVIbbjfo=";
};
patches = [
(fetchpatch {
# Replaces BaseResponse class with Response class for Werkezug 2.1.0 compatibility
# https://github.com/postmanlabs/httpbin/pull/674
url = "https://github.com/postmanlabs/httpbin/commit/5cc81ce87a3c447a127e4a1a707faf9f3b1c9b6b.patch";
hash = "sha256-SbEWjiqayMFYrbgAPZtSsXqSyCDUz3z127XgcKOcrkE=";
})
];
propagatedBuildInputs = [
brotlipy
flask

View file

@ -9,21 +9,20 @@
, pytest-forked
, pytest-randomly
, pytest-timeout
, pytest-xdist
, pytestCheckHook
, six
}:
buildPythonPackage rec {
pname = "httplib2";
version = "0.20.3";
version = "0.20.4";
format = "setuptools";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
sha256 = "sha256-Q5KkhVqyHDoIeKjvvYoHRbZPY7LUXGDwgp4CSuyvQ1g=";
sha256 = "sha256-eLvxmG9PUX+2RB3M6oG442Wmh6c5GI/aKP/Z8Z5Ixq8=";
};
propagatedBuildInputs = [
@ -36,7 +35,6 @@ buildPythonPackage rec {
pytest-forked
pytest-randomly
pytest-timeout
pytest-xdist
six
pytestCheckHook
];

View file

@ -19,7 +19,7 @@ buildPythonPackage rec {
# If you need these, you can just add them to your environment.
pname = "hypothesis";
version = "6.38.0";
version = "6.40.0";
format = "setuptools";
disabled = pythonOlder "3.7";
@ -28,7 +28,7 @@ buildPythonPackage rec {
owner = "HypothesisWorks";
repo = "hypothesis-python";
rev = "hypothesis-python-${version}";
sha256 = "sha256-JLAM9gBf/Lh+UO7audy6V2jEPg5Cn4DR7moQV7VBwGc=";
hash = "sha256-6BC3CTotkMhguueH4NJM8VjbrYhofHqtZEUytcllMwQ=";
};
postUnpack = "sourceRoot=$sourceRoot/hypothesis-python";

View file

@ -1,4 +1,13 @@
{ lib, buildPythonPackage, fetchPypi, hypothesis, lark, libcst, black, parso, pytestCheckHook, pytest-cov, pytest-xdist }:
{ lib
, buildPythonPackage
, fetchPypi
, hypothesis
, lark
, libcst
, parso
, pytestCheckHook
, pytest-xdist
}:
buildPythonPackage rec {
pname = "hypothesmith";
@ -9,17 +18,32 @@ buildPythonPackage rec {
sha256 = "0fb7b3fd03d76eddd4474b0561e1c2662457593a74cc300fd27e5409cd4d7922";
};
patches = [
./remove-black.patch
];
postPatch = ''
substituteInPlace setup.py --replace "lark-parser" "lark"
substituteInPlace setup.py \
--replace "lark-parser" "lark"
substituteInPlace tox.ini \
--replace "--cov=hypothesmith" "" \
--replace "--cov-branch" "" \
--replace "--cov-report=term-missing:skip-covered" "" \
--replace "--cov-fail-under=100" ""
'';
propagatedBuildInputs = [ hypothesis lark libcst ];
checkInputs = [ black parso pytestCheckHook pytest-cov pytest-xdist ];
checkInputs = [ parso pytestCheckHook pytest-xdist ];
pytestFlagsArray = [
"-v"
"--numprocesses $NIX_BUILD_CORES"
];
disabledTests = [
# https://github.com/Zac-HD/hypothesmith/issues/21
"test_source_code_from_libcst_node_type"
];
pythonImportsCheck = [ "hypothesmith" ];

Some files were not shown because too many files have changed in this diff Show more