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
This is a bit unfortunate, as this requires the `model` to be passed as
an (unparsed) `str`, rather than as an already-parsed
`NormalizedModelName`, ultimately making the class easier to misuse.
However, `InstanceID`s will now need to be sent over RPC, and no other
solution I tried for this that retained the type-unwrapping constructor
was satisfactory:
- I considered using Pydantic's `BaseModel` or `dataclass` base classes,
but opted against this, as I would like to avoid Pydantic types
leaking out of the RPC-specific modules they mostly live in today.
- I tried to convince Pydantic to properly encode/decode the existing
native dataclass, but ran across pydantic/pydantic#2531,
which won't allow custom encoding/decoding of arbitrary types in
Pydantic v1.
- I also messed with some other inheritance schemes, but in the end
decided converting to a `NamedTuple` and dropping the type unwrapping
was probably the best solution for now.
Issue: getsentry/team-ospo#196
0 commit comments