Skip to content

Use of rmtree causes DeprecationWarning on Python 3.12 alpha #10890

@davidism

Description

@davidism

The current Python 3.12 alpha has made a change to rmtree python/cpython#102828, deprecating the onerror parameter and replacing it with an onexc parameter. Something in Pytest's temp path fixtures calls an rm_rf function which calls rmtree with the onerror parameter.

def rm_rf(path: Path) -> None:
When warnings are treated as errors, this makes pytest fail any test using temp paths.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: enhancementnew feature or API change, should be merged into features branch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions