Skip to content

CI/DOC/DEPS: Unpin aiobotocore in environment.yml for failing doc build #44311

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

Closed
jreback opened this issue Nov 4, 2021 · 9 comments · Fixed by #50158
Closed

CI/DOC/DEPS: Unpin aiobotocore in environment.yml for failing doc build #44311

jreback opened this issue Nov 4, 2021 · 9 comments · Fixed by #50158
Labels
CI Continuous Integration Dependencies Required and optional dependencies

Comments

@jreback
Copy link
Contributor

jreback commented Nov 4, 2021

https://github.com/pandas-dev/pandas/runs/4101565310?check_suite_focus=true

>>>-------------------------------------------------------------------------
Exception in /home/runner/work/pandas/pandas/doc/source/user_guide/io.rst at block ending on line 3032
Specify :okexcept: as an option in the ipython:: block to suppress this message
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-331-4c4d77530df1> in <module>
----> 1 df = pd.read_xml(
      2     "s3://irs-form-990/201923199349319487_public.xml",
      3     xpath=".//irs:Form990PartVIISectionAGrp",
      4     namespaces={"irs": "http://www.irs.gov/efile"}
      5 )

~/work/pandas/pandas/pandas/io/xml.py in read_xml(path_or_buffer, xpath, namespaces, elems_only, attrs_only, names, encoding, parser, stylesheet, compression, storage_options)
    921     """
    922 
--> 923     return _parse(
    924         path_or_buffer=path_or_buffer,
    925         xpath=xpath,

~/work/pandas/pandas/pandas/io/xml.py in _parse(path_or_buffer, xpath, namespaces, elems_only, attrs_only, names, encoding, parser, stylesheet, compression, storage_options, **kwargs)
    722         raise ValueError("Values for parser can only be lxml or etree.")
    723 
--> 724     data_dicts = p.parse_data()
    725 
    726     return _data_to_frame(data=data_dicts, **kwargs)

~/work/pandas/pandas/pandas/io/xml.py in parse_data(self)
    387         from lxml.etree import XML
    388 
--> 389         self.xml_doc = XML(self._parse_doc(self.path_or_buffer))
    390 
    391         if self.stylesheet is not None:

~/work/pandas/pandas/pandas/io/xml.py in _parse_doc(self, raw_doc)
    536         )
    537 
--> 538         handle_data = get_data_from_filepath(
    539             filepath_or_buffer=raw_doc,
    540             encoding=self.encoding,

~/work/pandas/pandas/pandas/io/xml.py in get_data_from_filepath(filepath_or_buffer, encoding, compression, storage_options)
    599         or file_exists(filepath_or_buffer)
    600     ):
--> 601         with get_handle(
    602             filepath_or_buffer,
    603             "r",

~/work/pandas/pandas/pandas/io/common.py in get_handle(path_or_buf, mode, encoding, compression, memory_map, is_text, errors, storage_options)
    606 
    607     # open URLs
--> 608     ioargs = _get_filepath_or_buffer(
    609         path_or_buf,
    610         encoding=encoding,

~/work/pandas/pandas/pandas/io/common.py in _get_filepath_or_buffer(filepath_or_buffer, encoding, compression, mode, storage_options)
    354 
    355         try:
--> 356             file_obj = fsspec.open(
    357                 filepath_or_buffer, mode=fsspec_mode, **(storage_options or {})
    358             ).open()

~/miniconda3/envs/pandas-dev/lib/python3.8/site-packages/fsspec/core.py in open(self)
    133         been deleted; but a with-context is better style.
    134         """
--> 135         out = self.__enter__()
    136         closer = out.close
    137         fobjects = self.fobjects.copy()[:-1]

~/miniconda3/envs/pandas-dev/lib/python3.8/site-packages/fsspec/core.py in __enter__(self)
    100         mode = self.mode.replace("t", "").replace("b", "") + "b"
    101 
--> 102         f = self.fs.open(self.path, mode=mode)
    103 
    104         self.fobjects = [f]

~/miniconda3/envs/pandas-dev/lib/python3.8/site-packages/fsspec/spec.py in open(self, path, mode, block_size, cache_options, **kwargs)
    974         else:
    975             ac = kwargs.pop("autocommit", not self._intrans)
--> 976             f = self._open(
    977                 path,
    978                 mode=mode,

~/miniconda3/envs/pandas-dev/lib/python3.8/site-packages/s3fs/core.py in _open(self, path, mode, block_size, acl, version_id, fill_cache, cache_type, autocommit, requester_pays, **kwargs)
    532             cache_type = self.default_cache_type
    533 
--> 534         return S3File(
    535             self,
    536             path,

~/miniconda3/envs/pandas-dev/lib/python3.8/site-packages/s3fs/core.py in __init__(self, s3, path, mode, block_size, acl, version_id, fill_cache, s3_additional_kwargs, autocommit, cache_type, requester_pays)
   1821                 self.details = s3.info(path)
   1822                 self.version_id = self.details.get("VersionId")
-> 1823         super().__init__(
   1824             s3, path, mode, block_size, autocommit=autocommit, cache_type=cache_type
   1825         )

~/miniconda3/envs/pandas-dev/lib/python3.8/site-packages/fsspec/spec.py in __init__(self, fs, path, mode, block_size, autocommit, cache_type, cache_options, **kwargs)
   1302         if mode == "rb":
   1303             if not hasattr(self, "details"):
-> 1304                 self.details = fs.info(path)
   1305             self.size = self.details["size"]
   1306             self.cache = caches[cache_type](

~/miniconda3/envs/pandas-dev/lib/python3.8/site-packages/fsspec/asyn.py in wrapper(*args, **kwargs)
     86     def wrapper(*args, **kwargs):
     87         self = obj or args[0]
---> 88         return sync(self.loop, func, *args, **kwargs)
     89 
     90     return wrapper

~/miniconda3/envs/pandas-dev/lib/python3.8/site-packages/fsspec/asyn.py in sync(loop, func, timeout, *args, **kwargs)
     67         raise FSTimeoutError
     68     if isinstance(result[0], BaseException):
---> 69         raise result[0]
     70     return result[0]
     71 

~/miniconda3/envs/pandas-dev/lib/python3.8/site-packages/fsspec/asyn.py in _runner(event, coro, result, timeout)
     23         coro = asyncio.wait_for(coro, timeout=timeout)
     24     try:
---> 25         result[0] = await coro
     26     except Exception as ex:
     27         result[0] = ex

~/miniconda3/envs/pandas-dev/lib/python3.8/site-packages/s3fs/core.py in _info(self, path, bucket, key, refresh, version_id)
   1062                 else:
   1063                     try:
-> 1064                         out = await self._simple_info(path)
   1065                     except PermissionError:
   1066                         # If the permissions aren't enough for scanning a prefix

~/miniconda3/envs/pandas-dev/lib/python3.8/site-packages/s3fs/core.py in _simple_info(self, path)
    975         prefix = key.strip("/")
    976 
--> 977         out = await self._call_s3(
    978             "list_objects_v2",
    979             self.kwargs,

~/miniconda3/envs/pandas-dev/lib/python3.8/site-packages/s3fs/core.py in _call_s3(self, method, *akwarglist, **kwargs)
    235 
    236     async def _call_s3(self, method, *akwarglist, **kwargs):
--> 237         await self.set_session()
    238         s3 = await self.get_s3(kwargs.get("Bucket"))
    239         method = getattr(s3, method)

~/miniconda3/envs/pandas-dev/lib/python3.8/site-packages/s3fs/core.py in set_session(self, refresh, kwargs)
    376 
    377         conf = AioConfig(**config_kwargs)
--> 378         self.session = aiobotocore.AioSession(**self.kwargs)
    379 
    380         for parameters in (config_kwargs, self.kwargs, init_kwargs, client_kwargs):

AttributeError: module 'aiobotocore' has no attribute 'AioSession'

cc @pandas-dev/pandas-core

@jreback jreback added CI Continuous Integration Dependencies Required and optional dependencies labels Nov 4, 2021
@jreback jreback added this to the 1.3.5 milestone Nov 4, 2021
@jreback
Copy link
Contributor Author

jreback commented Nov 4, 2021

I guess s3fs changed or incompatible with new aiobotocore.

cc @martindurant if any ideas.

@phofl
Copy link
Member

phofl commented Nov 4, 2021

Probably incompatible. aiobotocore deprecated the AioSession object a few weeks ago, probably removed now.

Release Note of 2.0:

turn off default AIOBOTOCORE_DEPRECATED_1_4_0_APIS env var to match botocore module. See notes in 1.4.0.

Pinning to < 2.0 in s3fs should help

@jorisvandenbossche
Copy link
Member

It seems a fix for this was already released a while ago: fsspec/s3fs#514 (so the question might then be why those builds don't get the latest s3fs version)

@phofl
Copy link
Member

phofl commented Nov 6, 2021

Looks like s3fs requires aiobotocore~=1.4.1, which references 1.4.2 in this case and not 2.0. Looks like aiobotocore 2.0 is installed first and searches for the latest s3fs release without this clause, which seems to be 2021.07

@rhshadrach
Copy link
Member

Looks like docs build is now green, okay to close?

@phofl
Copy link
Member

phofl commented Nov 7, 2021

No aiobotocore is pinned to lower than 2.0

@simonjayhawkins
Copy link
Member

Removing milestone here as not critical to fix for 1.3.x (or backport unpin).

@simonjayhawkins simonjayhawkins removed this from the 1.3.5 milestone Nov 10, 2021
@ParfaitG
Copy link
Contributor

I see this issue involves a read_xml run in IO tools docs to demonstrate an S3 bucket call. An :okwarning: was added to its ipython block. If resolved, should we close this issue? If needed, I can convert ipython block to code-block.

@phofl
Copy link
Member

phofl commented Jan 31, 2022

We can close when we can unpin aiobotocore

@mroeschke mroeschke changed the title CI: web / docs builds failing CI/DOC/DEPS: Unpin aiobotocore in environment.yml for failing doc build Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration Dependencies Required and optional dependencies
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants