This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Argparse calls ngettext but doesn't import it
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.2
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: eric.araujo Nosy List: bethard, doko, eric.araujo, johnohagan
Priority: normal Keywords:

Created on 2011-04-20 07:36 by johnohagan, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (5)
msg134126 - (view) Author: John O'Hagan (johnohagan) Date: 2011-04-20 07:36
Argparse in python3.2 includes two calls to ngettext to handle error messages, but ngettext is not imported. This causes NameError to be raised instead of ArgumentError.

Changing line 93 from:

    from gettext import gettext


    from gettext import gettext, ngettext 

seems to fix the problem.
msg134274 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-04-22 16:57
I added the import and calls in 1827a8ac9b18, so this report is strange.  What is your exact version and where did you get it?
msg134294 - (view) Author: John O'Hagan (johnohagan) Date: 2011-04-23 04:48
It's argparse version 1.1 (1.1-1) from current Debian testing, Python 3.2 (r32:88445, Feb 20 2011, 18:43:30)
msg134303 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-04-23 14:49
Confirmed.  It’s a Debian-specific problem, please use “reportbug python3.2” to report it to them.
msg134527 - (view) Author: John O'Hagan (johnohagan) Date: 2011-04-27 04:31
Reported to Debian, bug #624277
Date User Action Args
2022-04-11 14:57:16adminsetgithub: 56093
2011-04-27 04:31:28johnohagansetmessages: + msg134527
2011-04-23 14:49:13eric.araujosetstatus: open -> closed

nosy: + doko
messages: + msg134303

resolution: not a bug
stage: resolved
2011-04-23 04:48:26johnohagansetmessages: + msg134294
2011-04-22 16:57:09eric.araujosetassignee: eric.araujo

messages: + msg134274
nosy: + eric.araujo
2011-04-20 19:59:20ned.deilysetnosy: + bethard
2011-04-20 07:36:50johnohagancreate