Should we integrate with `annotated-types`?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.1k
- Forks
- 193
- Avg merge
- 3d 20h
- Merged PRs (30d)
- 15
Description
Follow up from #176 and #154.
We currently support adding constraints to types by annotating them with msgspec.Meta. annotated-types provides it's own annotations describing the same constraints - we could potentially integrate with them in 2 ways:
- Consume annotated-types annotations. This would let msgspec work with annotated types annotations as well as our own built-in
Metaannotations. - Produce annotated-types annotations. This would make
Meta.__iter__produce the equivalentannotated-typesannotations, letting it work with other tools that consume such types.
I'm not convinced there's a real use case for either of these integrations, and would want to hear from multiple real users before expending any effort supporting this. See https://github.com/jcrist/msgspec/pull/176#issuecomment-1229265714 for a longer write up of my thoughts.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading follow-ups #176 and #154, then review the linked pull request discussion and the behavior of Meta.iter. Compare the two proposed integration directions—consuming or producing annotated-types annotations—and look for concrete user needs. The issue is done only once a supported direction and scope have been agreed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100