Issue1539925
Created on 2006-08-14 11:03 by lemburg, last changed 2022-04-11 14:56 by admin.
| Messages (5) | |||
|---|---|---|---|
| msg60969 - (view) | Author: Marc-Andre Lemburg (lemburg) * ![]() |
Date: 2006-08-14 11:03 | |
Carried over from Patch #1538956 description: During testing I found that the warning registry defaults to only issueing warnings once per module and line number. I suppose this is enough for debugging code, but it feels weird when trying things in the interactive session, as you only get the warnings once in that context (and for the whole session), regardless of the fact that you're entering new lines of code all the time. The reason is that the warning framework registers warnings based on line number which usually is 1 in interactive sessions. In general, it might be a better idea to have a single global warning registry and then include the module name or id in the registry key. Currently, the warning framework creates a new registry per (module) context. |
|||
| msg85079 - (view) | Author: Brett Cannon (brett.cannon) * ![]() |
Date: 2009-04-01 19:14 | |
Not a bad idea, although it would require some work to make it work in a backwards-compatible fashion. |
|||
| msg199793 - (view) | Author: Georg Brandl (georg.brandl) * ![]() |
Date: 2013-10-13 20:26 | |
Is there still any interest in this? |
|||
| msg306141 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2017-11-13 05:50 | |
Looks reasonable to me. Perhaps we should port the solution from IPython: https://github.com/ipython/ipython/issues/6611. |
|||
| msg306180 - (view) | Author: Alyssa Coghlan (ncoghlan) * ![]() |
Date: 2017-11-14 01:01 | |
As a user, what would I actually gain from being warned more than once per session that a particular API I'm using is deprecated?
If I want that behaviour, I can already opt in to it by doing "warnings.simplefilter('always')".
As things stand, the perpetually reset line counter just means that the effective default at the REPL is "warnings.simplefilter('module:::__main__')"
|
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:56:19 | admin | set | github: 43816 |
| 2017-11-14 01:01:29 | ncoghlan | set | nosy:
+ ncoghlan messages: + msg306180 |
| 2017-11-13 05:50:14 | serhiy.storchaka | set | messages:
+ msg306141 versions: + Python 3.7, - Python 3.5 |
| 2015-02-26 21:07:12 | martin.panter | set | nosy:
+ martin.panter |
| 2015-02-26 13:00:33 | serhiy.storchaka | set | nosy:
+ serhiy.storchaka versions: + Python 3.5, - Python 3.4 |
| 2013-10-13 22:15:25 | Alan.Cristhian | set | nosy:
+ Alan.Cristhian |
| 2013-10-13 20:26:53 | georg.brandl | set | nosy:
+ georg.brandl messages: + msg199793 |
| 2012-11-18 19:28:32 | ezio.melotti | set | stage: needs patch versions: + Python 3.4, - Python 3.2 |
| 2012-11-17 17:12:57 | brett.cannon | set | nosy:
- brett.cannon |
| 2010-07-10 06:28:52 | terry.reedy | set | versions: + Python 3.2, - Python 2.6 |
| 2009-04-01 19:14:14 | brett.cannon | set | assignee: brett.cannon -> messages: + msg85079 |
| 2009-02-11 03:08:20 | ajaksu2 | set | assignee: brett.cannon type: enhancement nosy: + brett.cannon |
| 2006-08-14 11:03:41 | lemburg | create | |
