Merge pull request #132510 from fabaff/bump-httpx
This commit is contained in:
commit
2f007062b1
36
pkgs/development/python-modules/httpx-ntlm/default.nix
Normal file
36
pkgs/development/python-modules/httpx-ntlm/default.nix
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, cryptography
|
||||||
|
, fetchPypi
|
||||||
|
, httpx
|
||||||
|
, ntlm-auth
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "httpx-ntlm";
|
||||||
|
version = "0.0.10";
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
pname = "httpx_ntlm";
|
||||||
|
inherit version;
|
||||||
|
sha256 = "1rar6smz56y8k5qbgrpabpr639nwvf6whdi093hyakf0m3h9cpfz";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
cryptography
|
||||||
|
httpx
|
||||||
|
ntlm-auth
|
||||||
|
];
|
||||||
|
|
||||||
|
# https://github.com/ulodciv/httpx-ntlm/issues/5
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "httpx_ntlm" ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "NTLM authentication support for HTTPX";
|
||||||
|
homepage = "https://github.com/ulodciv/httpx-ntlm";
|
||||||
|
license = licenses.isc;
|
||||||
|
maintainers = with maintainers; [ fab ];
|
||||||
|
};
|
||||||
|
}
|
57
pkgs/development/python-modules/httpx-socks/default.nix
Normal file
57
pkgs/development/python-modules/httpx-socks/default.nix
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
{ lib
|
||||||
|
, async-timeout
|
||||||
|
, buildPythonPackage
|
||||||
|
, curio
|
||||||
|
, fetchFromGitHub
|
||||||
|
, flask
|
||||||
|
, httpcore
|
||||||
|
, httpx
|
||||||
|
, pytest-asyncio
|
||||||
|
, pytest-trio
|
||||||
|
, pytestCheckHook
|
||||||
|
, python-socks
|
||||||
|
, pythonOlder
|
||||||
|
, sniffio
|
||||||
|
, trio
|
||||||
|
, yarl
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "httpx-socks";
|
||||||
|
version = "0.4.1";
|
||||||
|
disabled = pythonOlder "3.6";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "romis2012";
|
||||||
|
repo = pname;
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "1rz69z5fcw7d5nzy5q2q0r9gxrsqijgpg70cnyr5br6xnfgy01ar";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
async-timeout
|
||||||
|
curio
|
||||||
|
httpcore
|
||||||
|
httpx
|
||||||
|
python-socks
|
||||||
|
sniffio
|
||||||
|
trio
|
||||||
|
];
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
flask
|
||||||
|
pytest-asyncio
|
||||||
|
pytest-trio
|
||||||
|
pytestCheckHook
|
||||||
|
yarl
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "httpx_socks" ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Proxy (HTTP, SOCKS) transports for httpx";
|
||||||
|
homepage = "https://github.com/romis2012/httpx-socks";
|
||||||
|
license = licenses.asl20;
|
||||||
|
maintainers = with maintainers; [ fab ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -2,7 +2,7 @@
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, pythonOlder
|
, pythonOlder
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, brotli
|
, brotlicffi
|
||||||
, certifi
|
, certifi
|
||||||
, h2
|
, h2
|
||||||
, httpcore
|
, httpcore
|
||||||
|
@ -11,25 +11,25 @@
|
||||||
, pytestCheckHook
|
, pytestCheckHook
|
||||||
, pytest-asyncio
|
, pytest-asyncio
|
||||||
, pytest-trio
|
, pytest-trio
|
||||||
, pytest-cov
|
, typing-extensions
|
||||||
, trustme
|
, trustme
|
||||||
, uvicorn
|
, uvicorn
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "httpx";
|
pname = "httpx";
|
||||||
version = "0.18.0";
|
version = "0.18.2";
|
||||||
disabled = pythonOlder "3.6";
|
disabled = pythonOlder "3.6";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "encode";
|
owner = "encode";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "sha256-6EYBTRXaVHBgW/JzZvWLz55AqgocOyym2FVtu2Nkp/U=";
|
sha256 = "0rr5b6z96yipvp4riqmmbkbcy0sdyzykcdwf5y9ryh27pxr8q8x4";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
brotli
|
brotlicffi
|
||||||
certifi
|
certifi
|
||||||
h2
|
h2
|
||||||
httpcore
|
httpcore
|
||||||
|
@ -41,8 +41,8 @@ buildPythonPackage rec {
|
||||||
pytestCheckHook
|
pytestCheckHook
|
||||||
pytest-asyncio
|
pytest-asyncio
|
||||||
pytest-trio
|
pytest-trio
|
||||||
pytest-cov
|
|
||||||
trustme
|
trustme
|
||||||
|
typing-extensions
|
||||||
uvicorn
|
uvicorn
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -62,6 +62,6 @@ buildPythonPackage rec {
|
||||||
description = "The next generation HTTP client";
|
description = "The next generation HTTP client";
|
||||||
homepage = "https://github.com/encode/httpx";
|
homepage = "https://github.com/encode/httpx";
|
||||||
license = licenses.bsd3;
|
license = licenses.bsd3;
|
||||||
maintainers = [ maintainers.costrouc ];
|
maintainers = with maintainers; [ costrouc fab ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,40 +3,46 @@
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, httpcore
|
, httpcore
|
||||||
, httpx
|
, httpx
|
||||||
|
, flask
|
||||||
, pytest-asyncio
|
, pytest-asyncio
|
||||||
, pytest-cov
|
|
||||||
, pytestCheckHook
|
, pytestCheckHook
|
||||||
|
, starlette
|
||||||
, trio
|
, trio
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "respx";
|
pname = "respx";
|
||||||
version = "0.17.0";
|
version = "0.17.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "lundberg";
|
owner = "lundberg";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "sha256-unGAIsslGXOUHXr0FKzC9bX6+Q3mNGZ9Z/dtjz0gkj4=";
|
sha256 = "0w8idh6l2iq04ydz7r2qisq9jsxq8wszkx97kx4g3yjwg4ypvc6k";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Coverage is under 100 % due to the excluded tests
|
propagatedBuildInputs = [
|
||||||
postPatch = ''
|
httpx
|
||||||
substituteInPlace setup.cfg --replace "--cov-fail-under 100" ""
|
];
|
||||||
'';
|
|
||||||
|
|
||||||
propagatedBuildInputs = [ httpx ];
|
|
||||||
|
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
httpcore
|
httpcore
|
||||||
httpx
|
httpx
|
||||||
|
flask
|
||||||
pytest-asyncio
|
pytest-asyncio
|
||||||
pytest-cov
|
|
||||||
pytestCheckHook
|
pytestCheckHook
|
||||||
|
starlette
|
||||||
trio
|
trio
|
||||||
];
|
];
|
||||||
|
|
||||||
disabledTests = [ "test_pass_through" ];
|
postPatch = ''
|
||||||
|
sed -i "/--cov/d" setup.cfg
|
||||||
|
'';
|
||||||
|
|
||||||
|
disabledTests = [
|
||||||
|
"test_pass_through"
|
||||||
|
];
|
||||||
|
|
||||||
pythonImportsCheck = [ "respx" ];
|
pythonImportsCheck = [ "respx" ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -5,13 +5,13 @@
|
||||||
|
|
||||||
python3.pkgs.buildPythonApplication rec {
|
python3.pkgs.buildPythonApplication rec {
|
||||||
pname = "wapiti";
|
pname = "wapiti";
|
||||||
version = "3.0.4";
|
version = "3.0.5";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "wapiti-scanner";
|
owner = "wapiti-scanner";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "0wnz4nq1q5y74ksb1kcss9vdih0kbrmnkfbyc2ngd9id1ixfamxb";
|
sha256 = "0663hzpmn6p5xh65d2gk4yk2zh992lfd9lhdwwabhpv3n85nza75";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = with python3.pkgs; [
|
nativeBuildInputs = with python3.pkgs; [
|
||||||
|
@ -21,24 +21,34 @@ python3.pkgs.buildPythonApplication rec {
|
||||||
propagatedBuildInputs = with python3.pkgs; [
|
propagatedBuildInputs = with python3.pkgs; [
|
||||||
beautifulsoup4
|
beautifulsoup4
|
||||||
browser-cookie3
|
browser-cookie3
|
||||||
|
cryptography
|
||||||
Mako
|
Mako
|
||||||
markupsafe
|
markupsafe
|
||||||
pysocks
|
pysocks
|
||||||
requests
|
httpx
|
||||||
|
httpx-ntlm
|
||||||
|
httpx-socks
|
||||||
six
|
six
|
||||||
tld
|
tld
|
||||||
yaswfp
|
yaswfp
|
||||||
] ++ lib.optionals (python3.pythonOlder "3.8") [ importlib-metadata ];
|
] ++ lib.optionals (python3.pythonOlder "3.8") [ importlib-metadata ];
|
||||||
|
|
||||||
checkInputs = with python3.pkgs; [
|
checkInputs = with python3.pkgs; [
|
||||||
responses
|
respx
|
||||||
|
pytest-asyncio
|
||||||
pytestCheckHook
|
pytestCheckHook
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
# Is already fixed in the repo. Will be part of the next release
|
# Ignore pinned versions
|
||||||
substituteInPlace setup.py \
|
substituteInPlace setup.py \
|
||||||
--replace "importlib_metadata==2.0.0" "importlib_metadata"
|
--replace "==" ">="
|
||||||
|
substituteInPlace setup.cfg \
|
||||||
|
--replace " --cov" ""
|
||||||
|
'';
|
||||||
|
|
||||||
|
preCheck = ''
|
||||||
|
export HOME=$(mktemp -d);
|
||||||
'';
|
'';
|
||||||
|
|
||||||
disabledTests = [
|
disabledTests = [
|
||||||
|
@ -47,6 +57,10 @@ python3.pkgs.buildPythonApplication rec {
|
||||||
"test_bad_separator_used"
|
"test_bad_separator_used"
|
||||||
"test_blind"
|
"test_blind"
|
||||||
"test_chunked_timeout"
|
"test_chunked_timeout"
|
||||||
|
"test_cookies"
|
||||||
|
"test_drop_cookies"
|
||||||
|
"test_save_and_restore_state"
|
||||||
|
"test_explorer_extract_links"
|
||||||
"test_cookies_detection"
|
"test_cookies_detection"
|
||||||
"test_csrf_cases"
|
"test_csrf_cases"
|
||||||
"test_detection"
|
"test_detection"
|
||||||
|
@ -63,6 +77,8 @@ python3.pkgs.buildPythonApplication rec {
|
||||||
"test_no_crash"
|
"test_no_crash"
|
||||||
"test_options"
|
"test_options"
|
||||||
"test_out_of_band"
|
"test_out_of_band"
|
||||||
|
"test_multi_detection"
|
||||||
|
"test_vulnerabilities"
|
||||||
"test_partial_tag_name_escape"
|
"test_partial_tag_name_escape"
|
||||||
"test_prefix_and_suffix_detection"
|
"test_prefix_and_suffix_detection"
|
||||||
"test_qs_limit"
|
"test_qs_limit"
|
||||||
|
@ -85,6 +101,9 @@ python3.pkgs.buildPythonApplication rec {
|
||||||
"test_xss_with_strong_csp"
|
"test_xss_with_strong_csp"
|
||||||
"test_xss_with_weak_csp"
|
"test_xss_with_weak_csp"
|
||||||
"test_xxe"
|
"test_xxe"
|
||||||
|
# Requires a PHP installation
|
||||||
|
"test_timesql"
|
||||||
|
"test_cookies"
|
||||||
];
|
];
|
||||||
|
|
||||||
pythonImportsCheck = [ "wapitiCore" ];
|
pythonImportsCheck = [ "wapitiCore" ];
|
||||||
|
|
|
@ -3385,6 +3385,10 @@ in {
|
||||||
|
|
||||||
httpx = callPackage ../development/python-modules/httpx { };
|
httpx = callPackage ../development/python-modules/httpx { };
|
||||||
|
|
||||||
|
httpx-ntlm = callPackage ../development/python-modules/httpx-ntlm { };
|
||||||
|
|
||||||
|
httpx-socks = callPackage ../development/python-modules/httpx-socks { };
|
||||||
|
|
||||||
huawei-lte-api = callPackage ../development/python-modules/huawei-lte-api { };
|
huawei-lte-api = callPackage ../development/python-modules/huawei-lte-api { };
|
||||||
|
|
||||||
huey = callPackage ../development/python-modules/huey { };
|
huey = callPackage ../development/python-modules/huey { };
|
||||||
|
|
Loading…
Reference in a new issue