Add option for disabling "first request decorator" (setupmethod) decorator #383

wants to merge 4 commits into

4 participants


Sometimes it is unavoidable to raise the assertion added in SHA: 5500986

For example the scenario described here:

There should be an option to disable the assertion even in debug mode.

The Pallets Projects member

Hmm. Hmm. The reasoning why we do this is because people otherwise get attached to the idea that what they do is threadsafe (which it is not!). Behind the link for instance the config is changed on a per request level which is totally unthreadsafe.

I however see that the SQLAlchemy extension needs a way to specify per-request engines.


Do you have an idea how to solve our problem (see blog-post above) without an option for disabling the setupmethod decorator?


This pull request fails (merged 8fd7294 into 0787872).


This pull request passes (merged 0289a1f into 0787872).


Closing because this has been a year. Feel free to comment further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment