[issue4180] warnings.simplefilter("always") does not make warnings always show up

2017-04-18 Thread Gerrit Holl
Gerrit Holl added the comment: I believe this fix causes this bug: http://bugs.python.org/issue29672 -- nosy: +Gerrit.Holl ___ Python tracker ___

[issue4180] warnings.simplefilter(always) does not make warnings always show up

2014-09-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8adb2c6e0803 by Antoine Pitrou in branch '3.4': Issue #4180: The warnings registries are now reset when the filters are modified. https://hg.python.org/cpython/rev/8adb2c6e0803 New changeset 4bc60eb68d3e by Antoine Pitrou in branch 'default':

[issue4180] warnings.simplefilter(always) does not make warnings always show up

2014-09-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, this is pushed to 3.x. -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4180

[issue4180] warnings.simplefilter(always) does not make warnings always show up

2014-09-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Brett, do you want to review this? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4180 ___ ___

[issue4180] warnings.simplefilter(always) does not make warnings always show up

2014-08-21 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- assignee: exarkun - stage: patch review - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4180 ___

[issue4180] warnings.simplefilter(always) does not make warnings always show up

2014-08-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch implementing an alternate approach, with a version number added in the registry dicts. It also reuses Tres' test cases. Removing 2.7 because at this point we probably don't want to add non-minimal changes there (outside of the ssl module, that

[issue4180] warnings.simplefilter(always) does not make warnings always show up

2014-08-21 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4180 ___ ___

[issue4180] warnings.simplefilter(always) does not make warnings always show up

2014-06-05 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4180 ___

[issue4180] warnings.simplefilter(always) does not make warnings always show up

2013-01-25 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- nosy: -brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4180 ___ ___ Python-bugs-list

[issue4180] warnings.simplefilter(always) does not make warnings always show up

2011-06-12 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: +Python 3.3 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4180 ___ ___

[issue4180] warnings.simplefilter(always) does not make warnings always show up

2010-12-13 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- type: - behavior versions: +Python 3.1, Python 3.2 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4180 ___

[issue4180] warnings.simplefilter(always) does not make warnings always show up

2010-04-30 Thread Tres Seaver
Tres Seaver tsea...@agendaless.com added the comment: This patch tidies up the FilterWarnings tests to nomalize use of 'self.assertEquals' (matching the rest of the module) and make the 'test_always' assertions meaningful. -- Added file:

[issue4180] warnings.simplefilter(always) does not make warnings always show up

2010-04-30 Thread Tres Seaver
Tres Seaver tsea...@agendaless.com added the comment: This patch adds tests for the 'error', 'ignore', and 'always' filters being applied *after* the default warning has been issued, and therefore the registry populated. It causes failures for the 'error' and 'always' on both the Python and

[issue4180] warnings.simplefilter(always) does not make warnings always show up

2010-04-30 Thread Tres Seaver
Tres Seaver tsea...@agendaless.com added the comment: This patch replaces my earlier 'py_warnings' patch. It revamps the Python side to check filters before deciding not to emit the warning based on the registry. The new filter_after_default tests pass on the Python side with this patch.

[issue4180] warnings.simplefilter(always) does not make warnings always show up

2010-04-29 Thread Tres Seaver
Tres Seaver tsea...@agendaless.com added the comment: The attached patch fixes the OP's use case on the Python side by re-ordering the tests, such that always prevents the short-circuit from firing:: $ ./python Python 2.6.5+ (release26-maint, Apr 29 2010, 21:24:12) [GCC 4.3.3] on linux2

[issue4180] warnings.simplefilter(always) does not make warnings always show up

2010-03-08 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: It sounds like it would be cleaner to apply Brett's idea in msg75122, rather than have the user override (and alternate implementations implement) another obscure hook. We have enough hooks that nobody knows about, IMHO. -- nosy:

[issue4180] warnings.simplefilter(always) does not make warnings always show up

2010-03-06 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: +1 for Benjamin's patch, having just been bitten by this exact problem. I'm trying to do unit testing, checking both that a piece of code produces a DeprecationWarning and that it gives the correct result, with something like: with

[issue4180] warnings.simplefilter(always) does not make warnings always show up

2010-03-06 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- components: +Interpreter Core nosy: +flox stage: - patch review versions: +Python 2.7 -Python 2.4, Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4180

[issue4180] warnings.simplefilter(always) does not make warnings always show up

2009-06-12 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@divmod.com added the comment: So how about it? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4180 ___ ___

[issue4180] warnings.simplefilter(always) does not make warnings always show up

2009-06-12 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: I am still on sabbatical so no code review from me. But from the standpoint of making warn_explicit be overloadable, I'm on the fence. I don't mind it happening, but it will be just one more thing we have to support. Since it's Benjamin's code

[issue4180] warnings.simplefilter(always) does not make warnings always show up

2008-10-22 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone [EMAIL PROTECTED]: If a warning is emitted then a filter with the always rule is added then the is emitted again, it will not be shown the second time: [EMAIL PROTECTED]:~$ python Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) [GCC 4.2.3 (Ubuntu

[issue4180] warnings.simplefilter(always) does not make warnings always show up

2008-10-22 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: If you didn't raise the warning before using the simple filter, this would have worked. The undesired behavior is because of __warningsregistry__. It is set the first time the warning is emitted. When the second warning comes through, the

[issue4180] warnings.simplefilter(always) does not make warnings always show up

2008-10-22 Thread Brett Cannon
Brett Cannon [EMAIL PROTECTED] added the comment: Obviously the big problem with that change, Benjamin, is you will be changing the semantics. And that is a tough thing to change when it involves the warning machinery itself so emitting a warning about a warning might get messy. --

[issue4180] warnings.simplefilter(always) does not make warnings always show up

2008-10-22 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: Oh, do we not consider __warningsregistry__ an implementation detail? ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4180 ___

[issue4180] warnings.simplefilter(always) does not make warnings always show up

2008-10-22 Thread Brett Cannon
Brett Cannon [EMAIL PROTECTED] added the comment: On Wed, Oct 22, 2008 at 3:39 PM, Benjamin Peterson [EMAIL PROTECTED] wrote: Benjamin Peterson [EMAIL PROTECTED] added the comment: Oh, do we not consider __warningsregistry__ an implementation detail? I guess you could view it that way. I

[issue4180] warnings.simplefilter(always) does not make warnings always show up

2008-10-22 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: A simple solution would be to allow warn_explicit to be overridden. Then a custom warn_explicit function could simply ignore the registry argument. ___ Python tracker [EMAIL PROTECTED]

[issue4180] warnings.simplefilter(always) does not make warnings always show up

2008-10-22 Thread Brett Cannon
Brett Cannon [EMAIL PROTECTED] added the comment: On Wed, Oct 22, 2008 at 4:11 PM, Benjamin Peterson [EMAIL PROTECTED] wrote: Benjamin Peterson [EMAIL PROTECTED] added the comment: A simple solution would be to allow warn_explicit to be overridden. Then a custom warn_explicit function could

[issue4180] warnings.simplefilter(always) does not make warnings always show up

2008-10-22 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: Don't worry, Brett; you made it really easy. :) Here's a patch. -- keywords: +patch Added file: http://bugs.python.org/file11866/warn_explicit_replace.patch ___ Python tracker [EMAIL PROTECTED]