mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 21:03:15 +00:00
Merge pull request #264917 from mweinelt/urllib3-2.0.7
python311Packages.urllib3: 2.0.6 -> 2.0.7
This commit is contained in:
commit
deb82d98d0
@ -1,4 +1,5 @@
|
||||
{ lib
|
||||
, backports-zoneinfo
|
||||
, brotli
|
||||
, brotlicffi
|
||||
, buildPythonPackage
|
||||
@ -8,66 +9,29 @@
|
||||
, hatchling
|
||||
, idna
|
||||
, isPyPy
|
||||
, mock
|
||||
, pyopenssl
|
||||
, pysocks
|
||||
, pytest-freezegun
|
||||
, pytest-timeout
|
||||
, pytestCheckHook
|
||||
, python-dateutil
|
||||
, pythonOlder
|
||||
, tornado
|
||||
, trustme
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
let self = buildPythonPackage rec {
|
||||
pname = "urllib3";
|
||||
version = "2.0.6";
|
||||
format = "pyproject";
|
||||
version = "2.0.7";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-sZ4ahdIGtW198dXmg99KdyUlKpZOOZNkjdD7WhwVdWQ=";
|
||||
hash = "sha256-yX394fe9Q6ccjSpY42npsr9pLRM06p+crlWt19DdD4Q=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
hatchling
|
||||
];
|
||||
|
||||
# FIXME: remove backwards compatbility hack
|
||||
propagatedBuildInputs = passthru.optional-dependencies.brotli
|
||||
++ passthru.optional-dependencies.socks;
|
||||
|
||||
nativeCheckInputs = [
|
||||
python-dateutil
|
||||
mock
|
||||
pytest-freezegun
|
||||
pytest-timeout
|
||||
pytestCheckHook
|
||||
tornado
|
||||
trustme
|
||||
];
|
||||
|
||||
# Tests in urllib3 are mostly timeout-based instead of event-based and
|
||||
# are therefore inherently flaky. On your own machine, the tests will
|
||||
# typically build fine, but on a loaded cluster such as Hydra random
|
||||
# timeouts will occur.
|
||||
#
|
||||
# The urllib3 test suite has two different timeouts in their test suite
|
||||
# (see `test/__init__.py`):
|
||||
# - SHORT_TIMEOUT
|
||||
# - LONG_TIMEOUT
|
||||
# When CI is in the env, LONG_TIMEOUT will be significantly increased.
|
||||
# Still, failures can occur and for that reason tests are disabled.
|
||||
doCheck = false;
|
||||
|
||||
preCheck = ''
|
||||
export CI # Increases LONG_TIMEOUT
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [
|
||||
"urllib3"
|
||||
];
|
||||
|
||||
passthru.optional-dependencies = {
|
||||
brotli = if isPyPy then [
|
||||
brotlicffi
|
||||
@ -86,11 +50,44 @@ buildPythonPackage rec {
|
||||
];
|
||||
};
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytest-timeout
|
||||
pytestCheckHook
|
||||
tornado
|
||||
trustme
|
||||
] ++ lib.optionals (pythonOlder "3.9") [
|
||||
backports-zoneinfo
|
||||
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
||||
|
||||
# Tests in urllib3 are mostly timeout-based instead of event-based and
|
||||
# are therefore inherently flaky. On your own machine, the tests will
|
||||
# typically build fine, but on a loaded cluster such as Hydra random
|
||||
# timeouts will occur.
|
||||
#
|
||||
# The urllib3 test suite has two different timeouts in their test suite
|
||||
# (see `test/__init__.py`):
|
||||
# - SHORT_TIMEOUT
|
||||
# - LONG_TIMEOUT
|
||||
# When CI is in the env, LONG_TIMEOUT will be significantly increased.
|
||||
# Still, failures can occur and for that reason tests are disabled.
|
||||
doCheck = false;
|
||||
|
||||
passthru.tests.pytest = self.overridePythonAttrs (_: { doCheck = true; });
|
||||
|
||||
preCheck = ''
|
||||
export CI # Increases LONG_TIMEOUT
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [
|
||||
"urllib3"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Powerful, sanity-friendly HTTP client for Python";
|
||||
homepage = "https://github.com/shazow/urllib3";
|
||||
description = "Powerful, user-friendly HTTP client for Python";
|
||||
homepage = "https://github.com/urllib3/urllib3";
|
||||
changelog = "https://github.com/urllib3/urllib3/blob/${version}/CHANGES.rst";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
||||
};
|
||||
in self
|
||||
|
Loading…
Reference in New Issue
Block a user