html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/pull/7179#issuecomment-1317819272,https://api.github.com/repos/pydata/xarray/issues/7179,1317819272,IC_kwDOAMm_X85OjFOI,2448579,2022-11-16T23:32:21Z,2022-11-16T23:32:21Z,MEMBER,Turns out it is a pyodide bug with how they hook in to importlib,"{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1412019155 https://github.com/pydata/xarray/pull/7179#issuecomment-1317646082,https://api.github.com/repos/pydata/xarray/issues/7179,1317646082,IC_kwDOAMm_X85Oia8C,43316012,2022-11-16T20:44:36Z,2022-11-16T20:46:15Z,COLLABORATOR,"I don't think this is a bug in importlib but rather pyodide. They seem to add a hook to importlib (which is allowed, but probably causing this issue?) Edit: The error message from pyodide seems more like this is intentional? Is scipy really installed correctly?","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1412019155 https://github.com/pydata/xarray/pull/7179#issuecomment-1317583451,https://api.github.com/repos/pydata/xarray/issues/7179,1317583451,IC_kwDOAMm_X85OiLpb,2448579,2022-11-16T19:49:22Z,2022-11-16T19:50:02Z,MEMBER,"FYI I'm getting this error when trying to [update the version](https://github.com/pyodide/pyodide/pull/3262) in pyodide: https://app.circleci.com/pipelines/github/pyodide/pyodide/5016/workflows/e2cc0865-a91d-4cdb-8dbc-dfaeeb522c5f/jobs/60731 ```python JavascriptException message: Traceback (most recent call last): File ""/lib/python3.10/asyncio/futures.py"", line 201, in result raise self._exception File ""/lib/python3.10/asyncio/tasks.py"", line 232, in __step result = coro.send(None) File ""/lib/python3.10/_pyodide/_base.py"", line 531, in eval_code_async await CodeRunner( File ""/lib/python3.10/_pyodide/_base.py"", line 357, in run_async coroutine = eval(self.code, globals, locals) File """", line 1, in File ""/lib/python3.10/site-packages/xarray/__init__.py"", line 1, in from . import testing, tutorial File ""/lib/python3.10/site-packages/xarray/tutorial.py"", line 17, in from .backends.api import open_dataset as _open_dataset File ""/lib/python3.10/site-packages/xarray/backends/__init__.py"", line 16, in from .scipy_ import ScipyBackendEntrypoint, ScipyDataStore File ""/lib/python3.10/site-packages/xarray/backends/scipy_.py"", line 239, in class ScipyBackendEntrypoint(BackendEntrypoint): File ""/lib/python3.10/site-packages/xarray/backends/scipy_.py"", line 260, in ScipyBackendEntrypoint available = module_available(""scipy"") File ""/lib/python3.10/site-packages/xarray/core/utils.py"", line 1009, in module_available return importlib.util.find_spec(module) is not None File ""/lib/python3.10/importlib/util.py"", line 103, in find_spec return _find_spec(fullname, parent_path) File ""/lib/python3.10/_pyodide/_importhook.py"", line 226, in find_spec raise ModuleNotFoundError( ModuleNotFoundError: The module 'scipy' is included in the Pyodide distribution, but it is not installed. You can install it by calling: await micropip.install(""scipy"") in Python or await pyodide.loadPackage(""scipy"") in JavaScript. See https://pyodide.org/en/stable/usage/loading-packages.html for more details. ```` this seems like a bug in importlib","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1412019155 https://github.com/pydata/xarray/pull/7179#issuecomment-1295257627,https://api.github.com/repos/pydata/xarray/issues/7179,1295257627,IC_kwDOAMm_X85NNBAb,90008,2022-10-28T17:21:40Z,2022-10-28T17:21:40Z,CONTRIBUTOR,Exciting improvements on usability for the next version!,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1412019155 https://github.com/pydata/xarray/pull/7179#issuecomment-1295196783,https://api.github.com/repos/pydata/xarray/issues/7179,1295196783,IC_kwDOAMm_X85NMyJv,2448579,2022-10-28T16:25:19Z,2022-10-28T16:25:19Z,MEMBER,Thanks @headtr1ck great PR!,"{""total_count"": 1, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 1, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1412019155 https://github.com/pydata/xarray/pull/7179#issuecomment-1288072721,https://api.github.com/repos/pydata/xarray/issues/7179,1288072721,IC_kwDOAMm_X85Mxm4R,43316012,2022-10-23T10:02:46Z,2022-10-23T10:02:46Z,COLLABORATOR,"It seems that `cfgrib` has its own xarray_plugin now. Should the internal version be deprecated?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1412019155 https://github.com/pydata/xarray/pull/7179#issuecomment-1287920868,https://api.github.com/repos/pydata/xarray/issues/7179,1287920868,IC_kwDOAMm_X85MxBzk,43316012,2022-10-22T21:10:53Z,2022-10-22T21:10:53Z,COLLABORATOR,"I managed to get `dask.array` lazy as well, but `dask.utils` is still imported by `backends.locks`. Someone else has to tackle this, I am not too familiar with this... This got the import time quite low. I am happy with this now :)","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1412019155 https://github.com/pydata/xarray/pull/7179#issuecomment-1287814936,https://api.github.com/repos/pydata/xarray/issues/7179,1287814936,IC_kwDOAMm_X85Mwn8Y,43316012,2022-10-22T14:47:16Z,2022-10-22T21:09:25Z,COLLABORATOR,"Seems like it is but a good idea to mess with sys.modules in pytest. Anyone got an idea how to solve that? Edit: solved :)","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1412019155 https://github.com/pydata/xarray/pull/7179#issuecomment-1287807063,https://api.github.com/repos/pydata/xarray/issues/7179,1287807063,IC_kwDOAMm_X85MwmBX,43316012,2022-10-22T14:15:48Z,2022-10-22T14:17:19Z,COLLABORATOR,"Now I have made every module lazy that is not too much work, this includes: `matplotlib`, `flox` and all backends. The only remaining large import is `dask.array`, here I have to check if that is possible to make lazy? This alone is 500ms import time, since it also imports `numba`, `scipy` and `sparse`... Maybe we could even open a ticket at dask about this topic as well?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1412019155 https://github.com/pydata/xarray/pull/7179#issuecomment-1283016719,https://api.github.com/repos/pydata/xarray/issues/7179,1283016719,IC_kwDOAMm_X85MeUgP,43316012,2022-10-18T21:18:14Z,2022-10-18T21:18:14Z,COLLABORATOR,"The simplest solution would be to add a simple unit test that checks that blacklisted packets are not in `sys.modules`. For import timings we have asv, but that is not run so often.","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1412019155 https://github.com/pydata/xarray/pull/7179#issuecomment-1282995923,https://api.github.com/repos/pydata/xarray/issues/7179,1282995923,IC_kwDOAMm_X85MePbT,5635139,2022-10-18T20:58:04Z,2022-10-18T20:58:04Z,MEMBER,"Do you think there's a risk something gets added back by mistake? A galaxy brain idea is to have a lint in pre-commit which looks for `^import (foo|bar)` for the libraries we should be lazy loading. Not fool proof. Or something to measure import time so we can see if it rises again.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1412019155 https://github.com/pydata/xarray/pull/7179#issuecomment-1282951823,https://api.github.com/repos/pydata/xarray/issues/7179,1282951823,IC_kwDOAMm_X85MeEqP,43316012,2022-10-18T20:16:18Z,2022-10-18T20:16:18Z,COLLABORATOR,"Not as much of an improvement as I thought, but shaving off another 20ms. I can see if I can bring it down even further...","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1412019155 https://github.com/pydata/xarray/pull/7179#issuecomment-1281527397,https://api.github.com/repos/pydata/xarray/issues/7179,1281527397,IC_kwDOAMm_X85MYo5l,5635139,2022-10-17T21:36:58Z,2022-10-17T21:36:58Z,MEMBER,Very nice @headtr1ck !,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1412019155