| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| """ | ||
|
|
||
| if onerror is not None: | ||
| warnings.warn("onerror is deprecated, use onexc instead", |
There was a problem hiding this comment.
I would rephrase this as "onerror argument is deprecated, use onexc instead" (emphasys on the fact that onerror is an argument)
Sorry, something went wrong.
| """ | ||
|
|
||
| if onerror is not None: | ||
| warnings.warn("onerror argument is deprecated, use onexc instead", |
There was a problem hiding this comment.
The warn call needs stacklevel=2 parameter so that the warning message shows what is making the deprecated call. Werkzeug's tests started failing on the latest 3.12 alpha because of this, and it's really hard to tell what's causing it (I think it's pytest) because the warning just points at this line right now instead of the caller.
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks, will fix.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
I've asked on discord and was told that we normally emit the deprecation warning as soon as something is deprecated.