-
Notifications
You must be signed in to change notification settings - Fork 906
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] rename TimeoutError
or make it extend the builtin TimeoutError
#1495
Comments
TimeoutError
This can be super sus if the import ( |
You can rename it within your own project like: While this doesn't address the shadowing and omission concern, Playwright cannot break its API by renaming this completely. Perhaps doing: from playwright.sync_api import sync_playwright, TimeoutError
class PlaywrightTimeoutError(TimeoutError):
pass would be a backwards compatible compromise. (The examples and your code could then be changed to look for |
perhaps simply making _BuiltinTimeoutError = TimeoutError
class TimeoutError(Error, _BuiltinTimeoutError):
... that way there's no backward incompatible change and code that catches |
Probably want something like this: class TimeoutError(Error, __builtins__.TimeoutError):
pass |
TimeoutError
TimeoutError
or make it extend the builtin TimeoutError
This comment was marked as outdated.
This comment was marked as outdated.
@mxschmitt why was this reopened and the commit reverted? |
@mxschmitt, as a contributor who volunteered his time, may I please have an explanation? Without an explanation, I am highly unmotivated to continue contributing. Overall, I am just asking for more transparency. |
See #2312 (comment) for the reason. Since there is a good workaround we think its ok to hold off for now. |
TimeoutError
shadows a builtin exception with the same name, which leads to confusionThe text was updated successfully, but these errors were encountered: