anchor.diff:  { lib
   , attrs
   , buildPythonPackage
  -, fetchPypi
  +, fetchFromGitHub
  +, fetchpatch
   , httpx
   , iso8601
  +, poetry-core
   , pydantic
   , pyjwt
   , pytest-asyncio
  
positive.code: buildPythonPackage rec {
    pname = "qcs-api-client";
    version = "0.20.9";
    format = "setuptools";
  
    disabled = pythonOlder "3.7";
  
    src = fetchPypi {
      inherit pname version;
      sha256 = "7b4e890ca9d9996060690629eee88db49c5fa4bde520910d48dd20323d1c5574";
    };
  
    propagatedBuildInputs = [
      attrs
  
negative.code:     respx
    ];
  
    patches = [
      # Switch to poetry-core, https://github.com/rigetti/qcs-api-client-python/pull/2
      (fetchpatch {
        name = "switch-to-poetry-core.patch";
        url = "https://github.com/rigetti/qcs-api-client-python/commit/32f0b3c7070a65f4edf5b2552648d88435469e44.patch";
        sha256 = "sha256-mOc+Q/5cmwPziojtxeEMWWHSDvqvzZlNRbPtOSeTinQ=";
      })
    ];
  
    postPatch = ''
      substituteInPlace pyproject.toml \
        --replace 'attrs = "^20.1.0"' 'attrs = "*"' \
        --replace 'httpx = "^0.15.0"' 'httpx = "*"' \
        --replace 'iso8601 = "^0.1.13"' 'iso8601 = "*"' \
        --replace 'pydantic = "^1.7.2"' 'pydantic = "*"' \
        --replace 'pyjwt = "^1.7.1"' 'pyjwt = "*"'
    '';
  
    disabledTestPaths = [
      # Test is outdated
      "tests/test_client/test_client.py"
    ];
  
    pythonImportsCheck = [
      "qcs_api_client"
  