Skip to content

[prerelease] Attributes from legacypath plugin added too late? #9396

Closed
@The-Compiler

Description

@The-Compiler

Based on joeyespo/pytest-watch#122 it seems impossible to access config.inifile from pytest_cmdline_main now.

Minimal reproducer conftest.py:

def pytest_cmdline_main(config):
    print(config.inifile)

fails after 84722a7 with:

[...]
  File ".../conftest.py", line 2, in pytest_cmdline_main
    print(config.inifile)
AttributeError: 'Config' object has no attribute 'inifile'

but works fine before.

This is part of Add legacypath plugin, move py.path stuff there by bluetech · Pull Request #9208 · pytest-dev/pytest, cc @bluetech.

Makes me wonder whether this plugin is really a good idea in practice, also seeing things like 663be09. Maybe those should be kept in core after all until we can deprecate and remove them, and only then be moved to a (rather hackish) plugin?

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: deprecationfeature that will be removed in the futuretype: regressionindicates a problem that was introduced in a release which was working previously

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions