UserItem.CSVImport.create_from_file: wrong file-extension check
まだ誰も着手していません。
評価
調査の方向性
users_endpoint.py の Users.create_from_file から始め、非推奨化の動作と現在の呼び出し元を確認してください。リストされている小文字、大文字、部分文字列、non-CSV のパスを検証し、そのうえで、非推奨化期間中にバリデーションを修正するのか、削除までそのままにするのかという選択した方針が、プロジェクトの決定と一致していることを確認してください。
索引モデルが issue の本文から書いたものです。
説明
Users.create_from_file (in users_endpoint.py) validates the file with "csv" not in filepath before parsing. That test:
- accepts non-CSV files whose path merely contains the substring
csv(e.g.report.csv.bak,mycsv.txt,/home/csvuser/data.json) - rejects valid files whose extension is uppercase (e.g.
USERS.CSV)
Neither matches the error message ("Only csv files are accepted").
Fix would be Path(filepath).suffix.lower() == ".csv".
Note: create_from_file is already deprecated (emits DeprecationWarning and is being replaced by bulk_add). Two paths:
- Patch under the deprecation window so the last few callers get correct behavior until removal.
- Just delete the method when the deprecation window closes and don't touch it in the meantime.
Filed as follow-up to a review comment on PR #1812 (out of scope for that PR's refactor).
- 主要言語
- Python
- スター
- 716
- フォーク
- 446
- 平均マージ
- 8日 8時間
- マージ済み PR(30日)
- 2
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
tableau/server-client-python のほかの issue
-
in-progress
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
tableau/server-client-python#1829 · コメント 1 件 ·
-
enhancement gap needs investigation
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
tableau/server-client-python#1322 · コメント 1 件 ·
-
[Type2] Allow Incremental Refresh type schedules to be added via `server.schedules.add_to_schedule` オープンhelp wanted Server-Side Enhancement ui-exists
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
tableau/server-client-python#1101 · コメント 3 件 ·
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
tableau/server-client-python#783 · コメント 5 件 ·
-
enhancement needs investigation
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
tableau/server-client-python#1879 ·
tableau/server-client-python の issue をすべて見る
似ている issue
-
documentation help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
simonw/sqlite-utils#872 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100