class documentation
Importer that restricts modules.
| Static Method | current |
Get the current importer if any. |
| Method | __init__ |
Create importer. |
| Method | applied |
Context manager to apply this restrictive import. |
| Method | module |
Whether the given module name is configured as passthrough. |
| Instance Variable | import |
Undocumented |
| Instance Variable | modules |
Undocumented |
| Instance Variable | new |
Undocumented |
| Instance Variable | restricted |
Undocumented |
| Instance Variable | restriction |
Undocumented |
| Instance Variable | restrictions |
Undocumented |
| Method | _assert |
Undocumented |
| Method | _builtins |
Undocumented |
| Method | _builtins |
Undocumented |
| Method | _import |
Undocumented |
| Method | _is |
Undocumented |
| Method | _maybe |
Undocumented |
| Method | _maybe |
Implements _Environment.maybe_restrict_module. |
| Method | _traced |
Undocumented |
| Method | _unapplied |
Undocumented |
| Class Variable | _thread |
Undocumented |
def __init__(self, restrictions:
SandboxRestrictions, restriction_context: RestrictionContext):
(source)
¶
Create importer.
Context manager to apply this restrictive import.
Warning
This currently alters global sys.modules and builtins.__import__ while it is running and therefore should be locked against other code running at the same time.
def _import(self, name:
str, globals: Mapping[ str, object] | None = None, locals: Mapping[ str, object] | None = None, fromlist: Sequence[ str] = (), level: int = 0) -> types.ModuleType:
(source)
¶
Undocumented
def _is_import_notification_policy_applied(self, policy:
temporalio.workflow.SandboxImportNotificationPolicy) -> bool:
(source)
¶
Undocumented