Change by hai shi :
--
pull_requests: +25182
pull_request: https://github.com/python/cpython/pull/26598
___
Python tracker
<https://bugs.python.org/issue37
Change by hai shi :
--
pull_requests: +25320
pull_request: https://github.com/python/cpython/pull/26733
___
Python tracker
<https://bugs.python.org/issue37
hai shi added the comment:
I use this add_printf_to_get_details_from_race_condition.patch to get some
details of the running subinterpreter.
The successful output of test_already_running:
test_already_running (test.test__xxsubinterpreters.RunStringTests) ... In
interp_create, the current
Change by hai shi :
--
pull_requests: +25789
pull_request: https://github.com/python/cpython/pull/27240
___
Python tracker
<https://bugs.python.org/issue37
hai shi added the comment:
> The following locks are leaked:
> 1.
> https://github.com/python/cpython/blob/196d4deaf4810a0bba75ba537dd40f2d71a5a634/Python/pystate.c#L78
> 2.
> https://github.com/python/cpython/blob/196d4deaf4810a0bba75ba537dd40f2d71a5a634/Python/pystate.c#L8
hai shi added the comment:
Hi, Simon. Thanks for your report.
There have an relatived issue in: bpo-43145, this bpo have mentioned
`Py_Initialize()`. So I suggest to close this bpo. We can reopen it if we have
seperated questions need to be discussed in here.
> Running a Valgrind memch
hai shi added the comment:
> - there is still no way to get t.tp_name
Can we create PyType_GetDataSlot function to return the data pointer?
> If we go this way, why not add PyType_GetQualName as well?
+1. I will create another PR after PR-23903
New submission from hai shi :
Objects/obmalloc.c hasn't use the Py_USING_MEMORY_DEBUGGER macro now. So this
line can be deleted.
https://github.com/python/cpython/blob/31bec6f1b178dadec3cb43353274b4e958a8f015/Misc/README.valgrind#L17.
--
assignee: docs@python
components: Document
Change by hai shi :
--
nosy: +paul.j3, rhettinger
___
Python tracker
<https://bugs.python.org/issue44748>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by hai shi :
--
pull_requests: +26057
pull_request: https://github.com/python/cpython/pull/27551
___
Python tracker
<https://bugs.python.org/issue42
hai shi added the comment:
> - for the qualified name you can use `PyObject_GetAttrString(t,
> "__qualname__")`
After PR-27551 merged, we can use PyType_GetQualName() to get type's
`__qualname__`.
--
___
Python tracker
<
Change by hai shi :
--
pull_requests: +26143
pull_request: https://github.com/python/cpython/pull/27649
___
Python tracker
<https://bugs.python.org/issue42
Change by hai shi :
--
nosy: +paul.j3, rhettinger
___
Python tracker
<https://bugs.python.org/issue44864>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by hai shi :
--
nosy: +paul.j3, rhettinger
___
Python tracker
<https://bugs.python.org/issue44865>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by hai shi :
--
keywords: +patch
pull_requests: +26263
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27794
___
Python tracker
<https://bugs.python.org/issu
hai shi added the comment:
> Maybe the old behavior was better: if an extension uses the old API, share
> its state between all interpreters.
+1. I create PR-27794, which use `def->m_slots` to identify the extension
module created from `PyModule_Create()` or not.
hai shi added the comment:
> (Note that the "def->m_size == -1" means that the module does not support
> sub-interpreters, because it has global state.
Make Sense. It's more better and exact than my suggestion :)
--
__
hai shi added the comment:
> Now, I wonder if we should also introduce PyType_GetModuleName for
> __module__, or stop and close this as fixed.
IMO, I suggest to close this bpo. We can get the `tp_name` by the C API now. If
there have user want get `__module__`, we can open a new
hai shi added the comment:
> Should this be closed?
Copy from PEP-632: In Python 3.10 and 3.11, distutils will be formally marked
as deprecated. All known issues will be closed at this time.
I close this bpo. If there have some block issues to discuss, we can reopen
it ag
hai shi added the comment:
How about this one?
int foo(void)
{
printf(stderr, "foo BEGIN\n");
if (!Py_IsInitialized()) {
fprintf(stderr, "python already initialized\n");
return -1;
}
const char *module_name = "foo";
PyGILState_STATE state = P
hai shi added the comment:
> which can be wrapped within the calls to PyGILState_Ensure/Release.
OK, it's a good idea. But I think this enhancement will break the back
compatibility.
> python is initialized within that entrypoint
python is initialized when you
hai shi added the comment:
> Or are you saying something can be done in Python's components to
handle this use case transparently? so the user won't have to put GIL
locks in his code.
Sorry, I don't explain it good enough. You have said what I wanted to say:)
> Yes, bu
hai shi added the comment:
This bpo isn't a bug, so I close it now. If there are some enhancements need to
be discussed, we can reopen it:)
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python t
hai shi added the comment:
Is it a defined behavior?
I got this sentence from pep-3148: Deadlock can occur when the callable
associated with a Future waits on the results of another Future.
--
nosy: +shihai1991
___
Python tracker
<ht
Change by hai shi :
--
nosy: +shihai1991
___
Python tracker
<https://bugs.python.org/issue45020>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by hai shi :
--
nosy: +shihai1991
___
Python tracker
<https://bugs.python.org/issue45062>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by hai shi :
--
nosy: +shihai1991
___
Python tracker
<https://bugs.python.org/issue44359>
___
___
Python-bugs-list mailing list
Unsubscribe:
hai shi added the comment:
> PyStructSequence_InitType2() is not compatible with subinterpreters: it uses
> static types. Moreover, it allocates tp_members memory which is not released
> when the type is destroyed. But I'm not sure that the type is ever destroyed,
>
New submission from hai shi :
Copied from https://bugs.python.org/issue40512#msg399847:
Victor: PyStructSequence_InitType2() is not compatible with subinterpreters: it
uses static types. Moreover, it allocates tp_members memory which is not
released when the type is destroyed. But I'
hai shi added the comment:
bpo-45113: [subinterpreters][C API] Add a new function to create
PyStructSequence from Heap.
--
versions: +Python 3.11 -Python 3.10
___
Python tracker
<https://bugs.python.org/issue40
Hai Shi added the comment:
> But I encourage you to try, so you get a better understanding of the problem
> :)
OK, thanks, Petr. I try to add this C API to see what will happen :)
--
___
Python tracker
<https://bugs.python.org/i
Change by Hai Shi :
--
nosy: +shihai1991
___
Python tracker
<https://bugs.python.org/issue45127>
___
___
Python-bugs-list mailing list
Unsubscribe:
Hai Shi added the comment:
> More generally, this would need solving one of the remaining limitations of
> the limited API (PEPs 489, 630): type-specific data.
Agree. We can't track and destroy the memory block created from t
Change by Hai Shi :
--
keywords: +patch
pull_requests: +26955
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/28573
___
Python tracker
<https://bugs.python.org/issu
Change by Hai Shi :
--
nosy: +shihai1991
___
Python tracker
<https://bugs.python.org/issue45316>
___
___
Python-bugs-list mailing list
Unsubscribe:
Hai Shi added the comment:
> the simplest solution is calling `type_set_name`, even if that runs some
> unnecessary checks.
Hm, I haven't find any case who use dynamical tp_name of Type_Spec temporarily.
If we meet this user case, Adding a new object pointer of type name in i
Hai Shi added the comment:
> The only thing the proposed PR adds is a way to set ht_module, which actually
> isn't very useful (it's used for module state access.
Hm, there have some static types. so I create the
PyStructSequence_FromModuleAndDes() could receive tp_flags
Hai Shi added the comment:
> In _PyStructSequence_InitType, it will check type is initialized.
It's a internal C API :)
> when type already been initialized, should return 0 rather than throw
> exception.
The another solution is to check the type status
Hai Shi added the comment:
>Ah, sorry, I overlooked the flags.
It's Okay.
>This does beg the question: what else from PyType_Spec will be needed?
I guess we don't want to allow additional slots/methods.
+1.
>Also, note that converting the stdlib to heap types is suspend
Hai Shi added the comment:
> PEP 3121 is not withdrawn; PEP 630 is not withdrawn. What is then expected of
> a new PEP? Or the other way around: what is missing from those two PEPs?
Thanks Erlend for the relative information you provided. AFAIK, the stdlib is
not the extension
Hai Shi added the comment:
Hi, Chuanlong. Would you mind to upload a demo for this question?
--
nosy: +shihai1991
___
Python tracker
<https://bugs.python.org/issue45
Hai Shi added the comment:
> I use the Linux operating system (openeuler), kernel version 4.19.90, GCC
> version 7.3.0. I directly run the following statement in the virtual machine
Hm. I haven't openeuler system, but I get docker container of the euler system.
The tests have p
Hai Shi added the comment:
Hi, Victor Milovanov. The memory allocated by interpreter will be freed after
calling Py_Finalize().
--
nosy: +pablogsal, shihai1991
___
Python tracker
<https://bugs.python.org/issue45
Change by Hai Shi :
--
nosy: +shihai1991
___
Python tracker
<https://bugs.python.org/issue43588>
___
___
Python-bugs-list mailing list
Unsubscribe:
Hai Shi added the comment:
OK,thanks. If it's just only interal calling, I don't think throwing a
exception would break anything. As your pasted code shows, the modules have
judeged the tp_name is inited or not.
--
___
Python track
Change by Hai Shi :
--
nosy: +shihai1991
nosy_count: 4.0 -> 5.0
pull_requests: +28101
pull_request: https://github.com/python/cpython/pull/29876
___
Python tracker
<https://bugs.python.org/issu
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
Change by hai shi :
--
nosy: +shihai1991
___
Python tracker
<https://bugs.python.org/issue38956>
___
___
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.
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:
I checked some other common clis and it is show all right available options
too. So I thought the argparse's help function is good enough too ;)
```
$ ps -etest
error: TTY could not be found
Usage:
ps [options]
Try 'ps --help '
or 'ps --he
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')
>>>
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.
hai shi added the comment:
Users or developers interact with program by cli(argparse), so attributes'
output order affect users' interaction.
--
___
Python tracker
<https://bugs.python.o
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
Change by hai shi :
--
nosy: +shihai1991
___
Python tracker
<https://bugs.python.org/issue16399>
___
___
Python-bugs-list mailing list
Unsubscribe:
hai shi added the comment:
1)>You'd need to elaborate on that. I've been using argparse for years and
never once had presentational aspects affected by work. So, again, what is the
actual use case for this?
_AttributeHolder_ has sorted the args in `_get_kwargs()` and the off
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
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:
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
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
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:
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
hai shi added the comment:
FWIW, i counted the difference of each file's refs after `Py_Finalize()`.
[('Objects/dictobject.c', 21434), ('Python/marshal.c', 8135),
('Objects/codeobject.c', 6245), ('Objects/listobject.c', 6037),
('Objects/tu
Change by hai shi :
--
pull_requests: +17425
pull_request: https://github.com/python/cpython/pull/18030
___
Python tracker
<https://bugs.python.org/issue1635
Change by hai shi :
--
pull_requests: +17428
pull_request: https://github.com/python/cpython/pull/18032
___
Python tracker
<https://bugs.python.org/issue1635
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 :
--
keywords: +patch
pull_requests: +17441
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18046
___
Python tracker
<https://bugs.python.org/issu
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
Change by hai shi :
--
pull_requests: +17444
pull_request: https://github.com/python/cpython/pull/18049
___
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: +17456
pull_request: https://github.com/python/cpython/pull/18065
___
Python tracker
<https://bugs.python.org/issue1635
Change by hai shi :
--
pull_requests: +17457
pull_request: https://github.com/python/cpython/pull/18066
___
Python tracker
<https://bugs.python.org/issue1635
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 :
--
keywords: +patch
pull_requests: +17631
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18254
___
Python tracker
<https://bugs.python.org/issu
Change by hai shi :
--
nosy: +vstinner
___
Python tracker
<https://bugs.python.org/issue39487>
___
___
Python-bugs-list mailing list
Unsubscribe:
hai shi added the comment:
If i understand clearly, msg360993 is an solution of issue39465.
--
___
Python tracker
<https://bugs.python.org/issue39487>
___
___
Change by hai shi :
--
pull_requests: +17666
pull_request: https://github.com/python/cpython/pull/18292
___
Python tracker
<https://bugs.python.org/issue37
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
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
Change by hai shi :
--
pull_requests: +17672
pull_request: https://github.com/python/cpython/pull/18297
___
Python tracker
<https://bugs.python.org/issue37
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
hai shi added the comment:
IMHO, cli should only support atomic function.What is atomic functin? (if
downstream software's feature can not keep alive without upstream fucntion, it
must be an atomic function).
--
nosy: +shihai1991 -4383
___
P
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.
hai shi added the comment:
Users interact with console's output, so translated the output info is fine to
me.
Hi,raymond、paul. What's your opinion?
--
___
Python tracker
<https://bugs.python.o
Change by hai shi :
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue39378>
___
___
Python-bugs-list mailing list
Unsubscribe:
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,
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
Change by hai shi :
--
versions: +Python 3.9 -Python 3.5
___
Python tracker
<https://bugs.python.org/issue14074>
___
___
Python-bugs-list mailing list
Unsub
hai shi added the comment:
> Given that tuple metavars currently doesn't work, there is no backward
> compatibility issue. What is being proposed is to give more friendly error
> messages.
Got it, thanks.
> Paul suggested that it may be a better plan to just disallow tupl
hai shi added the comment:
Small style question: using 5 spaces in
https://github.com/python/cpython/blob/master/Objects/floatobject.c#L655-L664
after PR 18147 merged.
Due to bpo don't receive style quesiton, I commented here.
--
nosy: +shiha
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
Change by hai shi :
--
pull_requests: +17733
pull_request: https://github.com/python/cpython/pull/18358
___
Python tracker
<https://bugs.python.org/issue1635
Change by hai shi :
--
pull_requests: +17740
pull_request: https://github.com/python/cpython/pull/18365
___
Python tracker
<https://bugs.python.org/issue1635
hai shi added the comment:
i thinkt that not checking `PyModule_AddObject()`'s result may cause this
probleam too.
1) python-ast.c have one question, i fix it in PR18358.
2) most of the questions in extension module, for example:
https://github.com/python/cpython/blob/master/Mo
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
Change by hai shi :
--
pull_requests: +17745
pull_request: https://github.com/python/cpython/pull/18365
___
Python tracker
<https://bugs.python.org/issue38
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
Change by hai shi :
--
pull_requests: +17750
pull_request: https://github.com/python/cpython/pull/18374
___
Python tracker
<https://bugs.python.org/issue1635
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
101 - 200 of 700 matches
Mail list logo