New submission from hai shi :
As the title mentioned. A entire py_curses capi struct would be better than
pointer array.
Related PR: PR 24186
--
assignee: shihai1991
messages: 385532
nosy: shihai1991, vstinner
priority: normal
severity: normal
status: open
title: Port curses capi
Change by hai shi :
--
nosy: +paul.j3, rhettinger
___
Python tracker
<https://bugs.python.org/issue42966>
___
___
Python-bugs-list mailing list
Unsubscribe:
hai shi added the comment:
Wait. petr mentioned `_PyType_Name` in PR 23903 which use the short name. So I
am not sure which way is better. Lol~
--
___
Python tracker
<https://bugs.python.org/issue42
Change by hai shi :
--
nosy: +shihai1991
___
Python tracker
<https://bugs.python.org/issue42955>
___
___
Python-bugs-list mailing list
Unsubscribe:
hai shi added the comment:
> New C API functions must not return borrowed references, but strong
> references.
Thanks petr, victor for your suggestion. It's more friendly to users.
> Which one should be returned by PyType_GetName()? Is there a warranty that
> it's always sho
Change by hai shi :
--
nosy: +paul.j3, rhettinger
___
Python tracker
<https://bugs.python.org/issue42980>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by hai shi :
--
nosy: +shihai1991
___
Python tracker
<https://bugs.python.org/issue42972>
___
___
Python-bugs-list mailing list
Unsubscribe:
hai shi added the comment:
>Not a function, shouldn't be used with PyType_Slot:
> * tp_dict - I'd add a PyType_GetDict if there is a need to get this
> * tp_mro - I'd add a PyType_GetMRO if there is a need to get this
I checked some other projects which use type fileds directly
Change by hai shi :
--
nosy: +paul.j3, rhettinger
___
Python tracker
<https://bugs.python.org/issue42875>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by hai shi :
--
pull_requests: +23014
pull_request: https://github.com/python/cpython/pull/24186
___
Python tracker
<https://bugs.python.org/issue41
Change by hai shi :
--
nosy: +vinay.sajip
___
Python tracker
<https://bugs.python.org/issue42842>
___
___
Python-bugs-list mailing list
Unsubscribe:
hai shi added the comment:
> Hai Shi, do you mind if I have a go at the socket module CAPI capsule?
Welcome to join this bpo, you can enhance those extension modules if you like :)
--
___
Python tracker
<https://bugs.python.org/issu
Change by hai shi :
--
pull_requests: +22927
pull_request: https://github.com/python/cpython/pull/24096
___
Python tracker
<https://bugs.python.org/issue41
Change by hai shi :
--
keywords: +patch
pull_requests: +22895
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/24061
___
Python tracker
<https://bugs.python.org/issu
hai shi added the comment:
>The Check code is now commented out, and the issue of type checking is
>mentioned in PEP 630.
Got it, thanks for your supplement :)
--
___
Python tracker
<https://bugs.python.org/i
Change by hai shi :
--
nosy: +shihai1991
___
Python tracker
<https://bugs.python.org/issue40522>
___
___
Python-bugs-list mailing list
Unsubscribe:
hai shi added the comment:
After PR 23405 and PR 24006 merged, I think this bpo can be closed.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
hai shi added the comment:
> I wrote PR 24006 to fix the leak.
Oh, thanks for your fix, victor.
--
___
Python tracker
<https://bugs.python.org/issu
hai shi added the comment:
Thanks Patrick for your PR.
Thanks Serhiy for your merge.
--
nosy: +shihai1991
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
hai shi added the comment:
> #define XxoObject_CheckExact(v) (Py_TYPE(v) == _Type)
`#define Xxo_CheckExact(obj) Py_IS_TYPE(obj, _Type)` would be better to
hide details now.
> #define XxoObject_Check(v) PyObject_TypeCheck(v, _Type)
+1
I think the annotation will worth to be updaetd.
Change by hai shi :
--
nosy: +shihai1991
___
Python tracker
<https://bugs.python.org/issue42767>
___
___
Python-bugs-list mailing list
Unsubscribe:
hai shi added the comment:
>I don't see the purpose of the Py_TPFLAGS_HAVE_VERSION_TAG flag.
IMO, There have no more exact description of `Py_TPFLAGS_HAVE_VERSION_TAG`in
docs, so I perfer to remove it.
> By the way, is it worth it to remove Py_TPFLAGS_HAVE_FINALIZE? Or is it
Change by hai shi :
--
keywords: +patch
pull_requests: +22757
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/23903
___
Python tracker
<https://bugs.python.org/issu
Change by hai shi :
--
nosy: +paul.j3, rhettinger
___
Python tracker
<https://bugs.python.org/issue42650>
___
___
Python-bugs-list mailing list
Unsubscribe:
hai shi added the comment:
Thanks victor, petr for your comment and review. I closed this bpo and PR.
I paste victor's explanation in here in case other developers have the same
question too: Getting a crash is the
expected behaviour if you don't respect a function API. Most C
functions
Change by hai shi :
--
pull_requests: +22634
pull_request: https://github.com/python/cpython/pull/23683
___
Python tracker
<https://bugs.python.org/issue42
Change by hai shi :
--
nosy: +shihai1991
___
Python tracker
<https://bugs.python.org/issue42639>
___
___
Python-bugs-list mailing list
Unsubscribe:
hai shi added the comment:
> When does this actually happen? Is there a common situation where you'd
> mistakenly pass NULL to PyState_AddModule?
If created mod haven't been checked will have this risk. PyState_AddModule
is a exposing C API, we should make sure that calling API is in
Change by hai shi :
--
keywords: +patch
pull_requests: +22603
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/23745
___
Python tracker
<https://bugs.python.org/issu
New submission from hai shi :
PyState_AddModule(NULL, &_testcapimodule) in _testcapi module will get a
segmentation fault. And it's a C API, so a little improvement will be better.
--
assignee: shihai1991
components: C API
messages: 382915
nosy: petr.viktorin, shihai1991, vsti
hai shi added the comment:
>This code could be made much safer if there were a
>PyType_FromSpecWithBasesMeta which used the meta class to allocate the memory
IMHO, `PyType_FromSpecWithBases` is a atomic API of `TypeObject`.
Adding a class as a param will result in `PyType_FromSpecWit
hai shi added the comment:
Hi, Thanks for your report, Deepanshu. Can you upload your code in here?
Adding victor in this bpo, MAYBE he can give some suggestions about it.
--
nosy: +shihai1991, vstinner
___
Python tracker
<https://bugs.python.
hai shi added the comment:
> another solution is to move the "module state" into the interpreter,
OK, I am agree victor's solution too. It's a more simpler way.
--
___
Python tracker
<https://bugs.pytho
hai shi added the comment:
> But it would not harm to document the removal in
> https://docs.python.org/dev/whatsnew/3.10.html#id4 section.
Copy that. I will update it soon.
--
___
Python tracker
<https://bugs.python.org/i
Change by hai shi :
--
keywords: +patch
pull_requests: +22559
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/23691
___
Python tracker
<https://bugs.python.org/issu
New submission from hai shi :
PyModule_GetWarningsModule() of pylifecycle.c is useless when _warning module
was converted to a builtin module in 2.6. So move it directly now is OK.
--
components: Interpreter Core
messages: 382727
nosy: petr.viktorin, shihai1991, vstinner
priority
hai shi added the comment:
> MAYBE we need add a module flag in `PyModuleDef`.
I created a demo in PR 23683.
--
___
Python tracker
<https://bugs.python.org/issu
Change by hai shi :
--
keywords: +patch
pull_requests: +22547
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/23683
___
Python tracker
<https://bugs.python.org/issu
hai shi added the comment:
>On the other side, defining a Py_mod_exec_once that supports execution > >for
>just once can be a way.
>Although the usage is little, it will be fine because the use case will >exist.
IMHO, `Py_mod_exec_once` is more like a slot control flag.
Change by hai shi :
--
versions: +Python 3.10 -Python 3.4
___
Python tracker
<https://bugs.python.org/issue15674>
___
___
Python-bugs-list mailing list
Unsub
Change by hai shi :
--
nosy: +shihai1991
___
Python tracker
<https://bugs.python.org/issue42519>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by hai shi :
--
nosy: +shihai1991
___
Python tracker
<https://bugs.python.org/issue42522>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by hai shi :
--
nosy: +christian.heimes
___
Python tracker
<https://bugs.python.org/issue41626>
___
___
Python-bugs-list mailing list
Unsubscribe:
hai shi added the comment:
I create PR23581 to remove the inner Tools' shebang.
But I am not remove Tools/ssl/make_ssl_data.py, Tools/gdb/libpython.py in
PR23581.
* To make_ssl_data.py, I guess Christian may give us some guide.
* libpython.py will be installed in kinds of OS, some OS
Change by hai shi :
--
pull_requests: +22459
pull_request: https://github.com/python/cpython/pull/23581
___
Python tracker
<https://bugs.python.org/issue41
Change by hai shi :
--
nosy: +shihai1991
___
Python tracker
<https://bugs.python.org/issue42376>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by hai shi :
--
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue42410>
___
___
Python-bugs-
Change by hai shi :
--
resolution: -> not a bug
___
Python tracker
<https://bugs.python.org/issue42410>
___
___
Python-bugs-list mailing list
Unsubscrib
hai shi added the comment:
> Does it mean that this issue is invalid and can be closed?
I think it's can be closed if I can update test_functools.py in PR23405 :)
--
___
Python tracker
<https://bugs.python.org/issu
hai shi added the comment:
I updated the test_functools.py in PR23405, the CI have all passed.
--
___
Python tracker
<https://bugs.python.org/issue42
hai shi added the comment:
> It looks like you imported the functools module twice and have two different
> classes functools.partial. When you try to import one of them, you found the
> other one.
You are right. Serhiy:)
The key point is `import_helper.import_fresh_module()`.
`
hai shi added the comment:
> You should analyze why "cls != obj" conditon is true: why cls is not obj?
You are right. I am in the wrong way definitely. It's weird to me.I try to
figure it out in this week~
--
___
Python tr
hai shi added the comment:
>I propose to either a guard to PyType_GetModule() to prevent misuse of the
>function or to add a variant of the function that prevents misuse.
+1. Looks like check Py_TPFLAGS_BASETYPE in PyType_GetModule() is an easy way:)
--
nosy: +shih
Change by hai shi :
--
keywords: +patch
pull_requests: +22300
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/23407
___
Python tracker
<https://bugs.python.org/issu
hai shi added the comment:
Oh, sorry, wrong PR number. the right one: PR23405
--
___
Python tracker
<https://bugs.python.org/issue42410>
___
___
Python-bug
New submission from hai shi :
Touch an error when convert _functools module to use PyType_FromModuleAndSpec,
the error info:
_pickle.PicklingError: Can't pickle : it's not the
same object as functools.partial
The related PR: PR3405
--
components: Extension Modules
messages: 381436
Change by hai shi :
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue40891>
___
hai shi added the comment:
Duplicated issue: bpo-40137, so I closed this one.
--
___
Python tracker
<https://bugs.python.org/issue40891>
___
___
Python-bug
Change by hai shi :
--
pull_requests: +22298
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/23405
___
Python tracker
<https://bugs.python.org/issu
Change by hai shi :
--
nosy: +shihai1991
___
Python tracker
<https://bugs.python.org/issue40600>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by hai shi :
--
nosy: +shihai1991
___
Python tracker
<https://bugs.python.org/issue41861>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by hai shi :
--
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue41832>
___
___
Python-bugs-
hai shi added the comment:
Hi, petr. If there is no other doubt about this bpo, I suggest close this bpo.
--
___
Python tracker
<https://bugs.python.org/issue41
Change by hai shi :
--
nosy: +shihai1991
___
Python tracker
<https://bugs.python.org/issue42333>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by hai shi :
--
pull_requests: +22140
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/23243
___
Python tracker
<https://bugs.python.org/issu
hai shi added the comment:
> The PR entirely removed the note that a slot's value "May not be NULL".
> In fact, only tp_doc may be NULL. AFAIK, the restriction is still there > for
> other slots.
> Can that note be added back?
`May not be NULL` means everthing
Change by hai shi :
--
pull_requests: +22132
pull_request: https://github.com/python/cpython/pull/23235
___
Python tracker
<https://bugs.python.org/issue40
Change by hai shi :
--
versions: +Python 3.10 -Python 3.9
___
Python tracker
<https://bugs.python.org/issue40137>
___
___
Python-bugs-list mailing list
Unsub
Change by hai shi :
--
nosy: +shihai1991
___
Python tracker
<https://bugs.python.org/issue42294>
___
___
Python-bugs-list mailing list
Unsubscribe:
hai shi added the comment:
> Do you mean something like "only expose a slot if you have a reason for >
> exposing it"? That sounds like a tautology.
> Where in the docs would this go?
Add a friend Note in docs of `PyType_GetSlot` MAYBE?
> You mean nb_reserved, ri
New submission from hai shi :
I like your improvement.
But I suggest you should copy your first comment from your PR to here.(It's
easy for discuss in here;)
--
nosy: +paul.j3, rhettinger, shihai1991
___
Python tracker
<https://bugs.python.
hai shi added the comment:
Thank you all:)
--
___
Python tracker
<https://bugs.python.org/issue41832>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by hai shi :
--
nosy: +shihai1991
___
Python tracker
<https://bugs.python.org/issue42260>
___
___
Python-bugs-list mailing list
Unsubscribe:
hai shi added the comment:
> If you change this, why do it only for tp_doc, but for all the slots? NULL
> should *always* mean that the slot is set to NULL instead of inherited.
> (Except maybe in cases where this is dangerous; then it should result in an
> error?
IMO, it's a
Change by hai shi :
--
nosy: +shihai1991
___
Python tracker
<https://bugs.python.org/issue42035>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by hai shi :
--
keywords: +patch
pull_requests: +22039
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/23123
___
Python tracker
<https://bugs.python.org/issu
Change by hai shi :
--
versions: +Python 3.10 -Python 3.9
___
Python tracker
<https://bugs.python.org/issue40077>
___
___
Python-bugs-list mailing list
Unsub
hai shi added the comment:
I will take a look in this weekend :)
--
___
Python tracker
<https://bugs.python.org/issue41832>
___
___
Python-bugs-list mailin
Change by hai shi :
--
pull_requests: +22010
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/23096
___
Python tracker
<https://bugs.python.org/issu
Change by hai shi :
--
nosy: +shihai1991
___
Python tracker
<https://bugs.python.org/issue42100>
___
___
Python-bugs-list mailing list
Unsubscribe:
hai shi added the comment:
typo error: PR21913->PR21931
--
___
Python tracker
<https://bugs.python.org/issue41626>
___
___
Python-bugs-list mailing list
Un
hai shi added the comment:
Sorry for my delay~
>I think some of these work with any Python, but some need the locally built
>interpreter to give correct results.
>It could avoid confusion and mistakes to remove the shebangs and executable
>bits from the scripts that need a
hai shi added the comment:
> IMO, a slot should be exposed if there is some reason for exposing it.
Can we write those info to docs? In case some developer want to exposing slot
in future.
> Which other slots are we missing?
nb_inserved in PyNumberMethods should be r
Change by hai shi :
--
nosy: +shihai1991
___
Python tracker
<https://bugs.python.org/issue42111>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by hai shi :
--
nosy: +shihai1991
___
Python tracker
<https://bugs.python.org/issue42171>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by hai shi :
--
nosy: +shihai1991
___
Python tracker
<https://bugs.python.org/issue41796>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by hai shi :
--
nosy: +shihai1991
___
Python tracker
<https://bugs.python.org/issue38865>
___
___
Python-bugs-list mailing list
Unsubscribe:
hai shi added the comment:
I created a possible fix PR: PR-22973
--
___
Python tracker
<https://bugs.python.org/issue42145>
___
___
Python-bugs-list mailin
hai shi added the comment:
> AS this is masking other issues in the build bots, we need to revert the
> commit unless is fixed in 24 hours per the buildbot workflow
Thanks, Pablo. I checked that only test_io.py have resource leak.
I create PR-22973, pls take a look if you have fre
Change by hai shi :
--
pull_requests: +21888
pull_request: https://github.com/python/cpython/pull/22973
___
Python tracker
<https://bugs.python.org/issue41
hai shi added the comment:
Thanks petr for your review and merge.
--
___
Python tracker
<https://bugs.python.org/issue41726>
___
___
Python-bugs-list mailin
hai shi added the comment:
> Definitely. Sorry for the delay -- I missed the notification here.
No problem. This is not a block issue :)
--
___
Python tracker
<https://bugs.python.org/issu
hai shi added the comment:
Thanks for everyone's continus review :)
--
___
Python tracker
<https://bugs.python.org/issue39337>
___
___
Python-bugs-list mailin
Change by hai shi :
--
title: Move the codecs' register operation to testcases -> Move the
codecs.register operation to testcases
___
Python tracker
<https://bugs.python.org/issu
Change by hai shi :
--
keywords: +patch
pull_requests: +21522
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/22513
___
Python tracker
<https://bugs.python.org/issu
New submission from hai shi :
After PR22360 merged, we can move the codecs' register operation to testcases.
--
components: Tests
messages: 377863
nosy: shihai1991, vstinner
priority: normal
severity: normal
status: open
title: Move the codecs' register operation to testcases
type
Change by hai shi :
--
nosy: +shihai1991
___
Python tracker
<https://bugs.python.org/issue40455>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by hai shi :
--
nosy: +shihai1991
___
Python tracker
<https://bugs.python.org/issue41902>
___
___
Python-bugs-list mailing list
Unsubscribe:
hai shi added the comment:
oh, sorry, typo error. multiple search functions-->multiple error handler.
--
___
Python tracker
<https://bugs.python.org/issu
hai shi added the comment:
> If add a function for unregistering a codec search function, it would be
> worth to add also a function for unregistering an error handler.
Registering an error handler have no refleaks when registering multiple search
functions.
+1 if end use
101 - 200 of 700 matches
Mail list logo