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

Drop support for Path as argument of iter_compatible_reader (/writer?) #103

Open
Carreau opened this issue Feb 15, 2022 · 1 comment
Open

Comments

@Carreau
Copy link
Collaborator

Carreau commented Feb 15, 2022

Following the current flow in napari/npe2 it looks to me like iter_compat_reader (at least, maybe write as well) will never get a Path, it will only get strings.

It's not like the hook spec themselves, and though I would be in favor of also making them stricter, this is more of an internal api.

Another reason is that napari uses:

for url in event.mimeData().urls():
            if url.isLocalFile():
                filenames.append(url.toLocalFile())
            else:
                filenames.append(url.toString())

Which in then ends ends up in iter_compat_reader so my guess is that some of the things are not representable by path anyway.

@Carreau Carreau changed the title Drop support for Path for iter_compatible_reader (/writer?) Drop support for Path as argument of iter_compatible_reader (/writer?) Feb 15, 2022
@Carreau
Copy link
Collaborator Author

Carreau commented Feb 15, 2022

(note I'm also slightly confused as to why the logic differ that much between drop files on the viewer, and using one of File->open)

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

No branches or pull requests

1 participant