[issue40003] test.regrtest: add an option to run test.bisect_cmd on failed tests, use it on Refleaks buildbots

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

[issue40024] Add PyModule_AddType helper function

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

[issue40058] Running test_datetime twice fails with: module 'datetime' has no attribute '_divide_and_round'

2020-03-29 Thread hai shi
hai shi added the comment: > I believe it's a known problem with either `import_fresh_module` or `datetime` after removed the cleanup operation of `sys.modules` in PR19213, the testcases is successed in my local vm(I am not sure there have any other potential ri

[issue40058] Running test_datetime twice fails with: module 'datetime' has no attribute '_divide_and_round'

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

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

2020-03-25 Thread hai shi
hai shi added the comment: >Sorry for the noise, but I just wanted to say thanks to the people working on >this issue 13 years after I reported it. :) Far too many open-source projects >arbitrarily close bugs just because they don't have time to fix them and they >never get f

[issue40058] Running test_datetime twice fails with: module 'datetime' has no attribute '_divide_and_round'

2020-03-25 Thread hai shi
hai shi added the comment: add a pdb point in L11 of test_datetime.py 8 try: 9 pure_tests = import_fresh_module(TESTS, fresh=['datetime', '_strptime'], 10 blocked=['_datetime']) 11 import pdb;pdb.set_trace() 12

[issue40058] Running test_datetime twice fails with: module 'datetime' has no attribute '_divide_and_round'

2020-03-25 Thread hai shi
hai shi added the comment: `_divide_and_round()` would be deleted in https://github.com/python/cpython/blob/master/Lib/datetime.py#L2516. if it's removed L2516 of datetime.py, `test_name_cleanup()` would be failed.Looks like it's a planed behavior~ -- nosy: +shihai1991

[issue40050] test_importlib leaked [6303, 6299, 6303] references

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

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

2020-03-23 Thread hai shi
hai shi added the comment: > The last merged pull request, GH-GH-19084, causes refleaks in importlib > tests. Stable buildbots are failing, I can reproduce on macOS Catalina. thanks, Łukasz. I catched this problem in my vm of centos too. I don't the broken reason tempo

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

2020-03-22 Thread hai shi
hai shi added the comment: > I noticed that caches on Lib/encodings/__init__.py and codec_search_cach of > PyInterpreterState are the places holding the refs. I removed those caches > and number went do to. Good Catch, Paulo. IMHO, caches is useful in codecs(it's improve t

[issue40014] os.getgrouplist() can fail on macOS

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

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

2020-03-21 Thread hai shi
Change by hai shi : -- pull_requests: +18460 pull_request: https://github.com/python/cpython/pull/19100 ___ Python tracker <https://bugs.python.org/issue1635

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

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

[issue39824] Multi-phase extension module (PEP 489): don't call m_traverse, m_clear nor m_free before the module state is allocated

2020-03-19 Thread hai shi
Change by hai shi : -- pull_requests: +18432 pull_request: https://github.com/python/cpython/pull/19076 ___ Python tracker <https://bugs.python.org/issue39

[issue39337] codecs.lookup() ignores non-ASCII characters, whereas encodings.normalize_encoding() copies them

2020-03-19 Thread hai shi
Change by hai shi : -- pull_requests: +18424 pull_request: https://github.com/python/cpython/pull/19069 ___ Python tracker <https://bugs.python.org/issue39

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

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

[issue39984] Move some ceval fields from _PyRuntime.ceval to PyInterpreterState.ceval

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

[issue39337] codecs.lookup() ignores non-ASCII characters, whereas encodings.normalize_encoding() copies them

2020-03-17 Thread hai shi
hai shi added the comment: > Use _testinternalcapi in this case. oh, forgive me. I don't atttention this extension module before :( -- ___ Python tracker <https://bugs.python.org/issu

[issue39337] codecs.lookup() ignores non-ASCII characters, whereas encodings.normalize_encoding() copies them

2020-03-17 Thread hai shi
hai shi added the comment: > Maybe we should just add a private function for test in _testcapi. Oh, there have a problem with this idea: struct _is is defined in internal/pycore_pystate.h. _testcapi must test the public Python C API, not CPython internal C

[issue39968] port extension modules' macros of `get_module_state()` to inline function.

2020-03-16 Thread hai shi
hai shi added the comment: > Oh, macOS job was marked as success on PR 19017 :-( yeah, it's weird. This macOS job should be enhanced? -- ___ Python tracker <https://bugs.python.org/issu

[issue39968] port extension modules' macros of `get_module_state()` to inline function.

2020-03-16 Thread hai shi
hai shi added the comment: > See also: https://github.com/python/cpython/runs/509226542#step:4:305 Oh, thanks, Dong-hee Na. I create a PR for this typo error. -- ___ Python tracker <https://bugs.python.org/issu

[issue39968] port extension modules' macros of `get_module_state()` to inline function.

2020-03-16 Thread hai shi
Change by hai shi : -- pull_requests: +18377 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/19028 ___ Python tracker <https://bugs.python.org/issu

[issue39968] port extension modules' macros of `get_module_state()` to inline function.

2020-03-16 Thread hai shi
hai shi added the comment: Wow, thanks, victor. those msgs is very helpful to me. -- ___ Python tracker <https://bugs.python.org/issue39968> ___ ___ Python-bug

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

2020-03-15 Thread hai shi
Change by hai shi : -- pull_requests: +18367 pull_request: https://github.com/python/cpython/pull/19018 ___ Python tracker <https://bugs.python.org/issue1635

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

2020-03-15 Thread hai shi
hai shi added the comment: hundreds of encoding names can not be released in Py_Finalize(). for example: ``` 0x7ff482f589e0 [1] 'iso_8859_1_1987' 0x7ff482f58970 [1] 'iso_8859_1' ``` --> ``` 0x7ff482f589e0 [2] 'iso_8859_1_1987' 0x7ff482f58970 [2] 'iso_885

[issue39968] port extension modules' macros of `get_module_state()` to inline function.

2020-03-15 Thread hai shi
Change by hai shi : -- title: move extension modules' macros of `get_module_state()` to inline function. -> port extension modules' macros of `get_module_state()` to inline function. ___ Python tracker <https://bugs.python.org/issu

[issue39968] move extension modules' macros of `get_module_state()` to inline function.

2020-03-15 Thread hai shi
Change by hai shi : -- title: move extension modules' macros of `get_xx_state()` to inline function. -> move extension modules' macros of `get_module_state()` to inline function. ___ Python tracker <https://bugs.python.org/issu

[issue39968] move extension modules' macros of `get_xx_state()` to inline function.

2020-03-15 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +18366 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19017 ___ Python tracker <https://bugs.python.org/issu

[issue39968] move extension modules' macros of `get_xx_state()` to inline function.

2020-03-15 Thread hai shi
New submission from hai shi : as victor and petr said in PR18613:inline function is more better than macros, so I plan move all extension modules' macros of `get_xx_state()` to inline function. Note: some inline get_xx_state() can not be used directly in `tp_traverse`、`tp_free` and `tp_clear

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

2020-03-15 Thread hai shi
Change by hai shi : -- pull_requests: +18359 pull_request: https://github.com/python/cpython/pull/19012 ___ Python tracker <https://bugs.python.org/issue1635

[issue39337] codecs.lookup() ignores non-ASCII characters, whereas encodings.normalize_encoding() copies them

2020-03-14 Thread hai shi
Change by hai shi : -- pull_requests: +18344 pull_request: https://github.com/python/cpython/pull/18987 ___ Python tracker <https://bugs.python.org/issue39

[issue39337] codecs.lookup() ignores non-ASCII characters, whereas encodings.normalize_encoding() copies them

2020-03-14 Thread hai shi
hai shi added the comment: > How about calling `encodings.normalize_encoding() in > codecs.normalizestring()` to keep same behavior?(I create PR18845) I have try this idea, but it make the testcase of test_io.py failed because some object will call `codecs.Lookup()` in `_

[issue39585] Delete a pending item in _warning.c

2020-03-14 Thread hai shi
hai shi added the comment: Thanks, serhiy. -- ___ Python tracker <https://bugs.python.org/issue39585> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39337] codecs.lookup() ignores non-ASCII characters, whereas encodings.normalize_encoding() copies them

2020-03-08 Thread hai shi
hai shi added the comment: > I would prefer that codecs.lookup() and encodings.normalize_encoding() behave > the same. Either always ignore or always copy. How about calling `encodings.normalize_encoding() in codecs.normalizestring()` to keep same behavior?(I create PR18845) >

[issue39337] codecs.lookup() ignores non-ASCII characters, whereas encodings.normalize_encoding() copies them

2020-03-08 Thread hai shi
Change by hai shi : -- keywords: +patch nosy: +shihai1991 nosy_count: 3.0 -> 4.0 pull_requests: +18202 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18845 ___ Python tracker <https://bugs.python.org/i

[issue39824] Multi-phase extension module (PEP 489): don't call m_traverse, m_clear nor m_free before the module state is allocated

2020-03-07 Thread hai shi
hai shi added the comment: > we have no idea what Py_mod_create might have done that needs to be cleaned > up. Looks like no extension module author use `Py_mod_create` slots now. -- ___ Python tracker <https://bugs.python.org/i

[issue39796] warning extension module inited twice in python3.9

2020-03-02 Thread hai shi
hai shi added the comment: copy that, thanks for your explanation, victor. -- ___ Python tracker <https://bugs.python.org/issue39796> ___ ___ Python-bugs-list m

[issue39796] warning extension module inited twice in python3.9

2020-03-02 Thread hai shi
hai shi added the comment: Wow, Thanks, victor, much useful infos. >In Python 3, _PyWarnings_Init() calls PyModule_Create() which creates a module >but doesn't add it to sys.modules. this operation will be executed in _bootstrap_external. > We want the _warnings module to be ready

[issue39796] warning extension module inited twice in python3.9

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

[issue39796] warning extension module inited twice in python3.9

2020-02-29 Thread hai shi
New submission from hai shi : In master branch, `_PyWarnings_Init()` have been called twice. ``` (gdb) bt #0 _PyWarnings_Init () at Python/_warnings.c:1338 #1 0x00525df3 in pycore_init_import_warnings (tstate=tstate@entry=0x9a19c0, sysmod=0x77f7e5f0) at Python/pylifecycle.c:680

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

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

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

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

[issue9182] document “--” as a way to distinguish option w/ narg='+' from positional argument in argparse

2020-02-19 Thread hai shi
hai shi added the comment: It exists in master, so it still need a patch. -- nosy: +rhettinger, shihai1991 versions: +Python 3.9 -Python 2.7, Python 3.2 ___ Python tracker <https://bugs.python.org/issue9

[issue17050] argparse.REMAINDER doesn't work as first argument

2020-02-18 Thread hai shi
hai shi added the comment: > Okay. Would it be all right if I submit a fix to get it working at least in > the subparser case? Hi, dHannasch. According raymond and paul's opinion, you could try to create a PR to update argparse's doc. -- nosy: +shih

[issue39646] compile warning in unicodeobject.c

2020-02-17 Thread hai shi
hai shi added the comment: you are welcome ;0 -- ___ Python tracker <https://bugs.python.org/issue39646> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36465] Make release and debug ABI compatible

2020-02-17 Thread hai shi
Change by hai shi : -- pull_requests: +17912 pull_request: https://github.com/python/cpython/pull/18520 ___ Python tracker <https://bugs.python.org/issue36

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

2020-02-16 Thread hai shi
hai shi added the comment: Leave a note for myself: I check the remaining object roughly(though dump_refs function), most of remaining object is 'str', such as: '0x7f779cf0 [13] str'->'0x7f779cf0 [26] str' So far, I don't know which file and fileno create those object. MAYBE I n

[issue39647] Update doc of init_config.rst

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

[issue39647] Update doc of init_config.rst

2020-02-16 Thread hai shi
New submission from hai shi : Due to issue36465, the desc of `dump_refs` in init_config.rst should be udpated. -- assignee: docs@python components: Documentation messages: 362066 nosy: docs@python, shihai1991, vstinner priority: normal severity: normal status: open title: Update doc

[issue39646] compile warning in unicodeobject.c

2020-02-16 Thread hai shi
hai shi added the comment: I don't find a good idea so I just add init operation :( -- ___ Python tracker <https://bugs.python.org/issue39646> ___ ___ Python-bug

[issue39646] compile warning in unicodeobject.c

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

[issue39646] compile warning in unicodeobject.c

2020-02-15 Thread hai shi
hai shi added the comment: I will create PR later. -- ___ Python tracker <https://bugs.python.org/issue39646> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39646] compile warning in unicodeobject.c

2020-02-15 Thread hai shi
New submission from hai shi : Objects/unicodeobject.c: In function ‘PyUnicode_IsIdentifier’: ./Include/cpython/unicodeobject.h:396:38: warning: ‘data’ may be used uninitialized in this function [-Wmaybe-uninitialized] ((const Py_UCS4 *)(data))[(index

[issue39382] abstract_issubclass() doesn't take bases tuple item ref

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

[issue39639] Remove Suite node from AST

2020-02-15 Thread hai shi
hai shi added the comment: I am not sure there have any relation with jython's python.asdl? https://github.com/jythontools/jython/blob/master/ast/Python.asdl#L10 -- nosy: +shihai1991 ___ Python tracker <https://bugs.python.org/issue39

[issue20184] Derby #16: Convert 50 sites to Argument Clinic across 9 files

2020-02-15 Thread hai shi
hai shi added the comment: Looks like `builtins.vars` and `builtins.dir` should be migrated to AC too, so I create PR18512. -- nosy: +shihai1991 ___ Python tracker <https://bugs.python.org/issue20

[issue20184] Derby #16: Convert 50 sites to Argument Clinic across 9 files

2020-02-15 Thread hai shi
Change by hai shi : -- pull_requests: +17889 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/18512 ___ Python tracker <https://bugs.python.org/issu

[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)

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

[issue39573] Make PyObject an opaque structure in the limited C API

2020-02-13 Thread hai shi
hai shi added the comment: > By the way, please find another more inclusive way to say hi, see: https://heyguys.cc/ Oh, copy that. Sorry for my poor english. -- ___ Python tracker <https://bugs.python.org/issu

[issue39573] Make PyObject an opaque structure in the limited C API

2020-02-13 Thread hai shi
hai shi added the comment: >"obj == Py_None" is a very common pattern. >You have check how it is done in HPy: https://github.com/pyhandle/hpy >See also bpo-39511: "[subinterpreters] Per-interpreter singletons (None, >>True, False,

[issue39573] Make PyObject an opaque structure in the limited C API

2020-02-13 Thread hai shi
hai shi added the comment: Hi, guys. Is there value in adding `PyNone_Check` macro?(`_PyNone_Type` is not esposed to CAPI directly, so I am not sure about it) If the answer is 'yes', i can add it ;) -- nosy: +shihai1991 ___ Python tracker <ht

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

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

[issue39585] Delete a pending item in _warning.c

2020-02-11 Thread hai shi
Change by hai shi : -- components: +Extension Modules -Interpreter Core ___ Python tracker <https://bugs.python.org/issue39585> ___ ___ Python-bugs-list mailin

[issue39585] Delete a pending item in _warning.c

2020-02-11 Thread hai shi
hai shi added the comment: > What if a warning has a metaclass with a custom __getattribute__ method? Sorry, ppperry. I don't understand your question clearly. Could you give me some examples? This function could be touched when user call `warnings.warn_expli

[issue39593] ctypes s_set() uses strlen() and so truncates string at null character

2020-02-11 Thread hai shi
hai shi added the comment: I guess the `xx_get()` and `xx_set()` function's process logic have relation with ffi's type, after I checked some `xx_get()` and `xx_set()`'s process logic. -- ___ Python tracker <https://bugs.python.org/issue39

[issue39593] ctypes s_set() uses strlen() and so truncates string at null character

2020-02-11 Thread hai shi
hai shi added the comment: I am not sure it have realtion of libffi's type or not? `s_set()` and `s_get()`'s type of ffi is `FFI_TYPE_POINTER`; REF: https://www.manpagez.com/info/libffi/libffi-3.0.13/libffi_6.php#index-ffi_005ftype_005fpointer

[issue39593] ctypes s_set() uses strlen() and so truncates string at null character

2020-02-10 Thread hai shi
hai shi added the comment: releated bpo: issue12769 s_get() in cfield.c function have similar behavior. So far, this is a planned action(lack evidence). -- ___ Python tracker <https://bugs.python.org/issue39

[issue39593] Adding a unit test of ctypes

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

[issue39593] Adding a unit test of ctypes

2020-02-09 Thread hai shi
New submission from hai shi : strlen(data) can not be replaced by Py_SIZE(value) in https://github.com/python/cpython/blob/master/Modules/_ctypes/cfield.c#L1297. victor have give a great example about it in https://github.com/python/cpython/pull/18419 I create this bpo for two reasons: 1

[issue39573] Make PyObject an opaque structure in the limited C API

2020-02-08 Thread hai shi
Change by hai shi : -- pull_requests: +17795 pull_request: https://github.com/python/cpython/pull/18419 ___ Python tracker <https://bugs.python.org/issue39

[issue39585] Delete a pending item in _warning.c

2020-02-08 Thread hai shi
hai shi added the comment: If I am wrong, remove the check operation of `name` is fine. -- ___ Python tracker <https://bugs.python.org/issue39585> ___ ___ Pytho

[issue39585] Delete a pending item in _warning.c

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

[issue39585] Delete a pending item in _warning.c

2020-02-08 Thread hai shi
New submission from hai shi : a pend item could be removed (https://github.com/python/cpython/blob/master/Python/_warnings.c#L493). two reasons: 1) every warning have `__name__` and it must not NULL(`The tp_name slot must be set;` from pep0253) 2) the `__name__` of Warning class(including

[issue38823] Improve stdlib module initialization error handling.

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

[issue25753] Reference leaks in test_smtplib

2020-02-07 Thread hai shi
hai shi added the comment: > I cannot reproduce these leaks. I think this issue should be closed. +1, I have run 15+ times in my vm but not found these leaks:( -- nosy: +shihai1991 ___ Python tracker <https://bugs.python.org/issu

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

2020-02-07 Thread hai shi
Change by hai shi : -- pull_requests: +17780 pull_request: https://github.com/python/cpython/pull/18404 ___ 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

[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

[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

[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: update the above info: 1) python-ast.c have one question, i fix it in PR18365. -- ___ 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/Modules

[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-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

[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

[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: +shihai1991

[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 tu

[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

[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, rhettinger

[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:

[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.org/issue39

[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.py [-h] [-l LONG_MIN

[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 ___ Python

[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

[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

[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
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
Change by hai shi : -- pull_requests: +17666 pull_request: https://github.com/python/cpython/pull/18292 ___ Python tracker <https://bugs.python.org/issue37

[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> ___ ___

<    1   2   3   4   5   6   7   8   >