[issue33071] Document that PyPI no longer requires 'register'

2019-05-27 Thread hai shi
hai shi added the comment: I think you are right, so i remain meaningful intro. Anyone else has an thought? -- versions: -Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/issue33

[issue33071] Document that PyPI no longer requires 'register'

2019-05-26 Thread hai shi
hai shi added the comment: hi, everyone. I am a freshman,so let me do it from easy issues:) -- nosy: +shihai1991 ___ Python tracker <https://bugs.python.org/issue33

[issue33071] Document that PyPI no longer requires 'register'

2019-05-26 Thread hai shi
Change by hai shi : -- pull_requests: +13491 stage: backport needed -> patch review pull_request: https://github.com/python/cpython/pull/13584 ___ Python tracker <https://bugs.python.org/issu

[issue18299] Change script_helper to use universal_newlines=True in _assert_python

2019-06-05 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +13724 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/13847 ___ Python tracker <https://bugs.python.org/issu

[issue18299] Change script_helper to use universal_newlines=True in _assert_python

2019-06-05 Thread hai shi
hai shi added the comment: >it's a pain to extend the API (I don't want to use yet another __xxx custom >keyword) Adding __xxx in run_python_until_end function would increase the complexity but it looks like a unified function. -- nosy: +shih

[issue18299] Change script_helper to use universal_newlines=True in _assert_python

2019-06-08 Thread hai shi
Change by hai shi : -- pull_requests: +13781 pull_request: https://github.com/python/cpython/pull/13908 ___ Python tracker <https://bugs.python.org/issue18

[issue18299] Change script_helper to use universal_newlines=True in _assert_python

2019-06-13 Thread hai shi
hai shi added the comment: spawn_python in script_helper is good enough, so this bug looks like cloud be closed. -- ___ Python tracker <https://bugs.python.org/issue18

[issue37342] A type error in typeobj.rst

2019-06-19 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +14076 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14241 ___ Python tracker <https://bugs.python.org/issu

[issue37342] A type error in typeobj.rst

2019-06-19 Thread hai shi
New submission from hai shi : nb_index's type is unaryfunc -- assignee: docs@python components: Documentation messages: 346071 nosy: docs@python, shihai1991 priority: normal severity: normal status: open title: A type error in typeobj.rst ___ Python

[issue37342] A type error in typeobj.rst

2019-06-20 Thread hai shi
Change by hai shi : -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue37342> ___ ___ Python-bugs-

[issue37375] Fix a code style in dictobject.c

2019-06-23 Thread hai shi
Change by hai shi : -- components: Interpreter Core nosy: shihai1991 priority: normal severity: normal status: open title: Fix a code style in dictobject.c ___ Python tracker <https://bugs.python.org/issue37

[issue37375] Fix a code style in dictobject.c

2019-06-23 Thread hai shi
New submission from hai shi : # A small code style question: PyDictObject*mp should add a space:) PyDictObject *mp = (PyDictObject *)op -- ___ Python tracker <https://bugs.python.org/issue37

[issue37375] Fix a code style in dictobject.c

2019-06-23 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +14141 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14317 ___ Python tracker <https://bugs.python.org/issu

[issue18299] Change script_helper to use universal_newlines=True in _assert_python

2019-06-23 Thread hai shi
Change by hai shi : -- nosy: -shihai1991 ___ Python tracker <https://bugs.python.org/issue18299> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37377] unicode error should raise a value error

2019-06-23 Thread hai shi
hai shi added the comment: Got it, thank for your detailed explanation, steven. -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/i

[issue37377] unicode error should raise a value error

2019-06-23 Thread hai shi
New submission from hai shi : >>> "\x1" File "", line 1 SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 0-2: truncated \xXX escape I think rasing the valueError would be exact.(pep223 agree this behavior: https://www.pytho

[issue37375] Fix a code style in dictobject.c

2019-06-23 Thread hai shi
hai shi added the comment: Thanks, got it. -- ___ Python tracker <https://bugs.python.org/issue37375> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37300] a Py_XINCREF in classobject.c are not necessary

2019-06-16 Thread hai shi
New submission from hai shi : a Py_XINCREF in classobject.c are not necessary -- ___ Python tracker <https://bugs.python.org/issue37300> ___ ___ Python-bug

[issue37300] a Py_XINCREF in classobject.c are not necessary

2019-06-15 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +13969 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14120 ___ Python tracker <https://bugs.python.org/issu

[issue37300] a Py_XINCREF in classobject.c are not necessary

2019-06-15 Thread hai shi
Change by hai shi : -- components: Interpreter Core nosy: shihai1991 priority: normal severity: normal status: open title: a Py_XINCREF in classobject.c are not necessary type: enhancement ___ Python tracker <https://bugs.python.org/issue37

[issue37508] A wrong return type in memory.rst

2019-07-05 Thread hai shi
New submission from hai shi : the result should be a bytes object in #L70 in https://github.com/python/cpython/blob/master/Doc/c-api/memory.rst -- assignee: docs@python components: Documentation messages: 347356 nosy: docs@python, shihai1991 priority: normal severity: normal status

[issue37508] A wrong return type in memory.rst

2019-07-05 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +14419 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14604 ___ Python tracker <https://bugs.python.org/issu

[issue30090] Failed to build these modules: _ctypes

2019-07-05 Thread hai shi
hai shi added the comment: In centos, `sudo yum install -y libffi libffi-devel` should worked -- nosy: +shihai1991 ___ Python tracker <https://bugs.python.org/issue30

[issue37432] Fix a small param type in allocation.rst

2019-06-27 Thread hai shi
hai shi added the comment: Due to https://github.com/python/cpython/blob/master/Include/objimpl.h#L102, `void PyObject_Del(PyObject *op)` should be `void PyObject_Del(void *op)` -- ___ Python tracker <https://bugs.python.org/issue37

[issue37432] Fix a small param type allocation.rst

2019-06-27 Thread hai shi
Change by hai shi : -- assignee: docs@python components: Documentation nosy: docs@python, shihai1991 priority: normal severity: normal status: open title: Fix a small param type allocation.rst type: behavior ___ Python tracker <ht

[issue37432] Fix a small param type in allocation.rst

2019-06-27 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +14246 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14430 ___ Python tracker <https://bugs.python.org/issu

[issue37432] Fix a small param type in allocation.rst

2019-06-27 Thread hai shi
Change by hai shi : -- title: Fix a small param type allocation.rst -> Fix a small param type in allocation.rst ___ Python tracker <https://bugs.python.org/issu

[issue37432] Fix a small param type in allocation.rst

2019-06-28 Thread hai shi
Change by hai shi : -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue37432> ___ ___ Python-bugs-

[issue34697] ctypes: Crash if manually-created CField instance is used

2019-07-10 Thread hai shi
Change by hai shi : -- nosy: -shihai1991 ___ Python tracker <https://bugs.python.org/issue34697> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27379] SocketType changed in Python 3

2019-07-11 Thread hai shi
hai shi added the comment: In order to keep back compatible, I would prefer to update SocketType ;) -- nosy: +shihai1991 ___ Python tracker <https://bugs.python.org/issue27

[issue37566] Remove redudant code in socket.py

2019-07-11 Thread hai shi
New submission from hai shi : Looks like the _realsocket in socket.py is redudnat. But I am not sure somebody would use it or not. REF: https://github.com/python/cpython/blob/master/Lib/socket.py#L107 -- components: Library (Lib) messages: 347692 nosy: shihai1991 priority: normal

[issue27379] SocketType changed in Python 3

2019-07-11 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +14510 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14710 ___ Python tracker <https://bugs.python.org/issu

[issue37566] Remove redudant code in socket.py

2019-07-11 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +14511 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14711 ___ Python tracker <https://bugs.python.org/issu

[issue37583] Got a 113 error when running the test_socket

2019-07-13 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +14523 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14729 ___ Python tracker <https://bugs.python.org/issu

[issue37583] Got a 113 error when running the test_socket

2019-07-13 Thread hai shi
New submission from hai shi : When I run test_socket.py, I got a error. Looks it's a problem of security group. My env: a vm of centos May be I need add `EHOSTUNREACH` in support.get_socket_conn_refused_errs()? == FAIL

[issue37590] Remove redundant docs of PyEval_EvalFrameEx

2019-07-14 Thread hai shi
hai shi added the comment: sorry, the upstair's comment is wrong PyEval_EvalFrameEx have been updated. so remove redundant info:`It is literally 2000 lines long.` -- ___ Python tracker <https://bugs.python.org/issue37

[issue37590] Remove redundant docs of PyEval_EvalFrameEx

2019-07-14 Thread hai shi
New submission from hai shi : PyEval_EvalFrameEx have been updated. so remove redundant info in https://github.com/python/cpython/blob/master/Python/ceval.c#L733-L738 -- assignee: docs@python components: Documentation messages: 347874 nosy: docs@python, shihai1991 priority: normal

[issue37590] Remove redundant docs of PyEval_EvalFrameEx

2019-07-14 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +14560 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14765 ___ Python tracker <https://bugs.python.org/issu

[issue37590] Remove redundant docs of PyEval_EvalFrameEx

2019-07-14 Thread hai shi
hai shi added the comment: Thanks, Steve -- ___ Python tracker <https://bugs.python.org/issue37590> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37583] Got a 113 error when running the test_socket

2019-07-14 Thread hai shi
hai shi added the comment: sure, i copied the full output of test_socket. more failed test case looks like need add two property functions. -- Added file: https://bugs.python.org/file48480/test_socket_fail_info.txt ___ Python tracker <ht

[issue37583] Got a 113 error when running the test_socket

2019-07-13 Thread hai shi
hai shi added the comment: So I add this 113 error in `get_socket_conn_refused_errs` too ;) -- ___ Python tracker <https://bugs.python.org/issue37583> ___ ___

[issue37411] testEnviron (test.test_wsgiref.HandlerTests) fails when environment variable X is set

2019-07-02 Thread hai shi
Change by hai shi : -- pull_requests: +14383 pull_request: https://github.com/python/cpython/pull/14453 ___ Python tracker <https://bugs.python.org/issue37

[issue37451] Remove redudant test code in _testcapimodule.c

2019-06-30 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +14300 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14483 ___ Python tracker <https://bugs.python.org/issu

[issue37451] Remove redudant test code in _testcapimodule.c

2019-06-30 Thread hai shi
New submission from hai shi : the code in https://github.com/python/cpython/blob/master/Objects/unicodeobject.c#L3163-L3165 looks redundant, due to https://github.com/python/cpython/blob/master/Objects/unicodeobject.c#L3163-L3165 -- messages: 346923 nosy: shihai1991 priority: normal

[issue27679] set_bitfields() unused in _ctypes_test

2019-07-08 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +14459 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14648 ___ Python tracker <https://bugs.python.org/issu

[issue37187] CField.size from the ctypes module does not behave as documented on bitfields

2019-07-08 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +14458 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14647 ___ Python tracker <https://bugs.python.org/issu

[issue27679] set_bitfields() unused in _ctypes_test

2019-07-08 Thread hai shi
Change by hai shi : -- nosy: +shihai1991 versions: -Python 3.6 ___ Python tracker <https://bugs.python.org/issue27679> ___ ___ Python-bugs-list mailin

[issue37187] CField.size from the ctypes module does not behave as documented on bitfields

2019-07-08 Thread hai shi
Change by hai shi : -- nosy: +shihai1991 ___ Python tracker <https://bugs.python.org/issue37187> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29753] Ctypes Packing Bitfields Incorrectly - Linux

2019-07-14 Thread hai shi
Change by hai shi : -- nosy: +shihai1991 ___ Python tracker <https://bugs.python.org/issue29753> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37606] Improve test_dtrace.py

2019-07-16 Thread hai shi
New submission from hai shi : $ ./python -m unittest test.test_dtrace E == ERROR: setUpClass (test.test_dtrace.TraceTests) -- Traceback (most recent call

[issue37606] Improve test_dtrace.py

2019-07-16 Thread hai shi
hai shi added the comment: Thanks, copy that. -- ___ Python tracker <https://bugs.python.org/issue37606> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37606] Improve test_dtrace.py

2019-07-16 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +14592 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14796 ___ Python tracker <https://bugs.python.org/issu

[issue37476] Adding a unit test of unicode in test_unicode.py

2019-07-01 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +14344 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14531 ___ Python tracker <https://bugs.python.org/issu

[issue37476] Adding a unit test of unicode in test_unicode.py

2019-07-01 Thread hai shi
New submission from hai shi : As title, Adding a unit test of unicode in test_unicode.py. -- components: Tests messages: 347059 nosy: shihai1991 priority: normal severity: normal status: open title: Adding a unit test of unicode in test_unicode.py

[issue37411] testEnviron (test.test_wsgiref.HandlerTests) fails when environment variable X is set

2019-06-28 Thread hai shi
Change by hai shi : -- pull_requests: +14269 pull_request: https://github.com/python/cpython/pull/14453 ___ Python tracker <https://bugs.python.org/issue37

[issue37441] Fix a param error in exceptions.rst

2019-06-28 Thread hai shi
New submission from hai shi : Due to https://github.com/python/cpython/blob/master/Python/errors.c#L845-L846, `PyObject* PyErr_SetImportErrorSubclass(PyObject *msg, PyObject *name, PyObject *path)` should be `PyObject* PyErr_SetImportErrorSubclass(PyObject *exception, PyObject *msg, PyObject

[issue37441] Fix a param error in exceptions.rst

2019-06-28 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +14270 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14453 ___ Python tracker <https://bugs.python.org/issu

[issue37411] testEnviron (test.test_wsgiref.HandlerTests) fails when environment variable X is set

2019-07-02 Thread hai shi
Change by hai shi : -- pull_requests: +14375 pull_request: https://github.com/python/cpython/pull/14453 ___ Python tracker <https://bugs.python.org/issue37

[issue37583] Got a 113 error when running the test_socket

2019-08-12 Thread hai shi
hai shi added the comment: Oh, sorry, victor. I use ./python -m unittest xxx before. Updating the test result again. -- Added file: https://bugs.python.org/file48538/test_socket_fail_info_v2.txt ___ Python tracker <https://bugs.python.

[issue37583] Got a 113 error when running the test_socket

2019-08-13 Thread hai shi
Change by hai shi : -- pull_requests: +14978 pull_request: https://github.com/python/cpython/pull/15259 ___ Python tracker <https://bugs.python.org/issue37

[issue37750] PyBuffer_FromContiguous not documented

2019-08-03 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +14837 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15091 ___ Python tracker <https://bugs.python.org/issu

[issue37750] PyBuffer_FromContiguous not documented

2019-08-03 Thread hai shi
New submission from hai shi : as the title said. -- ___ Python tracker <https://bugs.python.org/issue37750> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37750] PyBuffer_FromContiguous not documented

2019-08-03 Thread hai shi
Change by hai shi : -- assignee: docs@python components: Documentation nosy: docs@python, shihai1991 priority: normal severity: normal status: open title: PyBuffer_FromContiguous not documented ___ Python tracker <https://bugs.python.org/issue37

[issue34697] ctypes: Crash if manually-created CField instance is used

2019-08-03 Thread hai shi
hai shi added the comment: ping -- ___ Python tracker <https://bugs.python.org/issue34697> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue19692] Rename Py_SAFE_DOWNCAST

2019-08-03 Thread hai shi
hai shi added the comment: Rename Py_SAFE_DOWNCAST in PR_15090. In the C API: Py_TRASHCAN_SAFE_BEGIN and Py_TRASHCAN_SAFE_END should be removed or keep it due to compatibility? In the stdlib: Looks that it's not changed is ok. -- nosy: +shihai1991

[issue19692] Rename Py_SAFE_DOWNCAST

2019-08-03 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +14835 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15090 ___ Python tracker <https://bugs.python.org/issu

[issue37681] warning: ‘no_sanitize_thread’

2019-08-03 Thread hai shi
hai shi added the comment: I checked no_sanitize_thread in some gcc manual of different version. And looks the no_sanitize_thread from gcc 5.1.0 [3](not 4.8) [1] https://gcc.gnu.org/onlinedocs/gcc-4.9.3/gcc/Function-Attributes.html#Function-Attributes [2] https://gcc.gnu.org/onlinedocs/gcc

[issue37752] Redundant Py_CHARMASK called in normalizestring(codecs.c)

2019-08-03 Thread hai shi
hai shi added the comment: Good catch ;), try to fix it, thanks. -- nosy: +shihai1991 ___ Python tracker <https://bugs.python.org/issue37752> ___ ___ Python-bug

[issue37751] In codecs, function 'normalizestring' should convert both spaces and hyphens to underscores.

2019-08-03 Thread hai shi
hai shi added the comment: Hm, there is a bit misleading between desc(https://github.com/python/cpython/blob/master/Python/codecs.c#L53) and the code (https://github.com/python/cpython/blob/master/Python/codecs.c#L74). -- nosy: +shihai1991

[issue37681] warning: ‘no_sanitize_thread’

2019-08-03 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +14843 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15096 ___ Python tracker <https://bugs.python.org/issu

[issue37752] Redundant Py_CHARMASK called in normalizestring(codecs.c)

2019-08-03 Thread hai shi
hai shi added the comment: Looks the PR is confused. Make sure: one PR on one dev branch. -- ___ Python tracker <https://bugs.python.org/issue37752> ___ ___

[issue9350] add remove_argument_group to argparse

2019-08-18 Thread hai shi
hai shi added the comment: IMHO, if we supply the ability to add an argument group, we need add the ability to remove the argument group too. -- nosy: +shihai1991 ___ Python tracker <https://bugs.python.org/issue9

[issue9350] add remove_argument_group to argparse

2019-08-18 Thread hai shi
hai shi added the comment: paul, raymond. Thanks for give me a quick answer:). Looks raymond's reason is good enough, i just only consider this question from api completeness(as paul said) not from user case. -- ___ Python tracker <ht

[issue37811] [FreeBSD, OSX] Socket module: incorrect usage of poll(2)

2019-08-11 Thread hai shi
hai shi added the comment: I found an OS distinguishing behavior in https://github.com/python/cpython/blob/master/Modules/selectmodule.c#L603-L612 -- nosy: +shihai1991 ___ Python tracker <https://bugs.python.org/issue37

[issue37496] Support annotations in signature strings.

2019-08-11 Thread hai shi
Change by hai shi : -- nosy: +shihai1991 ___ Python tracker <https://bugs.python.org/issue37496> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37887] some leak in the compiler_assert function

2019-08-19 Thread hai shi
New submission from hai shi : Some reference leak in compiler_assert function, due to not using Py_DECREF(assertion_error) before return. And having a question about code order in compiler_assert function. -- components: Interpreter Core files: compiler_assert.patch keywords: patch

[issue37887] some leak in the compiler_assert function

2019-08-20 Thread hai shi
hai shi added the comment: Ok, got it. -- ___ Python tracker <https://bugs.python.org/issue37887> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9938] Improving interactive use of argparse

2019-08-21 Thread hai shi
hai shi added the comment: It is a good idea. So I update this title and add PR 15362. I am not sure there have a problem of xuanli's CLA or not~ -- components: -Documentation nosy: +shihai1991 title: Documentation for argparse interactive use -> Improving interactive

[issue37698] Update doc of PyBuffer_ToContiguous

2019-08-21 Thread hai shi
Change by hai shi : -- nosy: +pitrou ___ Python tracker <https://bugs.python.org/issue37698> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue37775] update doc of compileall

2019-08-21 Thread hai shi
Change by hai shi : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue37750] PyBuffer_FromContiguous not documented

2019-08-21 Thread hai shi
Change by hai shi : -- nosy: +pitrou ___ Python tracker <https://bugs.python.org/issue37750> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue37908] Add some examples of ArgumentParser.exit()

2019-08-21 Thread hai shi
Change by hai shi : -- nosy: +paul.j3 ___ Python tracker <https://bugs.python.org/issue37908> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37908] Add some examples of ArgumentParser.exit()

2019-08-21 Thread hai shi
hai shi added the comment: issue 9938 -- ___ Python tracker <https://bugs.python.org/issue37908> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37908] Add some examples of ArgumentParser.exit()

2019-08-21 Thread hai shi
New submission from hai shi : As paul said in bpo 9938: The exit and error methods are mentioned in the 3.4 documentation, but there are no examples of modifying them. 16.4.5.9. Exiting methods ArgumentParser.exit(status=0, message=None) ArgumentParser.error(message) I

[issue37908] Add an example of ArgumentParser.exit()

2019-08-24 Thread hai shi
Change by hai shi : -- nosy: +bethard ___ Python tracker <https://bugs.python.org/issue37908> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37908] Add some examples of ArgumentParser.exit()

2019-08-24 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +15150 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15455 ___ Python tracker <https://bugs.python.org/issu

[issue37908] Add some examples of ArgumentParser.exit()

2019-08-24 Thread hai shi
hai shi added the comment: Adding an example of ArgumentParser.exit(), because some user would like cathing errors manually or consider exit progress or not when an error occurs. I have not add example of ArgumentParser.error(), because i can not think some user scenarios

[issue37908] Add an example of ArgumentParser.exit()

2019-08-24 Thread hai shi
Change by hai shi : -- title: Add some examples of ArgumentParser.exit() -> Add an example of ArgumentParser.exit() type: -> resource usage ___ Python tracker <https://bugs.python.org/i

[issue36267] User input to argparse raises Index_Error: "-a=" on a 'store_true' action

2019-09-02 Thread hai shi
Change by hai shi : -- pull_requests: +15323 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15656 ___ Python tracker <https://bugs.python.org/issu

[issue36267] User input to argparse raises Index_Error: "-a=" on a 'store_true' action

2019-09-02 Thread hai shi
hai shi added the comment: oh, sorry, pls ignore it. I misunderstand your opinion. -- type: crash -> behavior ___ Python tracker <https://bugs.python.org/issu

[issue36267] User input to argparse raises Index_Error: "-a=" on a 'store_true' action

2019-09-02 Thread hai shi
hai shi added the comment: Thanks, Raymond. This patch not a formal patch, just show what i want to do. if everything agree this behavior, I would add a normal PR. -- type: behavior -> crash ___ Python tracker <https://bugs.python.org/issu

[issue15125] argparse: positional arguments containing - in name not handled well

2019-08-29 Thread hai shi
hai shi added the comment: How about: 1. Adding documentation as steven said. 2. If user use '-' of positional arguments in latest cpython, we cloud remind user that `the '-' of positional arguments be replaced by '_' since cpython 4.0` 3.Applying Simon Law's patch. -- nosy

[issue36267] User input to argparse raises Index_Error: "-a=" on a 'store_true' action

2019-09-02 Thread hai shi
hai shi added the comment: I do something such as: p = argparse.ArgumentParser() p.add_argument('-a', action='store_true') p.add_argument('-b', action='store_true') p.parse_args('-ab='.split()) thos code code jump in 1903, and the explicit_arg's value is: 'b=' 1901 action_tuples.append

[issue36267] User input to argparse raises Index_Error: "-a=" on a 'store_true' action

2019-09-02 Thread hai shi
hai shi added the comment: Adding a judgment of explicit_args in judgment statement in the patch. -- keywords: +patch Added file: https://bugs.python.org/file48582/parse_v1.patch ___ Python tracker <https://bugs.python.org/issue36

[issue9938] Add optional kwargs to argparse

2019-08-23 Thread hai shi
Change by hai shi : -- title: Improving interactive use of argparse -> Add optional kwargs to argparse ___ Python tracker <https://bugs.python.org/iss

[issue9351] argparse set_defaults on subcommands should override top level set_defaults

2019-08-27 Thread hai shi
hai shi added the comment: How about use a flag(such USING_OUT_NAMESPACE) to identify we use namespace or not? For example: subnamespace, arg_strings = parser.parse_known_args(arg_strings, None) for key, value in vars(subnamespace).items(): if USING_OUT_NAMESPACE and not hasattr

[issue9938] Documentation for argparse interactive use

2019-08-21 Thread hai shi
Change by hai shi : -- pull_requests: +15073 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15362 ___ Python tracker <https://bugs.python.org/iss

[issue9938] Add optional kwargs to argparse

2019-09-04 Thread hai shi
Change by hai shi : -- nosy: +rhettinger ___ Python tracker <https://bugs.python.org/issue9938> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14364] Argparse incorrectly handles '--' as argument to option

2019-09-05 Thread hai shi
hai shi added the comment: some test cases which paul provided looks doesn't keep compatible. In TestDoubleDashRemoval: # output in my env is Namespace(cmd='cmd', foo=None, rest=['--', '--foo']) ('-- cmd -- -- --foo', NS(cmd='cmd', foo=None, rest=['--', '--', '--foo'])) # output in my env

[issue14364] Argparse incorrectly handles '--' as argument to option

2019-09-05 Thread hai shi
Change by hai shi : -- pull_requests: +15369 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15714 ___ Python tracker <https://bugs.python.org/issu

  1   2   3   4   5   6   7   8   >