Skip to content
This repository was archived by the owner on Aug 19, 2025. It is now read-only.
This repository was archived by the owner on Aug 19, 2025. It is now read-only.

Broken RowProxy import with sqlalchemy 1.4 #298

Closed

Description

@Kyle-Verhoog

The RowProxy import

from sqlalchemy.engine.result import ResultMetaData, RowProxy
fails because sqlalchemy removed RowProxy in 1.4 😕

Activity

  1. changed the title [-]Broken import with sqlalchemy 1.4[/-] [+]Broken `RowProxy` import with sqlalchemy 1.4[/+] on Mar 15, 2021
  2. added a commit that references this issue on Mar 15, 2021
  3. rafalp commented on Mar 15, 2021

    @rafalp
    Contributor

    Oh, so SQLAlchemy 1.4 is out now? That's great!

    PR fixing deps welcome <3

  4. Kyle-Verhoog commented on Mar 15, 2021

    @Kyle-Verhoog
    Author

    I'm not very familiar with databases but I'm down to take a shot at fixing it up to learn more! 😄

  5. laozhu commented on Mar 17, 2021

    @laozhu

    I have the same problem here, I am using pymysql.

    File "./services/main.py", line 4, in <module>
        from services.core.database import create_tables
      File "./services/core/database.py", line 16, in <module>
        database_master = Database(_settings.database_master_url)
      File "/Users/Ritchie/Developer/@easynm/cloud/services/.venv/lib/python3.9/site-packages/databases/core.py", line 66, in __init__
        backend_cls = import_from_string(backend_str)
      File "/Users/Ritchie/Developer/@easynm/cloud/services/.venv/lib/python3.9/site-packages/databases/importer.py", line 21, in import_from_string
        raise exc from None
      File "/Users/Ritchie/Developer/@easynm/cloud/services/.venv/lib/python3.9/site-packages/databases/importer.py", line 18, in import_from_string
        module = importlib.import_module(module_str)
      File "/usr/local/Cellar/python@3.9/3.9.1_8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py", line 127, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "/Users/Ritchie/Developer/@easynm/cloud/services/.venv/lib/python3.9/site-packages/databases/backends/mysql.py", line 9, in <module>
        from sqlalchemy.engine.result import ResultMetaData, RowProxy
    ImportError: cannot import name 'RowProxy' from 'sqlalchemy.engine.result' (/Users/Ritchie/Developer/@easynm/cloud/services/.venv/lib/python3.9/site-packages/sqlalchemy/engine/result.py)
    
  6. noisywiz commented on Mar 19, 2021

    @noisywiz

    Hi! One more issue for 1.4 sqlalchemy/sqlalchemy#6096

  7. rafalp commented on Mar 19, 2021

    @rafalp
    Contributor

    @rajasimon please pin dependencies to version if you are having problems.

  8. Basit-qc commented on Mar 22, 2021

    @Basit-qc

    Using databases[mysql]==0.4.2
    Had to downgrade sqlalchemy to sqlalchemy==1.3.23

  9. lovelydinosaur commented on Mar 22, 2021

    @lovelydinosaur
    Member

    I'd suggest that the sensible first pass for us would be to issue a new release of databases that pins sqlalchemy properly in the setup.py. That'd at least ensure that pip install databases would function properly.

    We can then follow up with a PR that adds support for both 1.3 and 1.4, but we'll be under less time pressure to do so, so we're more likely to get it right, and users will have a working databases install in the meantime.

  10. vijaykumar1356 commented on May 26, 2021

    @vijaykumar1356

    @tomchristie Please do the needful update to have a support for 1.4 SQLAlchemy version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions