mxcube / mxcubecore

Backend used by MXCuBE
http://mxcube.github.io/mxcube/
GNU Lesser General Public License v3.0
11 stars 51 forks source link

error using sqlalchemy 2.0.25 #837

Closed elmjag closed 5 months ago

elmjag commented 6 months ago

If sqlalchemy 2.0.25 package is installed, mxcube will fail to start with this error message:

Traceback (most recent call last):
  File "/app/web/mxcubeweb-server", line 3, in <module>
    from mxcubeweb import main
  File "/app/web/mxcubeweb/__init__.py", line 14, in <module>
  from mxcubeweb.server import Server as server  # noqa: E402
  File "/app/web/mxcubeweb/server.py", line 19, in <module>
    from mxcubeweb.core.components.user.database import (
  File "/app/web/mxcubeweb/core/components/user/database.py", line 4, in <module>
    from sqlalchemy import create_engine
  File "/opt/conda/lib/python3.9/site-packages/sqlalchemy/__init__.py", line 12, in <module>
    from . import util as _util
  File "/opt/conda/lib/python3.9/site-packages/sqlalchemy/util/__init__.py", line 15, in <module>
    from ._collections import coerce_generator_arg as coerce_generator_arg
  File "/opt/conda/lib/python3.9/site-packages/sqlalchemy/util/_collections.py", line 38, in <module>
    from .typing import is_non_string_iterable
  File "/opt/conda/lib/python3.9/site-packages/sqlalchemy/util/typing.py", line 56, in <module>
    from typing_extensions import TypeAliasType as TypeAliasType  # 3.12
ImportError: cannot import name 'TypeAliasType' from 'typing_extensions' (/opt/conda/lib/python3.9/site-packages/typing_extensions.py)

The problem is that sqlalchemy 2.0.25 requires typing_extensions >= 4.9.0.

However, it's not possible to install that version of typing_extensions. This is due to another transient dependency to typing_extensions package via ispyb-client package.

Ispyb-client have a pinned dependency on typing_extensions 4.3.0. Mxcubecore is already using latest version of ispyb-client.

elmjag commented 6 months ago

Is it possible to drop ispyb-client from mxcubecore depencies? Is it used a lot?

Or, can we update ispyb-client to work with typing_extensions >= 4.9.0?

Who maintains this package now? Its pypi page does not say a lot: https://pypi.org/project/ispyb-client/

fabcor-maxiv commented 6 months ago

My guess is that ispyb-client has been automatically generated. See: https://inspector.pypi.io/project/ispyb-client/1.0.0/packages/9e/8e/6e22b10f96b12053084532cf3269e19b06bde98b99224bfa91aea2d3a8ac/ispyb_client-1.0.0.tar.gz/ispyb_client-1.0.0/setup.py

Ispyb is in some kind of limbo right now. I think I now do have some permissions on some GitHub repositories, but not enough permissions to do anything significant.

marcus-oscarsson commented 6 months ago

ispyb-client is indeed automatically generated and is now now longer used. It was used for a brief moment but since then other decisions have been made making at-least as it is now ispyb-client deprecated. It can safely be removed from the dependencies.

elmjag commented 6 months ago

Aha! I'll make a PR to remove ispyb-client!