[issue45691] Partial moving of core objects to interpreter state is incorrect at best, unsafe at worse.
Change by Hai Shi : -- nosy: +shihai1991 ___ Python tracker <https://bugs.python.org/issue45691> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46417] [subinterpreters] Clear static types in Py_Finalize()
Change by Hai Shi : -- nosy: +shihai1991 ___ Python tracker <https://bugs.python.org/issue46417> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46368] faulthandler: add the ability to dump all interpreters, not only the current interpreter
Change by Hai Shi : -- nosy: +shihai1991 ___ Python tracker <https://bugs.python.org/issue46368> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45113] [subinterpreters][C API] Add a new function to create PyStructSequence from Heap.
Hai Shi added the comment: > If not, I'd like to close this (with apologies for not doing my research and > letting Hai Shi do unmerged work). > If a use case is found, I suspect it'll need a different solution – perhaps > allowing PyType_Slot·s OK, I close this bpo. We can reopen or create a new bpo if we find a useful user case. Thank you all for joining this bpo :) -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue45113> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46647] `test_functools` unexpected failures when C `_functoolsmodule` is missing
Hai Shi added the comment: > _functoolsmodule is a core bootstrap module and defined in > Modules/Setup.bootstrap. It has no external dependencies. There is no reason > and no point to disable the module. +1. > Cristian, in this case - is there a reason to keep `skipUnless(c_functools)` > around? > If we are sure that it is always available - then it should be always tested. Hm. Personally, I suggest to keep the `skipUnless` to aovid the code churn. Or maybe you have other cases to show the functools module will missing unexpectly? -- ___ Python tracker <https://bugs.python.org/issue46647> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46613] Add PyType_GetModuleByDef to the public & limited API
Change by Hai Shi : -- nosy: +shihai1991 ___ Python tracker <https://bugs.python.org/issue46613> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37583] Got a 113 error when running the test_socket
Change by hai shi : -- pull_requests: +14978 pull_request: https://github.com/python/cpython/pull/15259 ___ Python tracker <https://bugs.python.org/issue37583> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9350] add remove_argument_group to argparse
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/issue9350> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9350] add remove_argument_group to argparse
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 <https://bugs.python.org/issue9350> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37887] some leak in the compiler_assert function
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 messages: 349959 nosy: pitrou, shihai1991, vstinner priority: normal severity: normal status: open title: some leak in the compiler_assert function type: resource usage versions: Python 3.9 Added file: https://bugs.python.org/file48550/compiler_assert.patch ___ Python tracker <https://bugs.python.org/issue37887> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37887] some leak in the compiler_assert function
hai shi added the comment: Ok, got it. -- ___ Python tracker <https://bugs.python.org/issue37887> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9938] Documentation for argparse interactive use
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/issue9938> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9938] Improving interactive use of argparse
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 use of argparse versions: +Python 3.9 -Python 2.7, Python 3.3, Python 3.4 ___ Python tracker <https://bugs.python.org/issue9938> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37775] update doc of compileall
Change by hai shi : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue37775> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37750] PyBuffer_FromContiguous not documented
Change by hai shi : -- nosy: +pitrou ___ Python tracker <https://bugs.python.org/issue37750> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37698] Update doc of PyBuffer_ToContiguous
Change by hai shi : -- nosy: +pitrou ___ Python tracker <https://bugs.python.org/issue37698> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37908] Add some examples of ArgumentParser.exit()
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 will update the examples in this weekend. -- assignee: docs@python components: Documentation messages: 350097 nosy: docs@python, shihai1991 priority: normal severity: normal status: open title: Add some examples of ArgumentParser.exit() ___ Python tracker <https://bugs.python.org/issue37908> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37908] Add some examples of ArgumentParser.exit()
hai shi added the comment: issue 9938 -- ___ Python tracker <https://bugs.python.org/issue37908> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37908] Add some examples of ArgumentParser.exit()
Change by hai shi : -- nosy: +paul.j3 ___ Python tracker <https://bugs.python.org/issue37908> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9938] Add optional kwargs to argparse
Change by hai shi : -- title: Improving interactive use of argparse -> Add optional kwargs to argparse ___ Python tracker <https://bugs.python.org/issue9938> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37908] Add some examples of ArgumentParser.exit()
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/issue37908> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37908] Add some examples of ArgumentParser.exit()
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:( -- ___ Python tracker <https://bugs.python.org/issue37908> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37908] Add an example of ArgumentParser.exit()
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/issue37908> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37908] Add an example of ArgumentParser.exit()
Change by hai shi : -- nosy: +bethard ___ Python tracker <https://bugs.python.org/issue37908> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9351] argparse set_defaults on subcommands should override top level set_defaults
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(namespace, key): setattr(namespace, key, value) -- nosy: +shihai1991 ___ Python tracker <https://bugs.python.org/issue9351> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15125] argparse: positional arguments containing - in name not handled well
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: +shihai1991 ___ Python tracker <https://bugs.python.org/issue15125> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36267] User input to argparse raises Index_Error: "-a=" on a 'store_true' action
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((action, [], option_string)) 1902 char = option_string[0] 1903 option_string = char + explicit_arg[0] IMHO, we should judge this explicit_arg's value before jump this judgment statement. -- nosy: +shihai1991 ___ Python tracker <https://bugs.python.org/issue36267> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36267] User input to argparse raises Index_Error: "-a=" on a 'store_true' action
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/issue36267> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36267] User input to argparse raises Index_Error: "-a=" on a 'store_true' action
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/issue36267> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36267] User input to argparse raises Index_Error: "-a=" on a 'store_true' action
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/issue36267> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36267] User input to argparse raises Index_Error: "-a=" on a 'store_true' action
hai shi added the comment: oh, sorry, pls ignore it. I misunderstand your opinion. -- type: crash -> behavior ___ Python tracker <https://bugs.python.org/issue36267> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9938] Add optional kwargs to argparse
Change by hai shi : -- nosy: +rhettinger ___ Python tracker <https://bugs.python.org/issue9938> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14364] Argparse incorrectly handles '--' as argument to option
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 is Namespace(cmd='--', foo='1', rest=['1', '2']) ('-f1 -- -- 1 -- 2', NS(cmd='--', foo='1', rest=['1', '--', '2'])) # output in my env is Namespace(cmd='--foo', foo=None, rest=['--bar', '2']) ('-- --foo -- --bar 2', NS(cmd='--foo', foo=None, rest=['--', '--bar', '2'])) # output in my env is Namespace(cmd='cmd', foo=None, rest=['--foo', '-f2']) ('cmd -- --foo -- -f2', NS(cmd='cmd', foo=None, rest=['--foo', '--', '-f2'])) In TestDoubleDashRemoval1: # output in my env is Namespace(cmd='cmd', foo='1', rest=['-f2', '3']) ('-f1 -- cmd -- -f2 3', NS(cmd='cmd', foo='1', rest=['--', '-f2', '3'])) my python's version is: 2.7.5, 3.6.8 -- nosy: +shihai1991 ___ Python tracker <https://bugs.python.org/issue14364> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14364] Argparse incorrectly handles '--' as argument to option
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/issue14364> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14364] Argparse incorrectly handles '--' as argument to option
Change by hai shi : -- nosy: +rhettinger type: -> behavior ___ Python tracker <https://bugs.python.org/issue14364> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38053] Update plistlib documentation
hai shi added the comment: >* Remove notes about the new API being added in 3.4 since 3.4 is no longer >supported Related bpo in issue14455 -- nosy: +shihai1991 ___ Python tracker <https://bugs.python.org/issue38053> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37750] PyBuffer_FromContiguous not documented
Change by hai shi : -- pull_requests: +15617 pull_request: https://github.com/python/cpython/pull/15988 ___ Python tracker <https://bugs.python.org/issue37750> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9938] Add optional keyword argument exit_on_error to argparse.ArgumentParser
hai shi added the comment: Stéphane, thanks for your good comment. Some argparse's bpo is too old ;) -- ___ Python tracker <https://bugs.python.org/issue9938> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38168] Reflaks in setint() of mmapmodule.c
New submission from hai shi : As the title said, in `setint` function, the refcount of `o` should decreased all the time. -- components: Interpreter Core messages: 352412 nosy: shihai1991 priority: normal severity: normal status: open title: Reflaks in setint() of mmapmodule.c type: behavior ___ Python tracker <https://bugs.python.org/issue38168> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38168] Refleaks in setint() of mmapmodule.c
Change by hai shi : -- title: Reflaks in setint() of mmapmodule.c -> Refleaks in setint() of mmapmodule.c ___ Python tracker <https://bugs.python.org/issue38168> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38168] Refleaks in setint() of mmapmodule.c
Change by hai shi : -- keywords: +patch pull_requests: +15746 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16136 ___ Python tracker <https://bugs.python.org/issue38168> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19692] Rename Py_SAFE_DOWNCAST
hai shi added the comment: Looks we have a fast version rhythm. IMHO, If user would be affected and reported, reversing the PR is ok. -- ___ Python tracker <https://bugs.python.org/issue19692> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38253] Fix typo of Py_SET_ERANGE_IF_OVERFLOW in pyport.h
New submission from hai shi : Py_SET_ERANGE_ON_OVERFLOW should be changed to Py_SET_ERANGE_IF_OVERFLOW in pyport.h. -- assignee: docs@python components: Documentation messages: 352981 nosy: docs@python, shihai1991 priority: normal severity: normal status: open title: Fix typo of Py_SET_ERANGE_IF_OVERFLOW in pyport.h versions: Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue38253> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38253] Fix typo of Py_SET_ERANGE_IF_OVERFLOW in pyport.h
Change by hai shi : -- keywords: +patch pull_requests: +15906 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16230 ___ Python tracker <https://bugs.python.org/issue38253> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38273] Got an compile failed info about typeobject.c
New submission from hai shi : Got an compile error, my OS is gcc version 4.8.5 20150623 (Red Hat 4.8.5-36: CC='gcc -pthread' LDSHARED='gcc -pthread -shared' OPT='-g -Og -Wall' _TCLTK_INCLUDES='' _TCLTK_LIBS='' ./python -E ./setup.py build python: Objects/typeobject.c:2867: PyType_FromSpecWithBases: Assertion `memb->type == 19' failed. /bin/sh: line 9: 32047 Aborted CC='gcc -pthread' LDSHARED='gcc -pthread -shared' OPT='-g -Og -Wall' _TCLTK_INCLUDES='' _TCLTK_LIBS='' ./python -E ./setup.py $quiet build make: *** [sharedmods] Error 134 the relevant bpo is https://bugs.python.org/issue38140, i have no enough time see the detail, so just report it for now. -- components: Interpreter Core messages: 353178 nosy: shihai1991 priority: normal severity: normal status: open title: Got an compile failed info about typeobject.c type: compile error versions: Python 3.9 ___ Python tracker <https://bugs.python.org/issue38273> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38140] Py_tp_dictoffset / Py_tp_finalize are unsettable in stable API
hai shi added the comment: Got an compile error, i have not check the detail for now: python: Objects/typeobject.c:2867: PyType_FromSpecWithBases: Assertion `memb->type == 19' failed. i report it in bpo 38273 -- nosy: +shihai1991 ___ Python tracker <https://bugs.python.org/issue38140> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38273] Got an compile failed info about typeobject.c
hai shi added the comment: oh, thanks, guys. This error info is disappeared when i followed victor's advice. It must be i changed the configure/make file by accident. Sorry for this noisy info -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue38273> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14364] Argparse incorrectly handles '--' as argument to option
hai shi added the comment: Hi, Jonas. Thanks for your report. Let us wait core team's discuss;) -- ___ Python tracker <https://bugs.python.org/issue14364> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38383] undefined behavior in tailmatch() of bytes_methods.c
New submission from hai shi : `if (start + slen > len)` would cause undefined behavior? such as: start=PY_SSIZE_T_MAX, slen=1 REFS: [1] https://github.com/python/cpython/blob/master/Objects/bytes_methods.c#L746 -- components: Interpreter Core messages: 354032 nosy: shihai1991 priority: normal severity: normal status: open title: undefined behavior in tailmatch() of bytes_methods.c type: enhancement versions: Python 3.9 ___ Python tracker <https://bugs.python.org/issue38383> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38383] undefined behavior in tailmatch() of bytes_methods.c
Change by hai shi : -- keywords: +patch pull_requests: +16191 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16603 ___ Python tracker <https://bugs.python.org/issue38383> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14364] Argparse incorrectly handles '--' as argument to option
hai shi added the comment: > The PR's Misc/NEWS entry, "Fix behavior of argparse when '--' as argument to > option", is insufficient. Thanks for your comment, Raymond. I would continue update the desc. -- ___ Python tracker <https://bugs.python.org/issue14364> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38390] Got an compile warning in dictobject.c
New submission from hai shi : The warning detail: Objects/dictobject.c: In function ‘_PyDictView_Intersect’: Objects/dictobject.c:4189:15: warning: unused variable ‘tmp’ [-Wunused-variable] PyObject *tmp; ^ -- components: Build messages: 354068 nosy: shihai1991 priority: normal severity: normal status: open title: Got an compile warning in dictobject.c type: compile error versions: Python 3.9 ___ Python tracker <https://bugs.python.org/issue38390> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38390] Got a compile warning in dictobject.c
Change by hai shi : -- title: Got an compile warning in dictobject.c -> Got a compile warning in dictobject.c ___ Python tracker <https://bugs.python.org/issue38390> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38390] Got a compile warning in dictobject.c
Change by hai shi : -- keywords: +patch pull_requests: +16198 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16610 ___ Python tracker <https://bugs.python.org/issue38390> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16623] argparse help formatter does not honor non-breaking space
hai shi added the comment: I checked the help format. the help_lines' width in python2.7 is different python3. The width is more likely a hardcode in https://github.com/python/cpython/blob/2.7/Lib/argparse.py#L165. , so the help_lines = [u'This is a very long help string. ex: "--s3', u's3://my.bucket/dir1/dir2"'](when joining this help_lines it will add a '\n' in the middle) Since python 3.3, the width is a dynamic value in https://github.com/python/cpython/blob/master/Lib/argparse.py#L170 , so the help_lines = ['This is a very long help string. ex: "--s3\xa0s3://my.bucket/dir1/dir2"'] -- nosy: +shihai1991 ___ Python tracker <https://bugs.python.org/issue16623> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16623] argparse help formatter does not honor non-breaking space
hai shi added the comment: oh, typo error. the help_lines' width in python2.7 is different python3.-->the help_lines' width in python2.7 is different with python3.x -- ___ Python tracker <https://bugs.python.org/issue16623> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38419] The path of check-c-globals.py on README is wrong
hai shi added the comment: Maybe the keyword need add the `easy` wrod? (i don't know the internals) newcomer need find it in `Easy issues` ;) -- nosy: +shihai1991 ___ Python tracker <https://bugs.python.org/issue38419> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38465] The type of ob_exports in PyByteArrayObject become Py_ssize_t.
New submission from hai shi : for a code example: ``` v = [] b = bytearray(0x) for i in range(2**31+1) # the ob_exports would be overflow in 32 bit machine when i = 2**31. v.append(memoryview(b)) ``` IMHO, i thought converting the type of ob_exports to Py_ssize_t is fine. PS: I have no actual user scenario. -- components: Interpreter Core messages: 354586 nosy: shihai1991 priority: normal severity: normal status: open title: The type of ob_exports in PyByteArrayObject become Py_ssize_t. type: enhancement versions: Python 3.9 ___ Python tracker <https://bugs.python.org/issue38465> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38465] The type of ob_exports in PyByteArrayObject become Py_ssize_t.
Change by hai shi : -- keywords: +patch pull_requests: +16322 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16746 ___ Python tracker <https://bugs.python.org/issue38465> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38465] The type of ob_exports in PyByteArrayObject become Py_ssize_t.
hai shi added the comment: sorry, typo error. # the ob_exports would be overflow in 32 bit machine when i = 2**31. --> # the ob_exports would be overflow in 64 bit machine when i = 2**31. -- ___ Python tracker <https://bugs.python.org/issue38465> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38465] The type of ob_exports in PyByteArrayObject become Py_ssize_t.
hai shi added the comment: Thanks, Serhiy, you are right. -- ___ Python tracker <https://bugs.python.org/issue38465> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38600] Change the mark up of NULL
hai shi added the comment: In 'If *exc* is *NULL*, then the exception is cleared and the value is clipped to *PY_SSIZE_T_MIN* for a negative integer or *PY_SSIZE_T_MAX* for a positive integer.', should PY_SSIZE_T_MIN and PY_SSIZE_T_MAX be changed too? -- nosy: +shihai1991 ___ Python tracker <https://bugs.python.org/issue38600> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38600] Change the mark up of NULL
hai shi added the comment: Ok, it's fine to me. -- ___ Python tracker <https://bugs.python.org/issue38600> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38616] Using Py_XDECREF to replace Py_DECREF in PyAST_FromNodeObject()
New submission from hai shi : `if (c.c_normalize) { Py_DECREF(c.c_normalize); }` --> `Py_XDECREF(c.c_normalize);` -- components: Interpreter Core messages: 355545 nosy: shihai1991 priority: normal severity: normal status: open title: Using Py_XDECREF to replace Py_DECREF in PyAST_FromNodeObject() type: enhancement versions: Python 3.9 ___ Python tracker <https://bugs.python.org/issue38616> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38616] Using Py_XDECREF to replace Py_DECREF in PyAST_FromNodeObject()
Change by hai shi : -- keywords: +patch pull_requests: +16490 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16962 ___ Python tracker <https://bugs.python.org/issue38616> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38617] Using Py_XINCREF to replace Py_INCREF in PyAST_CompileObject
New submission from hai shi : 1) param is unpredictable; 2) the compiler_free() use Py_XDECREF(c->c_filename) in PyAST_CompileObject(); -- components: Interpreter Core messages: 355547 nosy: shihai1991 priority: normal severity: normal status: open title: Using Py_XINCREF to replace Py_INCREF in PyAST_CompileObject type: enhancement versions: Python 3.9 ___ Python tracker <https://bugs.python.org/issue38617> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38617] Using Py_XINCREF to replace Py_INCREF in PyAST_CompileObject
Change by hai shi : -- keywords: +patch pull_requests: +16491 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16963 ___ Python tracker <https://bugs.python.org/issue38617> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38618] Why not use refcount of c.c_filename in PyAST_FromNodeObject()
New submission from hai shi : I don't know why don't use refcount ` /* borrowed reference */ c.c_filename = filename; ` in https://github.com/python/cpython/blob/master/Python/ast.c#L786-L787 like ` Py_INCREF(filename); c.c_filename = filename; ` in https://github.com/python/cpython/blob/master/Python/compile.c#L333 -- components: Interpreter Core messages: 355548 nosy: shihai1991 priority: normal severity: normal status: open title: Why not use refcount of c.c_filename in PyAST_FromNodeObject() type: enhancement versions: Python 3.9 ___ Python tracker <https://bugs.python.org/issue38618> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38618] Why not use refcount of c.c_filename in PyAST_FromNodeObject()
hai shi added the comment: Due to victor add the desc(`/* borrowed reference */`) so noisy+ victor ;) -- nosy: +vstinner ___ Python tracker <https://bugs.python.org/issue38618> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38617] Using Py_XINCREF to replace Py_INCREF in PyAST_CompileObject
hai shi added the comment: Got it, thanks, Serhiy. -- ___ Python tracker <https://bugs.python.org/issue38617> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38618] Why not use refcount of c.c_filename in PyAST_FromNodeObject()
hai shi added the comment: > I don't understand the purpose of this issue. The bug tracker is not the > right place to ask question. If you think that it's a bug, please explain how > to trigger the bug. Hi, victor. What i want to express is that the refcount operation of filename should be same between ast.c and compile.c. I am not sure i express it clearly. If the refcount of filename in ast.c is redundant as Serhiy said, maybe we should remove it? Hm, If we think it's fine, just keep it, i will close it soon. And pls forgive me adding a noisy bpo again ;( -- ___ Python tracker <https://bugs.python.org/issue38618> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38618] Why not use refcount of c.c_filename in PyAST_FromNodeObject()
hai shi added the comment: Thanks for your patience, Serhiy. IMHO, i called the moving operation `clean code`: Consistent understanding, Consistent code. And the `clean code` should be a part of `enhancement`. -- ___ Python tracker <https://bugs.python.org/issue38618> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11354] argparse: nargs could accept range of options count
hai shi added the comment: I think the answer is 'yes'(It's over 8 years~). And tons of argparse'work need to be finished;) -- nosy: +shihai1991 ___ Python tracker <https://bugs.python.org/issue11354> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details
Change by hai shi : -- nosy: +shihai1991 nosy_count: 8.0 -> 9.0 pull_requests: +23686 pull_request: https://github.com/python/cpython/pull/24922 ___ Python tracker <https://bugs.python.org/issue35134> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43554] email: encoded headers lose their quoting when refolded
Change by hai shi : -- nosy: +barry, maxking, r.david.murray ___ Python tracker <https://bugs.python.org/issue43554> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41551] test.support has way too many imports in libregrtest
hai shi added the comment: There have another related issue and have been fixed now in bpo 41718. So I suggest to close this bpo. -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue41551> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41551] test.support has way too many imports in libregrtest
hai shi added the comment: bpo-41718 -- ___ Python tracker <https://bugs.python.org/issue41551> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4111] Add Systemtap/DTrace probes
Change by hai shi : -- nosy: +shihai1991 nosy_count: 25.0 -> 26.0 pull_requests: +23859 pull_request: https://github.com/python/cpython/pull/25115 ___ Python tracker <https://bugs.python.org/issue4111> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41111] [C API] Convert a few stdlib extensions to the limited C API (PEP 384)
Change by hai shi : -- keywords: +patch pull_requests: +23864 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25115 ___ Python tracker <https://bugs.python.org/issue4> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4111] Add Systemtap/DTrace probes
Change by hai shi : -- pull_requests: -23859 ___ Python tracker <https://bugs.python.org/issue4111> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41111] [C API] Convert a few stdlib extensions to the limited C API (PEP 384)
hai shi added the comment: > By the way, maybe Py_LIMITED_API should be defined in xxlimited.c, rather > than in setup.py. +1. Defining Py_LIMITED_API in xxlimited.c is more direct than in setup.py. so I created the PR-25115. -- ___ Python tracker <https://bugs.python.org/issue4> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4111] Add Systemtap/DTrace probes
Change by hai shi : -- pull_requests: +23865 pull_request: https://github.com/python/cpython/pull/25115 ___ Python tracker <https://bugs.python.org/issue4111> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41111] [C API] Convert a few stdlib extensions to the limited C API (PEP 384)
Change by hai shi : -- pull_requests: +23922 pull_request: https://github.com/python/cpython/pull/25180 ___ Python tracker <https://bugs.python.org/issue4> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41111] [C API] Convert a few stdlib extensions to the limited C API (PEP 384)
hai shi added the comment: > Perhaps it would be better that compiling them not be attempted with > configuring --with-trace-refs? +1. The limited C API can't be build under Py_TRACE_REFS now. -- ___ Python tracker <https://bugs.python.org/issue4> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak
Change by hai shi : -- nosy: +shihai1991 nosy_count: 12.0 -> 13.0 pull_requests: +23963 pull_request: https://github.com/python/cpython/pull/25226 ___ Python tracker <https://bugs.python.org/issue37788> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43753] [C API] Add Py_Is(x, y) and Py_IsNone(x) functions
Change by hai shi : -- nosy: +shihai1991 ___ Python tracker <https://bugs.python.org/issue43753> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak
hai shi added the comment: I created PR 25226. It's a another way to solve this problem. Compared to PR 15175, `_set_sentinel()` don't need to receive any params :) -- ___ Python tracker <https://bugs.python.org/issue37788> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43845] test_concurrent_futures leaks many dangling threads on FreeBSD
Change by hai shi : -- nosy: +shihai1991 ___ Python tracker <https://bugs.python.org/issue43845> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43908] array.array should remain immutable
hai shi added the comment: > I would like this type (and other types that have been or will be converted > to heap types) to remain immutable. Hi, Guido. I am interested in what have been broken in fact? or it's a defined behavior? > I think we may need a new flag bit meaning "built-in type, immutable". This > bit should not be inherited of course. Aggreed. Adding a new `tp_flag` is a lightweight solution. -- ___ Python tracker <https://bugs.python.org/issue43908> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37751] In codecs, function 'normalizestring' should convert both spaces and hyphens to underscores.
hai shi added the comment: >Ideally if we did not intend to break libraries then can this be fixed? Or if it is acceptable to have such a breaking change. Hi, akdor1154, thanks for your notice. It was a bugfix in fact:) https://bugs.python.org/issue37751#msg349448 > maybe this is https://github.com/python/cpython/pull/23096 ? though I would > not interpret that as a breaking change at first glance @victor ping :) -- ___ Python tracker <https://bugs.python.org/issue37751> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37751] In codecs, function 'normalizestring' should convert both spaces and hyphens to underscores.
hai shi added the comment: Thanks Marc-Andre for your supplement of PEP-100. Thanks Inada, victor for your review and merge. After PR-23096 merged, I suggest to close this bpo. If there have any other questions, we can reopen it again. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue37751> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41111] [C API] Convert a few stdlib extensions to the limited C API (PEP 384)
Change by hai shi : -- pull_requests: +24719 pull_request: https://github.com/python/cpython/pull/26080 ___ Python tracker <https://bugs.python.org/issue4> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41111] [C API] Convert a few stdlib extensions to the limited C API (PEP 384)
hai shi added the comment: > The main limitation to use the limited C API for stdlib is Argument Clinic > which attempts to always emit the most efficient code, like using the > METH_FASTCALL calling convention and use private functions like > _PyArg_CheckPositional() or "static _PyArg_Parser _parser". PR-26080 adds the feature that Argument Clinic to support to use the Limited C API. METH_FASTCALL is the part of the stable ABI in PR-23009. Do we need convert METH_VARARGS and METH_KEYWORDS as the part of the stable ABI too(something like METH_FASTCALL)? -- ___ Python tracker <https://bugs.python.org/issue4> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40938] urllib.parse.urlunsplit makes relative path to absolute (http:g -> http:///g)
Change by hai shi : -- nosy: +orsenthil ___ Python tracker <https://bugs.python.org/issue40938> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41111] [C API] Convert a few stdlib extensions to the limited C API (PEP 384)
hai shi added the comment: > METH_VARARGS and METH_KEYWORDS are part of the stable ABI. Copy that, thanks, petr. -- ___ Python tracker <https://bugs.python.org/issue4> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41111] [C API] Convert a few stdlib extensions to the limited C API (PEP 384)
Change by hai shi : -- versions: +Python 3.11 -Python 3.10 ___ Python tracker <https://bugs.python.org/issue4> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol
hai shi added the comment: > * functools._lru_list_elem Looks like this type have performance in issue PR-5008 when supporting GC. I am not sure there have other similar questions or not. -- ___ Python tracker <https://bugs.python.org/issue42972> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol
Change by hai shi : -- pull_requests: +25045 pull_request: https://github.com/python/cpython/pull/26451 ___ Python tracker <https://bugs.python.org/issue42972> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44263] Better explain the GC contract for PyType_FromSpecWithBases
Change by hai shi : -- nosy: +shihai1991 ___ Python tracker <https://bugs.python.org/issue44263> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37224] [subinterpreters] test__xxsubinterpreters fails randomly
hai shi added the comment: OK, I try to take a look after Kyle leaves temporarily. But I haven't replicate this issue in my vm in recent days :( -- nosy: +shihai1991 versions: +Python 3.11 -Python 3.8 ___ Python tracker <https://bugs.python.org/issue37224> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com