altairbow / django-db-connection-pool

Database connection pool component library for Django
https://pypi.python.org/pypi/django-db-connection-pool/
MIT License
195 stars 24 forks source link

1.2.3 is broken. #48

Closed bwang221 closed 1 year ago

bwang221 commented 1 year ago

Describe the bug

after upgrade from 1.2.2 to 1.2.3 , running into:

'CursorWrapper' object is not iterable

Environment

Traceback django/db/backends/utils.py in iter at line 30 System

    else:
        return cursor_attr
def __iter__(self):
    with self.db.wrap_database_errors:
        yield from self.cursor
def __enter__(self):
    return self
def __exit__(self, type, value, traceback):
mdantonio commented 1 year ago

Hi, same issue here (python 3.10, django 4.1.9)

wangcrazy1 commented 1 year ago

same issue here. It happens when I try to use the raw SQL.

jlmorton commented 1 year ago

FYI - I just submitted #50 to fix this issue. Looks like there was a regression introduced in 2383593df44ed68298371c481611b22fdda21904.

Would be awesome if we could get a bug fix release, as 1.2.3 is currently broken for Postgres, at least, and Django 4.2 is blocked by an unrelated bug fix in 1.2.3.

altairbow commented 1 year ago

@jlmorton Thank you, this PR does fix the BUG, but I plan to move dj_db_conn_pool.core.utils.CursorWrapper to dj_db_conn_pool.backends.jdbc.utils.CursorWrapper, this PR will not be merged