2.9.0 - Added tail, io_tail, and reverse_io functions. Fixed some unit tests
Added in main commit 48ce4b6
-
Added
common.reverse_io
function, allows reading blocks of bytes from files from the end of the file efficiently. -
Added
common.io_tail
function, a pure python generator function, which works similarly to UNIXtail
, and
efficiently reads the file from the end, instead of having to load the entire file to access the last lines. -
Added
common.tail
function, which is a simple wrapper aroundio_tail
- to simplify usage when tailing a relatively small ( < 10k lines? )
amount of lines. Iterates overio_tail
, loading each chunk into memory, and correctly orders the lines for immediate usage of the returned list. -
Added
io_tail
,reverse_io
andtail
to the docs. -
Added thorough unit tests for
io_tail
andtail
-
Minor cleanup of whitespace in
common.py
Additional commit to fix unit tests 47345a2
-
tests.test_net.TestNet._check_asn
now allows comparing against multiple AS names,
reducing risk of ASN test breakage due to AS names changing. -
Added additional AS names to
test_asn_to_name_int
andtest_asn_to_name_str
to repair
test breakage caused by Cloudflare's AS name changing, and preventing breakage caused by
AS name changes in future.