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

Support Path objects for import / export functions #774

Closed
njourdane opened this issue Nov 11, 2024 · 3 comments · Fixed by #787
Closed

Support Path objects for import / export functions #774

njourdane opened this issue Nov 11, 2024 · 3 comments · Fixed by #787
Labels
duplicate This issue or pull request already exists

Comments

@njourdane
Copy link
Contributor

Python's builtin pathlib normalizes path functions with an object-oriented Path object.

I could be very practical if all import and export functions could support Path objects for each argument involving a path.

I can make a PR for this if you agree.

@KilowattSynthesis
Copy link

KilowattSynthesis commented Nov 11, 2024

Duplicate of #685. Seems that there was no objection when it was brought up earlier; a PR would be fantastic, I'm sure :)

@jdegenstein
Copy link
Collaborator

@roipoussiere I support this idea, PR would be very welcome

@gumyr gumyr added the duplicate This issue or pull request already exists label Nov 11, 2024
@gumyr gumyr added this to the Not Gating Release 1.0.0 milestone Nov 11, 2024
@gumyr
Copy link
Owner

gumyr commented Nov 11, 2024

+1

erooke added a commit to erooke/build123d that referenced this issue Nov 13, 2024
For all import / export methods add `pathlib.Path` as an acceptable
argument. Convert the `Path` to a string.

closes: gumyr#685
closes: gumyr#774
erooke added a commit to erooke/build123d that referenced this issue Nov 14, 2024
For all import / export methods add `pathlib.Path` as an acceptable
argument. Convert the `Path` to a string.

closes: gumyr#685
closes: gumyr#774
erooke added a commit to erooke/build123d that referenced this issue Nov 14, 2024
For all import / export methods make the path a `Union[Pathlike, str, bytes]`
argument to follow python conventions as outlined in pep 519

closes: gumyr#685
closes: gumyr#774
@erooke erooke mentioned this issue Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants