Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 330867

Summary: dev-python/argparse DeprecationWarning
Product: Gentoo Linux Reporter: Helmut Jarausch <jarausch>
Component: [OLD] DevelopmentAssignee: Dirkjan Ochtman (RETIRED) <djc>
Status: RESOLVED INVALID    
Severity: normal CC: python
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Helmut Jarausch 2010-08-02 16:23:20 UTC
Using dev-python/argparse-1.1 with Python-2.6.5  gives
/usr/lib64/python2.6/site-packages/argparse.py:1576: DeprecationWarning: The "version" argument to ArgumentParser is deprecated. Please use "add_argument(..., action='version', version="N", ...)" instead
  """instead""", DeprecationWarning)


Reproducible: Always
Comment 1 William Hubbs gentoo-dev 2010-08-04 20:53:45 UTC
This is not a bug in the argparse module.

The deprecation warning is because the software using the module is
passing a version= argument to the ArgumentParser() method when it is
creating the parser instead of using the parser.add_argument method to
create a version option.

For more information, see section 15.4.6 of the standard library
documentation for python 2.7 [1], which also applies if using argparse
with python 2.6.

http://docs.python.org/library/argparse.html
Comment 2 Dirkjan Ochtman (RETIRED) gentoo-dev 2010-08-05 07:23:38 UTC
I agree with comment #1, closing.