Opened 11 years ago

Closed 11 years ago

#10293 closed defect (fixed)

sage -startuptime is broken

Reported by: jdemeyer Owned by: jason
Priority: critical Milestone: sage-4.6.1
Component: misc Keywords: startuptime new_import exception
Cc: Merged in: sage-4.6.1.alpha2
Authors: Mike Hansen Reviewers: François Bissey
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by jdemeyer)

Since sage-4.6.1.alpha2, sage -startuptime doesn't work anymore:

$ ./sage -startuptime
Traceback (most recent call last):
  File "/home/jdemeyer/sage-4.6.1.alpha2/local/bin/sage-startuptime.py", line 46, in <module>
    from sage.all import *
  File "/home/jdemeyer/sage-4.6.1.alpha2/local/bin/sage-startuptime.py", line 35, in new_import
    module = old_import(name, globals, locals, fromlist)
  File "/home/jdemeyer/sage-4.6.1.alpha2/local/lib/python2.6/site-packages/sage/all.py", line 99, in <module>
    from sage.server.all     import *
  File "/home/jdemeyer/sage-4.6.1.alpha2/local/bin/sage-startuptime.py", line 35, in new_import
    module = old_import(name, globals, locals, fromlist)
  File "/home/jdemeyer/sage-4.6.1.alpha2/local/lib/python2.6/site-packages/sage/server/all.py", line 2, in <module>
    from notebook.all import *
  File "/home/jdemeyer/sage-4.6.1.alpha2/local/bin/sage-startuptime.py", line 35, in new_import
    module = old_import(name, globals, locals, fromlist)
  File "/home/jdemeyer/sage-4.6.1.alpha2/local/lib/python2.6/site-packages/sage/server/notebook/all.py", line 22, in <module>
    from sagenb.notebook.all import *
  File "/home/jdemeyer/sage-4.6.1.alpha2/local/bin/sage-startuptime.py", line 35, in new_import
    module = old_import(name, globals, locals, fromlist)
  File "/home/jdemeyer/sage-4.6.1.alpha2/devel/sagenb/sagenb/notebook/all.py", line 16, in <module>
    from notebook_object import notebook, inotebook
  File "/home/jdemeyer/sage-4.6.1.alpha2/local/bin/sage-startuptime.py", line 35, in new_import
    module = old_import(name, globals, locals, fromlist)
  File "/home/jdemeyer/sage-4.6.1.alpha2/devel/sagenb/sagenb/notebook/notebook_object.py", line 17, in <module>
    import notebook as _notebook
  File "/home/jdemeyer/sage-4.6.1.alpha2/local/bin/sage-startuptime.py", line 35, in new_import
    module = old_import(name, globals, locals, fromlist)
  File "/home/jdemeyer/sage-4.6.1.alpha2/devel/sagenb/sagenb/notebook/notebook.py", line 39, in <module>
    import css          # style
  File "/home/jdemeyer/sage-4.6.1.alpha2/local/bin/sage-startuptime.py", line 35, in new_import
    module = old_import(name, globals, locals, fromlist)
  File "/home/jdemeyer/sage-4.6.1.alpha2/devel/sagenb/sagenb/notebook/css.py", line 17, in <module>
    from sagenb.notebook.template import template
  File "/home/jdemeyer/sage-4.6.1.alpha2/local/bin/sage-startuptime.py", line 35, in new_import
    module = old_import(name, globals, locals, fromlist)
  File "/home/jdemeyer/sage-4.6.1.alpha2/devel/sagenb/sagenb/notebook/template.py", line 18, in <module>
    import jinja2
  File "/home/jdemeyer/sage-4.6.1.alpha2/local/bin/sage-startuptime.py", line 35, in new_import
    module = old_import(name, globals, locals, fromlist)
  File "/home/jdemeyer/sage-4.6.1.alpha2/local/lib/python2.6/site-packages/Jinja2-2.5.5-py2.6.egg/jinja2/__init__.py", line 45, in <module>
    from jinja2.bccache import BytecodeCache, FileSystemBytecodeCache, \
  File "/home/jdemeyer/sage-4.6.1.alpha2/local/bin/sage-startuptime.py", line 35, in new_import
    module = old_import(name, globals, locals, fromlist)
  File "/home/jdemeyer/sage-4.6.1.alpha2/local/lib/python2.6/site-packages/Jinja2-2.5.5-py2.6.egg/jinja2/bccache.py", line 31, in <module>
    bc_magic = 'j2'.encode('ascii') + pickle.dumps(bc_version, 2)
  File "/home/jdemeyer/sage-4.6.1.alpha2/local/lib/python/encodings/__init__.py", line 100, in search_function
    level=0)
TypeError: new_import() got an unexpected keyword argument 'level'

Follow-up (adding doctest): #10300

Attachments (1)

trac_10293.patch (1.2 KB) - added by mhansen 11 years ago.

Download all attachments as: .zip

Change History (10)

Changed 11 years ago by mhansen

comment:1 Changed 11 years ago by mhansen

  • Authors set to Mike Hansen
  • Status changed from new to needs_review

That should fix it.

comment:2 Changed 11 years ago by fbissey

The patch works for me. linux x86 (sage-on-gentoo really).

comment:3 follow-up: Changed 11 years ago by jdemeyer

I'm impressed. A patch for a ticket that I did not announce for a Sage version which is not released :-)

comment:4 in reply to: ↑ 3 ; follow-up: Changed 11 years ago by fbissey

Replying to jdemeyer:

I'm impressed. A patch for a ticket that I did not announce for a Sage version which is not released :-)

well you started to merge patch in alpha3 didn't you? ebuild for alpha2 have been updated yesterday and announced on the gentoo-science mailing list for your info.

comment:5 Changed 11 years ago by jdemeyer

  • Description modified (diff)

comment:6 in reply to: ↑ 4 ; follow-up: Changed 11 years ago by jdemeyer

Replying to fbissey:

well you started to merge patch in alpha3 didn't you? ebuild for alpha2 have been updated yesterday and announced on the gentoo-science mailing list for your info.

I have merged patch (I assume you are referring to #9418) in sage-4.6.1.alpha2 which is not yet released. In fact, I am changing it now by adding the patch on this ticket.

comment:7 in reply to: ↑ 6 Changed 11 years ago by fbissey

Replying to jdemeyer:

Replying to fbissey:

well you started to merge patch in alpha3 didn't you? ebuild for alpha2 have been updated yesterday and announced on the gentoo-science mailing list for your info.

I have merged patch (I assume you are referring to #9418) in sage-4.6.1.alpha2 which is not yet released. In fact, I am changing it now by adding the patch on this ticket.

That's going off topic, but technically for sage-on-gentoo I don't really care that you merged a package like patch. That 0 impact on us. Do something in sage, sage_scripts and so on and that will have an impact. If you are including this in alpha2 I will just have to update the manifest.

comment:8 Changed 11 years ago by fbissey

  • Status changed from needs_review to positive_review

Tried the latest alpha2 with this ticket included, it still works so I am giving it a positive review.

comment:9 Changed 11 years ago by jdemeyer

  • Merged in set to sage-4.6.1.alpha2
  • Resolution set to fixed
  • Reviewers set to François Bissey
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.