catch_warnings(record=True)

record is keyword only on Python 3