Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Extension should be able to accept PathLike sources objects #237

Merged
merged 8 commits into from
Jul 20, 2024

Conversation

jaraco
Copy link
Member

@jaraco jaraco commented Mar 3, 2024

  • ENH: Extension should be able to accept PathLike sources objects
  • Adjust expectation to match behavior.
  • For consistency, ensure Extension.sources is always a path.Path object.

This PR is a resubmit of #230.

@jaraco
Copy link
Member Author

jaraco commented Mar 3, 2024

I've managed to fix the Windows tests and I started looking into the setuptools integration test failures. As it turns out, those are going to be harder to solve. I did start this branch to track some of the changes needed, but unfortunately, there's some pretty nasty code affecting paths. I'm thinking we're at least going to have to get Setuptools to the level of requiring str (and not bytes) for all paths before attempting to support pathlib.Path objects. Trying to support bytes and str and pathlib.Path is just going to be too complicated.

All of this makes me think we may want to defer this work until we can get distutils properly embedded within setuptools, so we don't have to deal with these concerns across two repositories.

@lazka
Copy link
Contributor

lazka commented Mar 4, 2024

A more compatible and more limited approach would be to just call os.fspath on all inputs, and keep the validation, the internal and exposed paths type as is.

@jaraco
Copy link
Member Author

jaraco commented Apr 14, 2024

A more compatible and more limited approach would be to just call os.fspath on all inputs, and keep the validation, the internal and exposed paths type as is.

That's a good suggestion. It would be incrementally better and would give users a better experience.

@jaraco jaraco merged commit e1e9f61 into main Jul 20, 2024
40 checks passed
@jaraco jaraco deleted the pathlike_ext branch July 20, 2024 23:44
jaraco added a commit that referenced this pull request Aug 2, 2024
ENH: Extension should be able to accept PathLike sources objects
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants