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

dependency on aiohttp should be in the requirements.txt #366

Closed
bmccandless opened this issue Aug 1, 2020 · 7 comments
Closed

dependency on aiohttp should be in the requirements.txt #366

bmccandless opened this issue Aug 1, 2020 · 7 comments

Comments

@bmccandless
Copy link

the update to 0.8.0 brings in a dependency to aiohttp, which is not listed in the requirements.
I therefore get an import error when using fsspec.

@juarezr
Copy link
Contributor

juarezr commented Aug 4, 2020

I have the same error while building for python3.6 and python3.7.

Any chance of including aiohttp as dependecy or maybe a import check as workaround?

Thanks

@martindurant
Copy link
Member

fsspec does not depend on aiohttp, only the HTTP backend does. Attempting to use the HTTP backend without it should display 'HTTPFileSystem requires "requests" and "aiohttp" to be installed' (on master).

@juarezr
Copy link
Contributor

juarezr commented Aug 5, 2020

Understood.

Although I fixed my build, other environments relying in fsspec + requests installed but without aiohttp could break.

This configures a serious issue that needs fixing here?

@mivade
Copy link
Contributor

mivade commented Aug 5, 2020

I actually get the following error when running tests of a project with 0.8.0:

ImportError: HTTPFileSystem requires "requests" to be installed

However looking at the full traceback what is actually happening is this:

ModuleNotFoundError: No module named 'aiohttp'

so something is clearly off and it looks like aiohttp is actually required for HTTP support but we get an error message that hides this fact.

@martindurant
Copy link
Member

The message is fixed on master https://github.com/intake/filesystem_spec/blob/master/fsspec/registry.py#L100

@mivade
Copy link
Contributor

mivade commented Aug 5, 2020

Glancing at setup.py, it wouldn't be a bad idea to use "extras" to make it easier to get these dependencies by doing something like pip install fsspec[http]. I can put together a PR for this shortly.

@martindurant
Copy link
Member

Good idea. Obviously there are quite a few... I wonder if it could be done in a way not to repeat the information in registry.py .
(Indeed, it would be good to implement #206 , which is tangentially related)

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

4 participants