anchor.diff:      uvloop
       websockets
       wsproto
  +  ] ++ lib.optionals (pythonOlder "3.8") [
  +    typing-extensions
     ];
   
  -  postPatch = ''
  -    substituteInPlace setup.py \
  -      --replace "h11==0.8.*" "h11" \
  -      --replace "httptools==0.0.13" "httptools"
  -  '';
  -
  -  checkInputs = [ pytest requests ];
  +  checkInputs = [
  +    pytestCheckHook
  +    pytest-mock
  +    pyyaml
  +    requests
  +    trustme
  +  ];
   
     doCheck = !stdenv.isDarwin;
   
  -  # watchgod required the watchgod package, which isn't available in nixpkgs
  -  checkPhase = ''
  -    pytest --ignore=tests/supervisors/test_watchgodreload.py \
  -      -k 'not test_supported_upgrade_request and not test_invalid_upgrade[WSProtocol]'
  -  '';
  +  pytestFlagsArray = [
  +    # watchgod required the watchgod package, which isn't available in nixpkgs
  +    "--ignore=tests/supervisors/test_reload.py"
  +  ];
   
  -  meta = with stdenv.lib; {
  +  disabledTests = [
  +    "test_supported_upgrade_request"
  +    "test_invalid_upgrade"
  +  ];
  +
  +  meta = with lib; {
       homepage = "https://www.uvicorn.org/";
       description = "The lightning-fast ASGI server";
       license = licenses.bsd3;
  
positive.code: , uvloop
  , websockets
  , wsproto
  , pytest
  , requests
  , isPy27
  }:
  
  buildPythonPackage rec {
    pname = "uvicorn";
    version = "0.11.5";
    disabled = isPy27;
  
    src = fetchFromGitHub {
      owner = "encode";
      repo = pname;
      rev = version;
      sha256 = "0cf0vw6kzxwlkvk5gw85wv3kg1kdil0wkq3s7rmxpvrk6gjk8jvq";
    };
  
    propagatedBuildInputs = [
  
negative.code: { stdenv
  , lib
  , buildPythonPackage
  , fetchFromGitHub
  , click
  