It appears that the regex in Pyramid does not allow a dot (.) In the callback name:
JSONP_VALID_CALLBACK = re.compile(r"^[a-zA-Z_$][0-9a-zA-Z_$]+$")
The workaround for this would be to subclass pyramid.renderers.JSONP, override its method __call__and force it to use the corrected regular expression. You can then register your own render with pyramid.config.Configurator.add_rendererand use it instead of Pyramid's built-in renderer.
When the problem is fixed in Pyramid, you simply remove your subclass and use the Pyramid renderer. Good thing you filed an error message.
source
share