flask-sqlalchemy-session
flask-sqlalchemy-session copied to clipboard
Fix for Werkzeug 2.1.
Fix #14
I have not tested it with greenlets. Seems that should be set directly with SQLAlchemy session factory.
Any chance this get released? It seems not really maintained for a while...
Thanks for the PR. I am not sure yet what the best solution for this is, I was thinking to extend the API to allow passing in a custom scopefunc and at the same time use a sane default such as the following to maintain the old behavior, which is also the desired behavior
try:
from greenlet import getcurrent as _scopefunc
except ImportError:
from threading import get_ident as _scopefunc
Is this doable with just the session factory?
Sorry for delay.
I thought the scopefunc was a parameter for sessionmaker
...
SQLAlchemy uses a different "registry" for default/threads, so if no greenlets
package I leave scopefunc as None
.
I run the tests with greenlets installed and it looks ok.
Is this close to being merged in?
Another user here affected by the same bug. Is this close to being merged in?
Also affected by this bug and waiting on this merge, is there anything blocking this from being merged in?