python / python/typeshed

Should ExcInfo allow traceback to be None?

Open
#9,789 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
5.1k
Forks
2.1k
Avg merge
1d 19h
Merged PRs (30d)
82

Description

https://github.com/python/typeshed/blob/c407a444897d7c0ce3543b57f48f9d594d3fb3a0/stdlib/_typeshed/__init__.pyi#L267

In some exceptions, there is no traceback, and it is None. Forgetting to handle None seems to be the kind of subtle bug that we want type checking to prevent. This was previously discussed in #6133.

I noticed this when looking at the first mypy_primer diff in #9788.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at stdlib/_typeshed/init.pyi around line 267 and inspect the ExcInfo definition. Review the prior discussion in #6133 and the mypy_primer diff mentioned in #9788 to identify affected uses. Done means the traceback type reflects that it can be None and the related type-checking diff is addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devtools
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.