[issue46613] Add PyType_GetModuleByDef to the public & limited API

2022-02-11 Thread Petr Viktorin


Petr Viktorin  added the comment:

It's in public API, adding it to limited is still pending.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46613] Add PyType_GetModuleByDef to the public & limited API

2022-02-11 Thread Petr Viktorin


Petr Viktorin  added the comment:


New changeset 204946986feee7bc80b233350377d24d20fcb1b8 by Petr Viktorin in 
branch 'main':
bpo-46613: Add PyType_GetModuleByDef to the public API (GH-31081)
https://github.com/python/cpython/commit/204946986feee7bc80b233350377d24d20fcb1b8


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46613] Add PyType_GetModuleByDef to the public & limited API

2022-02-08 Thread Hai Shi


Change by Hai Shi :


--
nosy: +shihai1991

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46613] Add PyType_GetModuleByDef to the public & limited API

2022-02-02 Thread Petr Viktorin


Change by Petr Viktorin :


--
keywords: +patch
pull_requests: +29264
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/31081

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46613] Add PyType_GetModuleByDef to the public & limited API

2022-02-02 Thread Petr Viktorin


New submission from Petr Viktorin :

_PyType_GetModuleByDef (added in bpo-42100)allows module state access 
from slot methods (like tp_init or nb_add),
the main thing missing from PEP 573 (Module State Access from C 
Extension Methods).
It's time to make it public.

The function itself can be implemented using only limited API, though 
it's a bit tricky to do so correctly (and our implementation uses 
private speedups), so it's better if extension authors can use it as a 
pre-made building block.

Discussed in: 
https://mail.python.org/archives/list/capi-...@python.org/thread/WMSDNMQ7A6LE6X4MQW4QAQUKDDL7MJ72/
Note that a bug was found in the CPython optimization recently: bpo-46433

--
components: C API
messages: 412378
nosy: petr.viktorin
priority: normal
severity: normal
status: open
title: Add PyType_GetModuleByDef to the public & limited API
versions: Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com