VirtualBox

Ticket #4072 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

Python 2.6 produces DeprecationWarnings on XPCOM exception class => Fixed in SVN

Reported by: bgilbert Owned by: ni81036
Priority: minor 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

comment:1 Changed 5 years ago by ni81036

  • Keywords python added
  • Owner set to ni81036

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.

comment:2 Changed 5 years ago by ni81036

  • Status changed from new to closed
  • Resolution set to fixed
  • Summary changed from Python 2.6 produces DeprecationWarnings on XPCOM exception class to Python 2.6 produces DeprecationWarnings on XPCOM exception class => Fixed in SVN
Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use