[sage-devel] Re: Bug with vars()?
I opened a ticket for the underlying issue: == Trac #18512: Move notebook() into Sage Right now the `notebook()` function is a lazy import from sagenb. Hence any access (like looking at the docstring) imports sagenb which changes the display backend which causes various problems (see https://groups.google.com/d/msg/sage-devel/3uaY6xHLMqQ/Zyn67xJ0LaMJ). It also doesn't fit into a world where there is more than one notebook. And its current behavior of turning the current Sage session into a notebook server can't work with the IPython notebook or SMC. First, we should definitely move `notebook` into the Sage library to move it away from sagenb. The more general question is what to do with it then. Options are * Just let it launch SageNB, any other notebook needs to be launched via `sage --notebook=...` on the commandline * Deprecate `notebook()` altogether * Let `notebook()` always spawn an independent process, and add an argument to select which one Status: new Component: notebook Last modified: 2015-05-26 07:04:55 Created: 2015-05-26 07:04:55 UTC Report upstream: N/A Authors: Reviewers: Branch: Keywords: Dependencies: -- URL: http://trac.sagemath.org/18512 == On Wednesday, May 6, 2015 at 10:51:27 AM UTC+2, Jean-Pierre Flori wrote: Dear all, My Sage 6.6 install quits after printing a depreciation warning message when I issue: sage: vars() Same is true for at least globals(). Any clue on what's going on? Best, JP -- You received this message because you are subscribed to the Google Groups sage-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
[sage-devel] Re: Bug with vars()?
There were some changes to how globals() are handled. Did you run make, can you show us the output, debugger, ... On Wednesday, May 6, 2015 at 10:51:27 AM UTC+2, Jean-Pierre Flori wrote: Dear all, My Sage 6.6 install quits after printing a depreciation warning message when I issue: sage: vars() Same is true for at least globals(). Any clue on what's going on? Best, JP -- You received this message because you are subscribed to the Google Groups sage-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
[sage-devel] Re: Bug with vars()?
Jean-Pierre Flori wrote: My Sage 6.6 install quits after printing a depreciation warning message when I issue: sage: vars() Works for me: ... 'zeta': zeta, 'zeta__exact': function zeta__exact at 0x7fa3b8c84b90, 'zeta_symmetric': function zeta_symmetric at 0x7fa3bac2f9b0, 'zeta_zeros': function zeta_zeros at 0x7fa273519aa0, 'zetaderiv': zetaderiv} --- TypeError Traceback (most recent call last) ipython-input-1-ef3ed5b882d8 in module() 1 vars() /data/Sage/release/stable/sage-6.6-gcc-4.9.2-default/local/lib/python2.7/site-packages/IPython/core/displayhook.pyc in __call__(self, result) 230 self.start_displayhook() 231 self.write_output_prompt() -- 232 format_dict, md_dict = self.compute_format_data(result) 233 self.update_user_ns(result) 234 self.fill_exec_result(result) TypeError: 'NoneType' object is not iterable sage: (Same in 4.7.beta4, FWIW. globals() doesn't throw.) Same is true for at least globals(). Any clue on what's going on? No. :-) -leif -- You received this message because you are subscribed to the Google Groups sage-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
Re: [sage-devel] Re: Bug with vars()?
I also have a 6.6 install which quites badly when I give (as the first command) vars(). The output is hunderds of lines long and ends with TypeError Traceback (most recent call last) ipython-input-1-ef3ed5b882d8 in module() 1 vars() /usr/local/sage/sage-2/local/lib/python2.7/site-packages/IPython/core/displayhook.pyc in __call__ (self, result) 230 self.start_displayhook() 231 self.write_output_prompt() -- 232 format_dict, md_dict = self.compute_format_data(result) 233 self.update_user_ns(result) 234 self.fill_exec_result(result) TypeError: 'NoneType' object is not iterable On 6 May 2015 at 11:26, Volker Braun vbraun.n...@gmail.com wrote: There were some changes to how globals() are handled. Did you run make, can you show us the output, debugger, ... On Wednesday, May 6, 2015 at 10:51:27 AM UTC+2, Jean-Pierre Flori wrote: Dear all, My Sage 6.6 install quits after printing a depreciation warning message when I issue: sage: vars() Same is true for at least globals(). Any clue on what's going on? Best, JP -- You received this message because you are subscribed to the Google Groups sage-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups sage-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
Re: [sage-devel] Re: Bug with vars()?
On 6 May 2015 at 12:49, Volker Braun vbraun.n...@gmail.com wrote: vars() works as documented. Its a good test whether every object that we define can actually print That sounds like a good thing, but I still do not understand why an error is raised. John itself. That caughs up plenty of deprecation warnings and fails for sage: notebook sagenb.notebook.notebook_object.NotebookObject instance at 0x7fbf8537e758 --- TypeError Traceback (most recent call last) ipython-input-1-608e12875613 in module() 1 notebook /mnt/disk/home/release/Sage/local/lib/python2.7/site-packages/IPython/core/displayhook.pyc in __call__(self, result) 230 self.start_displayhook() 231 self.write_output_prompt() -- 232 format_dict, md_dict = self.compute_format_data(result) 233 self.update_user_ns(result) 234 self.fill_exec_result(result) TypeError: 'NoneType' object is not iterable On Wednesday, May 6, 2015 at 1:16:49 PM UTC+2, John Cremona wrote: I also have a 6.6 install which quites badly when I give (as the first command) vars(). The output is hunderds of lines long and ends with TypeError Traceback (most recent call last) ipython-input-1-ef3ed5b882d8 in module() 1 vars() /usr/local/sage/sage-2/local/lib/python2.7/site-packages/IPython/core/displayhook.pyc in __call__ (self, result) 230 self.start_displayhook() 231 self.write_output_prompt() -- 232 format_dict, md_dict = self.compute_format_data(result) 233 self.update_user_ns(result) 234 self.fill_exec_result(result) TypeError: 'NoneType' object is not iterable On 6 May 2015 at 11:26, Volker Braun vbrau...@gmail.com wrote: There were some changes to how globals() are handled. Did you run make, can you show us the output, debugger, ... On Wednesday, May 6, 2015 at 10:51:27 AM UTC+2, Jean-Pierre Flori wrote: Dear all, My Sage 6.6 install quits after printing a depreciation warning message when I issue: sage: vars() Same is true for at least globals(). Any clue on what's going on? Best, JP -- You received this message because you are subscribed to the Google Groups sage-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com. To post to this group, send email to sage-...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups sage-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups sage-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
Re: [sage-devel] Re: Bug with vars()?
Technically its because * notebook is a lazy import, * printing notebook causes sagenb to be imported * which changes the displayhook to the SageNB displayhook which causes various problems. On Wednesday, May 6, 2015 at 1:58:45 PM UTC+2, John Cremona wrote: On 6 May 2015 at 12:49, Volker Braun vbrau...@gmail.com javascript: wrote: vars() works as documented. Its a good test whether every object that we define can actually print That sounds like a good thing, but I still do not understand why an error is raised. John itself. That caughs up plenty of deprecation warnings and fails for sage: notebook sagenb.notebook.notebook_object.NotebookObject instance at 0x7fbf8537e758 --- TypeError Traceback (most recent call last) ipython-input-1-608e12875613 in module() 1 notebook /mnt/disk/home/release/Sage/local/lib/python2.7/site-packages/IPython/core/displayhook.pyc in __call__(self, result) 230 self.start_displayhook() 231 self.write_output_prompt() -- 232 format_dict, md_dict = self.compute_format_data(result) 233 self.update_user_ns(result) 234 self.fill_exec_result(result) TypeError: 'NoneType' object is not iterable On Wednesday, May 6, 2015 at 1:16:49 PM UTC+2, John Cremona wrote: I also have a 6.6 install which quites badly when I give (as the first command) vars(). The output is hunderds of lines long and ends with TypeError Traceback (most recent call last) ipython-input-1-ef3ed5b882d8 in module() 1 vars() /usr/local/sage/sage-2/local/lib/python2.7/site-packages/IPython/core/displayhook.pyc in __call__ (self, result) 230 self.start_displayhook() 231 self.write_output_prompt() -- 232 format_dict, md_dict = self.compute_format_data(result) 233 self.update_user_ns(result) 234 self.fill_exec_result(result) TypeError: 'NoneType' object is not iterable On 6 May 2015 at 11:26, Volker Braun vbrau...@gmail.com wrote: There were some changes to how globals() are handled. Did you run make, can you show us the output, debugger, ... On Wednesday, May 6, 2015 at 10:51:27 AM UTC+2, Jean-Pierre Flori wrote: Dear all, My Sage 6.6 install quits after printing a depreciation warning message when I issue: sage: vars() Same is true for at least globals(). Any clue on what's going on? Best, JP -- You received this message because you are subscribed to the Google Groups sage-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com. To post to this group, send email to sage-...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups sage-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com javascript:. To post to this group, send email to sage-...@googlegroups.com javascript:. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups sage-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
Re: [sage-devel] Re: Bug with vars()?
vars() works as documented. Its a good test whether every object that we define can actually print itself. That caughs up plenty of deprecation warnings and fails for sage: notebook sagenb.notebook.notebook_object.NotebookObject instance at 0x7fbf8537e758 --- TypeError Traceback (most recent call last) ipython-input-1-608e12875613 in module() 1 notebook /mnt/disk/home/release/Sage/local/lib/python2.7/site-packages/IPython/core/displayhook.pyc in __call__(self, result) 230 self.start_displayhook() 231 self.write_output_prompt() -- 232 format_dict, md_dict = self.compute_format_data(result) 233 self.update_user_ns(result) 234 self.fill_exec_result(result) TypeError: 'NoneType' object is not iterable On Wednesday, May 6, 2015 at 1:16:49 PM UTC+2, John Cremona wrote: I also have a 6.6 install which quites badly when I give (as the first command) vars(). The output is hunderds of lines long and ends with TypeError Traceback (most recent call last) ipython-input-1-ef3ed5b882d8 in module() 1 vars() /usr/local/sage/sage-2/local/lib/python2.7/site-packages/IPython/core/displayhook.pyc in __call__ (self, result) 230 self.start_displayhook() 231 self.write_output_prompt() -- 232 format_dict, md_dict = self.compute_format_data(result) 233 self.update_user_ns(result) 234 self.fill_exec_result(result) TypeError: 'NoneType' object is not iterable On 6 May 2015 at 11:26, Volker Braun vbrau...@gmail.com javascript: wrote: There were some changes to how globals() are handled. Did you run make, can you show us the output, debugger, ... On Wednesday, May 6, 2015 at 10:51:27 AM UTC+2, Jean-Pierre Flori wrote: Dear all, My Sage 6.6 install quits after printing a depreciation warning message when I issue: sage: vars() Same is true for at least globals(). Any clue on what's going on? Best, JP -- You received this message because you are subscribed to the Google Groups sage-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com javascript:. To post to this group, send email to sage-...@googlegroups.com javascript:. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups sage-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
Re: [sage-devel] Re: Bug with vars()?
I unpacked the sage 6.6 tarball and ran make. I'll have some trouble posting the exact output here as the machine is not connected to the network, but basically: * I'm on an amd64 Ubuntu 14.04.2 LTS. * I launch: sage * I type at Sage's prompt: vars() * I get: /blablabla/pretty_print.py:147: DepreciationWarning: this is being removed from the global namespace. Use crystals.tab instead See http://trac.sagemath.org/15882 for details. ok = representation(obj, self, cycle) * I'm back at my shell. I'll have to build gdb to get further info. With 6.2 and 6.3 and 6.5, it works but before everything gets printed I see lots of this warning with slight variations in the line causing it. With 6.1.1 no warning, I guess 15882 was merged later. Anyway, it was a false alarm. I deleted my .sage directory and now it works: I get an error as others do. -- You received this message because you are subscribed to the Google Groups sage-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
Re: [sage-devel] Re: Bug with vars()?
On 2015-05-06 14:09, Volker Braun wrote: Technically its because * notebook is a lazy import, * printing notebook causes sagenb to be imported * which changes the displayhook to the SageNB displayhook which causes various problems. I guess that's a bug. Simply *importing* sagenb should not change the displayhook. -- You received this message because you are subscribed to the Google Groups sage-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.