Opened 16 years ago
Closed 16 years ago
#4072 closed defect (fixed)
Python 2.6 produces DeprecationWarnings on XPCOM exception class => Fixed in SVN
Reported by: | Benjamin Gilbert | Owned by: | Nikolay Igotti |
---|---|---|---|
Component: | other | Version: | VirtualBox 2.2.2 |
Keywords: | python | Cc: | bgilbert@… |
Guest type: | other | Host type: | other |
Description
When using the Python bindings on a system with Python 2.6 (e.g. Fedora 11), Python produces DeprecationWarning messages the first time the bindings throw an exception.
This can be reproduced by using vboxshell.py to create a machine with an invalid OS type (after applying the fix in #4071):
[sample]$ export VBOX_PROGRAM_PATH=/usr/lib/virtualbox/ [sample]$ export PYTHONPATH=../:/usr/lib/virtualbox/ [sample]$ python vboxshell.py Running VirtualBox version 2.2.2 vbox> create foo bar baz /home/bgilbert/sdk/bindings/xpcom/python/xpcom/__init__.py:54: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6 self.message = message /home/bgilbert/sdk/bindings/xpcom/python/xpcom/__init__.py:57: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6 self.message = message Unknown OS type: bar
Change History (2)
comment:1 by , 16 years ago
Keywords: | python added |
---|---|
Owner: | set to |
comment:2 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Summary: | Python 2.6 produces DeprecationWarnings on XPCOM exception class → Python 2.6 produces DeprecationWarnings on XPCOM exception class => Fixed in SVN |
Note:
See TracTickets
for help on using tickets.
Yes, this is related to this PEP: http://mail.python.org/pipermail/python-dev/2007-April/072542.html Will be fixed by renaming 'message' attribute to smth like 'msg', unless there are better proposals.