Opened 6 years ago

Closed 6 years ago

#14330 closed enhancement (fixed)

Upgrade to sagenb 0.10.7

Reported by: kini Owned by: tbd
Priority: major Milestone: sage-5.12
Component: packages: standard Keywords:
Cc: novoselt, ppurka, ohanar, kcrisman Merged in: sage-5.12.beta0
Authors: Keshav Kini Reviewers: Dmitrii Pasechnik, Karl-Dieter Crisman, Jeroen Demeyer, Andrey Novoseltsev, Punarbasu Purkayastha
Report Upstream: N/A Work issues:
Branch: u/tkluck/ticket/14330 (Commits) Commit:
Dependencies: #10637 Stopgaps:

Description (last modified by kini)

Next minor version of sagenb. Will contain LDAP functionality by Robin Martinjak (finally) and some other minor adjustments.

SPKG: http://wstein.org/home/keshav/files/sagenb-0.10.7.1.spkg

When this is merged, merge also #14273.

Change History (82)

comment:1 Changed 6 years ago by jdemeyer

  • Description modified (diff)

comment:2 Changed 6 years ago by novoselt

  • Cc novoselt added

comment:3 Changed 6 years ago by ohanar

  • Cc ohanar added

comment:4 Changed 6 years ago by ppurka

  • Cc kcrisman added
  • Dependencies set to #10637
  • Summary changed from Upgrade to sagenb 0.10.5 to Upgrade to sagenb 0.10.6

comment:5 Changed 6 years ago by ohanar

Any ETA on this?

comment:6 Changed 6 years ago by ppurka

It should be in by the next release. Too late for 5.9.

comment:7 Changed 6 years ago by ohanar

I'm aware of that, but it would be nice to get it in an early 5.10 beta since sagenb won't work in the git releases until this is merged.

comment:8 Changed 6 years ago by kini

ppurka just cleaned up a bunch of PRs so I think I'll release 0.10.6 now. Hang on a bit.

comment:9 Changed 6 years ago by kini

  • Description modified (diff)
  • Status changed from new to needs_review

OK, SPKG is up.

comment:10 follow-up: Changed 6 years ago by dimpase

#10637 includes patches to sagenb Sage repo (sic!). Shouldn't they be patches to the upstream sagenb?

Actually, should #10637 really be a dependency of this ticket?

Last edited 6 years ago by dimpase (previous) (diff)

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

Replying to dimpase:

#10637 includes patches to sagenb Sage repo (sic!). Shouldn't they be patches to the upstream sagenb?

Actually, should #10637 really be a dependency of this ticket?

If I am not incorrect, these patches are upstream already. So, #10637 is indeed a dependency of this ticket.

comment:12 in reply to: ↑ 11 Changed 6 years ago by dimpase

Replying to ppurka:

Replying to dimpase:

#10637 includes patches to sagenb Sage repo (sic!). Shouldn't they be patches to the upstream sagenb?

Actually, should #10637 really be a dependency of this ticket?

If I am not incorrect, these patches are upstream already. So, #10637 is indeed a dependency of this ticket.

If so, the instructions on #10637 are quite unclear.

comment:13 Changed 6 years ago by kini

Fixed.

comment:14 Changed 6 years ago by ppurka

The notebook spkg works fine for me. I have a question though, now that ldap is in the notebook. Are there any other (system) requirements for getting the ldap functionality working?

comment:15 Changed 6 years ago by jdemeyer

  • Status changed from needs_review to needs_work
sage -t devel/sagenb-main/sagenb/notebook/cell.py
**********************************************************************
File "devel/sagenb-main/sagenb/notebook/cell.py", line 228, in sagenb.notebook.cell.Cell_generic.worksheet
Failed example:
    W = nb.create_new_worksheet('Test', 'admin')
Exception raised:
    Traceback (most recent call last):
      File "/mazur/release/merger/sage-5.10.beta2/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 454, in _run
        self.execute(example, compiled, test.globs)
      File "/mazur/release/merger/sage-5.10.beta2/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 813, in execute
        exec compiled in globs
      File "<doctest sagenb.notebook.cell.Cell_generic.worksheet[3]>", line 1, in <module>
        W = nb.create_new_worksheet('Test', 'admin')
      File "/mazur/release/merger/sage-5.10.beta2/devel/sagenb/sagenb/notebook/notebook.py", line 461, in create_new_worksheet
        W = self.worksheet(username)
      File "/mazur/release/merger/sage-5.10.beta2/devel/sagenb/sagenb/notebook/notebook.py", line 757, in worksheet
        id_number = self.new_id_number(username)
      File "/mazur/release/merger/sage-5.10.beta2/devel/sagenb/sagenb/notebook/notebook.py", line 769, in new_id_number
        u = self.user(username).conf()
      File "/mazur/release/merger/sage-5.10.beta2/devel/sagenb/sagenb/notebook/notebook.py", line 279, in user
        return self.user_manager().user(username)
      File "/mazur/release/merger/sage-5.10.beta2/devel/sagenb/sagenb/notebook/user_manager.py", line 110, in user
        return self._user(username)
      File "/mazur/release/merger/sage-5.10.beta2/devel/sagenb/sagenb/notebook/user_manager.py", line 520, in _user
        raise KeyError, "no user '%s'"%username
    KeyError: "no user 'admin'"
**********************************************************************

PS: the value of a KeyError should be the missing key. So you should either

raise KeyError(username)

or

raise LookupError("no user '%s'"%username)

comment:16 Changed 6 years ago by jdemeyer

sage -t devel/sagenb-main/sagenb/notebook/user_manager.py
**********************************************************************
File "devel/sagenb-main/sagenb/notebook/user_manager.py", line 571, in sagenb.notebook.user_manager.OpenIDUserManager.get_username_from_openid
Failed example:
    UM.create_new_openid('https://www.google.com/accounts/o8/id?id=AItdaWgzjV1HJTa552549o1csTDdfeH6_bPxF14', 'thedude')
Exception raised:
    Traceback (most recent call last):
      File "/mazur/release/merger/sage-5.10.beta2/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 454, in _run
        self.execute(example, compiled, test.globs)
      File "/mazur/release/merger/sage-5.10.beta2/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 813, in execute
        exec compiled in globs
      File "<doctest sagenb.notebook.user_manager.OpenIDUserManager.get_username_from_openid[3]>", line 1, in <module>
        UM.create_new_openid('https://www.google.com/accounts/o8/id?id=AItdaWgzjV1HJTa552549o1csTDdfeH6_bPxF14', 'thedude')
      File "/mazur/release/merger/sage-5.10.beta2/devel/sagenb/sagenb/notebook/user_manager.py", line 594, in create_new_openid
        if not self._conf['openid']:
    KeyError: 'openid'
**********************************************************************

comment:17 Changed 6 years ago by ppurka

@jdemeyer Can you say why there are ImportError and IOError on doctesting files which have no doctests in them? The specific issue I am talking about is in this sagenb ticket.

comment:18 follow-up: Changed 6 years ago by kcrisman

When using this ticket, I get the following problem with sage -n. I can't say whether this is unique to me.

Executing twistd  --pidfile="sage_notebook.sagenb/sagenb.pid" -ny "sage_notebook.sagenb/twistedconf.tac"
Unhandled Error
Traceback (most recent call last):
  File "/Users/.../sage-5.9.rc1/local/lib/python2.7/site-packages/Twisted-12.3.0-py2.7-macosx-10.7-x86_64.egg/twisted/application/app.py", line 652, in run
    runApp(config)
  File "/Users/.../sage-5.9.rc1/local/lib/python2.7/site-packages/Twisted-12.3.0-py2.7-macosx-10.7-x86_64.egg/twisted/scripts/twistd.py", line 23, in runApp
    _SomeApplicationRunner(config).run()
  File "/Users/.../sage-5.9.rc1/local/lib/python2.7/site-packages/Twisted-12.3.0-py2.7-macosx-10.7-x86_64.egg/twisted/application/app.py", line 386, in run
    self.application = self.createOrGetApplication()
  File "/Users/.../sage-5.9.rc1/local/lib/python2.7/site-packages/Twisted-12.3.0-py2.7-macosx-10.7-x86_64.egg/twisted/application/app.py", line 451, in createOrGetApplication
    application = getApplication(self.config, passphrase)
--- <exception caught here> ---
  File "/Users/.../sage-5.9.rc1/local/lib/python2.7/site-packages/Twisted-12.3.0-py2.7-macosx-10.7-x86_64.egg/twisted/application/app.py", line 462, in getApplication
    application = service.loadApplication(filename, style, passphrase)
  File "/Users/.../sage-5.9.rc1/local/lib/python2.7/site-packages/Twisted-12.3.0-py2.7-macosx-10.7-x86_64.egg/twisted/application/service.py", line 405, in loadApplication
    application = sob.loadValueFromFile(filename, 'application', passphrase)
  File "/Users/.../sage-5.9.rc1/local/lib/python2.7/site-packages/Twisted-12.3.0-py2.7-macosx-10.7-x86_64.egg/twisted/persisted/sob.py", line 210, in loadValueFromFile
    exec fileObj in d, d
  File "sage_notebook.sagenb/twistedconf.tac", line 15, in <module>
    import base as flask_base
  File "/Users/.../sage-5.9.rc1/devel/sagenb/flask_version/base.py", line 10, in <module>
    from flaskext.openid import OpenID
exceptions.ImportError: No module named openid

Failed to load application: No module named openid

Traceback (most recent call last):
  File "/Users/.../sage-5.9.rc1/local/bin/sage-notebook", line 34, in <module>
    notebook()
  File "/Users/.../sage-5.9.rc1/devel/sagenb/sagenb/notebook/notebook_object.py", line 219, in __call__
    return self.notebook(*args, **kwds)
  File "/Users/.../sage-5.9.rc1/devel/sagenb/sagenb/notebook/run_notebook.py", line 608, in notebook_run
    raise socket.error
socket.error

comment:19 follow-up: Changed 6 years ago by ppurka

Are you using the git version of sage-5.9.rc1? I have seen this when using the git version and it is a known bug. Normal sage-5.9.rc1 worked fine here (Linux).

comment:20 in reply to: ↑ 19 Changed 6 years ago by kcrisman

Are you using the git version of sage-5.9.rc1? I have seen this when using the git version and it is a known bug. Normal sage-5.9.rc1 worked fine here (Linux).

No, just the git version of the sagenb (latest). I don't know how to use the git version of 5.9.rc1 :)

comment:21 Changed 6 years ago by ppurka

Ok. I have tested

  1. sage-5.9.beta1 on my Gentoo Linux laptop with (i) sagenb from git and (ii) the sagenb-0.10.6 spkg here.
  2. sage-5.9 on a Gentoo Linux desktop with (i) sagenb from git and (ii) the spkg here.
  3. sage-5.9.rc1 on a Debian 6 server with (i) sagenb from git and (ii) the spkg here.

All of them work.

comment:22 Changed 6 years ago by jdemeyer

In SPKG.txt, the following is wrong:

== License ==

GPLv2+

MathJax is licensed under Apache 2.0, which is compatible with GPLv3 but not GPLv2.

comment:23 Changed 6 years ago by jdemeyer

Also in setup.py:

    code = setup(name = 'sagenb',
          version     = '0.10.6',
          description = 'The Sage Notebook',
          license     = 'GNU General Public License (GPL) v2+',

comment:24 follow-up: Changed 6 years ago by ppurka

Two questions:

  1. Does it matter? Anyone who wants to fork it or do whatever with it is free to use GPLv3 instead of GPLv2. It is written as GPLv2+. It also has been so for over a year now (since MathJax went in).
  2. What does it imply about Sage? If the nb is converted to GPLv3, is it still ok to distribute it with sage?

comment:25 in reply to: ↑ 24 Changed 6 years ago by jdemeyer

Replying to ppurka:

Two questions:

  1. Does it matter?

I don't know whether it really matters. As a matter of correct documentation, it is something which can easily be fixed (simply by stating that sagenb is really GPLv3).

  1. What does it imply about Sage?

Nothing, given that Sage-as-distribution already has GPLv3 as only applicable license. Sage-the-library is GPLv2+.

comment:26 follow-up: Changed 6 years ago by ppurka

  1. The pull request 162 can be merged to upstream.
  2. I created an spkg with the changes. It can be downloaded for testing from my Google Drive here.
Last edited 6 years ago by ppurka (previous) (diff)

comment:27 in reply to: ↑ 26 Changed 6 years ago by dimpase

Replying to ppurka:

  1. I created an spkg with the changes. It can be downloaded for testing from my Google Drive here (I don't know any means of giving a

direct download).

did you try this:

http://thebiobucket.blogspot.sg/2011/10/how-to-link-to-google-docs-for-download.html

comment:28 follow-up: Changed 6 years ago by ppurka

This will work only till a certain extent. There is in fact a Google doc page which generates this url if you give it the public link. But this still can't be automated to a command line with wget. You have to use a browser to get the correct file name.

comment:29 in reply to: ↑ 28 Changed 6 years ago by dimpase

Replying to ppurka:

This will work only till a certain extent. There is in fact a Google doc page which generates this url if you give it the public link. But this still can't be automated to a command line with wget. You have to use a browser to get the correct file name.

OK, here is the right way:

comment:31 in reply to: ↑ 30 Changed 6 years ago by dimpase

Replying to ppurka:

Thanks. The spkg is here: https://googledrive.com/host/0B2kYdLdBVFHIZEd4ekpjNUFBNTQ/sagenb-0.10.6.spkg

OK. Did you test the LDAP feature on NTU's setup?

comment:32 Changed 6 years ago by ppurka

No I didn't check. An earlier version of the patch is already running for over 2y in the servers.

comment:33 Changed 6 years ago by dimpase

  • Description modified (diff)
  • Status changed from needs_work to needs_review

comment:34 in reply to: ↑ 18 ; follow-up: Changed 6 years ago by kcrisman

Replying to kcrisman:

When using this ticket, I get the following problem with sage -n. I can't say whether this is unique to me. exceptions.ImportError?: No module named openid

So... is this universally fixed? I haven't even been able to use this at all because of this, and relinked to the current sagenb on my personal installation.

comment:35 in reply to: ↑ 34 ; follow-ups: Changed 6 years ago by dimpase

Replying to kcrisman:

Replying to kcrisman:

When using this ticket, I get the following problem with sage -n. I can't say whether this is unique to me. exceptions.ImportError?: No module named openid

So... is this universally fixed? I haven't even been able to use this at all because of this, and relinked to the current sagenb on my personal installation.

Apparently, your installation didn't go well. You should be running Twisted version 13, not version 12. (And you get traceback from the latter)...

comment:36 in reply to: ↑ 35 Changed 6 years ago by kcrisman

When using this ticket, I get the following problem with sage -n. I can't say whether this is unique to me. exceptions.ImportError?: No module named openid

So... is this universally fixed? I haven't even been able to use this at all because of this, and relinked to the current sagenb on my personal installation.

Apparently, your installation didn't go well. You should be running Twisted version 13, not version 12. (And you get traceback from the latter)...

Hmm, so maybe just installing upstream doesn't simply require doing a soft link to upstream, but also some other unpacking of something...

comment:37 in reply to: ↑ 35 ; follow-up: Changed 6 years ago by kini

Well, you should be running setup.py develop or setup.py install. But...

Replying to dimpase:

Apparently, your installation didn't go well. You should be running Twisted version 13, not version 12. (And you get traceback from the latter)...

If this is true, then setup.py's dependency list is wrong - it only claims you need Twisted version 11 or greater.

comment:38 in reply to: ↑ 37 Changed 6 years ago by dimpase

Replying to kini:

Well, you should be running setup.py develop or setup.py install. But...

Replying to dimpase:

Apparently, your installation didn't go well. You should be running Twisted version 13, not version 12. (And you get traceback from the latter)...

If this is true, then setup.py's dependency list is wrong - it only claims you need Twisted version 11 or greater.

I just did sage -f on the spkg file. Is this not enough? I see that at startup I get

sage: notebook()
The notebook files are stored in: sage_notebook.sagenb
**************************************************
*                                                *
* Open your web browser to http://localhost:8080 *
*                                                *
**************************************************
Executing twistd  --pidfile="sage_notebook.sagenb/sagenb.pid" -ny "sage_notebook.sagenb/twistedconf.tac"
2013-06-09 13:57:50+0800 [-] Log opened.
2013-06-09 13:57:50+0800 [-] twistd 13.0.0 (/usr/local/src/sage/sage-5.10.rc1/local/bin/python 2.7.4) starting up.
...

so Twisted got updated to version 13 along the way.

But I have no clue how to tell what version is actually being run. Can one implement some functionality for this? Otherwise this will keep causing trouble... Something like notebook.version().

comment:39 Changed 6 years ago by kini

sage -f on the SPKG certainly should set everything up perfectly. I assumed kcrisman was trying to do something with the sagenb repo, rather than using the SPKG, since he mentions softlinks and upstreams.

Twisted got updated to version 13 when you installed the SPKG because the SPKG comes with Twisted version 13 in it (because it was packaged at some point in time during which PyPI's best match for the version requirement "twisted>=11" was Twisted version 13). This doesn't mean that sagenb necessarily requires that recent of a version of Twisted. Maybe it does, but if that is the case, that's a bug and someone needs to update setup.py and util/fetch_deps.py in the sagenb repo.

BTW since release 0.10.6 is already tagged in the git repo I suggest you call the SPKG you've made 0.10.7 and, once this ticket gets positive review, tag master as such and rebuild the SPKG with dist.sh. Basu, you might also want to ask William for an account on the Sage cluster if you don't already have one - then you can host arbitrary files on wstein.org/home/username instead of using Google Drive links :)

comment:40 Changed 6 years ago by dimpase

Is there any documentation on LDAP functionality available, and/or any UI? How can a user find it?

comment:41 follow-up: Changed 6 years ago by kcrisman

I assumed kcrisman was trying to do something with the sagenb repo, rather than using the SPKG, since he mentions softlinks and upstreams.

Correct, but I thought that was the only way to do *development* with the sagenb (which I needed for sws2rst). I'm going to try this again. I just did

$ git pull upstream master

but maybe I also have to do some python setup.py develop command in addition, even after I already had done so at some point? I hadn't done that. In fact, reading the comments above, it seems I should do that, though

  • I didn't want to break anything by doing so after pulling from master, and
  • for some reason after pulling from master (but not doing develop) it works again! ???!! I still have Twisted 12, apparently.

I agree about the 0.10.7 (or 0.10.6.1 or whatever). Note that these are in master, so I think what you mean is you want is for release to get updated to master or something?

comment:42 in reply to: ↑ 41 Changed 6 years ago by dimpase

Replying to kcrisman:

I just did

$ git pull upstream master

but maybe I also have to do some python setup.py develop command in addition, even after I already had done so at some point? I hadn't done that.

Well, you pulled an updated source. Assuming that your stuff is not 100% source-only, you need to do some kind of re-building, i.e. "python setup.py blah foo" or "./configure/make", or "sage -b", whatever is appropriate, every time you updated the source. An intelligent building system would not repeat unnecessary recompilations, so it ought to be quick...

comment:43 Changed 6 years ago by kcrisman

Oh, it was quick :) Note this needs to be done with the Sage Python... anyway, apparently all is well on that score.

Last edited 6 years ago by kcrisman (previous) (diff)

comment:44 Changed 6 years ago by dimpase

  • Status changed from needs_review to positive_review

OK, I think I can give it a positive review, assuming that a ticket on improving sagenb admin documentation will be open. (E.g.: how on Earth one can figure out how to set up LDAP auth without reading sources?!)

comment:45 Changed 6 years ago by jdemeyer

  • Milestone changed from sage-5.10 to sage-5.11
  • Reviewers set to Dmitrii Pasechnik

comment:46 Changed 6 years ago by ppurka

Can anyone test if the idle timeouts are working fine? I am getting a timeout and the sage process is quitting even when the idle timeout setting in my notebook is set to 0. There should be no timeouts at all in this case. See the last line below.

**************************************************
*                                                *
* Open your web browser to http://localhost:8080 *
*                                                *
**************************************************
Executing twistd  --pidfile="aaa.sagenb/sagenb.pid" -ny "aaa.sagenb/twistedconf.tac"
2013-06-14 20:31:07+0800 [-] Log opened.
2013-06-14 20:31:07+0800 [-] twistd 13.0.0 (/home/punarbasu/Installations/sage-5.10.rc0.sagenb/local/bin/python 2.7.4) starting up.
2013-06-14 20:31:07+0800 [-] reactor class: twisted.internet.epollreactor.EPollReactor.
2013-06-14 20:31:07+0800 [-] QuietSite starting on 8080
2013-06-14 20:31:07+0800 [-] Starting factory <__builtin__.QuietSite instance at 0x5e1a758>
2013-06-14 20:37:13+0800 [HTTPChannel,6,127.0.0.1] Quitting ignored worksheet process for u'aaa'.

Edit The timeout that I face is roughly 300s and it also doesn't match any of the timeout settings that I can see in the notebook interface.

Last edited 6 years ago by ppurka (previous) (diff)

comment:47 Changed 6 years ago by kcrisman

I did notice a lot of timeouts lately, but I thought it was something I did wrong. I don't have any details, I'm sorry, but can confirm that it's a little off.

comment:48 Changed 6 years ago by novoselt

  • Status changed from positive_review to needs_work
  • Work issues set to timeout does not work

I didn't experiment myself, but with two people having this issue it definitely should not be merged, plenty of worksheets require more than 5 minutes. On a related note of quitting worksheets unnecessarily: https://github.com/sagemath/sagenb/issues/163

comment:50 Changed 6 years ago by kcrisman

This also solves #13752, I think.

Last edited 6 years ago by kcrisman (previous) (diff)

comment:51 follow-up: Changed 6 years ago by novoselt

  • Work issues changed from timeout does not work to sphynx does not work for introspection

For me current top of sagenb does not process docstrings either via tab-completion or question mark.

comment:52 in reply to: ↑ 51 Changed 6 years ago by dimpase

  • Work issues changed from sphynx does not work for introspection to timeout does not work; sphynx does not work for introspection

Replying to novoselt:

For me current top of sagenb does not process docstrings either via tab-completion or question mark.

Has the "timeout does not work" problem been magically solved?

comment:53 Changed 6 years ago by kcrisman

Not magically, but it sounds like Andrey has an upstream pull request for this with correct code. We would need a new spkg, of course.

comment:54 Changed 6 years ago by novoselt

Do these lines look familiar to anyone?

    from pkg_resources import Requirement, working_set
    sagenb_path = working_set.find(Requirement.parse('sagenb')).location

In current master find returns None, which leads to an exception, all exceptions are caught by except: and then Sphinx is not working...

comment:55 Changed 6 years ago by ohanar

Andrey, does you pull request fix the issue mentioned here? To me it looks like it just makes sagenb respect the configuration file when the timeout isn't specified from the command-line -- which at least from reading this thread seems different than the issues others are experiencing.

comment:56 Changed 6 years ago by novoselt

Changing idle_timeout from 120 to 0 fixes timeout issue. Changing timeout=0 to timeout=None and extra if-check ensure that user settings via web interface affect the situation.

Meanwhile, can anyone else confirm that introspection is not working and it is not just me doing something stupid with git?

comment:57 Changed 6 years ago by novoselt

  • Work issues changed from timeout does not work; sphynx does not work for introspection to timeout does not work

OK, I have not run setup to register new notebook and that's why it could not find location of whatever.

comment:58 Changed 6 years ago by jdemeyer

Slightly off-topic, but I would like to point out that #14273 (which is supposed to be merged with this ticket) also needs review.

comment:59 Changed 6 years ago by kcrisman

I'm also wondering whether the spkg eventually created will be from the release branch or master branch. The master branch is missing things like some doctest fixes and of course anything new mentioned by Andrey et al. in the last while. Maybe there should be a 0.10.7 release that includes all the fixes before finally merging this.

comment:60 Changed 6 years ago by kini

The SPKG will have a version number, so the sagenb code in it should be the state of the repository at that version. That means the SPKG should be built from a tag. The tag should be somewhere on master. The release branch is just a branch that sits there and gets master merged into it whenever there's a new tagged version. It doesn't serve much of a purpose other than to track what the latest released version is.

comment:61 Changed 6 years ago by kcrisman

Okay, in that case we need a new tag (eventually) for all these fixes :-)

comment:62 Changed 6 years ago by novoselt

I would really like to have all my changes in as they have fixed old bugs that were really bugging me ;-) Plus the new version of MathJax is significantly faster, like twice, which helps preventing script timeouts in browsers.

comment:63 Changed 6 years ago by kini

  • Description modified (diff)
  • Summary changed from Upgrade to sagenb 0.10.6 to Upgrade to sagenb 0.10.7

comment:64 follow-up: Changed 6 years ago by novoselt

  • Work issues changed from timeout does not work to published formulas

I have 5.10 and 5.11.beta3 with this spkg running and typesetting does not work for published worksheets, I just see things like

<script type="math/tex">\newcommand{\Bold}[1]{\mathbf{#1}}\left[9, 18\right]</script>

Won't have time right now to figure out what triggers it, but will try in a couple of days if nobody beats me to it. Still "needs work", unfortunately... Is it maybe sanitation of worksheets to prevent scripts from running?..

comment:65 Changed 6 years ago by novoselt

And looks like images are not shown either.

comment:66 in reply to: ↑ 64 Changed 6 years ago by kcrisman

Replying to novoselt:

I have 5.10 and 5.11.beta3 with this spkg running and typesetting does not work for published worksheets, I just see things like

<script type="math/tex">\newcommand{\Bold}[1]{\mathbf{#1}}\left[9, 18\right]</script>

Won't have time right now to figure out what triggers it, but will try in a couple of days if nobody beats me to it. Still "needs work", unfortunately... Is it maybe sanitation of worksheets to prevent scripts from running?..

You must be right. I thought that this was only run as an option, but closer scrutiny says not. Mathjax isn't supposed to be killed off:

if el.tag=='script' and el.get('type')=='math/tex' and not el.get('src'):
    return True

but apparently it's not working right. Maybe it's working okay but some other stuff around it is removed so that the Mathjax doesn't render?

In any case, I feel like it should be an option to have this happen, and now I see it's required for all published worksheets. I could be persuaded otherwise, but at least this should work first :)

comment:67 Changed 6 years ago by novoselt

If this is the case, perhaps we should not ship sanitation with Sage. Those who run world-accessible servers should know what they are doing, what are the risks, and how to deal with them, in particular they are free to install the branch with sanitation. For those who run servers for trusted/known users only, sanitation is not really necessary...

comment:68 Changed 6 years ago by ppurka

I just tried and it is possible to remove (not revert) the commits by running

git rebase -i

and removing the commits corresponding to

| * | 003436a - Remove the remainder of the whatwg unsafe tags. 9 months ago <Jason Grout>
| * | 9f5bcf4 - Don't scrub html twice. 9 months ago <Jason Grout>
| * | 941299f - Add nofollow to html scrubbing.  Thanks to Volker Braun for bringing it up. 9 months ago <Jason Grout>
| * | 77fb49a - Sanitize the output and text cells of published worksheets. 9 months ago <Jason Grout>

Then we need to push (force) this update to sagenb master.

Do we want to do that? Will this automatically revert the status of jason's pull request to "open" again?

comment:69 Changed 6 years ago by kini

No, we don't want to force push to master. That's a very bad practice and will screw up anyone else who has pulled from the repo since I released 0.10.7. This will have to be 0.10.7.1, I'm afraid :P I'll cut it, give me a sec

comment:70 Changed 6 years ago by kini

  • Description modified (diff)
  • Status changed from needs_work to needs_review

comment:71 Changed 6 years ago by kini

  • Reviewers changed from Dmitrii Pasechnik to Dmitrii Pasechnik, Karl-Dieter Crisman, Jeroen Demeyer, Andrey Novoseltsev, Punarbasu Purkayastha

comment:72 Changed 6 years ago by novoselt

Thanks Keshav, published formulas and pictures are back, will keep testing!

comment:73 Changed 6 years ago by kcrisman

Thanks for catching this, Andrey! Sorry for missing this somehow :(

comment:74 Changed 6 years ago by ppurka

  • Status changed from needs_review to positive_review

I see [Math Processing Error] on published worksheets when the renderer is set to SVG. It works fine when it is kept at the default HTML-CSS.

3D plots show up fine (the 2D static version at least), and plots show up fine. I think this ticket is good to go.

comment:75 Changed 6 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:76 Changed 6 years ago by tkluck

  • Branch set to u/tkluck/ticket/134330

I added a git branch containing just the spkg meta files. It needs the file sagenb-0.10.7.1.tar.gz, which is available to people with accounts on boxen in my home directory (/home/tkluck/sagenb-0.10.7.1.tar.gz)

This does not (yet?) incorporate #10637 or #14273.

comment:77 Changed 6 years ago by tkluck

  • Branch changed from u/tkluck/ticket/134330 to u/tkluck/ticket/14330

comment:78 Changed 6 years ago by tkluck

comment:79 follow-up: Changed 6 years ago by tkluck

Why does this ticket depend on #10637?

On the one hand, we need to update to version 0.10.7.1 of the notebook to be able to switch to the integrated git repository. On the other hand, we try to keep the number of changes to a minimum. Is it okay to update the sage notebook in the git repository without applying #10637 there?

comment:80 in reply to: ↑ 79 Changed 6 years ago by ppurka

Replying to tkluck:

Why does this ticket depend on #10637?

The changes to the notebook to support sws2rst have already been merged and is present in 0.10.7.1.

As such you don't really need to apply #10637 to Sage to get a functional notebook. You won't lose any functionality in Sage, except that the sws2rst option won't be present. Doctests in sagenb should not fail, as long as you do not doctest the optional parts.

comment:81 Changed 6 years ago by jdemeyer

  • Work issues published formulas deleted

comment:82 Changed 6 years ago by jdemeyer

  • Merged in set to sage-5.12.beta0
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.