New submission from Anthony Sottile <[email protected]>:
I have yet to come across a usecase where `stacklevel=1` makes sense -- usually it is more helpful to point at the calling code than the function which is itself warning my proposal is to update the default for `stacklevel=` from `1` to `2` an example bpo where this is relevant is bpo-44295 ---------- components: Library (Lib) messages: 394960 nosy: Anthony Sottile priority: normal severity: normal status: open title: Should warnings.warn default to stacklevel=2? type: behavior versions: Python 3.11 _______________________________________ Python tracker <[email protected]> <https://bugs.python.org/issue44296> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
