From bde5c75eba8831d6df47d1a21a19061925cf065b Mon Sep 17 00:00:00 2001 From: Itai Shirav Date: Fri, 29 May 2020 01:36:53 +0300 Subject: [PATCH] Python 3.5 does not support f-strings --- src/infi/clickhouse_orm/funcs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/infi/clickhouse_orm/funcs.py b/src/infi/clickhouse_orm/funcs.py index ba05234..b5c9bbe 100644 --- a/src/infi/clickhouse_orm/funcs.py +++ b/src/infi/clickhouse_orm/funcs.py @@ -222,7 +222,8 @@ class FMeta(type): # Get default values for args argdefs = tuple(p.default for p in sig.parameters.values() if p.default != Parameter.empty) # Build the new function - new_code = compile(f'def {new_name}({new_sig}): return F("{new_name}", {args})', __file__, 'exec') + new_code = compile('def {new_name}({new_sig}): return F("{new_name}", {args})'.format(**locals()), + __file__, 'exec') new_func = FunctionType(code=new_code.co_consts[0], globals=globals(), name=new_name, argdefs=argdefs) # If base_func was parametric, new_func should be too if getattr(base_func, 'f_parametric', False):