Commit 950bf3ae authored by Sarah Clark's avatar Sarah Clark
Browse files
parent 1820c412
Loading
Loading
Loading
Loading
+11 −12
Original line number Diff line number Diff line
@@ -6,7 +6,6 @@
  # build-system
  hatch-fancy-pypi-readme,
  hatchling,
  pythonAtLeast,

  # dependencies
  anyio,
@@ -31,16 +30,21 @@

buildPythonPackage rec {
  pname = "anthropic";
  version = "0.49.0";
  version = "0.51.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "anthropics";
    repo = "anthropic-sdk-python";
    tag = "v${version}";
    hash = "sha256-vbK8rqCekWbgLAU7YlHUhfV+wB7Q3Rpx0OUYvq3WYWw=";
    hash = "sha256-gD3qZpPKtKZtuoGqnKVgFp0gCxpL0Aq5NGFCMk+z3cQ=";
  };

  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace-fail '"hatchling==1.26.3"' '"hatchling>=1.26.3"'
  '';

  build-system = [
    hatchling
    hatch-fancy-pypi-readme
@@ -71,14 +75,9 @@ buildPythonPackage rec {

  pythonImportsCheck = [ "anthropic" ];

  disabledTests =
    [
  disabledTests = [
    # Test require network access
    "test_copy_build_request"
    ]
    ++ lib.optionals (pythonAtLeast "3.13") [
      # Fails on RuntimeWarning: coroutine method 'aclose' of 'AsyncStream._iter_events' was never awaited
      "test_multi_byte_character_multiple_chunks[async]"
  ];

  disabledTestPaths = [