Unverified Commit 23a1bd0a authored by Jonas Heinrich's avatar Jonas Heinrich Committed by GitHub
Browse files

Merge pull request #217185 from fabaff/datadog-fix

python311Packages.datadog: disable failing tests on Python 3.11
parents 0bb11997 d6dd12a2
Loading
Loading
Loading
Loading
+21 −18
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
, hatchling
, decorator
, requests
, typing ? null
, configparser
, click
, fetchPypi
, freezegun
, hatchling
, mock
, pytestCheckHook
, pytest-vcr
, pytestCheckHook
, python-dateutil
, pythonAtLeast
, pythonOlder
, requests
, vcrpy
}:

@@ -21,22 +19,20 @@ buildPythonPackage rec {
  version = "0.44.0";
  format = "pyproject";

  disabled = pythonOlder "3.7";

  src = fetchPypi {
    inherit pname version;
    sha256 = "sha256-BxFw8MfvIlEdv3+b12xL5QDuLT1SBykApch7VJXSxzM=";
    hash = "sha256-BxFw8MfvIlEdv3+b12xL5QDuLT1SBykApch7VJXSxzM=";
  };

  postPatch = ''
    find . -name '*.pyc' -exec rm {} \;
  '';

  nativeBuildInputs = [
    hatchling
  ];

  propagatedBuildInputs = [ decorator requests ]
    ++ lib.optional (pythonOlder "3.5") typing
    ++ lib.optional (pythonOlder "3.0") configparser;
  propagatedBuildInputs = [
    requests
  ];

  nativeCheckInputs = [
    click
@@ -54,13 +50,20 @@ buildPythonPackage rec {

  disabledTests = [
    "test_default_settings_set"
  ] ++ lib.optionals (pythonAtLeast "3.11") [
    # https://github.com/DataDog/datadogpy/issues/746
    "TestDogshell"
  ];

  pythonImportsCheck = [ "datadog" ];
  pythonImportsCheck = [
    "datadog"
  ];

  meta = with lib; {
    description = "The Datadog Python library";
    license = licenses.bsd3;
    homepage = "https://github.com/DataDog/datadogpy";
    changelog = "https://github.com/DataDog/datadogpy/blob/v${version}/CHANGELOG.md";
    license = licenses.bsd3;
    maintainers = with maintainers; [ ];
  };
}
+24 −12
Original line number Diff line number Diff line
{ lib
, fetchPypi
, buildPythonPackage
, certifi
, chardet
, configparser
, datadog
, decorator
, fetchPypi
, idna
, requests
, python
, urllib3
, pythonOlder
}:

buildPythonPackage rec {
  pname = "gradient_statsd";
  pname = "gradient-statsd";
  version = "1.0.1";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchPypi {
    inherit pname version;
    sha256 = "iWlNX43ZtvU73wz4+8DgDulQNOnssJGxTBkvAaLj530=";
    pname = "gradient_statsd";
    inherit version;
    hash = "sha256-iWlNX43ZtvU73wz4+8DgDulQNOnssJGxTBkvAaLj530=";
  };

  propagatedBuildInputs = [
    certifi
    chardet
    datadog
    decorator
    idna
    requests
  ]
  ++ lib.optional python.isPy2 configparser;
    urllib3
  ];

  pythonImportsCheck = [ "gradient_statsd" ];
  pythonImportsCheck = [
    "gradient_statsd"
  ];

  # Pypi does not contain tests
  doCheck = false;
@@ -33,7 +45,7 @@ buildPythonPackage rec {
    description = "Wrapper around the DogStatsd client";
    homepage = "https://paperspace.com";
    license = licenses.mit;
    platforms   = platforms.unix;
    maintainers = with maintainers; [ freezeboy ];
    platforms = platforms.unix;
  };
}