Package Details: python-google-generativeai 0.8.5-4

Git Clone URL: https://aur.archlinux.org/python-google-generativeai.git (read-only, click to copy)
Package Base: python-google-generativeai
Description: Google AI Python SDK for the Gemini API
Upstream URL: https://github.com/google-gemini/generative-ai-python
Licenses: Apache-2.0
Submitter: qdii
Maintainer: qdii
Last Packager: qdii
Votes: 0
Popularity: 0.000000
First Submitted: 2024-07-24 21:11 (UTC)
Last Updated: 2025-06-14 12:42 (UTC)

Latest Comments

1 2 3 Next › Last »

qdii commented on 2025-06-14 12:38 (UTC)

I have gotten in touch with them, and they have told me they were reluctant in making changes to the upstream repo as the project is marked deprecated.

I will apply your patch and push a new version.

Thanks for your patience :)

wjhandley commented on 2025-06-14 10:55 (UTC)

Have we heard back from python-google-generativeai? I agree with @Auerhuhn that it is not unusual for a bleeding-edge distribution like Arch to forgo pinning if there is a newer version available.

Auerhuhn commented on 2025-05-27 22:10 (UTC)

Thanks @qdii!

have you tried to submit a pull request to the upstream project

I usually do, but not in this case. I saw that the upstream project is marked as deprecated, so I assumed it’s no longer actively developed. I could be wrong though!

qdii commented on 2025-05-27 21:38 (UTC)

@Auerhuhn

Your patch looks very good.

Out of curiosity, have you tried to submit a pull request to the upstream project to add support to the newer version?

Auerhuhn commented on 2025-05-27 11:36 (UTC)

@qdii Thanks for taking your time to explain.

confirm that using a newer version of the dependency is acceptable

Using a newer version breaks a couple of tests. Version 0.6.18 has introduced a new property that the tests don’t expect.

See my patch for details. Updating the tests to follow the new v0.6.18 API is part of what my patch does.

qdii commented on 2025-05-24 13:11 (UTC)

@Auerhuhn I understand that it's annoying for you and for other users, and I'd like to solve this fast too. I appreciate that you took the time to report and offer a patch.

I assume that the authors pinned this dependency to a specific version intentionally because the same file (setup.py) reads google-auth >= 2.15.0, so they know how to pin to a version + its successors, but chose not to. This is why I err on the side of strict pinning.

I'll try to get in touch with the maintainers of python-google-generativeai next week, and have them either update their dependency list, or at least confirm that using a newer version of the dependency is acceptable.

If I haven't managed after 1 week, I'll check your patch and then apply it.

Auerhuhn commented on 2025-05-22 15:05 (UTC)

Hi @qdii,

I wrote a patch that fixes the build and adds unit tests.
Would you consider applying it?

Convenience shell commands to do so:

cd python-google-generativeai
curl -LO https://salsa.debian.org/-/snippets/786/raw/main/python-google-generativeai.patch
git apply python-google-generativeai.patch
git add -- .SRCINFO PKGBUILD tests-accept-additional-props.patch
rm python-google-generativeai.patch

Auerhuhn commented on 2025-05-22 11:49 (UTC) (edited on 2025-05-22 11:49 (UTC) by Auerhuhn)

@qdii The upstream maintainers don’t claim it only works with that version. They pinned it for undisclosed reasons. That doesn’t imply that newer versions of the dependency aren’t going to work at all.

Maintaining a system package means you’re going to have to keep a balance between usefulness and strict adherence to pinned versions. You chose to err on the side of strict pinning, and that’s fair. However, the python-google-ai-generativelanguage package got updated, and that means your package is now broken for all users (unless they hold python-google-ai-generativelanguage, which would constitute a partial upgrade and thus be highly discouraged.)

@qdii Would you be willing to accept a patch to your PKGBUILD that introduces tests and drops unneeded pins for the sake of unblocking users who are trying to build the package?

qdii commented on 2025-05-14 18:20 (UTC) (edited on 2025-05-14 18:22 (UTC) by qdii)

@mistersmee

Hm, the upstream project maintainers have voiced in their setup.py that this library only works with:

  • google-ai-generativelanguage==0.6.15
  • google-auth>=2.15.0

The pins I have set in PKGBUILD follow this.

When you say "it breaks user's systems and packages", what do you mean exactly?

mistersmee commented on 2025-05-14 17:37 (UTC)

@qdii, please don't pin dependencies to specific versions, it breaks user's systems and packages.