Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sage -startuptime is broken #10293

Closed
jdemeyer opened this issue Nov 20, 2010 · 11 comments
Closed

sage -startuptime is broken #10293

jdemeyer opened this issue Nov 20, 2010 · 11 comments

Comments

@jdemeyer
Copy link

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

Component: misc

Keywords: startuptime new_import exception

Author: Mike Hansen

Reviewer: François Bissey

Merged: sage-4.6.1.alpha2

Issue created by migration from https://trac.sagemath.org/ticket/10293

@mwhansen
Copy link
Contributor

comment:1

Attachment: trac_10293.patch.gz

That should fix it.

@mwhansen
Copy link
Contributor

Author: Mike Hansen

@kiwifb
Copy link
Member

kiwifb commented Nov 20, 2010

comment:2

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

@jdemeyer
Copy link
Author

comment:3

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

@kiwifb
Copy link
Member

kiwifb commented Nov 20, 2010

comment:4

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.

@jdemeyer

This comment has been minimized.

@jdemeyer
Copy link
Author

comment:6

Replying to @kiwifb:

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.

@kiwifb
Copy link
Member

kiwifb commented Nov 20, 2010

comment:7

Replying to @jdemeyer:

Replying to @kiwifb:

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.

@kiwifb
Copy link
Member

kiwifb commented Nov 21, 2010

comment:8

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

@jdemeyer
Copy link
Author

Merged: sage-4.6.1.alpha2

@jdemeyer
Copy link
Author

Reviewer: François Bissey

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants