python-trio / python-trio/trio
RunVar exposure not flexible enough
Open
Nobody has claimed this yet.
typing
- Dominant language
- Python
- Stars
- 7.3k
- Forks
- 431
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 6
Description
RunVar[T].get(U) should return Union[T, U], not an error. Look at ContextVar for inspiration.
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 locating the RunVar[T].get(U) implementation and comparing its behavior with ContextVar, as the issue suggests. Trace the relevant tests or call sites to confirm the current error behavior, then ensure get(U) accepts the fallback type and returns the corresponding Union[T, U] without errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100