[ python-Bugs-997100 ] optparse.py:668 triggers FutureWarning

SourceForge.net noreply at sourceforge.net
Sat Sep 25 13:27:35 CEST 2004


Bugs item #997100, was opened at 2004-07-24 17:20
Message generated for change (Comment added) made by m-a
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=997100&group_id=5470

Category: Python Library
Group: Python 2.3
Status: Open
Resolution: Fixed
Priority: 3
Submitted By: Charles (melicertes)
Assigned to: Greg Ward (gward)
Summary: optparse.py:668 triggers FutureWarning

Initial Comment:
In Python 2.3.3, importing optparse triggers a
FutureWarning on line 668:

> /usr/local/lib/python2.3/optparse.py:668:
FutureWarning:                  
> %u/%o/%x/%X of negative int will return a signed
string in 
> Python 2.4 and up 
>   return ("<%s at 0x%x: %r>" 


----------------------------------------------------------------------

Comment By: Matthias Andree (m-a)
Date: 2004-09-25 13:27

Message:
Logged In: YES 
user_id=2788

I for one have seen the warning with a Python 2.3.4 I compiled myself 
(based on SuSE's 2.3.3 source RPM) on SuSE Linux 9.1. 

----------------------------------------------------------------------

Comment By: Greg Ward (gward)
Date: 2004-09-25 03:58

Message:
Logged In: YES 
user_id=14422

Marking this fixed, but not closing it, pending a checkin to
optparse.py on Python 2.3 branch and confirmation that it
actually helped.


----------------------------------------------------------------------

Comment By: Greg Ward (gward)
Date: 2004-09-25 03:58

Message:
Logged In: YES 
user_id=14422

You didn't specify which OS this happens on; I bet it was
Fedora Core or RHEL 3.0, right?  (I found a related thread
on python-dev, and ISTR it was related to the SE-Linux
changes fiddling how the userspace heap fits into VM.)

I'm checking in a change to optik/lib/option.py that should
suppress the warning.  I'm not sure this is the right thing
to do, though, since 1) I can't reproduce it, and 2) I don't
think it will be an issue under Python 2.4, with the
continuing unification of int and long.

See
http://mail.python.org/pipermail/python-dev/2003-November/039952.html
and following messages.

Perhaps the right thing to do is just fix this in
optparse.py on the Python 2.3 branch and forget about Optik
or Python 2.4.  Hmmm.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=997100&group_id=5470


More information about the Python-bugs-list mailing list