Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Fix for Werkzeug 2.1. #15

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

schettino72
Copy link

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...

@dtheodor
Copy link
Owner

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?

@schettino72
Copy link
Author

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.

@npcole
Copy link

npcole commented Jun 30, 2022

Is this close to being merged in?

@vincent-olivert-riera
Copy link

Another user here affected by the same bug. Is this close to being merged in?

@simon-ricketts
Copy link

Also affected by this bug and waiting on this merge, is there anything blocking this from being merged in?

@dsbilling
Copy link

@dtheodor Any news on merging this? 😇

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

__ident_func__ removed from werkzeug 2.1
6 participants