惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
WordPress大学
WordPress大学
T
Tailwind CSS Blog
V
Visual Studio Blog
月光博客
月光博客
Hugging Face - Blog
Hugging Face - Blog
小众软件
小众软件
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - Franky
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Last Week in AI
Last Week in AI
阮一峰的网络日志
阮一峰的网络日志
量子位
有赞技术团队
有赞技术团队
酷 壳 – CoolShell
酷 壳 – CoolShell
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
Jina AI
Jina AI
雷峰网
雷峰网
博客园 - 【当耐特】
博客园 - 叶小钗
美团技术团队
宝玉的分享
宝玉的分享
IT之家
IT之家

AUR Newest Packages

AUR (en) - linuxqq-clipsync-git AUR (en) - libtslitex-git AUR (en) - libtslitex-git AUR (en) - carton-appimage AUR (en) - veila-git AUR (en) - veila-bin AUR (en) - vigil-baseline AUR (en) - byedroid AUR (en) - neovim-base16-git AUR (en) - pirata AUR (en) - rpi-imager-git-non-root AUR (en) - python-fastapi-sso AUR (en) - tmux-ai-titles AUR (en) - zeed-bin AUR (en) - bclone-bin AUR (en) - dwl-git-azerty AUR (en) - auggie-bin AUR (en) - libspatialaudio-git AUR (en) - libspatialaudio AUR (en) - miniupnpd-iptables-legacy AUR (en) - miniupnpd-nft AUR (en) - jeeves-bin AUR (en) - opennow AUR (en) - rotki AUR (en) - kapi-bin AUR (en) - classfi-bin AUR (en) - classfi-git AUR (en) - classfi AUR (en) - giff-git AUR (en) - budget-tracker-bin
AUR (en) - python-google-genai
2026-05-29 · via AUR Newest Packages

This fixed the failing test_websocket_base_url_no_auth_with_custom_base_url test for me:

diff --git a/PKGBUILD b/PKGBUILD
index afa3ee0..4bc9fd8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -45,6 +45,7 @@ check() {
     --deselect google/genai/tests/afc/test_generate_content_stream_afc_thoughts.py
     --deselect google/genai/tests/operations/test_get.py
     --deselect google/genai/tests/interactions/test_paths.py
+    --deselect google/genai/tests/live/test_live.py
     # Need to be fixed by developers
     --deselect google/genai/tests/types/test_types.py::test_generic_alias_complex_array_with_default_value
     --deselect google/genai/tests/types/test_types.py::test_generic_alias_complex_array_with_default_value_all_py_versions

The coder comment on the from_callable method in FunctionDeclaration class reads:

    """Converts a Callable to a FunctionDeclaration based on the client.

    Note: For best results prefer
    [Google-style
    docstring](https://google.github.io/styleguide/pyguide.html#383-functions-and-methods)
    when describing arguments. This function does **not** parse argument
    descriptions into the property description slots of the resulting structure.
    Instead it sends the whole docstring in the top-level function description.
    Google-style docstring are closest to what the model is trained on.
    """

Hey @medaminezghal, so several tests fail when trying to install 1.55 or modifying your script to 1.57. At least a couple of these are tests that require one to set up a google AI API. See:

ERROR google/genai/tests/interactions/test_paths.py::test_interactions_paths[True-tests/interactions/paths-None] - google.auth.exceptions.DefaultCredentialsError: Your default credentials were not found. To set up Application Default Credentials, see https://cloud.google.com/docs/authentication/external/set-up-adc for more information. ERROR google/genai/tests/interactions/test_paths.py::test_interactions_paths[False-tests/interactions/paths-None] - ValueError: Missing key inputs argument! To use the Google AI API, provide (api_key) arguments. To use the Google Cloud API, provide (vertexai, project & location) arguments. ERROR google/genai/tests/interactions/test_paths.py::test_async_interactions_paths[True-tests/interactions/paths-None] - google.auth.exceptions.DefaultCredentialsError: Your default credentials were not found. To set up Application Default Credentials, see https://cloud.google.com/docs/authentication/external/set-up-adc for more information. ERROR google/genai/tests/interactions/test_paths.py::test_async_interactions_paths[False-tests/interactions/paths-None] - ValueError: Missing key inputs argument! To use the Google AI API, provide (api_key) arguments. To use the Google Cloud API, provide (vertexai, project & location) arguments.

And the rest are some sort of typing errors (and these are the only ones that show up in 1.55):

But even the typing errors seem like they might depend on APIs or at least API specific functions (without looking more deeply at the code than I have), since the output of FunctionDeclaration from_collable method being called on the test input depends on these APIs to structure them.

google/genai/tests/types/test_types.py::test_type_union_with_default_value_all_py_versions

actual_schema_vertex = types.FunctionDeclaration.from_callable(
          client=vertex_client, callable=func_under_test
      )

assert actual_schema_vertex == expected_schema
E     AssertionError: assert FunctionDeclaration(\n  description='test generic alias complex array with default value.',\n  name='func_under_test',\n  parameters=Schema(\n    properties={\n      'a': Schema(\n        default=[\n          1,\n          'a',\n          1.1,\n          True,\n        ],\n        items=Schema(\n          any_of=[\n            Schema(\n              type=<... Max depth ...>\n            ),\n            Schema(\n              type=<... Max depth ...>\n            ),\n            Schema(\n              type=<... Max depth ...>\n            ),\n            Schema(\n              type=<... Max depth ...>\n            ),\n          ]\n        ),\n        type=<Type.ARRAY: 'ARRAY'>\n      ),\n      'b': Schema(\n        default=[\n          11,\n          'aa',\n          1.11,\n          False,\n        ],\n        items=Schema(\n          any_of=[\n            Schema(\n              type=<... Max depth ...>\n            ),\n            Schema(\n              type=<... Max depth ...>\n            ),\n            Schema(\n              type=<... Max depth ...>\n            ),\n            Schema(\n              type=<... Max depth ...>\n            ),\n          ]\n        ),\n        type=<Type.ARRAY: 'ARRAY'>\n      ),\n      'c': Schema(\n        default=[\n          [\n            1,\n          ],\n          2,\n        ],\n        items=Schema(\n          any_of=[\n            Schema(\n              items=<... Max depth ...>,\n              type=<... Max depth ...>\n            ),\n            Schema(\n              type=<... Max depth ...>\n            ),\n          ]\n        ),\n        type=<Type.ARRAY: 'ARRAY'>\n      )\n    },\n    required=[],\n    type=<Type.OBJECT: 'OBJECT'>\n  )\n) == FunctionDeclaration(\n  description='test generic alias complex array with default value.',\n  name='func_under_test',\n  parameters=Schema(\n    properties={\n      'a': Schema(\n        default=[\n          1,\n          'a',\n          1.1,\n          True,\n        ],\n        items=Schema(\n          any_of=[\n            Schema(\n              type=<... Max depth ...>\n            ),\n            Schema(\n              type=<... Max depth ...>\n            ),\n            Schema(\n              type=<... Max depth ...>\n            ),\n            Schema(\n              type=<... Max depth ...>\n            ),\n          ],\n          type=<Type.OBJECT: 'OBJECT'>\n        ),\n        type=<Type.ARRAY: 'ARRAY'>\n      ),\n      'b': Schema(\n        default=[\n          11,\n          'aa',\n          1.11,\n          False,\n        ],\n        items=Schema(\n          any_of=[\n            Schema(\n              type=<... Max depth ...>\n            ),\n 

Hi @medaminezghal, would you mind adding python-pytest-xdist to checkdepends as @gwuensch has suggested?

This breaks downstream packages such as aider-chat, so it would be super helpful if you fixed this error.

Missing check dependency python-pytest-xdist for the -n auto option:

==> Starting check()...
ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...]
pytest: error: unrecognized arguments: -n --dist=loadscope google/genai/tests

This no longer builds for me.

FAILED google/genai/tests/live/test_live.py::test_websocket_base_url_no_auth_with_custom_base_url - AssertionError: assert 'wss://test-api-gateway-proxy.com' == 'https://test-api-gateway-proxy.com'

  - https://test-api-gateway-proxy.com
  ? ^^^^
  + wss://test-api-gateway-proxy.com
  ? ^^
================================= 1 failed, 867 passed, 1 skipped, 158 deselected, 62 warnings in 51.23s ==================================
==> ERROR: A failure occurred in check().
    Aborting...
 -> error making: python-google-genai-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
python-google-genai - exit status 4

@Jawzper if you are on CachyOS then I asked the repo maintainers to rebuild sentencepiece with the new protobuf 32.0 version. Which fixed this issue.

Make sure you install python-pytokens as it is also now required!

BTW, if you are NOT on CachyOS like me, then you need to get in contact with whoever is your repo maintainer and ask them to rebuild it. (or if you want to you can build it with the new protobuf 32.0 yourself)

I'm getting this error, can anyone help? I already have protobuf and python-protobuf packages installed.


====================================================== ERRORS ======================================================
___________________ ERROR collecting google/genai/tests/local_tokenizer/test_local_tokenizer.py ____________________
ImportError while importing test module '/home/jazz/.cache/yay/python-google-genai/src/python-genai-1.36.0/google/genai/tests/local_tokenizer/test_local_tokenizer.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.13/site-packages/_pytest/python.py:498: in importtestmodule
    mod = import_path(
/usr/lib/python3.13/site-packages/_pytest/pathlib.py:587: in import_path
    importlib.import_module(module_name)
/usr/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:935: in _load_unlocked
    ???
/usr/lib/python3.13/site-packages/_pytest/assertion/rewrite.py:186: in exec_module
    exec(co, module.__dict__)
google/genai/tests/local_tokenizer/test_local_tokenizer.py:19: in <module>
    from sentencepiece import sentencepiece_model_pb2
/usr/lib/python3.13/site-packages/sentencepiece/__init__.py:10: in <module>
    from . import _sentencepiece
E   ImportError: libprotobuf-lite.so.31.1.0: cannot open shared object file: No such file or directory
________________ ERROR collecting google/genai/tests/local_tokenizer/test_local_tokenizer_loader.py ________________
ImportError while importing test module '/home/jazz/.cache/yay/python-google-genai/src/python-genai-1.36.0/google/genai/tests/local_tokenizer/test_local_tokenizer_loader.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.13/site-packages/_pytest/python.py:498: in importtestmodule
    mod = import_path(
/usr/lib/python3.13/site-packages/_pytest/pathlib.py:587: in import_path
    importlib.import_module(module_name)
/usr/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:935: in _load_unlocked
    ???
/usr/lib/python3.13/site-packages/_pytest/assertion/rewrite.py:186: in exec_module
    exec(co, module.__dict__)
google/genai/tests/local_tokenizer/test_local_tokenizer_loader.py:19: in <module>
    import sentencepiece as spm
/usr/lib/python3.13/site-packages/sentencepiece/__init__.py:10: in <module>
    from . import _sentencepiece
E   ImportError: libprotobuf-lite.so.31.1.0: cannot open shared object file: No such file or directory
================================================= warnings summary =================================================
../../../../../../../usr/lib/python3.13/site-packages/_hypothesis_pytestplugin.py:450
  /usr/lib/python3.13/site-packages/_hypothesis_pytestplugin.py:450: PytestRemovedIn9Warning: Marks applied to fixtures have no effect
  See docs: https://docs.pytest.org/en/stable/deprecations.html#applying-a-mark-to-a-fixture-function
    return _orig_call(self, function)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================================= short test summary info ==============================================
ERROR google/genai/tests/local_tokenizer/test_local_tokenizer.py
ERROR google/genai/tests/local_tokenizer/test_local_tokenizer_loader.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
=================================== 172 deselected, 1 warning, 2 errors in 0.94s ===================================
==> ERROR: A failure occurred in check().
    Aborting...
 -> error making: python-google-genai-exit status 4

I believe pgpkeys are only relevant when using a signed source. In this case, makepkg has nothing to verify without an associated .sig