[issue37224] [subinterpreters] test__xxsubinterpreters fails randomly

2021-06-08 Thread hai shi
Change by hai shi : -- pull_requests: +25182 pull_request: https://github.com/python/cpython/pull/26598 ___ Python tracker <https://bugs.python.org/issue37

[issue37224] [subinterpreters] test__xxsubinterpreters fails randomly

2021-06-15 Thread hai shi
Change by hai shi : -- pull_requests: +25320 pull_request: https://github.com/python/cpython/pull/26733 ___ Python tracker <https://bugs.python.org/issue37

[issue37224] [subinterpreters] test__xxsubinterpreters fails randomly

2021-07-19 Thread hai shi
hai shi added the comment: I use this add_printf_to_get_details_from_race_condition.patch to get some details of the running subinterpreter. The successful output of test_already_running: test_already_running (test.test__xxsubinterpreters.RunStringTests) ... In interp_create, the current

[issue37224] [subinterpreters] test__xxsubinterpreters fails randomly

2021-07-19 Thread hai shi
Change by hai shi : -- pull_requests: +25789 pull_request: https://github.com/python/cpython/pull/27240 ___ Python tracker <https://bugs.python.org/issue37

[issue43145] Leak of locks from multiprocessing.Process

2021-07-24 Thread hai shi
hai shi added the comment: > The following locks are leaked: > 1. > https://github.com/python/cpython/blob/196d4deaf4810a0bba75ba537dd40f2d71a5a634/Python/pystate.c#L78 > 2. > https://github.com/python/cpython/blob/196d4deaf4810a0bba75ba537dd40f2d71a5a634/Python/pystate.c#L8

[issue43967] Valgrind memcheck on Py_Initialize

2021-07-25 Thread hai shi
hai shi added the comment: Hi, Simon. Thanks for your report. There have an relatived issue in: bpo-43145, this bpo have mentioned `Py_Initialize()`. So I suggest to close this bpo. We can reopen it if we have seperated questions need to be discussed in here. > Running a Valgrind memch

[issue42035] [C API] PyType_GetSlot cannot get tp_name

2021-07-27 Thread hai shi
hai shi added the comment: > - there is still no way to get t.tp_name Can we create PyType_GetDataSlot function to return the data pointer? > If we go this way, why not add PyType_GetQualName as well? +1. I will create another PR after PR-23903

[issue44766] [easy doc] Remove redundant info in README.valgrind

2021-07-28 Thread hai shi
New submission from hai shi : Objects/obmalloc.c hasn't use the Py_USING_MEMORY_DEBUGGER macro now. So this line can be deleted. https://github.com/python/cpython/blob/31bec6f1b178dadec3cb43353274b4e958a8f015/Misc/README.valgrind#L17. -- assignee: docs@python components: Document

[issue44748] argparse: a bool indicating if arg was encountered

2021-07-28 Thread hai shi
Change by hai shi : -- nosy: +paul.j3, rhettinger ___ Python tracker <https://bugs.python.org/issue44748> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42035] [C API] PyType_GetSlot cannot get tp_name

2021-08-02 Thread hai shi
Change by hai shi : -- pull_requests: +26057 pull_request: https://github.com/python/cpython/pull/27551 ___ Python tracker <https://bugs.python.org/issue42

[issue42035] [C API] PyType_GetSlot cannot get tp_name

2021-08-02 Thread hai shi
hai shi added the comment: > - for the qualified name you can use `PyObject_GetAttrString(t, > "__qualname__")` After PR-27551 merged, we can use PyType_GetQualName() to get type's `__qualname__`. -- ___ Python tracker <

[issue42035] [C API] PyType_GetSlot cannot get tp_name

2021-08-06 Thread hai shi
Change by hai shi : -- pull_requests: +26143 pull_request: https://github.com/python/cpython/pull/27649 ___ Python tracker <https://bugs.python.org/issue42

[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 <https://bugs.python.org/issue44864> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44865] [argparse] Missing translations

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

[issue44050] [subinterpreters] _PyImport_FixupExtensionObject() regression in Python 3.9

2021-08-17 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +26263 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27794 ___ Python tracker <https://bugs.python.org/issu

[issue44050] [subinterpreters] _PyImport_FixupExtensionObject() regression in Python 3.9

2021-08-17 Thread hai shi
hai shi added the comment: > Maybe the old behavior was better: if an extension uses the old API, share > its state between all interpreters. +1. I create PR-27794, which use `def->m_slots` to identify the extension module created from `PyModule_Create()` or not.

[issue44050] [subinterpreters] _PyImport_FixupExtensionObject() regression in Python 3.9

2021-08-17 Thread hai shi
hai shi added the comment: > (Note that the "def->m_size == -1" means that the module does not support > sub-interpreters, because it has global state. Make Sense. It's more better and exact than my suggestion :) -- __

[issue42035] [C API] PyType_GetSlot cannot get tp_name

2021-08-17 Thread hai shi
hai shi added the comment: > Now, I wonder if we should also introduce PyType_GetModuleName for > __module__, or stop and close this as fixed. IMO, I suggest to close this bpo. We can get the `tp_name` by the C API now. If there have user want get `__module__`, we can open a new

[issue30924] RPM build doc_files needs files separated into separate lines

2021-08-21 Thread hai shi
hai shi added the comment: > Should this be closed? Copy from PEP-632: In Python 3.10 and 3.11, distutils will be formally marked as deprecated. All known issues will be closed at this time. I close this bpo. If there have some block issues to discuss, we can reopen it ag

[issue44913] segfault in call to embedded PyModule_New

2021-08-21 Thread hai shi
hai shi added the comment: How about this one? int foo(void) { printf(stderr, "foo BEGIN\n"); if (!Py_IsInitialized()) { fprintf(stderr, "python already initialized\n"); return -1; } const char *module_name = "foo"; PyGILState_STATE state = P

[issue44913] segfault in call to embedded PyModule_New

2021-08-22 Thread hai shi
hai shi added the comment: > which can be wrapped within the calls to PyGILState_Ensure/Release. OK, it's a good idea. But I think this enhancement will break the back compatibility. > python is initialized within that entrypoint python is initialized when you

[issue44913] segfault in call to embedded PyModule_New

2021-08-23 Thread hai shi
hai shi added the comment: > Or are you saying something can be done in Python's components to handle this use case transparently? so the user won't have to put GIL locks in his code. Sorry, I don't explain it good enough. You have said what I wanted to say:) > Yes, bu

[issue44913] segfault in call to embedded PyModule_New

2021-08-23 Thread hai shi
hai shi added the comment: This bpo isn't a bug, so I close it now. If there are some enhancements need to be discussed, we can reopen it:) -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python t

[issue45021] Race condition in thread.py

2021-08-30 Thread hai shi
hai shi added the comment: Is it a defined behavior? I got this sentence from pep-3148: Deadlock can occur when the callable associated with a Future waits on the results of another Future. -- nosy: +shihai1991 ___ Python tracker <ht

[issue45020] Freeze all modules imported during startup.

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

[issue45062] test_asyncio: test_huge_content_recvinto() failed on PPC64LE RHEL8 Refleaks 3.9

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

[issue44359] test_ftplib fails as "env changes" if a socket operation times out in a thread: TimeoutError is not catched

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

[issue40512] [subinterpreters] Meta issue: per-interpreter GIL

2021-09-05 Thread hai shi
hai shi added the comment: > PyStructSequence_InitType2() is not compatible with subinterpreters: it uses > static types. Moreover, it allocates tp_members memory which is not released > when the type is destroyed. But I'm not sure that the type is ever destroyed, >

[issue45113] [subinterpreters][C API] Add a new function to create PyStructSequence from Heap.

2021-09-06 Thread hai shi
New submission from hai shi : Copied from https://bugs.python.org/issue40512#msg399847: Victor: PyStructSequence_InitType2() is not compatible with subinterpreters: it uses static types. Moreover, it allocates tp_members memory which is not released when the type is destroyed. But I'

[issue40512] [subinterpreters] Meta issue: per-interpreter GIL

2021-09-06 Thread hai shi
hai shi added the comment: bpo-45113: [subinterpreters][C API] Add a new function to create PyStructSequence from Heap. -- versions: +Python 3.11 -Python 3.10 ___ Python tracker <https://bugs.python.org/issue40

[issue45113] [subinterpreters][C API] Add a new function to create PyStructSequence from Heap.

2021-09-06 Thread Hai Shi
Hai Shi added the comment: > But I encourage you to try, so you get a better understanding of the problem > :) OK, thanks, Petr. I try to add this C API to see what will happen :) -- ___ Python tracker <https://bugs.python.org/i

[issue45127] Code objects can contain unmarshallable objects

2021-09-07 Thread Hai Shi
Change by Hai Shi : -- nosy: +shihai1991 ___ Python tracker <https://bugs.python.org/issue45127> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45113] [subinterpreters][C API] Add a new function to create PyStructSequence from Heap.

2021-09-25 Thread Hai Shi
Hai Shi added the comment: > More generally, this would need solving one of the remaining limitations of > the limited API (PEPs 489, 630): type-specific data. Agree. We can't track and destroy the memory block created from t

[issue45113] [subinterpreters][C API] Add a new function to create PyStructSequence from Heap.

2021-09-26 Thread Hai Shi
Change by Hai Shi : -- keywords: +patch pull_requests: +26955 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28573 ___ Python tracker <https://bugs.python.org/issu

[issue45316] [C API] Functions not exported with PyAPI_FUNC()

2021-10-06 Thread Hai Shi
Change by Hai Shi : -- nosy: +shihai1991 ___ Python tracker <https://bugs.python.org/issue45316> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45315] `PyType_FromSpec` does not copy the name

2021-10-06 Thread Hai Shi
Hai Shi added the comment: > the simplest solution is calling `type_set_name`, even if that runs some > unnecessary checks. Hm, I haven't find any case who use dynamical tp_name of Type_Spec temporarily. If we meet this user case, Adding a new object pointer of type name in i

[issue45113] [subinterpreters][C API] Add a new function to create PyStructSequence from Heap.

2021-10-13 Thread Hai Shi
Hai Shi added the comment: > The only thing the proposed PR adds is a way to set ht_module, which actually > isn't very useful (it's used for module state access. Hm, there have some static types. so I create the PyStructSequence_FromModuleAndDes() could receive tp_flags

[issue44532] multi subinterpreters use _PyStructSequence_InitType failed.

2021-10-20 Thread Hai Shi
Hai Shi added the comment: > In _PyStructSequence_InitType, it will check type is initialized. It's a internal C API :) > when type already been initialized, should return 0 rather than throw > exception. The another solution is to check the type status

[issue45113] [subinterpreters][C API] Add a new function to create PyStructSequence from Heap.

2021-10-20 Thread Hai Shi
Hai Shi added the comment: >Ah, sorry, I overlooked the flags. It's Okay. >This does beg the question: what else from PyType_Spec will be needed? I guess we don't want to allow additional slots/methods. +1. >Also, note that converting the stdlib to heap types is suspend

[issue45113] [subinterpreters][C API] Add a new function to create PyStructSequence from Heap.

2021-10-23 Thread Hai Shi
Hai Shi added the comment: > PEP 3121 is not withdrawn; PEP 630 is not withdrawn. What is then expected of > a new PEP? Or the other way around: what is missing from those two PEPs? Thanks Erlend for the relative information you provided. AFAIK, the stdlib is not the extension

[issue45275] Make argparse print description of subcommand when invoke help doc on subcommand

2021-10-24 Thread Hai Shi
Hai Shi added the comment: Hi, Chuanlong. Would you mind to upload a demo for this question? -- nosy: +shihai1991 ___ Python tracker <https://bugs.python.org/issue45

[issue45444] test.test_concurrent_futures fail in x86_ 64 architecture

2021-11-02 Thread Hai Shi
Hai Shi added the comment: > I use the Linux operating system (openeuler), kernel version 4.19.90, GCC > version 7.3.0. I directly run the following statement in the virtual machine Hm. I haven't openeuler system, but I get docker container of the euler system. The tests have p

[issue45758] Crash on Py_DecRef'ing builtin object from previous run

2021-11-09 Thread Hai Shi
Hai Shi added the comment: Hi, Victor Milovanov. The memory allocated by interpreter will be freed after calling Py_Finalize(). -- nosy: +pablogsal, shihai1991 ___ Python tracker <https://bugs.python.org/issue45

[issue43588] [Subinterpreters]: use static variable under building Python with --with-experimental-isolated-subinterpreters cause crash.

2021-11-10 Thread Hai Shi
Change by Hai Shi : -- nosy: +shihai1991 ___ Python tracker <https://bugs.python.org/issue43588> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44532] multi subinterpreters use _PyStructSequence_InitType failed.

2021-11-14 Thread Hai Shi
Hai Shi added the comment: OK,thanks. If it's just only interal calling, I don't think throwing a exception would break anything. As your pasted code shows, the modules have judeged the tp_name is inited or not. -- ___ Python track

[issue44133] Some C-API symbols (e.g. Py_FrozenMain) are not always exported

2021-12-01 Thread Hai Shi
Change by Hai Shi : -- nosy: +shihai1991 nosy_count: 4.0 -> 5.0 pull_requests: +28101 pull_request: https://github.com/python/cpython/pull/29876 ___ Python tracker <https://bugs.python.org/issu

[issue11354] argparse: nargs could accept range of options count

2019-11-14 Thread hai shi
hai shi added the comment: Could we close some bpo with a long history? If some user need this feature in future we could reopen it. -- ___ Python tracker <https://bugs.python.org/issue11

[issue38956] argparse.BooleanOptionalAction should not add the default value to the help string by default

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

[issue39075] types.SimpleNamespace should preserve attribute ordering (?)

2019-12-21 Thread hai shi
hai shi added the comment: IMHO, dropping the sort should be a default behavior. If some user need this feature, maybe we could supply a param to open the sort function or not? -- nosy: +shihai1991 ___ Python tracker <https://bugs.python.

[issue39075] types.SimpleNamespace should preserve attribute ordering (?)

2019-12-22 Thread hai shi
hai shi added the comment: @Raymond OK, copy that. -- ___ Python tracker <https://bugs.python.org/issue39075> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39106] Add suggestions to argparse error message output for unrecognized arguments

2019-12-25 Thread hai shi
hai shi added the comment: I checked some other common clis and it is show all right available options too. So I thought the argparse's help function is good enough too ;) ``` $ ps -etest error: TTY could not be found Usage: ps [options] Try 'ps --help ' or 'ps --he

[issue39173] _AttributeHolder of argparse should support the sort function or not?

2019-12-31 Thread hai shi
New submission from hai shi : Currently, many developers discuss the output of attributes of argparse should be sorted or not? >>> from argparse import ArgumentParser >>> parser = ArgumentParser() >>> _ = parser.add_argument('outstream') >>>

[issue39075] types.SimpleNamespace should preserve attribute ordering (?)

2019-12-31 Thread hai shi
hai shi added the comment: >Consider opening a separate issue (or start a thread on python-ideas) >about adding a more sophisticated implementation to the stdlib's >"reprlib" module. If you do so then please draw from the >argparse._AttributeHolder implementation.

[issue39173] _AttributeHolder of argparse should support the sort function or not?

2019-12-31 Thread hai shi
hai shi added the comment: Users or developers interact with program by cli(argparse), so attributes' output order affect users' interaction. -- ___ Python tracker <https://bugs.python.o

[issue16399] argparse: append action with default list adds to list instead of overriding

2020-01-01 Thread hai shi
Change by hai shi : -- pull_requests: +17226 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17793 ___ Python tracker <https://bugs.python.org/issu

[issue16399] argparse: append action with default list adds to list instead of overriding

2020-01-02 Thread hai shi
Change by hai shi : -- nosy: +shihai1991 ___ Python tracker <https://bugs.python.org/issue16399> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39173] _AttributeHolder of argparse should support the sort function or not?

2020-01-02 Thread hai shi
hai shi added the comment: 1)>You'd need to elaborate on that. I've been using argparse for years and never once had presentational aspects affected by work. So, again, what is the actual use case for this? _AttributeHolder_ has sorted the args in `_get_kwargs()` and the off

[issue16399] argparse: append action with default list adds to list instead of overriding

2020-01-02 Thread hai shi
hai shi added the comment: I update the doc of argparse and think this bpo could be closed when PR merged. -- nosy: +rhettinger ___ Python tracker <https://bugs.python.org/issue16

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-01-05 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +17262 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/17835 ___ Python tracker <https://bugs.python.org/issue1

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-01-05 Thread hai shi
hai shi added the comment: One part of this issue is that all C extensions of the stdlib should be updated to implement the PEP 489 "Multi-phase extension module initialization". > I try to port _json extension module to multiphase initialization module, but > the baselin

[issue39197] argparse: title and description for mutually exclusive arg groups

2020-01-05 Thread hai shi
hai shi added the comment: Do you have user case for it? _ArgumentGroup have the `title` attribute, so _MutuallyExclusiveGroup add same attribute is not a big probleam(if user really need it). -- nosy: +shihai1991 ___ Python tracker <ht

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-01-06 Thread hai shi
Change by hai shi : -- pull_requests: +17299 pull_request: https://github.com/python/cpython/pull/17883 ___ Python tracker <https://bugs.python.org/issue1635

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-01-06 Thread hai shi
hai shi added the comment: Compare to _Py_ForgetReference(), _Py_INC_REFTOTAL in _Py_NewReference() looks redundant. REF: https://github.com/python/cpython/blob/master/Include/object.h#L442 master brach baseline in my vm: ``` sys.gettotalrefcount(): 18049 sys.gettotalrefcount(): 22463

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-01-11 Thread hai shi
hai shi added the comment: FWIW, i counted the difference of each file's refs after `Py_Finalize()`. [('Objects/dictobject.c', 21434), ('Python/marshal.c', 8135), ('Objects/codeobject.c', 6245), ('Objects/listobject.c', 6037), ('Objects/tu

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-01-16 Thread hai shi
Change by hai shi : -- pull_requests: +17425 pull_request: https://github.com/python/cpython/pull/18030 ___ Python tracker <https://bugs.python.org/issue1635

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-01-16 Thread hai shi
Change by hai shi : -- pull_requests: +17428 pull_request: https://github.com/python/cpython/pull/18032 ___ Python tracker <https://bugs.python.org/issue1635

[issue39378] partial of PickleState struct should be traversed.

2020-01-17 Thread hai shi
New submission from hai shi : As subject, looks partial of PickleState struct should be traversed. -- components: Extension Modules messages: 360236 nosy: shihai1991 priority: normal severity: normal status: open title: partial of PickleState struct should be traversed. type

[issue39378] partial of PickleState struct should be traversed.

2020-01-17 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +17441 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18046 ___ Python tracker <https://bugs.python.org/issu

[issue39173] _AttributeHolder of argparse should support the sort function or not?

2020-01-17 Thread hai shi
hai shi added the comment: paul said in issue 39058: `Anyways removing the sort makes sense, and the proposed change phrase "in the order attributes were added" is sufficiently general.` I agree paul's opinion now. The functionality meets users' needs now, so we don&#x

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-01-18 Thread hai shi
Change by hai shi : -- pull_requests: +17444 pull_request: https://github.com/python/cpython/pull/18049 ___ Python tracker <https://bugs.python.org/issue1635

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-01-18 Thread hai shi
Change by hai shi : -- pull_requests: +17445 pull_request: https://github.com/python/cpython/pull/18050 ___ Python tracker <https://bugs.python.org/issue1635

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-01-19 Thread hai shi
Change by hai shi : -- pull_requests: +17456 pull_request: https://github.com/python/cpython/pull/18065 ___ Python tracker <https://bugs.python.org/issue1635

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-01-19 Thread hai shi
Change by hai shi : -- pull_requests: +17457 pull_request: https://github.com/python/cpython/pull/18066 ___ Python tracker <https://bugs.python.org/issue1635

[issue39487] Merge duplicated _Py_IDENTIFIER identifiers in C code

2020-01-29 Thread hai shi
New submission from hai shi : As stinner said in issue19514 those _Py_IDENTIFIER should be merged: ./Modules/_ctypes/_ctypes.c:1054:_Py_IDENTIFIER(_type_); ./Modules/_ctypes/_ctypes.c:1132:_Py_IDENTIFIER(_type_); ./Modules/_ctypes/_ctypes.c:1494:_Py_IDENTIFIER(_type_); ./Modules

[issue39487] Merge duplicated _Py_IDENTIFIER identifiers in C code

2020-01-29 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +17631 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18254 ___ Python tracker <https://bugs.python.org/issu

[issue39487] Merge duplicated _Py_IDENTIFIER identifiers in C code

2020-01-29 Thread hai shi
Change by hai shi : -- nosy: +vstinner ___ Python tracker <https://bugs.python.org/issue39487> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39487] Merge duplicated _Py_IDENTIFIER identifiers in C code

2020-01-30 Thread hai shi
hai shi added the comment: If i understand clearly, msg360993 is an solution of issue39465. -- ___ Python tracker <https://bugs.python.org/issue39487> ___ ___

[issue37304] compiler need support in(de)crement operation or all of it should have syntax error.

2020-01-31 Thread hai shi
Change by hai shi : -- pull_requests: +17666 pull_request: https://github.com/python/cpython/pull/18292 ___ Python tracker <https://bugs.python.org/issue37

[issue37304] compiler need support in(de)crement operation or all of it should have syntax error.

2020-01-31 Thread hai shi
hai shi added the comment: A discussion was initiated in https://discuss.python.org/t/why-compiler-doesnt-support-in-de-crement-operation-should-we-support-it/2181. And most of user tend not to support this in(de)crement operation. -- ___ Python

[issue37304] compiler need support in(de)crement operation or all of it should have syntax error.

2020-01-31 Thread hai shi
hai shi added the comment: Steven, Thank you for your quick comment. sure, i will keep this bpo stay in `closed` status until enlist the support of core developers. -- ___ Python tracker <https://bugs.python.org/issue37

[issue37304] compiler need support in(de)crement operation or all of it should have syntax error.

2020-01-31 Thread hai shi
Change by hai shi : -- pull_requests: +17672 pull_request: https://github.com/python/cpython/pull/18297 ___ Python tracker <https://bugs.python.org/issue37

[issue14074] argparse allows nargs>1 for positional arguments but doesn't allow metavar to be a tuple

2020-01-31 Thread hai shi
hai shi added the comment: I am not sure disallowing tuple metavars would break backup compatibility or not~ -- nosy: +shihai1991 versions: +Python 3.5 -Python 3.3 ___ Python tracker <https://bugs.python.org/issue14

[issue39467] Allow to deprecate CLI arguments in argparse

2020-02-01 Thread hai shi
hai shi added the comment: IMHO, cli should only support atomic function.What is atomic functin? (if downstream software's feature can not keep alive without upstream fucntion, it must be an atomic function). -- nosy: +shihai1991 -4383 ___ P

[issue39464] Allow translating argparse error messages

2020-02-01 Thread hai shi
hai shi added the comment: Paste José's comment from PR17169: This message isn't used (only?) in exceptions... it's a message that is given to the console, to notify the user when she didn't provide correct parameters. For example: ``` $ python3 ./drt.py -l Uso: ./drt.

[issue39464] Allow translating argparse error messages

2020-02-01 Thread hai shi
hai shi added the comment: Users interact with console's output, so translated the output info is fine to me. Hi,raymond、paul. What's your opinion? -- ___ Python tracker <https://bugs.python.o

[issue39378] partial of PickleState struct should be traversed.

2020-02-01 Thread hai shi
Change by hai shi : -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue39378> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39527] Update doc of argparse.rst

2020-02-01 Thread hai shi
New submission from hai shi : 1. examples don't need import argparse much times(IMHO, it should be a default behavior); 2. argparse have no doctest, it's not a good behavior; -- assignee: docs@python components: Documentation messages: 361213 nosy: docs@python, mdk,

[issue39527] Update doc of argparse.rst

2020-02-01 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +17683 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18306 ___ Python tracker <https://bugs.python.org/issu

[issue14074] argparse allows nargs>1 for positional arguments but doesn't allow metavar to be a tuple

2020-02-01 Thread hai shi
Change by hai shi : -- versions: +Python 3.9 -Python 3.5 ___ Python tracker <https://bugs.python.org/issue14074> ___ ___ Python-bugs-list mailing list Unsub

[issue14074] argparse allows nargs>1 for positional arguments but doesn't allow metavar to be a tuple

2020-02-01 Thread hai shi
hai shi added the comment: > Given that tuple metavars currently doesn't work, there is no backward > compatibility issue. What is being proposed is to give more friendly error > messages. Got it, thanks. > Paul suggested that it may be a better plan to just disallow tupl

[issue39434] Remove unnecessary logic of float __floordiv__

2020-02-02 Thread hai shi
hai shi added the comment: Small style question: using 5 spaces in https://github.com/python/cpython/blob/master/Objects/floatobject.c#L655-L664 after PR 18147 merged. Due to bpo don't receive style quesiton, I commented here. -- nosy: +shiha

[issue39546] argparse: allow_abbrev=False is ignored for alternative prefix characters

2020-02-04 Thread hai shi
hai shi added the comment: Good catch, it apprears in my python env(master base) too. -- nosy: +paul.j3, rhettinger, shihai1991 ___ Python tracker <https://bugs.python.org/issue39

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-02-04 Thread hai shi
Change by hai shi : -- pull_requests: +17733 pull_request: https://github.com/python/cpython/pull/18358 ___ Python tracker <https://bugs.python.org/issue1635

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-02-05 Thread hai shi
Change by hai shi : -- pull_requests: +17740 pull_request: https://github.com/python/cpython/pull/18365 ___ Python tracker <https://bugs.python.org/issue1635

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-02-05 Thread hai shi
hai shi added the comment: i thinkt that not checking `PyModule_AddObject()`'s result may cause this probleam too. 1) python-ast.c have one question, i fix it in PR18358. 2) most of the questions in extension module, for example: https://github.com/python/cpython/blob/master/Mo

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-02-05 Thread hai shi
hai shi added the comment: update the above info: 1) python-ast.c have one question, i fix it in PR18365. -- ___ Python tracker <https://bugs.python.org/issue1635

[issue38823] Improve stdlib module initialization error handling.

2020-02-05 Thread hai shi
Change by hai shi : -- pull_requests: +17745 pull_request: https://github.com/python/cpython/pull/18365 ___ Python tracker <https://bugs.python.org/issue38

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-02-05 Thread hai shi
hai shi added the comment: > 1) python-ast.c have one question, i fix it in PR18365. > 2) most of the questions in extension module, for example: > https://github.com/python/cpython/blob/master/Modules/gcmodule.c#L2019-L2022 brandt does relevant work already in PR1727

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-02-06 Thread hai shi
Change by hai shi : -- pull_requests: +17750 pull_request: https://github.com/python/cpython/pull/18374 ___ Python tracker <https://bugs.python.org/issue1635

[issue39465] Design a subinterpreter friendly alternative to _Py_IDENTIFIER

2020-02-06 Thread hai shi
hai shi added the comment: > The GIL avoids any risk of race condition, no? Looks like the GIL would affect performance more or less? >_Py_IDENTIFIER() would only be a "key" and _PyUnicode_FromId() would >store >the value somewhere in a hash table stored in PyInterp

<    1   2   3   4   5   6   7   8   >