SyntaxWarning on import in 3.0.0 (invalid escape sequence in types.py)

オープン
#3,308 コメント 2 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@VISHNU0906 がすでに取り組んでいます。

2026年11月6日 から。

  • #3309 @VISHNU0906 による — オープン

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
python
領域
backend

調査の方向性

Read google/genai/types.py around line 18161 and inspect the File.filename description. Confirm the warning on Python 3.12+ by importing google.genai; done means the invalid escape warning is gone. Pull request #3309 is already open for this issue.

索引モデルが issue の本文から書いたものです。

説明

Line 18161 of google/genai/types.py (the File.filename description) has \/ in a regular string, so importing google.genai on Python 3.12+ gives:

SyntaxWarning: "\/" is an invalid escape sequence. Did you mean "\\/"? A raw string is also an option.

2.34.0 doesn't have this.

主要言語
Python
スター
4.1k
フォーク
1.1k
平均マージ
1日 21時間
マージ済み PR(30日)
103

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

googleapis/python-genai のほかの issue

googleapis/python-genai の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。