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

Compatibility with pathlib #49

Closed
celynw opened this issue Oct 5, 2020 · 2 comments
Closed

Compatibility with pathlib #49

celynw opened this issue Oct 5, 2020 · 2 comments

Comments

@celynw
Copy link

celynw commented Oct 5, 2020

First of all, thank you for this.
As an advocate of pathlib, I'd like to be able to run

send2trash(path)

where path is a pathlib.Path object.
From what I gather this isn't implemented, because I get:

TypeError: Must be bytes, not PosixPath

but it works fine if I do:

send2trash(str(path))

It might be as simple as wrapping the input in str(), I haven't checked how other libraries are handling it.

bertrandlo added a commit to bertrandlo/mediaman that referenced this issue Feb 10, 2021
Compatibility with pathlib -
arsenetar/send2trash#49
@arsenetar
Copy link
Owner

Should be fixed with changes from 94e1ec0

@arsenetar
Copy link
Owner

1.8.0 is now available, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants