Skip to content

Allow users to find usages of py.local #10199

@kasium

Description

@kasium

What's the problem this feature will solve?

As far as I understand, py (especially py.local) and related fixtures like tempdir should be replace with pathlib and their corresponding fixtures like tmp_path. In large code bases switching is a longer task and requires multiple commits and work of multiple people

Describe the solution you'd like

It would be great if there would be an option to block the usage of these "old" fixtures, e.g. by a "future mode" or a warning which can be changed to an error with warning filters.

With this,

  1. it is easy to find, where a code change is needed
  2. after switching to pathlib only, future usage is blocked

Alternative Solutions

  • Using a linter, which is quite hard tue the dynamic calculation of fixtures

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: docsdocumentation improvement, missing or needing clarification

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions