[FR] Support os.PathLike objects
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 59
- Forks
- 94
- PR merge metrics
- No merged PRs in 30d
Description
I prefer to use pathlib.Path objects, but helpers like distutils.Command.make_file only accept strings: https://github.com/pypa/distutils/blob/27638e388d8ae92368e5459254b59a026e73b1cd/distutils/cmd.py#L387-L391
Filing this issue before I go in and make a PR to change these to os.PathLike checks. Any issues with that approach?
Directed here from setuptools: https://github.com/pypa/setuptools/issues/3315
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in distutils/cmd.py at the make_file implementation linked in the issue, then inspect nearby helpers that perform similar string-only path checks. Confirm how pathlib.Path and other os.PathLike objects should be accepted, and update the relevant checks so those helpers handle them consistently. Done means the affected helpers accept os.PathLike inputs without breaking existing string behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100