[issue44864] [argparse] Do not translate user-provided strings in `ArgumentParser.add_subparsers()`

2021-08-25 Thread Jérémie Detrey
Jérémie Detrey added the comment: Hi, Thank you for the clarification! In fact, I'm afraid the localization feature of `argparse` is undocumented. (At least, I couldn't find anything about it in the documentation.) A hint that modules should only take care of their own strings can however be

[issue44864] [argparse] Do not translate user-provided strings in `ArgumentParser.add_subparsers()`

2021-08-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: 'bug', for the tracker, mean a divergence between implementation and doc. Hence my question about the current doc. We could decide that either is wrong and should be changed. A change to meet 'expectations' and fix a 'design bug' is an enhancement. ---

[issue44864] [argparse] Do not translate user-provided strings in `ArgumentParser.add_subparsers()`

2021-08-24 Thread Jérémie Detrey
Jérémie Detrey added the comment: Hi Terry, Thanks for the feedback! I've just added a blurb to the PR. Regarding the issue type, even though this is indeed translation-related, I'd lean toward a bug report rather than an enhancement request: the fact that user-provided strings get fed to t

[issue44864] [argparse] Do not translate user-provided strings in `ArgumentParser.add_subparsers()`

2021-08-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: Jérémie, what does the doc say about translation? This will likely determine whether the is a bug report or a future-version-only enhancement request. The PR changes the two lines as indicated above and the CLA is signed. A blurb will be needed if this is t

[issue44864] [argparse] Do not translate user-provided strings in `ArgumentParser.add_subparsers()`

2021-08-08 Thread hai shi
Change by hai shi : -- nosy: +paul.j3, rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue44864] [argparse] Do not translate user-provided strings in `ArgumentParser.add_subparsers()`

2021-08-08 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch nosy: +python-dev nosy_count: 1.0 -> 2.0 pull_requests: +26156 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27667 ___ Python tracker _

[issue44864] [argparse] Do not translate user-provided strings in `ArgumentParser.add_subparsers()`

2021-08-08 Thread Jérémie Detrey
New submission from Jérémie Detrey : Dear all, In the `argparse` module, the `ArgumentParser.add_subparsers()` method may call the `_()` translation function on user-provided strings. See e.g. 3.9/Lib/argparse.py:1776 and 3.9/Lib/argparse.py:L1777: def add_subparsers(self, **kwargs):