git: 35285fbd4bcf - main - misc/py-openai: update 2.53.0 → 3.8.0

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Wed, 09 Sep 2026 07:49:15 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=35285fbd4bcfbef5763916a26b37c8edab8f29fb

commit 35285fbd4bcfbef5763916a26b37c8edab8f29fb
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2026-09-08 22:48:18 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2026-09-09 07:48:34 +0000

    misc/py-openai: update 2.53.0 → 3.8.0
---
 misc/py-openai/Makefile                   | 18 ++++++++++++------
 misc/py-openai/distinfo                   |  6 +++---
 misc/py-openai/files/patch-pyproject.toml | 12 ++++++------
 3 files changed, 21 insertions(+), 15 deletions(-)

diff --git a/misc/py-openai/Makefile b/misc/py-openai/Makefile
index b5f1c9ecb804..8afad3661875 100644
--- a/misc/py-openai/Makefile
+++ b/misc/py-openai/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	openai
-DISTVERSION=	2.53.0
+DISTVERSION=	3.8.0
 CATEGORIES=	misc # machine-learning
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -15,14 +15,14 @@ BUILD_DEPENDS=	${PY_SETUPTOOLS} \
 		${PYTHON_PKGNAMEPREFIX}hatch-fancy-pypi-readme>=0:devel/py-hatch-fancy-pypi-readme@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}hatchling>0:devel/py-hatchling@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
-RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}anyio>=3.5.0:devel/py-anyio@${PY_FLAVOR} \
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}anyio>=4.10.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}pydantic2>=1.9.0:devel/py-pydantic2@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}httpx>=0.27.0:www/py-httpx@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pydantic2>=1.10.13:devel/py-pydantic2@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}sniffio>0:devel/py-sniffio@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}tqdm>4:misc/py-tqdm@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}typing-extensions>=4.14:devel/py-typing-extensions@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}jiter>=0.10.0:textproc/py-jiter@${PY_FLAVOR}
+		${PYTHON_PKGNAMEPREFIX}jiter>=0.16.0:textproc/py-jiter@${PY_FLAVOR}
 RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}numpy>=1.16:math/py-numpy@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}pandas>=1.2.3:math/py-pandas@${PY_FLAVOR}
 TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}azure-identity>0:devel/py-azure-identity@${PY_FLAVOR} \
@@ -40,8 +40,14 @@ TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}azure-identity>0:devel/py-azure-identity@${
 USES=		python
 USE_PYTHON=	pep517 concurrent autoplist pytest # tests fail because api_key needs to be set
 
-TEST_ENV=	${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
+TEST_ENV=	${MAKE_ENV} \
+		PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} \
+		OPENAI_API_KEY=sk-test \
+		PYTEST_ADDOPTS="-p no:benchmark --ignore=tests/api_resources --ignore=tests/test_uv_workflows.py --ignore=tests/lib/test_fine_tuning_positional_arguments.py --ignore=tests/lib/chat/test_completions_streaming.py --ignore=tests/test_tls_hostname.py"
 
 NO_ARCH=	yes
 
+# tests as of 3.8.0: 3155 passed, 8 skipped in 38.77s
+# (ignored tests require a live OpenAI API endpoint or uv-specific CI fixtures)
+
 .include <bsd.port.mk>
diff --git a/misc/py-openai/distinfo b/misc/py-openai/distinfo
index ad485086a036..1f581a1a563a 100644
--- a/misc/py-openai/distinfo
+++ b/misc/py-openai/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1786155403
-SHA256 (openai-2.53.0.tar.gz) = baf5802ad08980e1d9d561e1b996e800c8bcd14af5847c6d0e7a5cc59e4d4116
-SIZE (openai-2.53.0.tar.gz) = 1099435
+TIMESTAMP = 1788825709
+SHA256 (openai-3.8.0.tar.gz) = 6138a5a1333a1be9e4d1edea2d160b311542787b029543f87de4961c66358d16
+SIZE (openai-3.8.0.tar.gz) = 1473819
diff --git a/misc/py-openai/files/patch-pyproject.toml b/misc/py-openai/files/patch-pyproject.toml
index 4031c157ea96..d55d74132c12 100644
--- a/misc/py-openai/files/patch-pyproject.toml
+++ b/misc/py-openai/files/patch-pyproject.toml
@@ -1,11 +1,11 @@
---- pyproject.toml.orig	2025-03-23 09:28:46 UTC
+-- Allow building with the hatchling version available in ports.
+
+--- pyproject.toml.orig	2026-09-07 00:00:00 UTC
 +++ pyproject.toml
-@@ -100,7 +100,7 @@ typecheck = { chain = [
- "typecheck:mypy" = "mypy ."
- 
+@@ -108,4 +108,4 @@ build-backend = "hatchling.build"
  [build-system]
--requires = ["hatchling==1.26.3", "hatch-fancy-pypi-readme"]
-+requires = ["hatchling>=1.26.3", "hatch-fancy-pypi-readme"]
+-requires = ["hatchling==1.27.0"]
++requires = ["hatchling>=1.27.0"]
  build-backend = "hatchling.build"
  
  [tool.hatch.build]