Date: Tue, 30 Jun 2026 07:12:36 +0000 From: Yuri Victorovich <yuri@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 4a5070eaeea1 - main - misc/py-langsmith: update 0.8.=?utf-8?Q?18 =E2=86=92 0?=.9.3 Message-ID: <6a436c64.24b1f.7f65d5dc@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=4a5070eaeea137785496f5291fd32ac71974d10d commit 4a5070eaeea137785496f5291fd32ac71974d10d Author: Yuri Victorovich <yuri@FreeBSD.org> AuthorDate: 2026-06-30 06:49:24 +0000 Commit: Yuri Victorovich <yuri@FreeBSD.org> CommitDate: 2026-06-30 07:12:15 +0000 misc/py-langsmith: update 0.8.18 → 0.9.3 --- misc/py-langsmith/Makefile | 34 ++++++++++++++++++++-- misc/py-langsmith/distinfo | 6 ++-- misc/py-langsmith/files/patch-langsmith_utils.py | 17 +++++++++++ ...sts_unit__tests_sandbox_test__async__sandbox.py | 21 +++++++++++++ ...atch-tests_unit__tests_sandbox_test__sandbox.py | 21 +++++++++++++ 5 files changed, 93 insertions(+), 6 deletions(-) diff --git a/misc/py-langsmith/Makefile b/misc/py-langsmith/Makefile index 5c32d5992a85..e41267db5ce9 100644 --- a/misc/py-langsmith/Makefile +++ b/misc/py-langsmith/Makefile @@ -1,5 +1,5 @@ PORTNAME= langsmith -DISTVERSION= 0.8.18 +DISTVERSION= 0.9.3 CATEGORIES= misc python # machine-learning MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -13,12 +13,16 @@ LICENSE= MIT BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hatchling>0:devel/py-hatchling@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}httpx>=0.23.0:www/py-httpx@${PY_FLAVOR} \ +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}anyio>=3.5.0:devel/py-anyio@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}distro>=1.7.0:sysutils/py-distro@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}httpx>=0.23.0:www/py-httpx@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}orjson>=3.9.14:devel/py-orjson@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}packaging>=23.2:devel/py-packaging@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pydantic2>=2:devel/py-pydantic2@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}requests-toolbelt>=1.0.0:www/py-requests-toolbelt@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}requests>=2.0.0:www/py-requests@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}sniffio>=1.1:devel/py-sniffio@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}typing-extensions>=4.0.0:devel/py-typing-extensions@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}uuid-utils>=0.12.0:misc/py-uuid-utils@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}websockets>=15.0:devel/py-websockets@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}xxhash>=3.0.0:devel/py-xxhash@${PY_FLAVOR} \ @@ -27,6 +31,16 @@ RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}opentelemetry-api>=1.30.0:devel/py-opentele ${PYTHON_PKGNAMEPREFIX}opentelemetry-exporter-otlp-proto-http>=1.30.0:devel/py-opentelemetry-exporter-otlp-proto-http@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}opentelemetry-sdk>=1.30.0:devel/py-opentelemetry-sdk@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}vcrpy>0:devel/py-vcrpy@${PY_FLAVOR} +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}dataclasses-json>=0.6.4:devel/py-dataclasses-json@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest-asyncio>=0.21.0:devel/py-pytest-asyncio@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest-dotenv>=0.5.2:devel/py-pytest-dotenv@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest-httpx>=0.30.0:devel/py-pytest-httpx@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest-rerunfailures>=14.0:devel/py-pytest-rerunfailures@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest-retry>0:devel/py-pytest-retry@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest-socket>=0.7.0:devel/py-pytest-socket@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest-subtests>=0.11.0:devel/py-pytest-subtests@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest-timeout>=2.3.1:devel/py-pytest-timeout@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest-xdist>=3.5.0:devel/py-pytest-xdist@${PY_FLAVOR} USES= python USE_PYTHON= pep517 autoplist pytest @@ -35,6 +49,20 @@ NO_ARCH= yes TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} -# tests as of 0.8.16: 226 failed, 1059 passed, 84 skipped, 3 xfailed, 63 warnings, 21 errors in 666.99s (0:11:06) +# Disable the flaky plugin (conflicts with pytest-rerunfailures/pytest-retry +# which both use the @pytest.mark.flaky marker with different kwargs). +# Ignore integration/evaluation/external tests (require API keys/network). +# Ignore google_adk and strands_agents wrapper tests (packages not available as FreeBSD ports). +TEST_ARGS= -p no:flaky \ + --ignore=tests/evaluation \ + --ignore=tests/external \ + --ignore=tests/integration_tests \ + --ignore=tests/unit_tests/wrappers/test_google_adk.py \ + --ignore=tests/unit_tests/wrappers/test_strands_agents.py + +# Skip flaky performance test that depends on timing/background thread throughput +PYTEST_IGNORED_TESTS= test_client_gc_after_autoscale + +# tests as of 0.9.3: 221 failed, 1396 passed, 84 skipped, 3 xfailed, 690 warnings, 10 errors in 554.00s (0:09:13) # failures due to missing api_key .include <bsd.port.mk> diff --git a/misc/py-langsmith/distinfo b/misc/py-langsmith/distinfo index 86da887eb3e1..e60dd991b543 100644 --- a/misc/py-langsmith/distinfo +++ b/misc/py-langsmith/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1781897318 -SHA256 (langsmith-0.8.18.tar.gz) = 32dde9c0e67e053e0fb738921fc8ced768af7b8fa83d7a0e3fd63597cf8776dd -SIZE (langsmith-0.8.18.tar.gz) = 4526988 +TIMESTAMP = 1782750364 +SHA256 (langsmith-0.9.3.tar.gz) = 868a007b3ecda002914b21212a953c77fcb1d71a8a09a94562c3b57941d3df3a +SIZE (langsmith-0.9.3.tar.gz) = 4577380 diff --git a/misc/py-langsmith/files/patch-langsmith_utils.py b/misc/py-langsmith/files/patch-langsmith_utils.py new file mode 100644 index 000000000000..e55bb99b363f --- /dev/null +++ b/misc/py-langsmith/files/patch-langsmith_utils.py @@ -0,0 +1,17 @@ +-- Fix _is_localhost to not treat 0.0.0.0 from DNS as localhost. +-- On FreeBSD, socket.gethostbyname() returns "0.0.0.0" for NXDOMAIN instead of +-- raising socket.gaierror, causing non-existent domains to be misidentified as +-- localhost. The 0.0.0.0 case is already handled by the _LOCALHOST_NAMES check +-- above when it appears as a URL hostname, so the DNS resolution check for +-- 0.0.0.0 is unnecessary and harmful on FreeBSD. +--- langsmith/utils.py.orig 2026-06-29 17:29:10 UTC ++++ langsmith/utils.py +@@ -889,7 +889,7 @@ def _is_localhost(url: str) -> bool: + if netloc in _LOCALHOST_NAMES: + return True + ip = socket.gethostbyname(netloc) +- return ip == "127.0.0.1" or ip.startswith("0.0.0.0") or ip.startswith("::") ++ return ip == "127.0.0.1" or ip.startswith("::") + except (socket.gaierror, RuntimeError): + # RuntimeError catches pytest-socket's SocketBlockedError in test environments + return False diff --git a/misc/py-langsmith/files/patch-tests_unit__tests_sandbox_test__async__sandbox.py b/misc/py-langsmith/files/patch-tests_unit__tests_sandbox_test__async__sandbox.py new file mode 100644 index 000000000000..8cc55b886475 --- /dev/null +++ b/misc/py-langsmith/files/patch-tests_unit__tests_sandbox_test__async__sandbox.py @@ -0,0 +1,21 @@ +-- Call request.read() before accessing request.content in async sandbox write tests. +-- Multipart form uploads create streaming requests in httpx, and accessing +-- .content without calling .read() first raises httpx.RequestNotRead. +--- tests/unit_tests/sandbox/test_async_sandbox.py.orig 2026-06-29 17:31:20 UTC ++++ tests/unit_tests/sandbox/test_async_sandbox.py +@@ -392,6 +392,7 @@ class TestAsyncSandboxWrite: + + # Verify request is multipart form + request = httpx_mock.get_request() ++ request.read() + assert b"hello world" in request.content + content_type = request.headers.get("content-type", "") + assert content_type.startswith("multipart/form-data") +@@ -412,6 +413,7 @@ class TestAsyncSandboxWrite: + + # Verify request is multipart form with binary content + request = httpx_mock.get_request() ++ request.read() + assert binary_data in request.content + content_type = request.headers.get("content-type", "") + assert content_type.startswith("multipart/form-data") diff --git a/misc/py-langsmith/files/patch-tests_unit__tests_sandbox_test__sandbox.py b/misc/py-langsmith/files/patch-tests_unit__tests_sandbox_test__sandbox.py new file mode 100644 index 000000000000..f095ec569e55 --- /dev/null +++ b/misc/py-langsmith/files/patch-tests_unit__tests_sandbox_test__sandbox.py @@ -0,0 +1,21 @@ +-- Call request.read() before accessing request.content in sandbox write tests. +-- Multipart form uploads create streaming requests in httpx, and accessing +-- .content without calling .read() first raises httpx.RequestNotRead. +--- tests/unit_tests/sandbox/test_sandbox.py.orig 2026-06-29 17:31:20 UTC ++++ tests/unit_tests/sandbox/test_sandbox.py +@@ -401,6 +401,7 @@ class TestSandboxWrite: + + # Verify request is multipart form + request = httpx_mock.get_request() ++ request.read() + assert b"hello world" in request.content + content_type = request.headers.get("content-type", "") + assert content_type.startswith("multipart/form-data") +@@ -421,6 +422,7 @@ class TestSandboxWrite: + + # Verify request is multipart form with binary content + request = httpx_mock.get_request() ++ request.read() + assert binary_data in request.content + content_type = request.headers.get("content-type", "") + assert content_type.startswith("multipart/form-data")home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a436c64.24b1f.7f65d5dc>
