UserItem.CSVImport.create_from_file: wrong file-extension check
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 70/100
Hướng nghiên cứu
Bắt đầu trong users_endpoint.py tại Users.create_from_file và xem xét hành vi deprecation của nó cùng các caller hiện tại. Xác minh các path lowercase, uppercase, substring và non-CSV được liệt kê, sau đó xác nhận rằng cách tiếp cận đã chọn — sửa validation trong thời gian deprecation hay để đến khi removal — phù hợp với quyết định của dự án.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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).
- Ngôn ngữ chính
- Python
- Star
- 716
- Fork
- 446
- Merge trung bình
- 8 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 2
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của tableau/server-client-python
-
in-progress
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
tableau/server-client-python#1829 · 1 bình luận ·
-
enhancement gap needs investigation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
tableau/server-client-python#1322 · 1 bình luận ·
-
[Type2] Allow Incremental Refresh type schedules to be added via `server.schedules.add_to_schedule` Đang mởhelp wanted Server-Side Enhancement ui-exists
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
tableau/server-client-python#1101 · 3 bình luận ·
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
tableau/server-client-python#783 · 5 bình luận ·
-
enhancement needs investigation
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
tableau/server-client-python#1879 ·
Tất cả issue của tableau/server-client-python
Issue tương tự
-
link-check link-check:sphinx-theme
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
OpenHands/extensions#626 · 1 bình luận ·
-
Change observation tooltip text Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
CSCfi/sd-search-api#39 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100