From 42bf899166c3e1884f49a525d77ab9f33c1c1261 Mon Sep 17 00:00:00 2001 From: harupy Date: Thu, 14 Nov 2024 22:13:17 +0900 Subject: [PATCH 1/2] Remove unnecessary cached-property dependency --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e0a20e8387..75f815741b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,6 @@ dependencies = [ "anyio>=3.5.0, <5", "distro>=1.7.0, <2", "sniffio", - "cached-property; python_version < '3.8'", "tqdm > 4", "jiter>=0.4.0, <1", ] From 81984670f83ff3f14b4a277daad611452c99a9f1 Mon Sep 17 00:00:00 2001 From: harupy Date: Thu, 14 Nov 2024 22:30:46 +0900 Subject: [PATCH 2/2] Remove cached_property import --- src/openai/_compat.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/openai/_compat.py b/src/openai/_compat.py index 7c3156a5eb..c3b92b34aa 100644 --- a/src/openai/_compat.py +++ b/src/openai/_compat.py @@ -225,9 +225,6 @@ def __set_name__(self, owner: type[Any], name: str) -> None: ... # __set__ is not defined at runtime, but @cached_property is designed to be settable def __set__(self, instance: object, value: _T) -> None: ... else: - try: - from functools import cached_property as cached_property - except ImportError: - from cached_property import cached_property as cached_property + from functools import cached_property as cached_property typed_cached_property = cached_property