-
-
Notifications
You must be signed in to change notification settings - Fork 133
Closed
Description
- cattrs version: 1.2.0
- Python version: 3.7.9
- Operating System: Linux
Description
There are a few spots in the code where I unstructure a tuple of attrs objects in preparation for JSON-encoding them. This stopped working with 1.2.0.
What I Did
Here's a minimal reproducer:
#!/usr/bin/env python3
import attr
import cattr
@attr.define()
class Foo:
foo: str
assert cattr.unstructure((Foo("foo"),)) == ({"foo": "foo"},)I've bisected this to 53fd2ad. From looking at that commit quickly, I'm guessing that switching from _subclass(Sequence) to is_sequence is causing a tuple to no longer be considered a sequence.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels