[issue17197] c/profile refactoring

2013-02-25 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- assignee: -> giampaolo.rodola resolution: -> fixed status: open -> closed ___ Python tracker ___ _

[issue17197] c/profile refactoring

2013-02-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 422169310b7c by Giampaolo Rodola' in branch 'default': Fix #17197: profile/cProfile modules refactored so that code of run() and runctx() utility functions is not duplicated in both modules. http://hg.python.org/cpython/rev/422169310b7c --

[issue17197] c/profile refactoring

2013-02-17 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Of course you're right. I didn't realize that. How about this (in attachment)? -- keywords: +patch Added file: http://bugs.python.org/file29106/profile-refactoring.diff ___ Python tracker

[issue17197] c/profile refactoring

2013-02-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > No, it's the other way around. It's from cProfile which I import > profile. > > diff --git a/Lib/cProfile.py b/Lib/cProfile.py > --- a/Lib/cProfile.py > +++ b/Lib/cProfile.py > ... > +import profile as _pyprofile That's exactly what I'm saying. Once you impor

[issue17197] c/profile refactoring

2013-02-13 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: No, it's the other way around. It's from cProfile which I import profile. diff --git a/Lib/cProfile.py b/Lib/cProfile.py --- a/Lib/cProfile.py +++ b/Lib/cProfile.py ... +import profile as _pyprofile -- ___ Python

[issue17197] c/profile refactoring

2013-02-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch doesn't look right to me. If you import cProfile, profile will always invoke the cProfile profiler. -- ___ Python tracker ___ ___

[issue17197] c/profile refactoring

2013-02-12 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- components: +Library (Lib) keywords: +easy -patch versions: +Python 3.4 ___ Python tracker ___ ___ P

[issue17197] c/profile refactoring

2013-02-12 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola': profile and cProfile modules define the same utility functions (run() and runctx()) which use the same code except the profiler class. Considering that we're going to add 2 new utility functions (runcall() and runblock(), see issue9285 and issue17130) I th