<commit_before>{ stdenv, pythonPackages, fetchFromGitHub }:

pythonPackages.buildPythonApplication rec {
  pname = "ntfy";
  version = "2.7.0";

  src = fetchFromGitHub {
    owner = "dschep";
    repo = "ntfy";
    rev = "v${version}";
    sha256 = "09f02cn4i1l2aksb3azwfb70axqhn7d0d0vl2r6640hqr74nc1cv";
  };

  checkInputs = with pythonPackages; [
    mock
  ];

  propagatedBuildInputs = with pythonPackages; [
    requests ruamel_yaml appdirs
    sleekxmpp dns
    emoji
    psutil
    matrix-client
    dbus-python
  ];

  checkPhase = ''
    HOME=$(mktemp -d) ${pythonPackages.python.interpreter} setup.py test
  '';

  meta = with stdenv.lib; {
    description = "A utility for sending notifications, on demand and when commands finish";
    homepage = "http://ntfy.rtfd.org/";
    license = licenses.gpl3;
    maintainers = with maintainers; [ jfrankenau kamilchm ];
  };
}<commit_msg>ntfy: Switch to python3. Also fixes test failure.<commit_after>{ stdenv, python3Packages, fetchFromGitHub }:

python3Packages.buildPythonApplication rec {
  pname = "ntfy";
  version = "2.7.0";

  src = fetchFromGitHub {
    owner = "dschep";
    repo = "ntfy";
    rev = "v${version}";
    sha256 = "09f02cn4i1l2aksb3azwfb70axqhn7d0d0vl2r6640hqr74nc1cv";
  };

  checkInputs = with python3Packages; [
    mock
  ];

  propagatedBuildInputs = with python3Packages; [
    requests ruamel_yaml appdirs
    sleekxmpp dns
    emoji
    psutil
    matrix-client
    dbus-python
  ];

  checkPhase = ''
    HOME=$(mktemp -d) ${python3Packages.python.interpreter} setup.py test
  '';

  meta = with stdenv.lib; {
    description = "A utility for sending notifications, on demand and when commands finish";
    homepage = "http://ntfy.rtfd.org/";
    license = licenses.gpl3;
    maintainers = with maintainers; [ jfrankenau kamilchm ];
  };
}
{'fraction_non_alphanumeric': 0.1131765992345544, 'fraction_numerical': 0.03389830508474576, 'mean_word_length': 3.357142857142857, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '3375964', 'n_tokens_mistral': 698, 'n_tokens_neox': 663, 'n_words': 139}