Limitations¶
- Mixing raw Moto decorators with
aiomoto.mock_awsin the same test is unsupported; the contexts manage shared state differently and can diverge. - In-process and server-mode contexts cannot be active in the same process at the
same time. Starting the other mode raises
ModeConflictError, including when different threads attempt to start both modes concurrently. Use separate processes to run both modes at once. - aiomoto wraps Moto and patches aiobotocore; s3fs should be covered automatically in in-process mode since it uses aiobotocore clients underneath.
- Version ranges are kept narrow and tested together. If you notice a new version of aiobotocore or Moto that isn't covered, please raise an issue.
- s3fs caches filesystem instances; create them inside
mock_awsand close them so finalizers don't run against a closed or different event loop. - Pandas S3 I/O: in server mode, aiomoto patches pandas to route
s3://through fsspec/s3fs when those dependencies are installed. - Polars S3 I/O is patched in server mode when polars is installed; aiomoto injects
storage_optionsfors3://paths following theauto_endpointmode. - Moto proxy mode is unsupported; requesting it raises
ProxyModeError.
Free-threaded CPython¶
Free-threaded CPython 3.14t support covers aiomoto's core in-process mocking. The pandas and polars server-mode integrations are validated on regular CPython builds only — their dependency stacks are not yet reliable on free-threaded interpreters, and Windows 3.14t also lacks compatible pywin32 wheels for Moto's server dependency chain.