[issue45482] [C API] Add PySimpleNamespace_New() function

2021-10-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset 354c35220d25a893e502014478f6739dad6897f3 by Victor Stinner in branch 'main': bpo-45482: Rename namespaceobject.h to pycore_namespace.h (GH-28975) https://github.com/python/cpython/commit/354c35220d25a893e502014478f6739dad6897f3 --

[issue45482] [C API] Add PySimpleNamespace_New() function

2021-10-15 Thread STINNER Victor
STINNER Victor added the comment: > The other choice is to move the function to the internal C API. I created GH-28975 for that. -- ___ Python tracker ___

[issue45482] [C API] Add PySimpleNamespace_New() function

2021-10-15 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27263 pull_request: https://github.com/python/cpython/pull/28975 ___ Python tracker ___

[issue45482] [C API] Add PySimpleNamespace_New() function

2021-10-15 Thread STINNER Victor
STINNER Victor added the comment: I created this issue while cleaning the C API. I'm not fully convinced that PySimpleNamespace_New() must be made public. The other choice is to move the function to the internal C API. -- ___ Python tracker

[issue45482] [C API] Add PySimpleNamespace_New() function

2021-10-15 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +27258 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28970 ___ Python tracker ___

[issue45482] [C API] Add PySimpleNamespace_New() function

2021-10-15 Thread STINNER Victor
New submission from STINNER Victor : Python has a types.SimpleNamespace type which is convenient to cheap a "simple namespace". I propose to make its C API public (but exclude it from the limited C API): add PySimpleNamespace_New() function. It's currently used in: * Modules/timemodule.c: