Skip to content

Commit 71c65c0

Browse files
committed
Fix tests
Apply upstream PR #3064, which adds the google.genai._interactions compatibility module that test_interactions_default_timeout imports. PR #3109 (commit b006b4b) added the test before that module was merged, so it fails on 2.30.1 with an ImportError (googleapis/python-genai#3122). PR #3064 still has DEFAULT_TIMEOUT = Timeout(timeout=60.0, connect=5.0); set it to Timeout(timeout=None, connect=5.0) as b006b4b expects. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 1b513de commit 71c65c0

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

‎python-google-genai/PKGBUILD‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,20 @@ optdepends=('python-aiohttp: aiohttp'
4444
'python-transformers: local-tokenizer'
4545

4646
'python-pyopenssl: pyopenssl')
47-
source=("$url/archive/refs/tags/v$pkgver.tar.gz")
48-
sha256sums=('b8f9817676911d701ba9d985630a48dcd147b62331995b0a5888acf63b860133')
47+
source=("$url/archive/refs/tags/v$pkgver.tar.gz"
48+
"$url/pull/3064.patch")
49+
sha256sums=('b8f9817676911d701ba9d985630a48dcd147b62331995b0a5888acf63b860133'
50+
'3d18903ca18ae3d2913d87d6423df903e2a96408aa2dd671271347ce52f02d28')
4951

5052
prepare(){
5153
cd "$srcdir"/${pkgname//google-/}-$pkgver
5254
sed -i 's/, "twine>=6.1.0", "packaging>=24.2", "pkginfo>=1.12.0"//g' pyproject.toml
5355
# Fix compatibility with newer tenacity versions
5456
sed -i 's/wait.initial/wait.multiplier/g' google/genai/tests/client/test_retries.py
57+
# Add the google.genai._interactions module that test_interactions_default_timeout imports (upstream PR #3064, not merged yet)
58+
patch -Np1 -i ../3064.patch
59+
# Use the default timeout set by upstream commit b006b4b, which PR #3064 doesn't have yet
60+
sed -i 's/Timeout(timeout=60.0, connect=5.0)/Timeout(timeout=None, connect=5.0)/' google/genai/_interactions/__init__.py
5561
}
5662

5763
build() {

0 commit comments

Comments
 (0)