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

bump aiobotocore to 2.1.0 #564

Merged
merged 1 commit into from
Jan 11, 2022
Merged

Conversation

hayashier
Copy link
Contributor

@hayashier hayashier commented Dec 15, 2021

aiobotocore is one of the dependencies of s3fs.

I have updated aiobotocore from 2.0.1 to the latest 2.1.0.

[Background]
boto is used by many different libraries, so it is difficult to lock the boto version.
When I use botocore 1.23.0 or later, I face and opened this issue aio-libs/aiobotocore#905

And this issue has been resolved by this PR aio-libs/aiobotocore#909
Updated version was released with aiobotocore 2.1.0 So I want to use this version from s3fs.

I'll show the log after applying my PR.

Before

>>> import s3fs
>>> fs = s3fs.S3FileSystem()
>>> fs.ls('hayshogo-s3')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/hayshogo/.local/lib/python3.9/site-packages/fsspec/asyn.py", line 91, in wrapper
    return sync(self.loop, func, *args, **kwargs)
  File "/Users/hayshogo/.local/lib/python3.9/site-packages/fsspec/asyn.py", line 71, in sync
    raise return_result
  File "/Users/hayshogo/.local/lib/python3.9/site-packages/fsspec/asyn.py", line 25, in _runner
    result[0] = await coro
  File "/Users/hayshogo/repositories/thirdparty/s3fs/s3fs/core.py", line 810, in _ls
    files = await self._lsdir(path, refresh)
  File "/Users/hayshogo/repositories/thirdparty/s3fs/s3fs/core.py", line 578, in _lsdir
    await self.set_session()
  File "/Users/hayshogo/repositories/thirdparty/s3fs/s3fs/core.py", line 420, in set_session
    self._s3 = await s3creator.__aenter__()
  File "/Users/hayshogo/.local/lib/python3.9/site-packages/aiobotocore/session.py", line 37, in __aenter__
    self._client = await self._coro
  File "/Users/hayshogo/.local/lib/python3.9/site-packages/aiobotocore/session.py", line 121, in _create_client
    client = await client_creator.create_client(
  File "/Users/hayshogo/.local/lib/python3.9/site-packages/aiobotocore/client.py", line 45, in create_client
    self._register_lazy_block_unknown_fips_pseudo_regions(service_client)
AttributeError: 'AioClientCreator' object has no attribute '_register_lazy_block_unknown_fips_pseudo_regions'

After

>>> import s3fs
>>> fs = s3fs.S3FileSystem()
>>> fs.ls('hayshogo-s3')
['hayshogo-s3/dist', 'hayshogo-s3/sample.txt', 'hayshogo-s3/src']

Thank you,

@martindurant
Copy link
Member

In general, we are happy to keep up with the latest aiobotocore , unless of course it needs us to fix something.

@martindurant
Copy link
Member

Also, feel free to relax the aiohttp<=4

@hayashier
Copy link
Contributor Author

hayashier commented Dec 15, 2021

Thank you for your comment!
OK. I'll keep that in mind for future reference.


s3fs depends on aiobotocore~=2.0.1, fsspec==2021.11.1, aiohttp<=4
https://github.com/fsspec/s3fs/blob/main/requirements.txt

aiobotocore~=2.0.1
fsspec==2021.11.1
aiohttp<=4

The latest versions of aiohttp and fsspec are 3.8.1 and 2021.11.1 respectively. So for now, I won't ask for updating other packages(Including aiohttp). Please let me request to update them in the future if necessary.

https://github.com/aio-libs/aiohttp/tags
https://github.com/fsspec/filesystem_spec/tags

@hayashier hayashier changed the title update aiobotocore, one of the depencensies bump aiobotocore to 2.1.0 Dec 16, 2021
@raybellwaves
Copy link
Contributor

raybellwaves commented Dec 16, 2021

You will also want to change the version in the CI as well

conda install -c conda-forge pip botocore aiobotocore==2.0.1 "aiohttp<=4" "moto>=2.0" pytest flake8 black -y

@hayashier
Copy link
Contributor Author

hayashier commented Dec 16, 2021

OK. I also updated the version in the CI.
Thanks,

@martindurant
Copy link
Member

It seems like aiobotocore 2.1.0 has not yet made it to conda-forge. Let's wait until it does!

@hayashier
Copy link
Contributor Author

hayashier commented Dec 18, 2021

It looks like it. OK. I see!
I'll track conda-forge for supporting aiobotocore 2.1.0 https://conda.anaconda.org/conda-forge/noarch/

@guenhter
Copy link

Waiting for conda-forge/aiobotocore-feedstock#46 to be solved.

@hayashier
Copy link
Contributor Author

hayashier commented Jan 11, 2022

Thank you, guenhter!

Now it seems like aiobotocore 2.1.0 has made it to conda-forge.

@martindurant Could you please retrigger CI and check this PR again?

@martindurant martindurant merged commit 7558e34 into fsspec:main Jan 11, 2022
@guenhter
Copy link

@martindurant Great that this has been merged. When do you think a new version will be available on pip containing this change?

@martindurant
Copy link
Member

I have been meaning to do it last week, but got busy. So, soon?

@guenhter
Copy link

I don't want to put any pressure on you :)
Great to hear.

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.

None yet

4 participants