You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
api: deprecate UserItem.CSVImport.validate_file_for_import in favor of a safer replacement #1847
validate_file_for_import is public API and its current shape invited the class of bug that #1829 patched. Proposing an additive replacement plus a deprecation on the existing method - no breaking change now, removal on the next major version.
Returning raw invalid lines forces callers to re-parse to give a useful error, and hands credential-bearing rows back to the caller (mitigated by _redact_password_column but the shape invites the bug).
Proposed replacement:
@dataclass(frozen=True)classCsvImportError:
row: intcolumn: ColumnType|Nonereason: str# never the raw field value@dataclassclassCsvImportResult:
valid_count: interrors: list[CsvImportError]
@staticmethoddefvalidate_import_file(csv_file) ->CsvImportResult: ...
Migration:
Add validate_import_file returning the structured result.
Reimplement validate_file_for_import as a thin wrapper that emits DeprecationWarning and adapts back to the old return shape.
Update samples/ to use the new method.
Remove the deprecated method on the next major version bump.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. If this is still relevant, please comment to keep it open.
Activity
github-actions commentedon Oct 1, 2026
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. If this is still relevant, please comment to keep it open.
github-actions commentedon Oct 16, 2026
Closing due to inactivity. If this is still relevant, please reopen or file a new issue.