From 950bf3aef402607945b8fe47f7314d1da1dc2a37 Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Wed, 14 May 2025 10:32:30 -0700 Subject: [PATCH] python3Packages.anthropic: 0.49.0 -> 0.51.0 Release notes: https://github.com/anthropics/anthropic-sdk-python/releases/tag/v0.51.0 diff: https://github.com/anthropics/anthropic-sdk-python/compare/v0.49.0...v0.51.0 --- .../python-modules/anthropic/default.nix | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/anthropic/default.nix b/pkgs/development/python-modules/anthropic/default.nix index 50127effdede..2bbe891870ef 100644 --- a/pkgs/development/python-modules/anthropic/default.nix +++ b/pkgs/development/python-modules/anthropic/default.nix @@ -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,15 +75,10 @@ buildPythonPackage rec { pythonImportsCheck = [ "anthropic" ]; - 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]" - ]; + disabledTests = [ + # Test require network access + "test_copy_build_request" + ]; disabledTestPaths = [ # Test require network access