taskflow doesn't work with SQLAlchemy 1.4.23

Bug #1940964 reported by Thomas Goirand
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
taskflow
New
Undecided
Unassigned

Bug Description

Hi,

This is a report when trying to build the Xena Taskflow package for Debian.

Oslo.db wants SQLAlchemy >= 1.4. So the whole OpenStack Xena must be compatible with it. Unfortunately, it looks like Taskflow fails with SQLA 1.4.

=========================
Failures during discovery
=========================
--- import errors ---
Failed to import test module: taskflow.tests.unit.persistence.test_sql_persistence
Traceback (most recent call last):
  File "/usr/lib/python3.9/unittest/loader.py", line 436, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/lib/python3.9/unittest/loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "/<<PKGBUILDDIR>>/taskflow/tests/unit/persistence/test_sql_persistence.py", line 46, in <module>
    from taskflow.persistence.backends import impl_sqlalchemy
  File "/<<PKGBUILDDIR>>/taskflow/persistence/backends/impl_sqlalchemy.py", line 35, in <module>
    from taskflow.persistence.backends.sqlalchemy import tables
  File "/<<PKGBUILDDIR>>/taskflow/persistence/backends/sqlalchemy/tables.py", line 22, in <module>
    import sqlalchemy_utils as su
  File "/usr/lib/python3/dist-packages/sqlalchemy_utils/__init__.py", line 1, in <module>
    from .aggregates import aggregated # noqa
  File "/usr/lib/python3/dist-packages/sqlalchemy_utils/aggregates.py", line 372, in <module>
    from .functions.orm import get_column_key
  File "/usr/lib/python3/dist-packages/sqlalchemy_utils/functions/__init__.py", line 1, in <module>
    from .database import ( # noqa
  File "/usr/lib/python3/dist-packages/sqlalchemy_utils/functions/database.py", line 11, in <module>
    from .orm import quote
  File "/usr/lib/python3/dist-packages/sqlalchemy_utils/functions/orm.py", line 14, in <module>
    from sqlalchemy.orm.query import _ColumnEntity
ImportError: cannot import name '_ColumnEntity' from 'sqlalchemy.orm.query' (/usr/lib/python3/dist-packages/sqlalchemy/orm/query.py)

Revision history for this message
Thomas Goirand (thomas-goirand) wrote :

Hi,

Sorry for the noise, I needed to upgrade sqlalchemy-utils. After that, everything is fine.

Revision history for this message
jhon55 (jhon3456) wrote :

you're encountering an import error when trying to build the Xena Taskflow package for Debian, specifically related to SQLAlchemy 1.4. The error suggests that _ColumnEntity from sqlalchemy.orm.query is no longer available in SQLAlchemy 1.4, which is causing the failure in sqlalchemy_utils.

Here are some potential solutions:

Check for Compatibility: The version of Taskflow you’re using might not be fully compatible with SQLAlchemy 1.4. Check if there is an updated version of Taskflow that supports SQLAlchemy 1.4 or if there are any ongoing patches that address this issue.

Downgrade SQLAlchemy: If the newer version of SQLAlchemy is not essential for other components, you could try downgrading SQLAlchemy to a version prior to 1.4 (e.g., 1.3.x), which might resolve the immediate import issue.

Patch the Code: If you need to proceed with SQLAlchemy 1.4, it may be necessary to patch sqlalchemy_utils or Taskflow to accommodate the changes in SQLAlchemy 1.4, particularly around the _ColumnEntity usage. This could involve refactoring the import to use a supported method or structure.

Report the Issue: If there’s no immediate fix available, reporting this to the Taskflow maintainers would be helpful. There may already be an ongoing effort to address compatibility with SQLAlchemy 1.4, or they may provide guidance on how to proceed.

In the meantime, I'd recommend checking the changelogs and issue trackers for both OpenStack Xena and Taskflow to see if this problem has been officially acknowledged or if any workarounds have been suggested. for more information please visit: https://carparkapkmods.com/get-unlimited-money/

Revision history for this message
Thomas Goirand (thomas-goirand) wrote :

As I wrote, the issue was sqlalchemy-utils, which was fixed, and this bug can be closed.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.