Skip to content

[FR] distutils: support os.PathLike #3315

@taralx

Description

@taralx

What's the problem this feature will solve?

I prefer to use pathlib.Path objects, but helpers like distutils.Command.make_file only accept strings:

if isinstance(infiles, str):
infiles = (infiles,)
elif not isinstance(infiles, (list, tuple)):
raise TypeError(
"'infiles' must be a string, or a list or tuple of strings")

Describe the solution you'd like

Filing this issue before I go in and make a PR to change these to os.PathLike checks. Any issues with that approach?

Alternative Solutions

No response

Additional context

Directed here from CPython: python/cpython#92687

Code of Conduct

  • I agree to follow the PSF Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs TriageIssues that need to be evaluated for severity and status.enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions