
Hello, I'm accepting PEP 445 (A C API to customize memory allocators) by Victor. There is probably some grammar to correct here and there (neither Victor nor I are native English speakers), but I don't want this to hold back acceptance. The PEP is an obvious improvement in flexibility for everyone embedding Python in some external application, or even recompiling their own Python runtime for specific uses. The implementation is tracked in http://bugs.python.org/issue3329 Thanks to Victor for his patience :-) Regards Antoine.

2013/7/6 Antonio Cavallo <a.cavallo@cavallinux.eu>:
Could that remove the need for the --with-pydebug flag?
With the PEP 445, you still have to recompile Python with --with-debug, but you don't have to recompile Python extensions anymore. Debug checks on memory allocators are now implemented as hooks, instead of using C macros. I see this as an improvment ;-) Victor

On 7 Jul 2013 07:01, "Antoine Pitrou" <solipsis@pitrou.net> wrote:
Yay! And thanks to you for suggesting this API would benefit from being run through the PEP process - I think the end result is a significant improvement over what we originally planned to commit. Cheers, Nick.
http://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com

2013/7/6 Antoine Pitrou <solipsis@pitrou.net>:
Thanks Antoine for you review :-) I pushed the implementation of the PEP, splitted in different changesets: new functions and then changes to use these new functions. You can now play with the new hooks to hack your own memory debug tool for Python 3.4! You can easily implement your own tool in Python! (if you hook PYMEM_DOMAIN_MEM and PYMEM_DOMAIN_OBJ, but not PYMEM_DOMAIN_RAW) I will share with you my experiment of these new APIs. I'm preparing a new version of pytracemalloc to adapt it to the API of the PEP 445. https://pypi.python.org/pypi/pytracemalloc Victor

2013/7/6 Antonio Cavallo <a.cavallo@cavallinux.eu>:
Could that remove the need for the --with-pydebug flag?
With the PEP 445, you still have to recompile Python with --with-debug, but you don't have to recompile Python extensions anymore. Debug checks on memory allocators are now implemented as hooks, instead of using C macros. I see this as an improvment ;-) Victor

On 7 Jul 2013 07:01, "Antoine Pitrou" <solipsis@pitrou.net> wrote:
Yay! And thanks to you for suggesting this API would benefit from being run through the PEP process - I think the end result is a significant improvement over what we originally planned to commit. Cheers, Nick.
http://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com

2013/7/6 Antoine Pitrou <solipsis@pitrou.net>:
Thanks Antoine for you review :-) I pushed the implementation of the PEP, splitted in different changesets: new functions and then changes to use these new functions. You can now play with the new hooks to hack your own memory debug tool for Python 3.4! You can easily implement your own tool in Python! (if you hook PYMEM_DOMAIN_MEM and PYMEM_DOMAIN_OBJ, but not PYMEM_DOMAIN_RAW) I will share with you my experiment of these new APIs. I'm preparing a new version of pytracemalloc to adapt it to the API of the PEP 445. https://pypi.python.org/pypi/pytracemalloc Victor
participants (5)
-
"Martin v. Löwis"
-
Antoine Pitrou
-
Antonio Cavallo
-
Nick Coghlan
-
Victor Stinner