fastapi-gsap/.venv/lib/python3.12/site-packages/greenlet/__init__.py
Tyler J King e744336385 fix: capability enforcement, credential safety, atomic delegations, input validation
C-6: ConnectorRuntime enforces capability_mask per operation.
     READ-only ACs cannot invoke MUTATE operations (wipe, lock, retire).
C-7: AC validated against database (exists, active, not expired)
     before connector invocation.
C-9: Delegated AC capability bounded by delegator's capability.
C-10: Command counter uses atomic SQL increment with limit check.
M-23: expire_stale() uses same atomic SQL pattern.

H-1: Sensitive credential fields hidden from repr/logs via repr=False.
H-2: Stub backend requires ALLOW_STUB_CREDENTIALS=true to activate.
H-3: Kerberos backend raises CredentialResolutionError instead of
     returning stub ticket.
H-4: Chronicle INTENT emitted before execution, RESULT after.
H-5: device_id validated as UUID before Graph API URL interpolation.
H-8: ConnectorRuntime enforces governance for all connector invocations.

Signed-off-by: Tyler King <tking@guildhouse.dev>
2026-04-14 08:13:27 -04:00

71 lines
1.7 KiB
Python

# -*- coding: utf-8 -*-
"""
The root of the greenlet package.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
__all__ = [
'__version__',
'_C_API',
'GreenletExit',
'error',
'getcurrent',
'greenlet',
'gettrace',
'settrace',
]
# pylint:disable=no-name-in-module
###
# Metadata
###
__version__ = '3.3.2'
from ._greenlet import _C_API # pylint:disable=no-name-in-module
###
# Exceptions
###
from ._greenlet import GreenletExit
from ._greenlet import error
###
# greenlets
###
from ._greenlet import getcurrent
from ._greenlet import greenlet
###
# tracing
###
try:
from ._greenlet import gettrace
from ._greenlet import settrace
except ImportError:
# Tracing wasn't supported.
# XXX: The option to disable it was removed in 1.0,
# so this branch should be dead code.
pass
###
# Constants
# These constants aren't documented and aren't recommended.
# In 1.0, USE_GC and USE_TRACING are always true, and USE_CONTEXT_VARS
# is the same as ``sys.version_info[:2] >= 3.7``
###
from ._greenlet import GREENLET_USE_CONTEXT_VARS # pylint:disable=unused-import
from ._greenlet import GREENLET_USE_GC # pylint:disable=unused-import
from ._greenlet import GREENLET_USE_TRACING # pylint:disable=unused-import
# Controlling the use of the gc module. Provisional API for this greenlet
# implementation in 2.0.
from ._greenlet import CLOCKS_PER_SEC # pylint:disable=unused-import
from ._greenlet import enable_optional_cleanup # pylint:disable=unused-import
from ._greenlet import get_clocks_used_doing_optional_cleanup # pylint:disable=unused-import
# Other APIS in the _greenlet module are for test support.