Issue 82 in argparse: argparse 1.2 incompatible with Python 3.1

7 views
Skip to first unread message

argp...@googlecode.com

unread,
Mar 28, 2011, 6:26:26 PM3/28/11
to argpar...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 82 by Arfrever...@gmail.com: argparse 1.2 incompatible with
Python 3.1
http://code.google.com/p/argparse/issues/detail?id=82

argparse 1.1 was compatible with Python 3.1 (all 1485 tests were passing).
argparse 1.2 is incompatible with Python 3.1.

Output of tests of argparse 1.2:
$ PYTHONPATH=. python3.1 test/test_argparse.py
Traceback (most recent call last):
File "test/test_argparse.py", line 13, in <module>
from StringIO import StringIO
ImportError: No module named StringIO

It's not only a bug in test suite. If I copy test_argparse.py from argparse
1.1 and try to run tests against argparse 1.2, then there are 1060 errors.

argp...@googlecode.com

unread,
Mar 30, 2011, 8:17:47 AM3/30/11
to argpar...@googlegroups.com
Updates:
Owner: ThomasMo...@gmail.com

Comment #1 on issue 82 by steven.b...@gmail.com: argparse 1.2 incompatible

Thomas, any chance you could take a look at this? The previous releases of
argparse ran on Python 2.3-3.1.

argp...@googlecode.com

unread,
Mar 30, 2011, 9:54:12 AM3/30/11
to argpar...@googlegroups.com
Updates:
Status: Accepted

Comment #2 on issue 82 by ThomasMo...@gmail.com: argparse 1.2 incompatible

I'll have a look.

Isn't argparse in stdlib since 2.7 (and also in 3.x)?

If so, why do you use the package?

argp...@googlecode.com

unread,
Mar 30, 2011, 9:58:18 AM3/30/11
to argpar...@googlegroups.com

Comment #3 on issue 82 by Arfrever...@gmail.com: argparse 1.2 incompatible

argparse is in stdlib in 2.7 and >=3.2, not 3.1.

argp...@googlecode.com

unread,
Mar 30, 2011, 10:22:38 AM3/30/11
to argpar...@googlegroups.com
Updates:
Status: Fixed

Comment #4 on issue 82 by ThomasMo...@gmail.com: argparse 1.2 incompatible

Should be fixed by this changeset, please see the commit comment and do a
test:

http://code.google.com/p/argparse/source/detail?r=c1c83cae40ebebe8aeb89f212484a33296bc83be

argp...@googlecode.com

unread,
Mar 30, 2011, 6:50:44 PM3/30/11
to argpar...@googlegroups.com

Comment #5 on issue 82 by Arfrever...@gmail.com: argparse 1.2 incompatible

Please apply the attached patch.

Attachments:
test_argparse.patch 384 bytes

argp...@googlecode.com

unread,
Mar 31, 2011, 4:59:41 AM3/31/11
to argpar...@googlegroups.com

Comment #6 on issue 82 by ThomasMo...@gmail.com: argparse 1.2 incompatible

Thanks for the patch. I applied a very similar change, but also "fixed" the
python 2.3 testing issue the same way. I changed the version comparison for
consistency reasons.


argp...@googlecode.com

unread,
Mar 31, 2011, 10:10:00 AM3/31/11
to argpar...@googlegroups.com

Comment #7 on issue 82 by Arfrever...@gmail.com: argparse 1.2 incompatible

Thanks. Please release a new version (1.2.1 or 1.3).

argp...@googlecode.com

unread,
Mar 31, 2011, 11:19:30 AM3/31/11
to argpar...@googlegroups.com

Comment #8 on issue 82 by ThomasMo...@gmail.com: argparse 1.2 incompatible

Yeah, 1.2.1 - soon! :)


argp...@googlecode.com

unread,
Mar 31, 2011, 5:52:09 PM3/31/11
to argpar...@googlegroups.com
Updates:
Status: Verified

Comment #9 on issue 82 by ThomasMo...@gmail.com: argparse 1.2 incompatible

1.2.1 released!

argp...@googlecode.com

unread,
Apr 1, 2011, 5:45:05 AM4/1/11
to argpar...@googlegroups.com

Comment #10 on issue 82 by steven.b...@gmail.com: argparse 1.2 incompatible

Thanks again for doing this!

Reply all
Reply to author
Forward
0 new messages