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

Closed
wants to merge 4 commits into
from

4 participants

@mfa

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

For example the scenario described here:
http://blog.madflex.de/2012/1/17/FlaskSQLAlchemy_PostgresqlConnector/

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

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

@mfa

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

@travisbot

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

@travisbot

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

@kennethreitz

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