#12927: Logging synchronises input and output wrongly.
----------------------+-----------------------------------------------------
   Reporter:  itaibn  |             Owner:  jason      
       Type:  defect  |            Status:  new        
   Priority:  major   |         Milestone:  sage-5.1   
  Component:  misc    |          Keywords:  log logging
Work issues:          |   Report Upstream:  N/A        
  Reviewers:          |           Authors:             
  Merged in:          |      Dependencies:             
   Stopgaps:          |  
----------------------+-----------------------------------------------------
 In `sage/misc/log.py`, the following is in the documentation:
 {{{
         """
         There is an off-by-one issue with IPython's input and output
         history; ``__IPYTHON__.input_hist_raw`` is a *list* containing
         the un-preparsed Sage commands. However,
         ``__IPYTHON__.output_hist`` is a dictionary whose keys are
         integers and whose values are outputs.  This is good because
         not every input has an output.

         **BUT**, the output from::

             __IPYTHON__.input_hist_raw[n]

         is stored in::

             __IPYTHON__.output_hist[n+1] !

         This is annoying and it may be a bug. Right now the loggers
         correct for this, but if modifying or extending this code,
         consider yourself warned.
         """
 }}}
 This is incorrect. In fact, the compensation for this inside the code
 makes the input and output out of synchronisation. This can be seen in the
 following log:
 {{{
 Sage Log 2012-05-08-190000
 1 sage:
 
sage.misc.preparser.load(sage.misc.preparser.base64.b64decode("L2hvbWUvaXRhaWJuLy5zYWdlLy9pbml0LnNhZ2U="),globals(),False)

   2

 2 sage: 1+1
 3 sage: log_text()
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12927>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to