From 02d56d8e51138b0233039763ef0a48980dbb17c3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2024 05:24:34 +0000 Subject: [PATCH] chore(internal): codegen related update (#64) --- README.md | 6 ++++-- pyproject.toml | 1 - src/studio_sdk/_compat.py | 5 +---- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 43b18ee..a86ec70 100644 --- a/README.md +++ b/README.md @@ -186,12 +186,14 @@ Note that requests that time out are [retried twice by default](#retries). We use the standard library [`logging`](https://docs.python.org/3/library/logging.html) module. -You can enable logging by setting the environment variable `STUDIO_SDK_LOG` to `debug`. +You can enable logging by setting the environment variable `STUDIO_SDK_LOG` to `info`. ```shell -$ export STUDIO_SDK_LOG=debug +$ export STUDIO_SDK_LOG=info ``` +Or to `debug` for more verbose logging. + ### How to tell whether `None` means `null` or missing In an API response, a field may be explicitly `null`, or missing entirely; in either case, its value is `None` in this library. You can differentiate the two cases with `.model_fields_set`: diff --git a/pyproject.toml b/pyproject.toml index 938fa15..e3c7d6e 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'", ] requires-python = ">= 3.8" classifiers = [ diff --git a/src/studio_sdk/_compat.py b/src/studio_sdk/_compat.py index df173f8..92d9ee6 100644 --- a/src/studio_sdk/_compat.py +++ b/src/studio_sdk/_compat.py @@ -214,9 +214,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