Opened 13 years ago

Closed 12 years ago

#4172 closed defect (duplicate)

exception in timeit permanetly disables gc

Reported by: anakha Owned by: mabshoff
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: memleak Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


sage: import gc
sage: gc.isenabled()
sage: %timeit raise RuntimeError, "test"
RuntimeError                              Traceback (most recent call last)

/Volumes/Place/anakha/Applications/sage/devel/sage-tri/sage/geometry/<ipython console> in <module>()

/Volumes/Place/anakha/Applications/sage/local/lib/python2.5/site-packages/IPython/ in ipmagic(self, arg_s)
    946         else:
    947             magic_args = self.var_expand(magic_args,1)
--> 948             return fn(magic_args)
    950     def ipalias(self,arg_s):

/Volumes/Place/anakha/Applications/sage/local/lib/python2.5/site-packages/IPython/ in magic_timeit(self, parameter_s)
   1779             for i in range(1, 10):
   1780                 number *= 10
-> 1781                 if timer.timeit(number) >= 0.2:
   1782                     break

/Volumes/Place/anakha/Applications/sage/local/lib/python/ in timeit(self, number)
    159         gcold = gc.isenabled()
    160         gc.disable()
--> 161         timing = self.inner(it, self.timer)
    162         if gcold:
    163             gc.enable()

/Volumes/Place/anakha/Applications/sage/devel/sage-tri/sage/geometry/<magic-timeit> in inner(_it, _timer)

RuntimeError: test
sage: gc.isenabled()

Change History (1)

comment:1 Changed 12 years ago by mhansen

  • Milestone changed from sage-3.2 to sage-duplicate/invalid
  • Resolution set to duplicate
  • Status changed from new to closed

Patch is up at #4353

Note: See TracTickets for help on using tickets.