Merge pull request #309979 from TomaSajt/json-logging
python312Packages.json-logging: fix tests on python312, small cleanup
This commit is contained in:
commit
1a6246d055
|
@ -6,17 +6,18 @@
|
||||||
, httpx
|
, httpx
|
||||||
, pytestCheckHook
|
, pytestCheckHook
|
||||||
, pythonOlder
|
, pythonOlder
|
||||||
|
, pythonAtLeast
|
||||||
, quart
|
, quart
|
||||||
, requests
|
, requests
|
||||||
, sanic
|
, sanic
|
||||||
|
, setuptools
|
||||||
, uvicorn
|
, uvicorn
|
||||||
, wheel
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "json-logging";
|
pname = "json-logging";
|
||||||
version = "1.5.0-rc0";
|
version = "1.5.0-rc0";
|
||||||
format = "setuptools";
|
pyproject = true;
|
||||||
|
|
||||||
disabled = pythonOlder "3.7";
|
disabled = pythonOlder "3.7";
|
||||||
|
|
||||||
|
@ -27,16 +28,28 @@ buildPythonPackage rec {
|
||||||
hash = "sha256-WOAEY1pONH+Gx1b8zHZDMNgJJSn7jvMO60LYTA8z/dE=";
|
hash = "sha256-WOAEY1pONH+Gx1b8zHZDMNgJJSn7jvMO60LYTA8z/dE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeCheckInputs = [
|
# The logging module introduced the `taskName` field in Python 3.12, which the tests don't expect
|
||||||
|
postPatch = lib.optionalString (pythonAtLeast "3.12") ''
|
||||||
|
substituteInPlace tests/helpers/constants.py \
|
||||||
|
--replace-fail '"written_at",' '"taskName", "written_at",'
|
||||||
|
'';
|
||||||
|
|
||||||
|
build-system = [
|
||||||
|
setuptools
|
||||||
|
];
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
fastapi
|
fastapi
|
||||||
flask
|
flask
|
||||||
httpx
|
httpx
|
||||||
pytestCheckHook
|
|
||||||
quart
|
quart
|
||||||
requests
|
requests
|
||||||
sanic
|
sanic
|
||||||
uvicorn
|
uvicorn
|
||||||
wheel
|
];
|
||||||
|
|
||||||
|
nativeCheckInputs = [
|
||||||
|
pytestCheckHook
|
||||||
];
|
];
|
||||||
|
|
||||||
pythonImportsCheck = [
|
pythonImportsCheck = [
|
||||||
|
|
Loading…
Reference in New Issue
Block a user