[Python-Dev] strange warnings from tempfile.mkstemped.__del__ on HP
Guido van Rossum
guido@python.org
Tue, 13 Aug 2002 23:31:40 -0400
Lysator's snake-farm, which does regular builds of CVS Python
checkouts on a variety of uncommon platforms, has started reporting
two warnings that I don't understand. (Never mind the gettext.py
warnings; they're shallow; someone should fix them.)
The problem is the two exceptions ignored in __del__ methods. If I
look at the code of the new tempfile.py module and its
test_tempfile.py unittests, I see that there's a class mkstemped
defined in test_tempfile.py, which has a __del__ method that closes
the file descriptor. The only way I can see this failing with an
AttributeError exception is if the instance never makes it through its
__init__ call. But in that case I would have expect a failure
reported; the only instantiation of mkstemped() is inside a try/except
where the exceptclause calls self.failOnException() which causes the
unit tests to fail. But the unittest doesn't report any failures?!
I don't see this happening on Linux, so it's hard to go beyond
speculation.
--Guido van Rossum (home page: http://www.python.org/~guido/)
------- Forwarded Message
Date: Tue, 13 Aug 2002 23:04:56 -0400
From: sfarmer@lysator.liu.se
To: snake-farm-report@lists.lysator.liu.se
Subject: [farm-report] Build python-HP_UX-B.11.00-9000_829-taylor was successfu
l.
Build test succeeded. Any warnings are appended below.
- --
/mp/slaskdisk/tmp/sfarmer/python/dist/src/Lib/gettext.py:142: DeprecationWarnin
g: hex/oct constants > sys.maxint will return positive values in Python 2.4 and
up
LE_MAGIC = 0x950412de
/mp/slaskdisk/tmp/sfarmer/python/dist/src/Lib/gettext.py:143: DeprecationWarnin
g: hex/oct constants > sys.maxint will return positive values in Python 2.4 and
up
BE_MAGIC = 0xde120495
/mp/slaskdisk/tmp/sfarmer/python/dist/src/Lib/gettext.py:149: DeprecationWarnin
g: hex/oct constants > sys.maxint will return positive values in Python 2.4 and
up
MASK = 0xffffffff
Exception exceptions.AttributeError: "mkstemped instance has no attribute 'fd'"
in <bound method mkstemped.__del__ of <test.test_tempfile.mkstemped instance a
t 0x40705ee0>> ignored
Exception exceptions.AttributeError: "mkstemped instance has no attribute 'fd'"
in <bound method mkstemped.__del__ of <test.test_tempfile.mkstemped instance a
t 0x40afcdc8>> ignored
Stop.
_______________________________________________
Snake-farm-report mailing list
Snake-farm-report@lists.lysator.liu.se
http://lists.lysator.liu.se/mailman/listinfo/snake-farm-report
------- End of Forwarded Message