<commit_before>{ lib
, stdenv
, buildPythonPackage
, fetchFromGitHub
, pyasn1
, pyasn1-modules
, pythonAtLeast
, pythonOlder
, pytestCheckHook
, openldap
, cyrus_sasl
}:

buildPythonPackage rec {
  pname = "python-ldap";
  version = "3.4.3";
  disabled = pythonOlder "3.6";

  src = fetchFromGitHub {
    owner = pname;
    repo = pname;
    rev = "refs/tags/python-ldap-${version}";
    hash = "sha256-/ehvSs2qjuTPhaaOP0agPbWyyRugBpUlPq/Ny9t2C58=";
  };

  buildInputs = [
    openldap
    cyrus_sasl
  ];

  propagatedBuildInputs = [
    pyasn1
    pyasn1-modules
  ];

  checkInputs = [
    pytestCheckHook
  ];

  preCheck = ''
    # Needed by tests to setup a mockup ldap server.
    export BIN="${openldap}/bin"
    export SBIN="${openldap}/bin"
    export SLAPD="${openldap}/libexec/slapd"
    export SCHEMA="${openldap}/etc/schema"
  '';

  doCheck = !stdenv.isDarwin;

  meta = with lib; {
    description = "Python modules for implementing LDAP clients";
    homepage = "https://www.python-ldap.org/";
    license = licenses.psfl;
  };
}<commit_msg>python3.pkgs.ldap: disable failing test (#201190)<commit_after>{ lib
, stdenv
, buildPythonPackage
, fetchFromGitHub
, pyasn1
, pyasn1-modules
, pythonAtLeast
, pythonOlder
, pytestCheckHook
, openldap
, cyrus_sasl
}:

buildPythonPackage rec {
  pname = "python-ldap";
  version = "3.4.3";
  disabled = pythonOlder "3.6";

  src = fetchFromGitHub {
    owner = pname;
    repo = pname;
    rev = "refs/tags/python-ldap-${version}";
    hash = "sha256-/ehvSs2qjuTPhaaOP0agPbWyyRugBpUlPq/Ny9t2C58=";
  };

  buildInputs = [
    openldap
    cyrus_sasl
  ];

  propagatedBuildInputs = [
    pyasn1
    pyasn1-modules
  ];

  checkInputs = [
    pytestCheckHook
  ];

  preCheck = ''
    # Needed by tests to setup a mockup ldap server.
    export BIN="${openldap}/bin"
    export SBIN="${openldap}/bin"
    export SLAPD="${openldap}/libexec/slapd"
    export SCHEMA="${openldap}/etc/schema"
  '';

  disabledTests = [
    # https://github.com/python-ldap/python-ldap/issues/501
    "test_tls_ext_noca"
  ];

  doCheck = !stdenv.isDarwin;

  meta = with lib; {
    description = "Python modules for implementing LDAP clients";
    homepage = "https://www.python-ldap.org/";
    license = licenses.psfl;
  };
}
{'fraction_non_alphanumeric': 0.1338339222614841, 'fraction_numerical': 0.020318021201413426, 'mean_word_length': 3.2100371747211898, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2492205', 'n_tokens_mistral': 927, 'n_tokens_neox': 886, 'n_words': 153}