Dhirajpandit / argparse

Automatically exported from code.google.com/p/argparse
Other
0 stars 0 forks source link

argparse 1.2 incompatible with Python 3.1 #82

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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.

Original issue reported on code.google.com by Arfrever...@gmail.com on 28 Mar 2011 at 10:25

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

Original comment by steven.b...@gmail.com on 30 Mar 2011 at 12:16

GoogleCodeExporter commented 8 years ago
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?

Original comment by Thomas.J...@gmail.com on 30 Mar 2011 at 1:54

GoogleCodeExporter commented 8 years ago
argparse is in stdlib in 2.7 and >=3.2, not 3.1.

Original comment by Arfrever...@gmail.com on 30 Mar 2011 at 1:55

GoogleCodeExporter commented 8 years ago
Should be fixed by this changeset, please see the commit comment and do a test:

http://code.google.com/p/argparse/source/detail?r=c1c83cae40ebebe8aeb89f212484a3
3296bc83be

Original comment by Thomas.J...@gmail.com on 30 Mar 2011 at 2:22

GoogleCodeExporter commented 8 years ago
Please apply the attached patch.

Original comment by Arfrever...@gmail.com on 30 Mar 2011 at 10:49

Attachments:

GoogleCodeExporter commented 8 years ago
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.

Original comment by Thomas.J...@gmail.com on 31 Mar 2011 at 8:59

GoogleCodeExporter commented 8 years ago
Thanks. Please release a new version (1.2.1 or 1.3).

Original comment by Arfrever...@gmail.com on 31 Mar 2011 at 2:09

GoogleCodeExporter commented 8 years ago
Yeah, 1.2.1 - soon! :)

Original comment by Thomas.J...@gmail.com on 31 Mar 2011 at 3:19

GoogleCodeExporter commented 8 years ago
1.2.1 released!

Original comment by Thomas.J...@gmail.com on 31 Mar 2011 at 9:51

GoogleCodeExporter commented 8 years ago
Thanks again for doing this!

Original comment by steven.b...@gmail.com on 1 Apr 2011 at 9:43