Problem
Pywikibot defines its own TimeoutError exception in pywikibot.exceptions:
However, Python already provides the built-in TimeoutError exception. Using the same name can lead to ambiguity when reading code or writing exception handlers. Without additional context, it is unclear whether this refers to the built-in exception or pywikibot.exceptions.TimeoutError.
exception.TimeoutError was introduced with rPWBC956a903b (Pywikibot 3.0.20200508) but api.TimeoutError was introduced with a very first Pywikibot 2 release with rPWBCdcff6d3e.
Proposal
Rename` pywikibot.exceptions.TimeoutError` to a more specific name, for example:
- RequestTimeoutError
- ApiTimeoutError