Index: kombu-5.2.4/kombu/transport/sqlalchemy/__init__.py =================================================================== --- kombu-5.2.4.orig/kombu/transport/sqlalchemy/__init__.py +++ kombu-5.2.4/kombu/transport/sqlalchemy/__init__.py @@ -58,7 +58,7 @@ import threading from json import dumps, loads from queue import Empty -from sqlalchemy import create_engine +from sqlalchemy import create_engine, text from sqlalchemy.exc import OperationalError from sqlalchemy.orm import sessionmaker @@ -164,7 +164,7 @@ class Channel(virtual.Channel): def _get(self, queue): obj = self._get_or_create(queue) if self.session.bind.name == 'sqlite': - self.session.execute('BEGIN IMMEDIATE TRANSACTION') + self.session.execute(text('BEGIN IMMEDIATE TRANSACTION')) try: msg = self.session.query(self.message_cls) \ .with_for_update() \ Index: kombu-5.2.4/kombu/transport/sqlalchemy/models.py =================================================================== --- kombu-5.2.4.orig/kombu/transport/sqlalchemy/models.py +++ kombu-5.2.4/kombu/transport/sqlalchemy/models.py @@ -4,7 +4,7 @@ import datetime from sqlalchemy import (Boolean, Column, DateTime, ForeignKey, Index, Integer, Sequence, SmallInteger, String, Text) -from sqlalchemy.orm import relation +from sqlalchemy.orm import relationship from sqlalchemy.schema import MetaData try: @@ -35,7 +35,7 @@ class Queue: @declared_attr def messages(cls): - return relation('Message', backref='queue', lazy='noload') + return relationship('Message', backref='queue', lazy='noload') class Message: Index: kombu-5.2.4/requirements/test.txt =================================================================== --- kombu-5.2.4.orig/requirements/test.txt +++ kombu-5.2.4/requirements/test.txt @@ -1,3 +1,4 @@ -pytest~=7.0.1 +pytz +pytest>=7.1.1 pytest-sugar Pyro4