You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Binding and AWS adapter: smaller conversion, stub and status issues #101
The stub declares Mapping where the binding needs a dict (python/dynamoxy/_core.pyi): expression_attribute_names/expression_attribute_values of every operation, tags, request_items, _check_expressions/_apply_update's names/values, from_wire and value_from_wire; a MappingProxyType or UserDict raises TypeError. parameters is typed Sequence[Any], so a str type-checks and is split into characters.
The typed wire format accepts invalid input (convert.rs): base64 "====" and "A===" decode to b"\x00", "AA==AAAA" (padding in the middle) to four zero bytes; {"NULL": false} reads as None; {"SS": []} gives an empty set; {"N": 5}, {"BOOL": 1} and non-str keys raise TypeError, not the ValidationError the module documents.
Some bad input raises other exceptions than ValidationError: a lone surrogate (from json.loads('"\\ud800"')) raises UnicodeEncodeError; an int of more than 4,300 digits raises Python's int-to-str ValueError; an int subclass with its own __str__ works below 2**63 and fails with "not a number" above.
The in-memory awaitable Ready is not iterable (runtime.rs, only __await__ and __next__): yield from call.__await__() in types.coroutine code raises TypeError; AWS calls return an asyncio.Future, which works. Add __iter__.
A failed wake-up write could stall a loop (runtime.rs ignores every error of the 1-byte write, not only WouldBlock): if it fails otherwise (ENOBUFS, ENOMEM), no byte is pending and later completions never write again (found by reading only).
Unknown table statuses become ACTIVE (backend/aws/convert.rs): the SDK has REPLICATION_NOT_AUTHORIZED, and later statuses arrive as Unknown; such tables are reported active, and wait_for_table treats them as ready (found by reading only).
Found in a review of the library for bugs (fctl session); the fixes that fit in its ten pull requests are #61 to #65, #67 to #70 and #72.
Activity
fix(binding): conversions take any mapping and refuse invalid wire va…