Message306638
| Author |
pitrou |
| Recipients |
ncoghlan, pitrou, serhiy.storchaka, vstinner |
| Date |
2017年11月21日.13:50:46 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<da6d5956-1372-bd59-45b7-dd251c01c4b5@free.fr> |
| In-reply-to |
<1511271963.98.0.213398074469.issue32089@psf.upfronthosting.co.za> |
| Content |
Le 21/11/2017 à 14:46, STINNER Victor a écrit :
>
> I don't know the rationale of the "always" action rather than "default".
Neither do I. But I don't think it matters a lot. pydebug builds are
almost only used by Python core developers. "developer mode" is target
at every Python developer.
> The problem of ResourceWarning is that the warning logs where the last reference to the resource was cleared, or where the a garbage collection was triggered. Multiple resources can be created from different places, but all "die" at the same place.
If they have different names, they will be logged separately.
>>> def f(fname):
... open(fname)
...
>>> f('setup.py')
__main__:2: ResourceWarning: unclosed file <_io.TextIOWrapper
name='setup.py' mode='r' encoding='UTF-8'>
>>> f('setup.py')
>>> f('LICENSE.txt')
__main__:2: ResourceWarning: unclosed file <_io.TextIOWrapper
name='LICENSE.txt' mode='r' encoding='UTF-8'>
>>> f('LICENSE.txt')
>>>
> For ResourceWarning, your rationale only concerns pydebug build, no?
Why? I'm talking about "-X dev", not pydebug builds. |
|