Something went wrong. Try again.
lol
Something went wrong. Try again.
2.4 kB · 103 lines
Nix
at master
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104{ aiofiles, buildPythonPackage, charset-normalizer, cryptography, fastapi, fetchFromGitHub, hatchling, lib, orjson, pytest-asyncio, pytest-httpbin, pytestCheckHook, stdenv, urllib3-future, wassima,}:
buildPythonPackage rec { pname = "niquests"; version = "3.18.6"; pyproject = true;
src = fetchFromGitHub { owner = "jawah"; repo = "niquests"; tag = "v${version}"; hash = "sha256-hJD5hI/qvYo31eu05fhDZhgRNTbbGJnFE293HM+TuIA="; };
build-system = [ hatchling ];
dependencies = [ charset-normalizer urllib3-future wassima ];
optional-dependencies = { inherit (urllib3-future.optional-dependencies) brotli socks ws zstd ; full = [ orjson ] ++ urllib3-future.optional-dependencies.brotli ++ urllib3-future.optional-dependencies.socks ++ urllib3-future.optional-dependencies.qh3 ++ urllib3-future.optional-dependencies.ws ++ urllib3-future.optional-dependencies.zstd; http3 = urllib3-future.optional-dependencies.qh3; ocsp = urllib3-future.optional-dependencies.qh3; speedups = [ orjson ] ++ urllib3-future.optional-dependencies.brotli ++ urllib3-future.optional-dependencies.zstd; };
pythonImportsCheck = [ "niquests" ];
nativeCheckInputs = [ aiofiles cryptography fastapi pytest-asyncio pytest-httpbin pytestCheckHook ] ++ optional-dependencies.socks;
disabledTestPaths = [ # tests connect to the internet "tests/test_requests.py" ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # NameResolutionError: Failed to resolve 'localhost' "tests/test_rate_limiters.py" "tests/test_lowlevel.py" "tests/test_testserver.py" ];
disabledTests = lib.optionals stdenv.hostPlatform.isLinux [ "test_docker_version_info" "test_docker_404_unknown_path" ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # PermissionError: [Errno 1] Operation not permitted "test_use_proxy_from_environment" ];
meta = { changelog = "https://github.com/jawah/niquests/blob/${src.tag}/HISTORY.md"; description = "Simple HTTP library that is a drop-in replacement for Requests"; homepage = "https://github.com/jawah/niquests"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ dotlambda ]; };}