Message306638
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. |
|
Date |
User |
Action |
Args |
2017-11-21 13:50:47 | pitrou | set | recipients:
+ pitrou, ncoghlan, vstinner, serhiy.storchaka |
2017-11-21 13:50:47 | pitrou | link | issue32089 messages |
2017-11-21 13:50:46 | pitrou | create | |
|