[db-dtypes] Support pandas 3.1 ExtensionArray compliance interface changes
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 領域
- databases, testing-qa
調査の方向性
Start with db_dtypes/dtypes.py and the compliance files tests/compliance/test_date_compliance.py, test_json_compliance.py, and test_time_compliance.py. Run nox -s unit_prerelease with pandas 3.1.0rc0, then inspect the failing ExtensionArray tests and the temporary constraint in packages/db-dtypes/testing/constraints-3.14.txt. Done means unit and compliance suites pass against pandas 3.1 and the temporary ceiling is removed.
索引モデルが issue の本文から書いたものです。
説明
Summary
When testing with pandas >= 3.1.0 (currently in pre-release on PyPI as pandas==3.1.0rc0), the db-dtypes compliance test suite (tests/compliance) fails due to upstream changes in pandas internal utilities and ExtensionArray interface contracts.
To prevent presubmit PR CI from failing unexpectedly on developer branches, a temporary ceiling constraint (pandas < 3.1.0dev0) was added in packages/db-dtypes/testing/constraints-3.14.txt. This issue tracks the feature work required to update db-dtypes for full pandas 3.1 compatibility.
Problem Details
1. Private Import Removal (np_version_gt2)
The compliance test files (test_date_compliance.py, test_json_compliance.py, test_time_compliance.py) currently import a private helper:
from pandas.compat.numpy import np_version_gt2
In pandas 3.1, this private attribute has been removed from pandas.compat.numpy, resulting in test collection errors:
ImportError: cannot import name 'np_version_gt2' from 'pandas.compat.numpy'
2. ExtensionArray Interface Contract Changes
Pandas 3.1 introduces stricter interface requirements in pandas.tests.extension.base:
fillnamapping:ExtensionArray.fillna()no longer accepts dictionary or mapping values.- Comparison Operator Outputs: Changes to boolean comparison return types and PyArrow-backed boolean handling.
- Datetime / ZoneInfo fixture dependencies: Test fixtures generating localized timestamps require explicit
tzdataresolution on newer Python runtimes.
Desired Solution
- Decouple Version Checks:
Replacefrom pandas.compat.numpy import np_version_gt2intests/compliance/with standard version checks usingpackaging.version.parse(np.__version__) >= Version("2.0.0"). - Update Array Implementations for Pandas 3.1:
Audit and updateDateArray,TimeArray, andJSONArrayindb_dtypes/dtypes.pyto satisfy both pandas 3.0 and pandas 3.1 ExtensionArray contracts simultaneously. - Verify Pre-release & Compliance:
Run bothunitandcompliancetest suites againstpandas>=3.1.0rc0usingnox -s unit_prereleaseto ensure 100% compliance. - Remove Temporary Constraint:
Removepandas < 3.1.0dev0frompackages/db-dtypes/testing/constraints-3.14.txt.
- 主要言語
- Python
- スター
- 5.4k
- フォーク
- 1.8k
- 平均マージ
- 2日 20時間
- マージ済み PR(30日)
- 140
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
googleapis/google-cloud-python のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
googleapis/google-cloud-python#19099 ·
メンテナーはふだん 2 日以内に返信
-
firestore: field path with a quoted name ending in a backslash is misparsed対応中かも @sebxt が 28 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
googleapis/google-cloud-python#18771 ·
メンテナーはふだん 2 日以内に返信
-
api: spanner type: feature request
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
googleapis/google-cloud-python#18584 ·
メンテナーはふだん 2 日以内に返信
-
auth: `impersonated_credentials` loses `subject` on copy, so `with_scopes()` and `with_quota_project()` turn off domain wide delegation対応中かも @Om-singhaI が 57 日前に担当しました。 オープンauth priority: p2 type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
googleapis/google-cloud-python#18428 ·
メンテナーはふだん 2 日以内に返信
-
A client called `run_in_transaction` be stuck if Spanner is down対応中かも @founderinaction が 10 日前に担当しました。 オープンpriority: p2 type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
googleapis/google-cloud-python#18375 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
googleapis/google-cloud-python の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
btclib-org/btclib-wallet#1045 ·
メンテナーはふだん 1 日以内に返信
-
area-templates triage:bot-seen triage:needs-human
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
microsoft/aspire#22356 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
[Train] An elastic ScalingConfig(num_workers=(0, 0)) is accepted and the run waits forever対応中かも @wguo7 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
ray-project/ray#68217 ·
メンテナーはふだん 2 日以内に返信