def get_parser(step_name):
    if isinstance(step_name, RE_TYPE):
        # backwards compartibility
        warn = (
            'pytest-bdd [{0}]: Direct usage of regex is deprecated. Please use pytest_bdd.parsers.re instead.'.format(
                step_name.pattern)
        )
        warnings.warn(warn)
        print(warn)
        return re(step_name.pattern, flags=step_name.flags)
    elif isinstance(step_name, six.string_types):
        return string(step_name)
    elif not hasattr(step_name, 'is_matching') or not hasattr(step_name, 'parse_arguments'):
        raise InvalidStepParserError(step_name)
    else:
        return step_name
Close the handler.
dataset/ETHPy150Open pytest-dev/pytest-bdd/pytest_bdd/parsers.py/get_parser--crossover with--dataset/ETHPy150Open babble/babble/include/jython/Lib/logging/handlers.py/BufferingHandler.close