Merge pull request #217185 from fabaff/datadog-fix

python311Packages.datadog: disable failing tests on Python 3.11
This commit is contained in:
Jonas Heinrich 2023-02-20 12:17:07 +01:00 committed by GitHub
commit 23a1bd0af2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 45 additions and 30 deletions

View File

@ -1,18 +1,16 @@
{ lib { lib
, buildPythonPackage , buildPythonPackage
, fetchPypi
, pythonOlder
, hatchling
, decorator
, requests
, typing ? null
, configparser
, click , click
, fetchPypi
, freezegun , freezegun
, hatchling
, mock , mock
, pytestCheckHook
, pytest-vcr , pytest-vcr
, pytestCheckHook
, python-dateutil , python-dateutil
, pythonAtLeast
, pythonOlder
, requests
, vcrpy , vcrpy
}: }:
@ -21,22 +19,20 @@ buildPythonPackage rec {
version = "0.44.0"; version = "0.44.0";
format = "pyproject"; format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "sha256-BxFw8MfvIlEdv3+b12xL5QDuLT1SBykApch7VJXSxzM="; hash = "sha256-BxFw8MfvIlEdv3+b12xL5QDuLT1SBykApch7VJXSxzM=";
}; };
postPatch = ''
find . -name '*.pyc' -exec rm {} \;
'';
nativeBuildInputs = [ nativeBuildInputs = [
hatchling hatchling
]; ];
propagatedBuildInputs = [ decorator requests ] propagatedBuildInputs = [
++ lib.optional (pythonOlder "3.5") typing requests
++ lib.optional (pythonOlder "3.0") configparser; ];
nativeCheckInputs = [ nativeCheckInputs = [
click click
@ -54,13 +50,20 @@ buildPythonPackage rec {
disabledTests = [ disabledTests = [
"test_default_settings_set" "test_default_settings_set"
] ++ lib.optionals (pythonAtLeast "3.11") [
# https://github.com/DataDog/datadogpy/issues/746
"TestDogshell"
]; ];
pythonImportsCheck = [ "datadog" ]; pythonImportsCheck = [
"datadog"
];
meta = with lib; { meta = with lib; {
description = "The Datadog Python library"; description = "The Datadog Python library";
license = licenses.bsd3;
homepage = "https://github.com/DataDog/datadogpy"; homepage = "https://github.com/DataDog/datadogpy";
changelog = "https://github.com/DataDog/datadogpy/blob/v${version}/CHANGELOG.md";
license = licenses.bsd3;
maintainers = with maintainers; [ ];
}; };
} }

View File

@ -1,39 +1,51 @@
{ lib { lib
, fetchPypi
, buildPythonPackage , buildPythonPackage
, certifi
, chardet , chardet
, configparser
, datadog , datadog
, decorator
, fetchPypi
, idna
, requests , requests
, python , urllib3
, pythonOlder
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "gradient_statsd"; pname = "gradient-statsd";
version = "1.0.1"; version = "1.0.1";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi { src = fetchPypi {
inherit pname version; pname = "gradient_statsd";
sha256 = "iWlNX43ZtvU73wz4+8DgDulQNOnssJGxTBkvAaLj530="; inherit version;
hash = "sha256-iWlNX43ZtvU73wz4+8DgDulQNOnssJGxTBkvAaLj530=";
}; };
propagatedBuildInputs = [ propagatedBuildInputs = [
certifi
chardet chardet
datadog datadog
decorator
idna
requests requests
] urllib3
++ lib.optional python.isPy2 configparser; ];
pythonImportsCheck = [ "gradient_statsd" ]; pythonImportsCheck = [
"gradient_statsd"
];
# Pypi does not contain tests # Pypi does not contain tests
doCheck = false; doCheck = false;
meta = with lib; { meta = with lib; {
description = "Wrapper around the DogStatsd client"; description = "Wrapper around the DogStatsd client";
homepage = "https://paperspace.com"; homepage = "https://paperspace.com";
license = licenses.mit; license = licenses.mit;
platforms = platforms.unix;
maintainers = with maintainers; [ freezeboy ]; maintainers = with maintainers; [ freezeboy ];
platforms = platforms.unix;
}; };
} }