<commit_before>{ lib
, buildPythonPackage
, fetchFromGitLab
, pythonOlder
, typing-extensions
, wsproto
, toml
, h2
, priority
, mock
, poetry-core
, pytest-asyncio
, pytest-cov
, pytest-sugar
, pytest-trio
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "Hypercorn";
  version = "0.13.2";
  disabled = pythonOlder "3.7";
  format = "pyproject";

  src = fetchFromGitLab {
    owner = "pgjones";
    repo = pname;
    rev = version;
    sha256 = "sha256-fIjw5A6SvFUv8cU7xunVlPYphv+glypY4pzvHNifYLQ=";
  };

  nativeBuildInputs = [
    poetry-core
  ];

  propagatedBuildInputs = [ wsproto toml h2 priority ]
    ++ lib.optionals (pythonOlder "3.8") [ typing-extensions ];

  checkInputs = [
    pytest-asyncio
    pytest-cov
    pytest-sugar
    pytest-trio
    pytestCheckHook
  ] ++ lib.optionals (pythonOlder "3.8") [ mock ];

  pythonImportsCheck = [ "hypercorn" ];

  meta = with lib; {
    homepage = "https://pgjones.gitlab.io/hypercorn/";
    description = "The ASGI web server inspired by Gunicorn";
    license = licenses.mit;
    maintainers = with maintainers; [ dgliwka ];
  };
}<commit_msg>python3Packages.hypercorn: test in asyncio legacy mode<commit_after>{ lib
, buildPythonPackage
, fetchFromGitLab
, pythonOlder
, typing-extensions
, wsproto
, toml
, h2
, priority
, mock
, poetry-core
, pytest-asyncio
, pytest-cov
, pytest-sugar
, pytest-trio
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "Hypercorn";
  version = "0.13.2";
  disabled = pythonOlder "3.7";
  format = "pyproject";

  src = fetchFromGitLab {
    owner = "pgjones";
    repo = pname;
    rev = version;
    sha256 = "sha256-fIjw5A6SvFUv8cU7xunVlPYphv+glypY4pzvHNifYLQ=";
  };

  nativeBuildInputs = [
    poetry-core
  ];

  propagatedBuildInputs = [ wsproto toml h2 priority ]
    ++ lib.optionals (pythonOlder "3.8") [ typing-extensions ];

  checkInputs = [
    pytest-asyncio
    pytest-cov
    pytest-sugar
    pytest-trio
    pytestCheckHook
  ] ++ lib.optionals (pythonOlder "3.8") [ mock ];

  pytestFlagsArray = [
    "--asyncio-mode=legacy"
  ];

  pythonImportsCheck = [ "hypercorn" ];

  meta = with lib; {
    homepage = "https://pgjones.gitlab.io/hypercorn/";
    description = "The ASGI web server inspired by Gunicorn";
    license = licenses.mit;
    maintainers = with maintainers; [ dgliwka ];
  };
}
{'fraction_non_alphanumeric': 0.12478485370051635, 'fraction_numerical': 0.020223752151462996, 'mean_word_length': 3.3215613382899627, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '6956053', 'n_tokens_mistral': 912, 'n_tokens_neox': 885, 'n_words': 167}