#19735: upgrade Python to 2.7.11
--------------------------------------+------------------------
       Reporter:  slelievre           |        Owner:
           Type:  enhancement         |       Status:  new
       Priority:  major               |    Milestone:  sage-7.0
      Component:  packages: standard  |   Resolution:
       Keywords:                      |    Merged in:
        Authors:                      |    Reviewers:
Report Upstream:  N/A                 |  Work issues:
         Branch:                      |       Commit:
   Dependencies:                      |     Stopgaps:
--------------------------------------+------------------------

Comment (by fbissey):

 Breaks `timeit` because of https://bugs.python.org/issue5633 more
 precisely this commit https://hg.python.org/cpython/rev/14d1018940cb.

 That's the kind of problems
 {{{
 sage: from sage.misc.sage_timeit import sage_timeit
 sage: sage_timeit('3^100000', globals(), preparse=True, number=50)
 ---------------------------------------------------------------------------
 KeyError                                  Traceback (most recent call
 last)
 <ipython-input-2-e93b8105f8e1> in <module>()
 ----> 1 sage_timeit('3^100000', globals(), preparse=True,
 number=Integer(50))

 /home/frb15/gentoo/usr/lib/python2.7/site-
 packages/sage/misc/sage_timeit.pyc in sage_timeit(stmt, globals_dict,
 preparse, number, repeat, precision, seconds)
    218     # to the shell namespace?
    219
 --> 220     src = timeit_.template % {'stmt': timeit_.reindent(stmt, 8),
 'setup': "pass"}
    221     code = compile(src, "<magic-timeit>", "exec")
    222     ns = {}

 KeyError: ‘init’
 }}}
 Every single doctest relying on `timeit` breaks. From what I can see from
 the commit adding `'init': ''` to the timeit_.template call may be enough.
 I haven't tested this yet.

--
Ticket URL: <http://trac.sagemath.org/ticket/19735#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to