Skip to content

Sandbox fixes - #197

Merged
cretz merged 4 commits into
temporalio:mainfrom
cretz:thread-local-dict-fix
Nov 14, 2022
Merged

Sandbox fixes#197
cretz merged 4 commits into
temporalio:mainfrom
cretz:thread-local-dict-fix

Conversation

@cretz

@cretz cretz commented Nov 14, 2022

Copy link
Copy Markdown
Contributor

What was changed

  • Add missing dict methods to thread-local sys modules
  • Add workflow.unsafe.in_sandbox
    • Why: we need a if name == "__main__": equivalent for people that want to not do things inside a sandbox but do at other import times
  • Added test that accesses inspect.stack()
    • This was breaking due to sys.modules.copy()

These were noticed when working on sdk-features

@cretz
cretz requested a review from a team November 14, 2022 17:26
@cretz
cretz force-pushed the thread-local-dict-fix branch from c66f1e9 to 58d241d Compare November 14, 2022 17:31
@cretz
cretz marked this pull request as draft November 14, 2022 18:09
@cretz cretz changed the title Add missing methods to thread-local dict Sandbox fixes Nov 14, 2022
@cretz
cretz marked this pull request as ready for review November 14, 2022 18:53
@cretz
cretz merged commit 7dedda3 into temporalio:main Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants