You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/03/22 10:21:45 UTC

[GitHub] [incubator-superset] mapto edited a comment on issue #3997: Alternate PR to #3970

mapto edited a comment on issue #3997: Alternate PR to #3970
URL: https://github.com/apache/incubator-superset/pull/3997#issuecomment-475564826
 
 
   I also need to add a `before_request` for #7024 to get session information from cookies. However, this PR does not seem to solve the problem: the intended use as per the provided example does not work.
   
       FLASK_APP_MUTATOR = lambda x: x.before_request = f
   
   results in a `SyntaxError: can't assign to lambda` with Python 3.6.8. Currently, [assignments inside lambda are not supported](https://stackoverflow.com/q/50090868/1827854) in Python, and this is apparently [going to change in Python 3.8](https://stackoverflow.com/a/14617232/1827854).
   
   My understanding is that the most workable current alternative is to add the before_request handler in `__init__.py`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org