hi, i have a route something like this :
@app.route("/xxx-detail/<gid>")
def xxx_detail(gid):
return render_template("xxx_detail.html")
idk, but when i use cython, i got error :
TypeError: ontology_detail() takes no keyword arguments
but it's work fine with python interpreter, thank you !
Cython version 0.27.3
Python 2.7.12
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
See the always_allow_keywords option here:
http://docs.cython.org/en/latest/src/reference/compilation.html#compiler-directives
how i can use that ?, is that compiler flag ? or ? @scoder
Scroll down to the How To Set Directives section, there's multiple ways depending on what you want to apply it to. I'd recommend the decorator - cimport cython, then decorate with @cython.always_allow_keywords(True).
@TeamSpen210 Same problem when compiling flask URI converter source code into ".so" extension, "always_allow_keywords" is working. you can add the flags to setup.py, this is how my setup.py looks like:
setup(
name='web',
ext_modules=cythonize(modules, compiler_directives={'always_allow_keywords': True})
)
You are a gentleman and a scholar!
@TeamSpen210 Same problem when compiling flask URI converter source code into ".so" extension, "always_allow_keywords" is working. you can add the flags to setup.py, this is how my setup.py looks like:
setup( name='web', ext_modules=cythonize(modules, compiler_directives={'always_allow_keywords': True}) )
Most helpful comment
@TeamSpen210 Same problem when compiling flask URI converter source code into ".so" extension, "always_allow_keywords" is working. you can add the flags to setup.py, this is how my setup.py looks like: