<commit_before>{ lib
, buildPythonPackage
, fetchFromGitHub
, uvicorn
, starlette
, pydantic
, isPy3k
, pytest
, pytestcov
, pyjwt
, passlib
, aiosqlite
, peewee
, flask
}:

buildPythonPackage rec {
  pname = "fastapi";
  version = "0.55.1";
  format = "flit";
  disabled = !isPy3k;

  src = fetchFromGitHub {
    owner = "tiangolo";
    repo = "fastapi";
    rev = version;
    sha256 = "1515nhwari48v0angyl5z3cfpvwn4al2nvqh0cjd9xgxzvm310s8";
  };

  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace "starlette ==0.13.2" "starlette"
  '';

  propagatedBuildInputs = [
    uvicorn
    starlette
    pydantic
  ];

  checkInputs = [
    pytest
    pytestcov
    pyjwt
    passlib
    aiosqlite
    peewee
    flask
  ];

  # test_default_response_class.py: requires orjson, which requires rust toolchain
  # test_custom_response/test_tutorial001b.py: requires orjson
  # tests/test_tutorial/test_sql_databases/test_testing_databases.py: just broken, don't know why
  checkPhase = ''
    pytest --ignore=tests/test_default_response_class.py \
           --ignore=tests/test_tutorial/test_custom_response/test_tutorial001b.py \
           --ignore=tests/test_tutorial/test_sql_databases/test_testing_databases.py
  '';

  meta = with lib; {
    homepage = "https://github.com/tiangolo/fastapi";
    description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production";
    license = licenses.mit;
    maintainers = with maintainers; [ wd15 ];
  };
}<commit_msg>pythonPackages.fastapi: 0.55.1 -> 0.63.0<commit_after>{ lib
, buildPythonPackage
, fetchFromGitHub
, pydantic
, starlette
, pytestCheckHook
, pytest-asyncio
, aiosqlite
, databases
, flask
, httpx
, passlib
, peewee
, python-jose
, sqlalchemy
}:

buildPythonPackage rec {
  pname = "fastapi";
  version = "0.63.0";
  format = "flit";

  src = fetchFromGitHub {
    owner = "tiangolo";
    repo = "fastapi";
    rev = version;
    sha256 = "0l3imrcs42pqf9d6k8c1q15k5sqcnapl5zk71xl52mrxhz49lgpi";
  };

  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace "starlette ==0.13.6" "starlette"
  '';

  propagatedBuildInputs = [
    starlette
    pydantic
  ];

  checkInputs = [
    aiosqlite
    databases
    flask
    httpx
    passlib
    peewee
    python-jose
    pytestCheckHook
    pytest-asyncio
    sqlalchemy
  ];

  # disabled tests require orjson which requires rust nightly
  pytestFlagsArray = [ "--ignore=tests/test_default_response_class.py" ];
  disabledTests = [ "test_get_custom_response" ];

  meta = with lib; {
    homepage = "https://github.com/tiangolo/fastapi";
    description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production";
    license = licenses.mit;
    maintainers = with maintainers; [ wd15 ];
  };
}
{'fraction_non_alphanumeric': 0.10599571734475374, 'fraction_numerical': 0.027480371163454677, 'mean_word_length': 3.312307692307692, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '249756', 'n_tokens_mistral': 1063, 'n_tokens_neox': 1013, 'n_words': 194}