_______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
For now the default value of the stacklevel parameter in warnings.warn()
is 1. But in most cases stacklevel=2 is required, sometimes >2, and I
don't know cases that need stacklevel=1. I propose to make the default
value of stacklevel to be 2. I think that unlikely this will break
existing code. But rather can fix existing bugs. If stacklevel=1 is
required (I don't know cases), it can be explicitly specified.
- [Python-Dev] Make stacklevel=2 by default in warnings.war... Serhiy Storchaka
- Re: [Python-Dev] Make stacklevel=2 by default in war... Nathaniel Smith
- Re: [Python-Dev] Make stacklevel=2 by default in... Serhiy Storchaka
- Re: [Python-Dev] Make stacklevel=2 by default in... Gustavo Carneiro
- Re: [Python-Dev] Make stacklevel=2 by default in war... Victor Stinner
- Re: [Python-Dev] Make stacklevel=2 by default in... Nathaniel Smith
- Re: [Python-Dev] Make stacklevel=2 by defaul... Nick Coghlan
- Re: [Python-Dev] Make stacklevel=2 by de... Guido van Rossum
- Re: [Python-Dev] Make stacklevel=2 by de... Serhiy Storchaka
- Re: [Python-Dev] Make stacklevel=2 ... Brett Cannon
- Re: [Python-Dev] Make stackleve... Serhiy Storchaka