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

map io::ErrorKind::IsADirectory/NotADirectory to Python on 1.83+ #4747

Merged
merged 1 commit into from
Nov 30, 2024

Conversation

Icxolu
Copy link
Contributor

@Icxolu Icxolu commented Nov 29, 2024

This maps io::ErrorKind::IsADirectory/NotADirectory to the corresponding Python exception when compiling on Rust 1.83+.

Closes #4740

Copy link
Contributor

@Tpt Tpt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for pushing this!

It would be great to add the conversion in the other direction in line 28 and a test in line 169 (both of src/err/impls.rs)

@Icxolu
Copy link
Contributor Author

Icxolu commented Nov 29, 2024

Thanks for pointing that out, not sure why I stopped with only half the work done 🙃

@Tpt
Copy link
Contributor

Tpt commented Nov 30, 2024

Thank you for this MR!

Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks both!

@davidhewitt davidhewitt added this pull request to the merge queue Nov 30, 2024
Merged via the queue into PyO3:main with commit 5df4706 Nov 30, 2024
46 checks passed
@Icxolu Icxolu deleted the fix/4740 branch November 30, 2024 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Map ErrorKind::IsADirectory and ErrorKind::NotADirectory when targetting Rust 1.83
3 participants