Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #75376

Re: Convert Python 3 ResourceWarnings into exception

Newsgroups comp.lang.python
Date 2014-07-30 07:08 -0700
References <mailman.12438.1406727006.18130.python-list@python.org>
Message-ID <4c8cf799-78dd-441f-9a04-b2507fca6a05@googlegroups.com> (permalink)
Subject Re: Convert Python 3 ResourceWarnings into exception
From wxjmfauth@gmail.com

Show all headers | View raw


Le mercredi 30 juillet 2014 15:24:59 UTC+2, Piotr Dobrogost a écrit :
> Hi!
> 
> 
> 
> Recently A. Jesse Jiryu Davis asked at Stackoverflow
> 
> (http://stackoverflow.com/q/24717027/95735) if there is "a way to force a
> 
> Python 3 unittest to fail, rather than simply print a warning to stderr, if
> 
> it causes any ResourceWarning?" Daniel Harding, in the accepted answer,
> 
> states it's not possible.
> 
> 
> 
> Is it really the case?
> 
> 
> 
> For sake of context, here I believe is the place, where
> 
> PyErr_WriteUnraisable is being called in this case -
> 
> http://hg.python.org/cpython/annotate/c0e311e010fc/Modules/socketmodule.c#l3857


I can let Python 3 crash with any valid string I wish.
I can let Python 3 fails with any *valid* string I wish.

jmf

PS I know why.

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Convert Python 3 ResourceWarnings into exception Piotr Dobrogost <p@gmane-2014.dobrogost.net> - 2014-07-30 13:24 +0000
  Re: Convert Python 3 ResourceWarnings into exception wxjmfauth@gmail.com - 2014-07-30 07:08 -0700

csiph-web