2013/11/11 Charles-François Natali <cf.nat...@gmail.com>: > After several exchanges with Victor, PEP 454 has reached a status > which I consider ready for pronuncement [1]: so if you have any last > minute comment, now is the time!
Because the PEP has a long history, 49 mercurial revisions between september and november 2013, I tried to summarize its history. Most important changes of the PEP 454 between initial versions and the current (final?) version: - tracemalloc can store a whole traceback instead of just the filename and line number of the most recent frame - tracemalloc is no more a high-level tool, but a core module exposing only one thing, traces on memory blocks, with a light Snapshot class to compute statistics. Tasks, DisplayTop class, command line interface and metrics have been removed. - many functions and features with no real use cases were removed. For example, get_trace(address) was taking a raw address, whereas such address is not directly accessible in Python. It was replaced with get_object_traceback(obj) which has a better API. - better API providing access to all data from traces to statistics. Raw traces are accessible via Snapshot.traces which generates temporary read-only view to get an object API. - minimalist API, ex: no more Snapshot.timestamp attribute - no more "premature optimizations". For example, statistics are no more computed during capture in C, but computed on a snapshot in Python. Charles-François did a great job to convert a high-level and specialized tool to a reusage and generic module. Thanks for all your advices! Without all these changes, it would be harder to extend tracemalloc later and to reuse tracemalloc for different use cases. Victor _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com