Hi Jonathan / @jgubmll / @jonathanunderwood, congratulations on frame support & reaching production status!
We provide context manager classes LZ$FrameCompressor and LZ4FrameDecompressor,
Judging by what's on top of master I think you might be missing something there since both __enter__ and __exit__ methods are empty which is a No-Op and basically means the following two do exactly the same thing:
with lz4.frame.LZ4FrameCompressor() as compressor:
# do stuff with compressor
pass
# At this point compressor is still in scope so it's no like
# the context has caused it to be GC'ed.
and
compressor = lz4.frame.LZ4FrameCompressor()
# do stuff with compressor
You also mention:
The compression context is created with an appropriate destructor, so no need to del it here
Maybe I'm missing something - where is the appropriate destructor? (I see e.g. no __del__ method.)
Hi Jonathan / @jgubmll / @jonathanunderwood, congratulations on frame support & reaching production status!
Judging by what's on top of master I think you might be missing something there since both
__enter__and__exit__methods are empty which is a No-Op and basically means the following two do exactly the same thing:and
You also mention:
Maybe I'm missing something - where is the appropriate destructor? (I see e.g. no
__del__method.)