ThomasWaldmann / argparse

python argparse, pypi version (moved from google code)
Other
59 stars 18 forks source link

Backport allow_abbrev option from Python 3.5 #92

Closed jd closed 7 years ago

ThomasWaldmann commented 9 years ago

Looks good. Do you need this in here for 2.6 compatibility?

jd commented 9 years ago

No, I don't care about Python 2.6 personally. I just need to for all Python < 3.5 though.

ThomasWaldmann commented 9 years ago

Well, a while ago I did a fix here to make a bug in python 3.2.early go away.

But then I noticed that when you have a python that HAS argparse in its stdlib (like 3.2) AND you install argparse from pypi additionally (to fix or add stuff, wanting to override stdlib), python will still import argparse from stdlib if you just do "import argparse", not the pypi package.

For my issue, I just added a non-broken argparse from 3.2.late to package.support.argparse and imported from there. crappy, but worked.

jd commented 9 years ago

Thanks for the heads-up @ThomasWaldmann. This really sucks indeed :(

dominik-jastrzebski commented 8 years ago

@jd @ThomasWaldmann any update? It would be nice to have this feature backported.

ThomasWaldmann commented 8 years ago

@dominik-jastrzebski did you read my comment above? do you need this for python 2.6?

dominik-jastrzebski commented 8 years ago

@ThomasWaldmann No, I don't need it for Python 2.6. Python 2.7 is just fine. I read your comment above, but I don't understand the connection between merging this PR and problems with installing the library while it's included in the stdlib.

jd commented 8 years ago

Installing the lib in Python 2.7 won't override the builtin module. You can pip install this, it will never be used in Python 2.7.

jayvdb commented 8 years ago

... and having an updated argparse in Python 2.7+ is the job of a larger project like https://github.com/PythonCharmers/python-future