[issue29235] Allow profile/cProfile to be used as context managers

2019-01-29 Thread Cheryl Sabella
Cheryl Sabella added the comment: Closing as these changes have been merged for a few months. msg285538 mentions that the pure-Python profiler doesn't have `enable` and `disable`, which is already opened in issue 32017. -- nosy: +cheryl.sabella resolution: -> fixed stage: patch

[issue29235] Allow profile/cProfile to be used as context managers

2018-06-07 Thread INADA Naoki
INADA Naoki added the comment: New changeset cebe80b59b7386db3cce904d280dab61d1037e7a by INADA Naoki (Scott Sanderson) in branch 'master': bpo-29235: Update document for Profiler's context manager (GH-7331) https://github.com/python/cpython/commit/cebe80b59b7386db3cce904d280dab61d1037e7a

[issue29235] Allow profile/cProfile to be used as context managers

2018-06-01 Thread Scott Sanderson
Scott Sanderson added the comment: I've posted a patch to update the docs to https://github.com/python/cpython/pull/7331. -- nosy: +Scott Sanderson2 ___ Python tracker ___

[issue29235] Allow profile/cProfile to be used as context managers

2018-06-01 Thread Scott Sanderson
Change by Scott Sanderson : -- pull_requests: +6961 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29235] Allow profile/cProfile to be used as context managers

2018-06-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Please add a versionadded or versionchanged directive in the documentation (not sure what is more appropriate in this case) and an entry in What's New. A news entry shouldn't consist of several paragraphs. This will be lost when news entries will be

[issue29235] Allow profile/cProfile to be used as context managers

2018-06-01 Thread Brett Cannon
Brett Cannon added the comment: New changeset 2e01b75884892d5aabdaab658fbd17f7a7ccebaa by Brett Cannon (Scott Sanderson) in branch 'master': bpo-29235: Make cProfile.Profile a context manager (GH-6808) https://github.com/python/cpython/commit/2e01b75884892d5aabdaab658fbd17f7a7ccebaa

[issue29235] Allow profile/cProfile to be used as context managers

2018-05-14 Thread Scott Sanderson
Scott Sanderson added the comment: This looks like it's been dormant for a bit. I've posted a patch (with tests and docs) to https://github.com/python/cpython/pull/6808. -- nosy: +Scott Sanderson ___ Python tracker

[issue29235] Allow profile/cProfile to be used as context managers

2018-05-14 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +6495 stage: test needed -> patch review ___ Python tracker ___

[issue29235] Allow profile/cProfile to be used as context managers

2017-01-15 Thread Thane Brimhall
Thane Brimhall added the comment: I've signed the agreement. I will do the necessary research to figure out how to do unit tests and documentation updates. I should also mention that while maintaining API-compatibility with `profile` was a stated goal, it turns out that the pure-python

[issue29235] Allow profile/cProfile to be used as context managers

2017-01-15 Thread Xiang Zhang
Xiang Zhang added the comment: > I suspect unit tests and documentation updates? Yes. Code alone is not enough. It's better to have tests and documentation. Also, it's appreciated to sign the CLA: https://www.python.org/psf/contrib/contrib-form/. :-) -- nosy: +xiang.zhang stage:

[issue29235] Allow profile/cProfile to be used as context managers

2017-01-15 Thread Thane Brimhall
Thane Brimhall added the comment: So this is my first time contributing to Python, but here's a (trivial) patch for this issue. Let me know what else is required to make this happen. I suspect unit tests and documentation updates? -- keywords: +patch Added file:

[issue29235] Allow profile/cProfile to be used as context managers

2017-01-10 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: +ethan.furman stage: -> needs patch ___ Python tracker ___

[issue29235] Allow profile/cProfile to be used as context managers

2017-01-10 Thread Thane Brimhall
New submission from Thane Brimhall: The `enable` and `disable` methods on the profilers fit the description of a context manager very well. The following code: pr = cProfile.Profile() pr.enable() # ... do something ... pr.disable() pr.print_stats() Would turn into