fedora-copr / copr

RPM build system - upstream for https://copr.fedorainfracloud.org/
113 stars 61 forks source link

frontend: add missing dialect ref for identifier_preparer #3430

Closed nikromen closed 2 months ago

nikromen commented 2 months ago

https://docs.sqlalchemy.org/en/20/core/internals.html#sqlalchemy.engine.Dialect.identifier_preparer

fixes traceback:

  File "/usr/share/copr/coprs_frontend/coprs/logic/batches_logic.py", line 45, in locked_table
    _lock_table(table_name)
  File "/usr/lib/python3.12/site-packages/backoff/_sync.py", line 105, in retry
    ret = target(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/copr/coprs_frontend/coprs/logic/batches_logic.py", line 34, in _lock_table
    db.engine.identifier_preparer.quote(table)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Engine' object has no attribute 'identifier_preparer'