From fc3eb3addb3abd4804265d0af4e0f71a4b3432ca297788de0fde19849d464a4c Mon Sep 17 00:00:00 2001 From: Nico Krapp Date: Wed, 21 Aug 2024 10:43:30 +0000 Subject: [PATCH] Accepting request 1194970 from home:yeey:branches:devel:languages:python - update to 1.40.8 * types: define FilePurpose enum (#1653) (3c2eeae) OBS-URL: https://build.opensuse.org/request/show/1194970 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-openai?expand=0&rev=14 --- openai-1.14.2.tar.gz | 3 --- openai-1.40.8.tar.gz | 3 +++ python-openai.changes | 6 ++++++ python-openai.spec | 33 +++++++++++++++++++++++---------- 4 files changed, 32 insertions(+), 13 deletions(-) delete mode 100644 openai-1.14.2.tar.gz create mode 100644 openai-1.40.8.tar.gz diff --git a/openai-1.14.2.tar.gz b/openai-1.14.2.tar.gz deleted file mode 100644 index d798e44..0000000 --- a/openai-1.14.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:08e8ba2c3e9388054033b33f674a0b6be67d954d4bad5d55ae49db7594aee121 -size 206298 diff --git a/openai-1.40.8.tar.gz b/openai-1.40.8.tar.gz new file mode 100644 index 0000000..cf08143 --- /dev/null +++ b/openai-1.40.8.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e225f830b946378e214c5b2cfa8df28ba2aeb7e9d44f738cb2a926fd971f5bc0 +size 287219 diff --git a/python-openai.changes b/python-openai.changes index 17c2d92..c19f8d3 100644 --- a/python-openai.changes +++ b/python-openai.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Aug 21 04:07:02 UTC 2024 - Guang Yee + +- update to 1.40.8 + * types: define FilePurpose enum (#1653) (3c2eeae) + ------------------------------------------------------------------- Sat Mar 23 12:06:17 UTC 2024 - Dirk Müller diff --git a/python-openai.spec b/python-openai.spec index e5a2225..7b9073e 100644 --- a/python-openai.spec +++ b/python-openai.spec @@ -17,15 +17,17 @@ Name: python-openai -Version: 1.14.2 +Version: 1.40.8 Release: 0 Summary: OpenAI bindings for python License: Apache-2.0 Group: Development/Languages/Python URL: https://github.com/openai/openai-python Source: https://github.com/openai/openai-python/archive/refs/tags/v%{version}.tar.gz#/openai-%{version}.tar.gz +BuildRequires: %{python_module hatch-fancy-pypi-readme} BuildRequires: %{python_module hatchling} BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-anyio >= 3.5.0 @@ -38,16 +40,23 @@ Requires: python-typing_extensions Requires(post): update-alternatives Requires(postun): update-alternatives # SECTION test-requirements -BuildRequires: %{python_module anyio} -BuildRequires: %{python_module dirty-equals} -BuildRequires: %{python_module distro} -BuildRequires: %{python_module httpx} +BuildRequires: %{python_module dirty-equals >= 0.6.0} +BuildRequires: %{python_module distro >= 1.7.0} +BuildRequires: %{python_module httpx >= 0.23.0} +BuildRequires: %{python_module importlib-metadata >= 6.7.0} +BuildRequires: %{python_module inline-snapshot >= 0.7.0} +BuildRequires: %{python_module jiter} +BuildRequires: %{python_module mypy} BuildRequires: %{python_module pydantic} -BuildRequires: %{python_module pytest >= 3.5} -BuildRequires: %{python_module pytest-asyncio < 0.23} +BuildRequires: %{python_module pyright >= 1.1.359} +BuildRequires: %{python_module pytest-asyncio} +BuildRequires: %{python_module pytest} BuildRequires: %{python_module respx} -BuildRequires: %{python_module sniffio} +BuildRequires: %{python_module rich >= 13.7.1} +BuildRequires: %{python_module time-machine} +BuildRequires: %{python_module toml} BuildRequires: %{python_module tqdm} +BuildRequires: %{python_module trio >= 0.22.2} BuildRequires: %{python_module typing_extensions} # /SECTION BuildArch: noarch @@ -65,7 +74,7 @@ You can find usage examples for the OpenAI Python library in https://github.com/openai/openai-cookbook/. %prep -%autosetup -p1 -n openai-python-%{version} +%autosetup -p1 -n openai-%{version} %build %pyproject_wheel @@ -79,7 +88,11 @@ You can find usage examples for the OpenAI Python library in # most of tests/api_resources need registered API key # test_streaming_response needs network connection # test_copy_build_request needs "warmed up" machinery and OBS starts always fresh -%pytest --ignore "tests/api_resources" -k "not (test_streaming_response or test_copy_build_request)" +# test_basic_attribute_access_works needs network connection +# NOTE: Also, "tests/lib/chat/test_completions_streaming.py" required static snapshot +# files (./.inline_snapshop/external) which are *not included* in the tarball so we need to deselect those tests. +# NOTE: disable tests with the "asyncio" marker because they required pluggy version 1.3.0 or older +%pytest --ignore "tests/api_resources" --ignore "tests/lib/chat/test_completions_streaming.py" -m "not asyncio" -k "not (test_streaming_response or test_copy_build_request or test_basic_attribute_access_works)" %post %python_install_alternative openai