Git Product home page Git Product logo

Comments (2)

rtobar avatar rtobar commented on July 21, 2024

@Bubu thanks again for getting in touch and the details in the report.

The problem is exactly one that you suspect: 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, although clearly different backends are more or less strict about this (some do something like if not buffer, in which case None just works, but others are not that lenient), which is why some fail and some others don't.

I'd say this is not a bug on our end, but something that will need to be corrected in python-libarchive. In the meanwhile you'll have to wrap their EntryReadStream class into your own and provide the None -> b'' conversion yourself if you want to continue down that route.

Based on this, I'll mark this issue as "invalid" and will close it, but I'm happy to continue the discussion if needed.

from ijson.

Bubu avatar Bubu commented on July 21, 2024

Thanks for the detailed explanation. I'll see about opening an issue with python-libarchive.

from ijson.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.