jcc2220 added the comment:
Here's an example of the inconsistency - if SpooledTemporaryFile is
instantiated with max_size set to 0, it will not rollover, EXCEPT when truncate
method is called. Both write and writelines (public methods) call _check,
which deals with rollover, but _
New submission from jcc2220 :
When _max_size is set to 0, the _check method will never call rollover, as the
conditional for a rollover is never satisfied. However, in the truncate
method, the _max_size is not checked against 0, and so a rollover could be
called when it is 0. This is more