From: SourceForge.net <no...@so...> - 2003-12-21 13:39:01
|
Bugs item #863925, was opened at 2003-12-22 00:39 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116528&aid=863925&group_id=16528 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Ben Burton (bab) Assigned to: Nobody/Anonymous (nobody) Summary: FutureWarning (negative integers and signed strings) Initial Comment: Hi. The following issue was reported in the Debian BTS (#224325): I have a python script which started to output this warning: /usr/lib/python2.3/site-packages/pyPgSQL/PgSQL.py:2644: FutureWarning: %u/%o/%x/%X of negative int will return a signed string in Python 2.4 %and up The following patch should fix it: --- python-pgsql-2.4.0.old/pyPgSQL/PgSQL.py 2003-12-22 00:17:47.000000000 +1100 +++ python-pgsql-2.4.0/pyPgSQL/PgSQL.py 2003-12-22 00:19:36.000000000 +1100 @@ -2641,7 +2641,7 @@ if name is None: if isRefCursor: raise TypeError, "Reference cursor requires a name." - name = "PgSQL_%08X" % id(self) + name = "PgSQL_%08X" % long(id(self)) elif type(name) is not StringType: raise TypeError, "Cursor name must be a string." Thanks - Ben. :) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116528&aid=863925&group_id=16528 |