wmjie / ibm-db

Automatically exported from code.google.com/p/ibm-db
0 stars 0 forks source link

DeprecationWarning: BaseException.message has been deprecated as of Python 2.6 #101

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi All,
The message below is shown every time an exception is thrown.

What steps will reproduce the problem?

Just make the module to throw an exception

>>> import ibm_db_dbi
>>> dbh = ibm_db_dbi.connect("db2")
>>> cur = dbh.cursor()
>>> cur.execute('blahblah')
/usr/local/lib64/python2.6/site-packages/ibm_db-1.0.5-py2.6-linux-x86_64.egg/ibm
_db_dbi.py:60: DeprecationWarning: BaseException.message has been deprecated as 
of Python 2.6
  self.message = message
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib64/python2.6/site-packages/ibm_db-1.0.5-py2.6-linux-x86_64.egg/ibm_db_dbi.py", line 1279, in execute
    self._prepare_helper(operation)
  File "/usr/local/lib64/python2.6/site-packages/ibm_db-1.0.5-py2.6-linux-x86_64.egg/ibm_db_dbi.py", line 1164, in _prepare_helper
    raise _get_exception(inst)
ibm_db_dbi.ProgrammingError/usr/local/lib64/python2.6/site-packages/ibm_db-1.0.5
-py2.6-linux-x86_64.egg/ibm_db_dbi.py:63: DeprecationWarning: 
BaseException.message has been deprecated as of Python 2.6
  return 'ibm_db_dbi::'+str(self.__class__.__name__)+': '+str(self.message)
: ibm_db_dbi::ProgrammingError: [IBM][CLI Driver][DB2/LINUXX8664] SQL0104N  An 
unexpected token "END-OF-STATEMENT" was found following "blahblah".  Expected 
tokens may include:  "JOIN <joined_table>".  SQLSTATE=42601 SQLCODE=-104

OS:      Suse Linux Enterprise Server
version: ibm_db-1.0.5-py2.6-linux-x86_64.egg

Original issue reported on code.google.com by south.mi...@gmail.com on 20 Mar 2012 at 2:56

GoogleCodeExporter commented 9 years ago
I am able to reproduce this issue, older version of Python-2.6 doesn't have 
deprecated this.

If you want then I will provide the patch for this issue.

In our Next release we will remove this issue.

Original comment by rahul.pr...@in.ibm.com on 3 Apr 2012 at 12:53

GoogleCodeExporter commented 9 years ago
Hi Rahul,
I workaround the issue by filtering the warning so I can wait for next
release. BTW: do you have an estimated date for the next release?
Another thing worth noting is that I did not see this issue on python 2.7.

Original comment by south.mi...@gmail.com on 3 Apr 2012 at 3:28

GoogleCodeExporter commented 9 years ago
This issue have been fixed in Python-2.6.3 and newer, so with newer version of 
Python-2.6 you will not get this Deprecated Waring. 

Original comment by rahul.pr...@in.ibm.com on 21 May 2012 at 11:15

GoogleCodeExporter commented 9 years ago
Fixed and released with ibm_db-1.0.6

Original comment by rahul.pr...@in.ibm.com on 25 May 2012 at 7:07