Bug#642020: python-debian: ArFile (via DebFile) errors when given only a fileobj

John Wright jsw at debian.org
Tue Aug 26 23:43:43 UTC 2014


Sorry for the very delayed response.  I'm trying to clean up our
outstanding bug list...

I'm not convinced that sharing the file is the correct thing to do - it
introduces thread-unsafe-ness between DebFile/ArFile and its dependent
objects that isn't obvious up front.

In addition, the existing behavior or re-opening the file by name is bad
for another reason: it leaks open files.

I think a better solution is probably something like:
  - If the input file is a "real" file, use mmap to get a view of the
    object for members.
  - Otherwise, we should probably iterate over the entire input object
    to generate our own file-like view of it, which itself supports an
    interface similar to mmap, and use that for member objects.

-- 
John Wright <jsw at debian.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-python-debian-maint/attachments/20140826/f1f84c91/attachment.sig>


More information about the pkg-python-debian-maint mailing list