mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 12:29:02 +02: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
|
{ lib
|
||||||
|
, backports-zoneinfo
|
||||||
, brotli
|
, brotli
|
||||||
, brotlicffi
|
, brotlicffi
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
|
@ -8,66 +9,29 @@
|
||||||
, hatchling
|
, hatchling
|
||||||
, idna
|
, idna
|
||||||
, isPyPy
|
, isPyPy
|
||||||
, mock
|
|
||||||
, pyopenssl
|
, pyopenssl
|
||||||
, pysocks
|
, pysocks
|
||||||
, pytest-freezegun
|
|
||||||
, pytest-timeout
|
, pytest-timeout
|
||||||
, pytestCheckHook
|
, pytestCheckHook
|
||||||
, python-dateutil
|
, pythonOlder
|
||||||
, tornado
|
, tornado
|
||||||
, trustme
|
, trustme
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
let self = buildPythonPackage rec {
|
||||||
pname = "urllib3";
|
pname = "urllib3";
|
||||||
version = "2.0.6";
|
version = "2.0.7";
|
||||||
format = "pyproject";
|
pyproject = true;
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
hash = "sha256-sZ4ahdIGtW198dXmg99KdyUlKpZOOZNkjdD7WhwVdWQ=";
|
hash = "sha256-yX394fe9Q6ccjSpY42npsr9pLRM06p+crlWt19DdD4Q=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
hatchling
|
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 = {
|
passthru.optional-dependencies = {
|
||||||
brotli = if isPyPy then [
|
brotli = if isPyPy then [
|
||||||
brotlicffi
|
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; {
|
meta = with lib; {
|
||||||
description = "Powerful, sanity-friendly HTTP client for Python";
|
description = "Powerful, user-friendly HTTP client for Python";
|
||||||
homepage = "https://github.com/shazow/urllib3";
|
homepage = "https://github.com/urllib3/urllib3";
|
||||||
changelog = "https://github.com/urllib3/urllib3/blob/${version}/CHANGES.rst";
|
changelog = "https://github.com/urllib3/urllib3/blob/${version}/CHANGES.rst";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
maintainers = with maintainers; [ fab ];
|
maintainers = with maintainers; [ fab ];
|
||||||
};
|
};
|
||||||
}
|
};
|
||||||
|
in self
|
||||||
|
|
Loading…
Reference in a new issue