[pypy-dev] os.tmpnam warnings

Amaury Forgeot d'Arc amauryfa at gmail.com
Mon Jun 6 15:55:08 CEST 2011


Hi,

2011/6/6 Benjamin Peterson <benjamin at python.org>:
> 2011/6/6 Da_Blitz <pypy at pocketnix.org>:
>>     """Return an absolute pathname of a file that did not exist at the
>>     time the call is made.  The directory and a prefix may be specified
>>     as strings; they may be omitted or None if not needed."""
>> +    from warnings import warn
>> +    from exceptions import RuntimeWarning
>
> When you do post to the tracker, note RuntimeWarning is builtin.

Also ensure that the warning message points to the *caller* of os.tempnam().
(I don't remember whether applevel functions are visible in the Traceback)

-- 
Amaury Forgeot d'Arc


More information about the pypy-dev mailing list