Critical bug in gsheets-connection

gsheets-connection has a hard requirement of pandas < v2. It does not work with streamlit anymore, either with running local or with running on share.streamlit.io. Moreover, on share.streamlit.io, “the app is in the oven” takes about a century to finish because it’s building a pandas < v2 from source because there is no precompiled wheel available anymore on pip.

The error is immediate on import pandas as pd. Here is a GitHub issue and follows the error as displayed on streamlit. Thank you.

ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
Traceback:

File "/Users/•/repos/•/•/venv/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 85, in exec_func_with_error_handling
    result = func()
             ^^^^^^File "/Users/•/repos/•/•/venv/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 576, in code_to_exec
    exec(code, module.__dict__)File "/Users/•/repos/•/•/app.py", line 2, in <module>
    import pandas as pdFile "/Users/•/repos/•/•/venv/lib/python3.12/site-packages/pandas/__init__.py", line 22, in <module>
    from pandas.compat import is_numpy_dev as _is_numpy_dev  # pyright: ignore # noqa:F401
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "/Users/•/repos/•/•/venv/lib/python3.12/site-packages/pandas/compat/__init__.py", line 18, in <module>
    from pandas.compat.numpy import (File "/Users/•/repos/•/•/venv/lib/python3.12/site-packages/pandas/compat/numpy/__init__.py", line 4, in <module>
    from pandas.util.version import VersionFile "/Users/•/repos/•/•/venv/lib/python3.12/site-packages/pandas/util/__init__.py", line 2, in <module>
    from pandas.util._decorators import (  # noqa:F401File "/Users/•/repos/•/•/venv/lib/python3.12/site-packages/pandas/util/_decorators.py", line 14, in <module>
    from pandas._libs.properties import cache_readonlyFile "/Users/•/repos/•/•/venv/lib/python3.12/site-packages/pandas/_libs/__init__.py", line 13, in <module>
    from pandas._libs.interval import IntervalFile "pandas/_libs/interval.pyx", line 1, in init pandas._libs.interval

Try numpy<2.

That doesn’t solve the problem of taking forever to deploy on the cloud

Also, sadly, is not a fix

Given the sad state of gsheets-connection, the best thing to do may be just getting rid of it and use gspread instead.

That did it. The only thing I lost is the cache behavior, thanks.