Re: [Python-Dev] RFC: PEP 454: Add a new tracemalloc module

2013-09-08 Thread Victor Stinner
2013/9/8 Janzert : > It seems like most of this could live on PyPi for a while so the API can get > hashed out in use? The pytracemalloc is available on PyPI since 6 months. The only feedback I had was something trying to compile it on Windows (which is complex because of the dependency to glib, I

Re: [Python-Dev] RFC: PEP 454: Add a new tracemalloc module

2013-09-08 Thread Janzert
It seems like most of this could live on PyPi for a while so the API can get hashed out in use? If that's not the case is it because the PEP 445 API isn't rich enough? Janzert ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/

Re: [Python-Dev] RFC: PEP 454: Add a new tracemalloc module

2013-09-08 Thread Victor Stinner
2013/9/4 Victor Stinner : > http://www.python.org/dev/peps/pep-0454/ > > PEP: 454 > Title: Add a new tracemalloc module to trace Python memory allocations > Version: $Revision$ > Last-Modified: $Date$ > Author: Victor Stinner > Status: Draft > Type: Standards Track > Content-Type: text/x-rst > Cre

Re: [Python-Dev] RFC: PEP 454: Add a new tracemalloc module

2013-09-05 Thread Victor Stinner
2013/9/5 Alexander Belopolsky : > Please mention that this API is similar to that of faulthandler and add a > link to faulthandler docs. Done. Victor ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev U

Re: [Python-Dev] RFC: PEP 454: Add a new tracemalloc module

2013-09-04 Thread Alexander Belopolsky
On Tue, Sep 3, 2013 at 7:27 PM, Victor Stinner wrote: > API > === > > To trace the most Python memory allocations, the module should be > enabled as early as possible in your application by calling > ``tracemalloc.enable()`` function, by setting the ``PYTHONTRACEMALLOC`` > environment variable to

Re: [Python-Dev] RFC: PEP 454: Add a new tracemalloc module

2013-09-04 Thread Victor Stinner
>> ``trace`` class: >> This class represents debug information of an allocated memory block. >> >> ``size`` attribute: >> Size in bytes of the memory block. >> ``filename`` attribute: >> Name of the Python script where the memory block was allocated, >> ``None`` if unknown. >> ``lin

Re: [Python-Dev] RFC: PEP 454: Add a new tracemalloc module

2013-09-03 Thread Victor Stinner
> ``get_object_trace(obj)`` function: > > Get the trace of a Python object *obj* as a ``trace`` instance. > > Return ``None`` if the tracemalloc module did not save the location > when the object was allocated, for example if the module was > disabled. This function and get_traces(