Skip to content

v1.0.1

Latest

Choose a tag to compare

@chad-earthscope chad-earthscope released this 29 Sep 18:20
· 1 commit to main since this release

Added

  • get_prealloc_block_size() and set_prealloc_block_size() to read or disable
    the block preallocation of sample buffers. Use default of 1 MiB.
  • MS3TraceList.trim_buffers() to trim sample buffers after adding data in small pieces.

Fixed

  • Release cffi buffer exports explicitly to avoid a GC segfault with memoryview
    on CPython before 3.12.7 (see python/cpython#77894).
  • Release the remaining cffi buffer exports explicitly: in MS3TraceList.add_buffer()
    on an invalid selection, and in MS3Record.from_filelike() and the file-like
    validator source.
  • MS3Record.unpack_data() and parse_into() within with_datasamples() raise
    ValueError instead of aborting the process, and a view taken within it stays
    valid after the context exits.
  • Advancing or closing the reader, iterator or trace list that a record came from,
    within its with_datasamples(), raises ValueError instead of aborting the process.
  • A record from MS3Record.from_filelike() no longer exposes its raw record once
    the buffer it pointed into is gone; record raises ValueError.
  • configure_logging() raises ValueError for a prefix of 200 bytes or more,
    which libmseed refuses, instead of releasing the prefix it keeps using.
  • MS3TraceSeg, MS3RecordList and MS3RecordPtr raise ValueError once data is
    added to their MS3TraceList, and MS3TraceID once generate(remove_packed=True)
    removes data, instead of reading segments and trace IDs libmseed has freed.
    Iterating over them is checked at each step, and generate() raises ValueError
    if the trace list is closed or has data removed while it is suspended.

Changed

  • Grow sample buffers in 1 MiB blocks on all platforms, avoiding quadratic read time
    on some, and trim them to size after add_file(), add_buffer() and add_filelike()
    of at least one block, and MS3Record.parse(), parse_into() and unpack_data().
  • Document when data sample and raw record views become invalid, for MS3Record,
    MS3RecordReader and MS3TraceSeg.