[sage-combinat-devel] sage-combinat currently breaks sage

2013-02-16 Thread Anne Schilling
Hi!

Applying all patches in the sage-combinat queue needing review (and no further)
currently breaks sage

---
ImportError   Traceback (most recent call last)

/Applications/sage-5.6/local/lib/python2.7/site-packages/sage/misc/interpreter.pyc
 in sage_prefilter(self, block, continuation)
403 for i in range(len(B)):
404 L = B[i]
-- 405 M = do_prefilter_paste(L, continuation or (not first))
406 first = False
407 # The L[:len(L)-len(L.lstrip())]  business here preserves

/Applications/sage-5.6/local/lib/python2.7/site-packages/sage/misc/interpreter.pyc
 in do_prefilter_paste(line, continuation)
234
235 if len(line)  0:
-- 236 line = preparser_ipython.preparse_ipython(line, not 
continuation)
237
238 return line

/Applications/sage-5.6/local/lib/python2.7/site-packages/sage/misc/preparser_ipython.pyc
 in preparse_ipython(line, reset)
 76 # but I don't know how yet...
 77 L = L[1:].strip()
--- 78 import sage.interfaces.all
 79 if L.lower() in sage.interfaces.all.interfaces:
 80 switch_interface(L.lower())

/Applications/sage-5.6/local/lib/python2.7/site-packages/sage/interfaces/all.py 
in module()
  2
  3 from frobby import frobby
 4 from four_ti_2 import four_ti_2
  5 from axiom import Axiom, axiom, axiom_console
  6 from fricas import FriCAS, fricas, fricas_console

/Applications/sage-5.6/local/lib/python2.7/site-packages/sage/interfaces/four_ti_2.py
 in module()
 32 
#*
 33
--- 34 from sage.rings.integer_ring import ZZ
 35 import os
 36

/Applications/sage-5.6/devel/sage-combinat/integer.pxd in init 
sage.rings.integer_ring (sage/rings/integer_ring.c:12180)()
  7
  8
 9
 10
 11

/Applications/sage-5.6/devel/sage-combinat/integer.pyx in init 
sage.rings.integer (sage/rings/integer.c:38406)()
169
170
-- 171
172
173

/Applications/sage-5.6/local/lib/python2.7/site-packages/sage/rings/infinity.py 
in module()
198 #import sage.rings.real_mpfr
199 import sage.rings.integer
-- 200 import sage.rings.rational
201
202 from sage.rings.integer_ring import ZZ

/Applications/sage-5.6/devel/sage-combinat/fast_arith.pxd in init 
sage.rings.rational (sage/rings/rational.c:27918)()
  3
  4
 5
  6
  7

/Applications/sage-5.6/devel/sage-combinat/fast_arith.pyx in init 
sage.rings.fast_arith (sage/rings/fast_arith.c:8060)()
 49
 50
--- 51
 52
 53

ImportError: cannot import name ZZ
sage:
KeyboardInterrupt

Cheers,

Anne

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-combinat-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-combinat-devel] Re: sage-combinat currently breaks sage

2013-02-16 Thread Travis Scrimshaw
Hey Anne and Nicolas,

I caused this when I rebased #10963. I've fixed it and pushed the changes.

Sorry!
Travis


On Saturday, February 16, 2013 9:54:59 AM UTC-5, Anne Schilling wrote:

 Hi! 

 Applying all patches in the sage-combinat queue needing review (and no 
 further) 
 currently breaks sage 

 --- 

 ImportError   Traceback (most recent call 
 last) 

 /Applications/sage-5.6/local/lib/python2.7/site-packages/sage/misc/interpreter.pyc
  
 in sage_prefilter(self, block, continuation) 
 403 for i in range(len(B)): 
 404 L = B[i] 
 -- 405 M = do_prefilter_paste(L, continuation or (not first)) 
 406 first = False 
 407 # The L[:len(L)-len(L.lstrip())]  business here 
 preserves 

 /Applications/sage-5.6/local/lib/python2.7/site-packages/sage/misc/interpreter.pyc
  
 in do_prefilter_paste(line, continuation) 
 234 
 235 if len(line)  0: 
 -- 236 line = preparser_ipython.preparse_ipython(line, not 
 continuation) 
 237 
 238 return line 

 /Applications/sage-5.6/local/lib/python2.7/site-packages/sage/misc/preparser_ipython.pyc
  
 in preparse_ipython(line, reset) 
  76 # but I don't know how yet... 
  77 L = L[1:].strip() 
 --- 78 import sage.interfaces.all 
  79 if L.lower() in sage.interfaces.all.interfaces: 
  80 switch_interface(L.lower()) 

 /Applications/sage-5.6/local/lib/python2.7/site-packages/sage/interfaces/all.py
  
 in module() 
   2 
   3 from frobby import frobby 
  4 from four_ti_2 import four_ti_2 
   5 from axiom import Axiom, axiom, axiom_console 
   6 from fricas import FriCAS, fricas, fricas_console 

 /Applications/sage-5.6/local/lib/python2.7/site-packages/sage/interfaces/four_ti_2.py
  
 in module() 
  32 
 #*
  

  33 
 --- 34 from sage.rings.integer_ring import ZZ 
  35 import os 
  36 

 /Applications/sage-5.6/devel/sage-combinat/integer.pxd in init 
 sage.rings.integer_ring (sage/rings/integer_ring.c:12180)() 
   7 
   8 
  9 
  10 
  11 

 /Applications/sage-5.6/devel/sage-combinat/integer.pyx in init 
 sage.rings.integer (sage/rings/integer.c:38406)() 
 169 
 170 
 -- 171 
 172 
 173 

 /Applications/sage-5.6/local/lib/python2.7/site-packages/sage/rings/infinity.py
  
 in module() 
 198 #import sage.rings.real_mpfr 
 199 import sage.rings.integer 
 -- 200 import sage.rings.rational 
 201 
 202 from sage.rings.integer_ring import ZZ 

 /Applications/sage-5.6/devel/sage-combinat/fast_arith.pxd in init 
 sage.rings.rational (sage/rings/rational.c:27918)() 
   3 
   4 
  5 
   6 
   7 

 /Applications/sage-5.6/devel/sage-combinat/fast_arith.pyx in init 
 sage.rings.fast_arith (sage/rings/fast_arith.c:8060)() 
  49 
  50 
 --- 51 
  52 
  53 

 ImportError: cannot import name ZZ 
 sage: 
 KeyboardInterrupt 

 Cheers, 

 Anne 


-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-combinat-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-combinat-devel] patches fail to apply

2013-02-16 Thread Franco Saliola
I just tried applying the queue to 5.6 and came across the following
problems (both patches apparently have positive reviews). I didn't try to
apply the entire queue, so I don't know whether there are any other issues.

This workflow doesn't work for me.

-

applying trac_14065-combinatorial_object_cmp-ts.patch
patching file sage/categories/crystals.py
Hunk #1 FAILED at 518
1 out of 3 hunks FAILED -- saving rejects to file
sage/categories/crystals.py.rej
patch failed, unable to continue (try -v)
patch failed, rejects left in working dir
errors during apply, please fix and refresh
trac_14065-combinatorial_object_cmp-ts.patch

-

applying trac_14130-gyw-bs.patch
patching file sage/categories/crystals.py
Hunk #1 FAILED at 498
1 out of 1 hunks FAILED -- saving rejects to file
sage/categories/crystals.py.rej
patching file sage/combinat/crystals/highest_weight_crystals.py
Hunk #1 FAILED at 82
1 out of 1 hunks FAILED -- saving rejects to file
sage/combinat/crystals/highest_weight_crystals.py.rej
patch failed, unable to continue (try -v)
patch failed, rejects left in working dir
errors during apply, please fix and refresh trac_14130-gyw-bs.patch

-

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-combinat-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sage-combinat-devel] patches fail to apply

2013-02-16 Thread Anne Schilling
Hi Franco,

For me everything applies to sage-5.6. Try

hg qpop -a
hg qselect
hg qpush -a

I moved the puzzle patch up in the queue, so hopefully
this should work for you and gave it the ticket number 14141!!! :-)

Cheers,

Anne

On 2/16/13 7:19 AM, Franco Saliola wrote:
 
 I just tried applying the queue to 5.6 and came across the following problems 
 (both patches apparently have positive reviews). I didn't try to apply the 
 entire queue, so I don't know whether there are
 any other issues.
 
 This workflow doesn't work for me.
 
 -
 
 applying trac_14065-combinatorial_object_cmp-ts.patch
 patching file sage/categories/crystals.py
 Hunk #1 FAILED at 518
 1 out of 3 hunks FAILED -- saving rejects to file 
 sage/categories/crystals.py.rej
 patch failed, unable to continue (try -v)
 patch failed, rejects left in working dir
 errors during apply, please fix and refresh 
 trac_14065-combinatorial_object_cmp-ts.patch
 
 -
 
 applying trac_14130-gyw-bs.patch
 patching file sage/categories/crystals.py
 Hunk #1 FAILED at 498
 1 out of 1 hunks FAILED -- saving rejects to file 
 sage/categories/crystals.py.rej
 patching file sage/combinat/crystals/highest_weight_crystals.py
 Hunk #1 FAILED at 82
 1 out of 1 hunks FAILED -- saving rejects to file 
 sage/combinat/crystals/highest_weight_crystals.py.rej
 patch failed, unable to continue (try -v)
 patch failed, rejects left in working dir
 errors during apply, please fix and refresh trac_14130-gyw-bs.patch
 
 -
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 sage-combinat-devel group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to sage-combinat-devel+unsubscr...@googlegroups.com.
 To post to this group, send email to sage-combinat-devel@googlegroups.com.
 Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.
  
  

-- 
Anne Schilling  E-mail: a...@math.ucdavis.edu
Professor   Web:http://www.math.ucdavis.edu/~anne
Department of Mathematics   Office: MSB 3222
University of CaliforniaPhone:  (530) 554 2326
One Shields Ave Fax:(530) 752 6635
Davis, CA 95616

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-combinat-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-devel] Shibboleth and Sage ?

2013-02-16 Thread Thierry Dumont

Dear Colleagues,

I am wondering if a Sage interface to Shibboleth 
(http://en.wikipedia.org/wiki/Shibboleth_%28Internet2%29) would be 
inresting / difficult to build.


In France, Shibboleth is popular in academic institutions and it would 
be interesting to allow a Sage server to work with it. The concept seems 
 different from OpenID...


Did any body looked at this ?
yours
t.

--
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


attachment: tdumont.vcf

Re: [sage-devel] sage -t Help

2013-02-16 Thread John Cremona
I think it works if you cd to SAGE_ROOT and do the sage -t from there
(with the full relative path to the file of course).

John

On 16 February 2013 04:30, Kannappan Sampath kntri...@gmail.com wrote:
 Hello everyone,

 I would be very glad if someone can please help me with this problem. I had
 wanted to review some doctest-adding patches. So, as a preliminary, if I did
 sage -t filename, I get mysterious errors.

 For instance, in sage/rings/, if I do  sage -t complex_interval.pyx, (I
 think this goes through for any .pyx file from my cursory looking into what
 flows on the screen when I do sage -t * in a directory...), I get that very
 large file, I am attaching.

 Questions:

 1) Is this one one of the intended uses of the 't' flag: sage -t
 filename.pyx? You may assume that filename.pyx exists at pwd.

 2) If the answer to the above is yes, how do I fix the problem I am facing?

 Notes about the Sage distro: Sage 5.7.beta4. I have other versions all built
 from source at the ~/Downloads/ along with this one.

 Hope someone would help. Thank you. ~KnS


 --
 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?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.



-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sage-devel] sage -t Help

2013-02-16 Thread Jeroen Demeyer
On 2013-02-16 05:30, Kannappan Sampath wrote:
 Hello everyone, 
 
 I would be very glad if someone can please help me with this problem. I
 had wanted to review some doctest-adding patches. So, as a preliminary,
 if I did sage -t filename, I get mysterious errors. 

I think we need more information about exactly what you're trying to do.
1) was this a build from source or a binary build?
2) do you get the same errors with a plain vanilla Sage (without the
extra patches)?
3) does the sage executable refer to the version of Sage you're testing?
4) did you remember to run sage -b after applying the patch?

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sage-devel] sage -t Help

2013-02-16 Thread Jeroen Demeyer
On 2013-02-16 11:55, John Cremona wrote:
 I think it works if you cd to SAGE_ROOT and do the sage -t from there
 (with the full relative path to the file of course).
That shouldn't be the problem, doctests are supposed to work from any
directory:

jdemeyer@sage:/release/merger/sage-5.8.beta0/devel/sage/sage/rings$
../../../../sage -t complex_interval.pyx
sage -t  devel/sage-main/sage/rings/complex_interval.pyx
 [4.8 s]

--
All tests passed!
Total time for all tests: 4.9 seconds

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-devel] Re: interesting IPython notebooks

2013-02-16 Thread kcrisman


On Friday, February 15, 2013 9:49:16 PM UTC-5, jason wrote:

 Fernando Perez put together this interesting page of IPython notebooks: 


 https://github.com/ipython/ipython/wiki/A-gallery-of-interesting-IPython-Notebooks
  

 I thought you guys would have fun looking through some of them. 


These are really cool - I love 
http://nbviewer.ipython.org/urls/raw.github.com/carljv/Will_it_Python/master/ARM/ch5/arsenic_wells_switching.ipynb.
 
 Would something like this rendering be a way to allow the resumption of 
published worksheets at sagenb.org, or is the security issue the same with 
their model?

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sage-devel] sage -t Help

2013-02-16 Thread Kannappan Sampath
Dear Jeroen and John,

Thank you for the replies. OK, thanks for the questions. One of them nails
it

On Sat, Feb 16, 2013 at 4:53 PM, Jeroen Demeyer jdeme...@cage.ugent.bewrote:

 On 2013-02-16 05:30, Kannappan Sampath wrote:
  Hello everyone,
 
  I would be very glad if someone can please help me with this problem. I
  had wanted to review some doctest-adding patches. So, as a preliminary,
  if I did sage -t filename, I get mysterious errors.

 I think we need more information about exactly what you're trying to do.
 1) was this a build from source or a binary build?

2) do you get the same errors with a plain vanilla Sage (without the
 extra patches)?
 3) does the sage executable refer to the version of Sage you're testing?

I think no: the sage --version echoes Sage 5.6 that I got from Ubuntu
Repos!! And, I had applied the patches for testing on sage.5.7.beta4.

4) did you remember to run sage -b after applying the patch?

Yes.

So, could you please tell me how would I run this version of sage? And, I
think the reason the tests are failing on the Sage 5.6 is there are some
changes that I have not committed. Is this right?

Thanks for the hint that the sage test works from any other directory. But,
if I did sudo, the sage says, some other users could put files and is not
the best place to run sage code from, which makes sense.

Hopefully, I have given enough information to help me.

Thank you.

Kannappan

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sage-devel] sage -t Help

2013-02-16 Thread Jeroen Demeyer
On 2013-02-16 14:36, Kannappan Sampath wrote:
 So, could you please tell me how would I run this version of sage?
It depends on what you want to do. If you *always* want that version of
Sage, you could either:
- change the file `which sage` to point to the directory you want (for
example, by making it a symlink to /path/to/sage-5.7.beta4/sage)
- set SAGE_ROOT in your ~/.bashrc (or whatever rc file for your shell)
- make an alias sage=/path/to/sage-5.7.beta4/sage in your ~/.bashrc
(or whatever rc file for your shell)

If you just want to run that version for testing, you could do:
$ ../../../../sage -t complex_interval.pyx

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-devel] Improper use of UniqueRepresentation

2013-02-16 Thread Simon King
Hi!

Currently I try to make hash and comparison of UniqueRepresentation
faster. When my attempts broke some tests, I found that
UniqueRepresentation is used improperly in some locations.

For example, it is used on named groups.
  sage: G = SymmetricGroup(6)
  sage: type(G)
  sage.groups.perm_gps.permgroup_named.SymmetricGroup_with_category
  sage: isinstance(G, UniqueRepresentation)
  True
  sage: G3 = G.subgroup([G((1,2,3,4,5,6)),G((1,2))])
  sage: hash(G)
  110093248
  sage: hash(G3)
  -2734260432119589081
  sage: G == G3
  True

This is because named groups override the __eq__ method of
UniqueRepresentation, but do not override the __hash__ method. So,
that's broken. Similar things happen a lot in sage/graphs.

UniqueRepresentation is not just about caching of an object by means of the
arguments used to create it! In addition, it is about objects that compare
equal if and only if they are identical. Hence, overriding __eq__ simply
makes no sense for sub-classes of UniqueRepresentation.

What shall we do about it?

To the very least, UniqueRepresentation should not be used as a base
class for named groups. One could still use ClasscallMetaclass and use a
weak_cached_function decorator on __classcall__, in order to cache named
groups.

But in addition, the hash is broken in the example above. Do you have a
good suggestion for a hash that is compatible with comparison of these
named groups? Similarly for graphs.

Best regards,
Simon


-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.