Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #75374 > unrolled thread
| Started by | Piotr Dobrogost <p@gmane-2014.dobrogost.net> |
|---|---|
| First post | 2014-07-30 13:24 +0000 |
| Last post | 2014-07-30 07:08 -0700 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.lang.python
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
| From | Piotr Dobrogost <p@gmane-2014.dobrogost.net> |
|---|---|
| Date | 2014-07-30 13:24 +0000 |
| Subject | Convert Python 3 ResourceWarnings into exception |
| Message-ID | <mailman.12438.1406727006.18130.python-list@python.org> |
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
[toc] | [next] | [standalone]
| From | wxjmfauth@gmail.com |
|---|---|
| Date | 2014-07-30 07:08 -0700 |
| Message-ID | <4c8cf799-78dd-441f-9a04-b2507fca6a05@googlegroups.com> |
| In reply to | #75374 |
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.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web