Change by hai shi :
--
nosy: +vstinner
___
Python tracker
<https://bugs.python.org/issue39487>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
Change by hai shi :
--
pull_requests: +17457
pull_request: https://github.com/python/cpython/pull/18066
___
Python tracker
<https://bugs.python.org/issue1635
Change by hai shi :
--
pull_requests: +17456
pull_request: https://github.com/python/cpython/pull/18065
___
Python tracker
<https://bugs.python.org/issue1635
Change by hai shi :
--
pull_requests: +17445
pull_request: https://github.com/python/cpython/pull/18050
___
Python tracker
<https://bugs.python.org/issue1635
Change by hai shi :
--
pull_requests: +17444
pull_request: https://github.com/python/cpython/pull/18049
___
Python tracker
<https://bugs.python.org/issue1635
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't need spend
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
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
Change by hai shi :
--
pull_requests: +17428
pull_request: https://github.com/python/cpython/pull/18032
___
Python tracker
<https://bugs.python.org/issue1635
Change by hai shi :
--
pull_requests: +17425
pull_request: https://github.com/python/cpython/pull/18030
___
Python tracker
<https://bugs.python.org/issue1635
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/tupleobject.c', 4169), ('Objects/boolobject.c', 2433
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
Change by hai shi :
--
pull_requests: +17299
pull_request: https://github.com/python/cpython/pull/17883
___
Python tracker
<https://bugs.python.org/issue1635
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
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
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
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
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 offspring
cl
Change by hai shi :
--
nosy: +shihai1991
___
Python tracker
<https://bugs.python.org/issue16399>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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.org/issue39
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.
FWI
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')
>>> _ = pars
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 --help '
for additional
hai shi added the comment:
@Raymond OK, copy that.
--
___
Python tracker
<https://bugs.python.org/issue39075>
___
___
Python-bugs-list mailing list
Unsubscribe:
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.
Change by hai shi :
--
nosy: +shihai1991
___
Python tracker
<https://bugs.python.org/issue38956>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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/issue11
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
<ht
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 filenam
hai shi added the comment:
Got it, thanks, Serhiy.
--
___
Python tracker
<https://bugs.python.org/issue38617>
___
___
Python-bugs-list mailing list
Unsubscribe:
hai shi added the comment:
Due to victor add the desc(`/* borrowed reference */`)
so noisy+ victor ;)
--
nosy: +vstinner
___
Python tracker
<https://bugs.python.org/issue38
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
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/issu
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 repl
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/issu
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_DEC
hai shi added the comment:
Ok, it's fine to me.
--
___
Python tracker
<https://bugs.python.org/issue38600>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
hai shi added the comment:
Thanks, Serhiy, you are right.
--
___
Python tracker
<https://bugs.python.org/issue38465>
___
___
Python-bugs-list mailing list
Unsub
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/issu
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/issu
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
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/issue38
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/issu
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',
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/issu
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/issu
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
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
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/issu
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
prior
hai shi added the comment:
Hi, Jonas. Thanks for your report.
Let us wait core team's discuss;)
--
___
Python tracker
<https://bugs.python.org/issue14
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 -&g
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
___
Pyt
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
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/issu
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
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/issue19
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/issu
Change by hai shi :
--
title: Reflaks in setint() of mmapmodule.c -> Refleaks in setint() of
mmapmodule.c
___
Python tracker
<https://bugs.python.org/issu
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
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/issue9
Change by hai shi :
--
pull_requests: +15617
pull_request: https://github.com/python/cpython/pull/15988
___
Python tracker
<https://bugs.python.org/issue37
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/i
Change by hai shi :
--
nosy: +rhettinger
type: -> behavior
___
Python tracker
<https://bugs.python.org/issue14364>
___
___
Python-bugs-list mailing list
Un
Change by hai shi :
--
pull_requests: +15369
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/15714
___
Python tracker
<https://bugs.python.org/issu
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
Change by hai shi :
--
nosy: +rhettinger
___
Python tracker
<https://bugs.python.org/issue9938>
___
___
Python-bugs-list mailing list
Unsubscribe:
hai shi added the comment:
oh, sorry, pls ignore it. I misunderstand your opinion.
--
type: crash -> behavior
___
Python tracker
<https://bugs.python.org/issu
Change by hai shi :
--
pull_requests: +15323
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/15656
___
Python tracker
<https://bugs.python.org/issu
hai shi added the comment:
Thanks, Raymond. This patch not a formal patch, just show what i want to do. if
everything agree this behavior, I would add a normal PR.
--
type: behavior -> crash
___
Python tracker
<https://bugs.python.org/issu
hai shi added the comment:
Adding a judgment of explicit_args in judgment statement in the patch.
--
keywords: +patch
Added file: https://bugs.python.org/file48582/parse_v1.patch
___
Python tracker
<https://bugs.python.org/issue36
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
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
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
Change by hai shi :
--
nosy: +bethard
___
Python tracker
<https://bugs.python.org/issue37908>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by hai shi :
--
title: Add some examples of ArgumentParser.exit() -> Add an example of
ArgumentParser.exit()
type: -> resource usage
___
Python tracker
<https://bugs.python.org/i
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
Change by hai shi :
--
keywords: +patch
pull_requests: +15150
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/15455
___
Python tracker
<https://bugs.python.org/issu
Change by hai shi :
--
title: Improving interactive use of argparse -> Add optional kwargs to argparse
___
Python tracker
<https://bugs.python.org/iss
Change by hai shi :
--
nosy: +paul.j3
___
Python tracker
<https://bugs.python.org/issue37908>
___
___
Python-bugs-list mailing list
Unsubscribe:
hai shi added the comment:
issue 9938
--
___
Python tracker
<https://bugs.python.org/issue37908>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Change by hai shi :
--
nosy: +pitrou
___
Python tracker
<https://bugs.python.org/issue37698>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Change by hai shi :
--
nosy: +pitrou
___
Python tracker
<https://bugs.python.org/issue37750>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Change by hai shi :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
Change by hai shi :
--
pull_requests: +15073
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/15362
___
Python tracker
<https://bugs.python.org/iss
hai shi added the comment:
Ok, got it.
--
___
Python tracker
<https://bugs.python.org/issue37887>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
hai shi added the comment:
paul, raymond. Thanks for give me a quick answer:).
Looks raymond's reason is good enough, i just only consider this question from
api completeness(as paul said) not from user case.
--
___
Python tracker
<ht
hai shi added the comment:
IMHO, if we supply the ability to add an argument group, we need add the
ability to remove the argument group too.
--
nosy: +shihai1991
___
Python tracker
<https://bugs.python.org/issue9
Change by hai shi :
--
pull_requests: +14978
pull_request: https://github.com/python/cpython/pull/15259
___
Python tracker
<https://bugs.python.org/issue37
hai shi added the comment:
Oh, sorry, victor. I use ./python -m unittest xxx before.
Updating the test result again.
--
Added file: https://bugs.python.org/file48538/test_socket_fail_info_v2.txt
___
Python tracker
<https://bugs.python.
hai shi added the comment:
I found an OS distinguishing behavior in
https://github.com/python/cpython/blob/master/Modules/selectmodule.c#L603-L612
--
nosy: +shihai1991
___
Python tracker
<https://bugs.python.org/issue37
Change by hai shi :
--
nosy: +shihai1991
___
Python tracker
<https://bugs.python.org/issue37496>
___
___
Python-bugs-list mailing list
Unsubscribe:
501 - 600 of 700 matches
Mail list logo