assert is only evaluated if __debug__ is True and should not be used to check for conditions. Will-fix: #15838