google-genai 1.39.0__tar.gz → 1.39.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. {google_genai-1.39.0/google_genai.egg-info → google_genai-1.39.1}/PKG-INFO +1 -1
  2. {google_genai-1.39.0 → google_genai-1.39.1}/google/genai/_api_client.py +17 -0
  3. {google_genai-1.39.0 → google_genai-1.39.1}/google/genai/client.py +1 -1
  4. {google_genai-1.39.0 → google_genai-1.39.1}/google/genai/version.py +1 -1
  5. {google_genai-1.39.0 → google_genai-1.39.1/google_genai.egg-info}/PKG-INFO +1 -1
  6. {google_genai-1.39.0 → google_genai-1.39.1}/pyproject.toml +1 -1
  7. {google_genai-1.39.0 → google_genai-1.39.1}/LICENSE +0 -0
  8. {google_genai-1.39.0 → google_genai-1.39.1}/MANIFEST.in +0 -0
  9. {google_genai-1.39.0 → google_genai-1.39.1}/README.md +0 -0
  10. {google_genai-1.39.0 → google_genai-1.39.1}/google/genai/__init__.py +0 -0
  11. {google_genai-1.39.0 → google_genai-1.39.1}/google/genai/_adapters.py +0 -0
  12. {google_genai-1.39.0 → google_genai-1.39.1}/google/genai/_api_module.py +0 -0
  13. {google_genai-1.39.0 → google_genai-1.39.1}/google/genai/_automatic_function_calling_util.py +0 -0
  14. {google_genai-1.39.0 → google_genai-1.39.1}/google/genai/_base_transformers.py +0 -0
  15. {google_genai-1.39.0 → google_genai-1.39.1}/google/genai/_base_url.py +0 -0
  16. {google_genai-1.39.0 → google_genai-1.39.1}/google/genai/_common.py +0 -0
  17. {google_genai-1.39.0 → google_genai-1.39.1}/google/genai/_extra_utils.py +0 -0
  18. {google_genai-1.39.0 → google_genai-1.39.1}/google/genai/_live_converters.py +0 -0
  19. {google_genai-1.39.0 → google_genai-1.39.1}/google/genai/_local_tokenizer_loader.py +0 -0
  20. {google_genai-1.39.0 → google_genai-1.39.1}/google/genai/_mcp_utils.py +0 -0
  21. {google_genai-1.39.0 → google_genai-1.39.1}/google/genai/_operations_converters.py +0 -0
  22. {google_genai-1.39.0 → google_genai-1.39.1}/google/genai/_replay_api_client.py +0 -0
  23. {google_genai-1.39.0 → google_genai-1.39.1}/google/genai/_test_api_client.py +0 -0
  24. {google_genai-1.39.0 → google_genai-1.39.1}/google/genai/_tokens_converters.py +0 -0
  25. {google_genai-1.39.0 → google_genai-1.39.1}/google/genai/_transformers.py +0 -0
  26. {google_genai-1.39.0 → google_genai-1.39.1}/google/genai/batches.py +0 -0
  27. {google_genai-1.39.0 → google_genai-1.39.1}/google/genai/caches.py +0 -0
  28. {google_genai-1.39.0 → google_genai-1.39.1}/google/genai/chats.py +0 -0
  29. {google_genai-1.39.0 → google_genai-1.39.1}/google/genai/errors.py +0 -0
  30. {google_genai-1.39.0 → google_genai-1.39.1}/google/genai/files.py +0 -0
  31. {google_genai-1.39.0 → google_genai-1.39.1}/google/genai/live.py +0 -0
  32. {google_genai-1.39.0 → google_genai-1.39.1}/google/genai/live_music.py +0 -0
  33. {google_genai-1.39.0 → google_genai-1.39.1}/google/genai/local_tokenizer.py +0 -0
  34. {google_genai-1.39.0 → google_genai-1.39.1}/google/genai/models.py +0 -0
  35. {google_genai-1.39.0 → google_genai-1.39.1}/google/genai/operations.py +0 -0
  36. {google_genai-1.39.0 → google_genai-1.39.1}/google/genai/pagers.py +0 -0
  37. {google_genai-1.39.0 → google_genai-1.39.1}/google/genai/py.typed +0 -0
  38. {google_genai-1.39.0 → google_genai-1.39.1}/google/genai/tokens.py +0 -0
  39. {google_genai-1.39.0 → google_genai-1.39.1}/google/genai/tunings.py +0 -0
  40. {google_genai-1.39.0 → google_genai-1.39.1}/google/genai/types.py +0 -0
  41. {google_genai-1.39.0 → google_genai-1.39.1}/google_genai.egg-info/SOURCES.txt +0 -0
  42. {google_genai-1.39.0 → google_genai-1.39.1}/google_genai.egg-info/dependency_links.txt +0 -0
  43. {google_genai-1.39.0 → google_genai-1.39.1}/google_genai.egg-info/requires.txt +0 -0
  44. {google_genai-1.39.0 → google_genai-1.39.1}/google_genai.egg-info/top_level.txt +0 -0
  45. {google_genai-1.39.0 → google_genai-1.39.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: google-genai
3
- Version: 1.39.0
3
+ Version: 1.39.1
4
4
  Summary: GenAI Python SDK
5
5
  Author-email: Google LLC <googleapis-packages@google.com>
6
6
  License: Apache-2.0
@@ -1775,3 +1775,20 @@ class BaseApiClient:
1775
1775
  await self._async_httpx_client.aclose()
1776
1776
  if self._aiohttp_session:
1777
1777
  await self._aiohttp_session.close()
1778
+
1779
+ def __del__(self) -> None:
1780
+ """Closes the API client when the object is garbage collected.
1781
+
1782
+ ADK uses this client so cannot rely on the genai.[Async]Client.__del__
1783
+ for cleanup.
1784
+ """
1785
+
1786
+ try:
1787
+ self.close()
1788
+ except Exception: # pylint: disable=broad-except
1789
+ pass
1790
+
1791
+ try:
1792
+ asyncio.get_running_loop().create_task(self.aclose())
1793
+ except Exception: # pylint: disable=broad-except
1794
+ pass
@@ -13,6 +13,7 @@
13
13
  # limitations under the License.
14
14
  #
15
15
 
16
+ import asyncio
16
17
  import os
17
18
  from types import TracebackType
18
19
  from typing import Optional, Union
@@ -125,7 +126,6 @@ class AsyncClient:
125
126
  await self.aclose()
126
127
 
127
128
  def __del__(self) -> None:
128
- import asyncio
129
129
  try:
130
130
  asyncio.get_running_loop().create_task(self.aclose())
131
131
  except Exception:
@@ -13,4 +13,4 @@
13
13
  # limitations under the License.
14
14
  #
15
15
 
16
- __version__ = '1.39.0' # x-release-please-version
16
+ __version__ = '1.39.1' # x-release-please-version
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: google-genai
3
- Version: 1.39.0
3
+ Version: 1.39.1
4
4
  Summary: GenAI Python SDK
5
5
  Author-email: Google LLC <googleapis-packages@google.com>
6
6
  License: Apache-2.0
@@ -3,7 +3,7 @@ requires = ["setuptools", "wheel", "twine>=6.1.0", "packaging>=24.2", "pkginfo>=
3
3
 
4
4
  [project]
5
5
  name = "google-genai"
6
- version = "1.39.0"
6
+ version = "1.39.1"
7
7
  description = "GenAI Python SDK"
8
8
  readme = "README.md"
9
9
  license = {text = "Apache-2.0"}
File without changes
File without changes
File without changes
File without changes