UserItem.CSVImport.create_from_file: wrong file-extension check
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 70/100
Research direction
Start in users_endpoint.py at Users.create_from_file and review its deprecation behavior and current callers. Verify the listed lowercase, uppercase, substring, and non-CSV paths, then confirm the chosen approach—fixing validation during the deprecation window or leaving it until removal—matches the project decision.
Written by the indexing model from the issue text.
Description
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).
- Dominant language
- Python
- Stars
- 716
- Forks
- 446
- Avg merge
- 8d 8h
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from tableau/server-client-python
-
in-progress
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
tableau/server-client-python#1829 · 1 comment ·
-
enhancement gap needs investigation
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
tableau/server-client-python#1322 · 1 comment ·
-
[Type2] Allow Incremental Refresh type schedules to be added via `server.schedules.add_to_schedule` Openhelp wanted Server-Side Enhancement ui-exists
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
tableau/server-client-python#1101 · 3 comments ·
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
tableau/server-client-python#783 · 5 comments ·
-
enhancement needs investigation
Difficulty 4/5 3-5 days Newbie friendliness 45/100
tableau/server-client-python#1879 ·
All issues in tableau/server-client-python
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100