The bug was due to the sys.stdout not being properly reset after muting, in one of two instances where this was done.
This PR also replaces both instances with a muter context manager - the implementation of the muting was a bit brittle, relying on manual try/except and temp stdout handling which is risky.
Includes a test that the sys.stdout is indeed unchanged.
This fixes https://github.com/sktime/skbase/issues/327, which caused a permanently muted
stdout
afterall_objects
call.The bug was due to the
sys.stdout
not being properly reset after muting, in one of two instances where this was done.This PR also replaces both instances with a muter context manager - the implementation of the muting was a bit brittle, relying on manual try/except and temp stdout handling which is risky.
Includes a test that the
sys.stdout
is indeed unchanged.