-
Notifications
You must be signed in to change notification settings - Fork 262
Closed
Labels
bugThis issue is a bug.This issue is a bug.language/pythonRelated to Python bindingsRelated to Python bindingsp1
Description
🐛 Bug Report
The following seems like it should work:
import jsii
from aws_cdk import core
class TestpythonStack(core.Stack):
def __init__(self, scope: core.Construct, id: str, **kwargs) -> None:
super().__init__(scope, id, **kwargs)
# The code that defines your stack goes here
lazy = core.Lazy.string_value(Producert())
core.CfnOutput(self, 'Output', value=lazy)
@jsii.implements(core.IStringProducer)
class Producert:
def produce(self, context):
return 'whee'But in fact this leads the runtime to trying to serialize a FUNCTION back to jsii:
[jsii-kernel] fromSandbox registerPostProcessor(pp) { postProcessor = pp; } [{"serializationClass":"Any","typeRef":{"type":{"primitive":"any"}}}]
Which fails (obviously).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.language/pythonRelated to Python bindingsRelated to Python bindingsp1