Skip to content

Use 'callable' instead of typechecking for runtime calls ctx/env injection#1108

Merged
davidism merged 1 commit intopallets:masterfrom
captainmalloc:runtime_calls
Nov 20, 2019
Merged

Use 'callable' instead of typechecking for runtime calls ctx/env injection#1108
davidism merged 1 commit intopallets:masterfrom
captainmalloc:runtime_calls

Conversation

@captainmalloc
Copy link
Copy Markdown
Contributor

When jinja2 is used from Cython-compiled code, Functions and Methods are not types.FunctionType or types.MethodType anymore. Instead they are cython_function_or_method. The framework does not recognize decorated functions/methods and doesn't inject the needed parameters before the call execution.

Using callable is backward compatible with existing implementation and also compatible with Cython-compiled code.

@davidism davidism added this to the 2.11.0 milestone Nov 20, 2019
@davidism davidism merged commit c206cc9 into pallets:master Nov 20, 2019
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants