Repository navigation
Conversation
Contributor
|
Thanks for the pull request, @Xander-AJ! It's linked to #71769, which is currently assigned to @thergupta2001, who's already working on it. We keep one contributor per issue to avoid duplicated effort. If @thergupta2001 has had no activity for 7 days, the issue is released automatically and you'll then be able to claim it with I've closed this pull request for now — none of your work is lost. Once #71769 is assigned to you, ask a maintainer to reopen it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
doc/source/whatsnew/vX.X.X.rstfile if fixing a bug or adding a new feature.#64986 dropped the
__iter__requirement fromis_file_like, sostringify_pathnow treats any os.PathLike withread/writeas an open buffer.py.path.local(pytest'stmpdir) hasread()/write()helpers but isn't iterable, so it goes through as a buffer instead of through__fspath__.read_csvraises a TypeError (the C parser callsLocalPath.read(262144), whose first argument ismode), andto_csvsilently keeps only the last chunk becauseLocalPath.write()rewrites the file each call.I changed
stringify_pathso the GH 38125 shortcut doesn't apply to an os.PathLike that isn't iterable. Non-path-like objects without__iter__are still accepted as buffers, which is what #64986 was for. The fsspec case from GH 38125 is unaffected;test_stringify_file_and_path_likestill passes. Same condition @hamarshehmhmd suggested in the issue.Added a
stringify_pathtest and ato_csv/read_csvround trip with a small path-like class that hasread/writeand no__iter__. Both fail on main and pass with the fix. Also checked the original repro with_pytest._py.path.LocalPath.I used Claude Code with Claude Opus 5.5 () to write the fix, tests and whatsnew entry and to run the tests and pre-commit. I reviewed every change myself.
AGENTS.md, I have reviewed and understood every change, and I have described above how I used it and exactly which tool, model version, and effort setting.