Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(python,rust!): Fix scan_csv error type #12355

Merged
merged 13 commits into from
Nov 14, 2023
Merged

fix(python,rust!): Fix scan_csv error type #12355

merged 13 commits into from
Nov 14, 2023

Conversation

stinodego
Copy link
Member

@stinodego stinodego commented Nov 10, 2023

Closes #10640

Inspired by @romanovacca 's work in #11976

Changes

  • All IO functions now use the open_file util from polars-utils (there were 3 competing implementations)
  • Revisit the open_file util to raise a Polars IO error rather than a ComputeError.
  • Translate Polars IO errors to specific Python IO errors such as FileNotFoundError.
  • Remove truncation of the path to 88 characters. Paths may be long sometimes, but I am definitely interested in the full path if it turns out there is an error.

@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature python Related to Python Polars rust Related to Rust Polars labels Nov 10, 2023
@stinodego stinodego changed the title feat: Improve IO errors fix: Improve IO errors Nov 10, 2023
@stinodego stinodego removed the enhancement New feature or an improvement of an existing feature label Nov 10, 2023
@github-actions github-actions bot added the fix Bug fix label Nov 10, 2023
@stinodego stinodego changed the title fix: Improve IO errors fix: Fix scan_csv error type Nov 10, 2023
@stinodego stinodego changed the title fix: Fix scan_csv error type fix(python,rust!): Fix scan_csv error type Nov 10, 2023
@github-actions github-actions bot added the breaking rust Change that breaks backwards compatibility for the Rust crate label Nov 10, 2023
@stinodego stinodego marked this pull request as ready for review November 10, 2023 08:55
@stinodego stinodego marked this pull request as draft November 10, 2023 09:01
@stinodego stinodego marked this pull request as ready for review November 10, 2023 09:23
py-polars/src/file.rs Show resolved Hide resolved
crates/polars-utils/src/io.rs Show resolved Hide resolved
@stinodego stinodego merged commit 89fb070 into main Nov 14, 2023
23 checks passed
@stinodego stinodego deleted the io-error branch November 14, 2023 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking rust Change that breaks backwards compatibility for the Rust crate fix Bug fix python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Raise FileNotFoundError instead of ComputeError on missing csv file
2 participants