Skip to content

Replace deprecated Config.getvalue() with Config.getoption() #345

Description

@icemac

pytest documents Config.getvalue() as deprecated in favor of Config.getoption() (soft deprecation, no warning is emitted — see https://github.com/pytest-dev/pytest/blob/68308aa288e00ff84880572ed9b3590f6cd7d470/src/_pytest/config/__init__.py#L2096).

The plugin currently calls getvalue in several places in src/pytest_rerunfailures.py (e.g. for reruns, force_reruns, reruns_mode, reruns_delay, reruns_delay_backoff_factor, collectonly). They should all be switched to getoption in one consistent cleanup.

Note: getoption's default parameter only applies when the option does not exist at all, not when its value is None, so this is a cosmetic change with no behavior difference for our registered options.

Follow-up to the review discussion in #343.

Comment created by Claude

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions