From 5dfb00886eb56db340a689380c6a481a7b7ea34f Mon Sep 17 00:00:00 2001 From: Harutaka Kawamura Date: Mon, 25 Nov 2024 21:17:54 +0900 Subject: [PATCH] chore: remove now unused `cached-property` dep (#1867) --- pyproject.toml | 1 - src/openai/_compat.py | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 02b3fbfb93..4c41631edd 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", ] diff --git a/src/openai/_compat.py b/src/openai/_compat.py index d7196c9193..87fc370765 100644 --- a/src/openai/_compat.py +++ b/src/openai/_compat.py @@ -226,9 +226,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