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

Returning b'' instead of None when reaching EOF #14

Open
Bubu opened this issue Mar 20, 2021 · 0 comments
Open

Returning b'' instead of None when reaching EOF #14

Bubu opened this issue Mar 20, 2021 · 0 comments

Comments

@Bubu
Copy link

Bubu commented Mar 20, 2021

As discussed with the maintainer of ijson over here it seems that the archive stream reader should be returning b'' instead of None when finished reading.

your file-object from libarchive is "weird" in the sense that when it gets to the endof the file it implicitly returns None instead of an empty string (here and here). File-like objects are expected to return an empty string ('' or b'', depending on the mode with which it operates) when the end of the file is reached. This is the behavior that ijson expects as well

Would that be something that can be fixed for future versions?

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

No branches or pull requests

1 participant