[sage-devel] Re: Abandon Python 2.6 support?

2016-06-10 Thread Nathan Dunfield

>
> Which operating systems / distros would be affected by this (i.e., only 
> ship with 2.6.x [and probably some older 3.x])? 
>

What I'd seriously worry about here is RHEL 6 and derivatives (CentOS, 
SciLinux).  It only comes with Python 2.6 by default, and while old (came 
out in 2010), it is frequently seen on university high-performance 
computing clusters (for example the main cluster here at UIUC).  

OS X is not a issue as has been Python 2.7 is included since 10.7, and in 
any event it is easy to install Python there. 

Best,

Nathan

-- 
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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: Abandon Python 2.6 support?

2016-06-10 Thread leif
John H Palmieri wrote:
> Building Sage requires a system installation of Python. So far Python
> 2.6 has been good enough, and when changes were made to inadvertently
> break this (one as recent as March: see
> https://groups.google.com/forum/#!msg/sage-devel/1hbXSJFWDZw/NNP9L2V9DQAJ),
> people complained.
> 
> Now the plan is to require Python 2.7: see
> http://trac.sagemath.org/ticket/20802 (motivated by the use of argparse
> in http://trac.sagemath.org/ticket/20721) and
> http://trac.sagemath.org/ticket/20023. This change seems important
> enough that we should discuss it here rather than on a trac ticket.

Which operating systems / distros would be affected by this (i.e., only
ship with 2.6.x [and probably some older 3.x])?

How complicated is it (for an "ordinary" user) to build or just install
Python 2.7 on these?  (Note that on some systems, users would have to
build/install their personal Python version -- or ask a sysadmin.)


Would it perhaps be possible to first grab a binary distribution of Sage
in order to later build (probably some newer version of) Sage from
source with that?  (As a "simple" way to get Python 2.7, and probably
also a more recent GCC.  I'd personally of course prefer if Sage
required at most Python 2.6 to bootstrap.)


-leif

P.S.:  IMHO it's already stupid that building Sage requires some other
Python despite Sage building its own;  it would seem even more stupid if
it required (almost) the same version it builds...


-- 
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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Abandon Python 2.6 support?

2016-06-10 Thread John H Palmieri
Building Sage requires a system installation of Python. So far Python 2.6 
has been good enough, and when changes were made to inadvertently break 
this (one as recent as March: see 
https://groups.google.com/forum/#!msg/sage-devel/1hbXSJFWDZw/NNP9L2V9DQAJ), 
people complained.

Now the plan is to require Python 2.7: see 
http://trac.sagemath.org/ticket/20802 (motivated by the use of argparse in 
http://trac.sagemath.org/ticket/20721) and 
http://trac.sagemath.org/ticket/20023. This change seems important enough 
that we should discuss it here rather than on a trac ticket.

-- 
John

-- 
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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: import and build with py3

2016-06-10 Thread Volker Braun
Afaik this is the expected result: Compiled modules (both bytecode pyc or 
binary so) are versioned and will not be loaded if there is a version 
mismatch.



On Friday, June 10, 2016 at 3:10:56 PM UTC-4, Frédéric Chapoton wrote:
>
> ok, sorry for being so dumb and unclear. Please be patient. Let me try to 
> be more clear.
> Currently I do that:
>
> * enter a python3 virtual env (using source mypy3/bin/activate)
> * cd sage/src
> * launch ipython
> * import sage
> * from sage.interfaces.all import *
> resulting in 
> ImportError: No module named 'sage.misc.lazy_import'
>
> So my question is: what is the cause of this error ? The same error 
> happens for several cython modules.
>
> Frederic
>
>
> Le vendredi 10 juin 2016 20:59:31 UTC+2, Volker Braun a écrit :
>>
>> Whats your question
>>
>> a) you want to build Sage in a py3 environment? Then build Sage in a py3 
>> environment. What hat do you mean by "flag to pass to make"??
>>
>> b) you want to build Sage in a py2 environment but you want Sage to build 
>> its own Python 3. Then run "SAGE_PYTHON3=yes make"
>>
>>
>>
>>
>>
>>
>> On Friday, June 10, 2016 at 2:37:43 PM UTC-4, Frédéric Chapoton wrote:
>>>
>>> Sure, but how can I try ? Is there something like a flag to pass to make 
>>> ?
>>>
>>> Le vendredi 10 juin 2016 20:19:38 UTC+2, Volker Braun a écrit :

 Sage is supposedly requiring Python 2.7 or 3.3+ to build, but it isn't 
 tested with py3 so its unlikely to actually work.



 On Friday, June 10, 2016 at 2:10:38 PM UTC-4, Frédéric Chapoton wrote:
>
> Hello,
>
> What is the correct way to start trying to build sage in a python3 
> (virtual) environnement ?
>
> When I do a "make" inside a py3 virtual env, sage just setups its own 
> environnement, using py2, of course.
>
> When I try to import parts of sage from an ipython3 session, I run 
> into several things:
>
> * first one is #20706.
>
> * another one is the fact that cython extensions are not available, so 
> that I get messages like
>
> ImportError: No module named 'sage.misc.lazy_import'
>
> Is there a way to tell sage to try to build using py3 ?
>
> Frederic
>


-- 
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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: import and build with py3

2016-06-10 Thread Frédéric Chapoton
ok, sorry for being so dumb and unclear. Please be patient. Let me try to 
be more clear.
Currently I do that:

* enter a python3 virtual env (using source mypy3/bin/activate)
* cd sage/src
* launch ipython
* import sage
* from sage.interfaces.all import *
resulting in 
ImportError: No module named 'sage.misc.lazy_import'

So my question is: what is the cause of this error ? The same error happens 
for several cython modules.

Frederic


Le vendredi 10 juin 2016 20:59:31 UTC+2, Volker Braun a écrit :
>
> Whats your question
>
> a) you want to build Sage in a py3 environment? Then build Sage in a py3 
> environment. What hat do you mean by "flag to pass to make"??
>
> b) you want to build Sage in a py2 environment but you want Sage to build 
> its own Python 3. Then run "SAGE_PYTHON3=yes make"
>
>
>
>
>
>
> On Friday, June 10, 2016 at 2:37:43 PM UTC-4, Frédéric Chapoton wrote:
>>
>> Sure, but how can I try ? Is there something like a flag to pass to make ?
>>
>> Le vendredi 10 juin 2016 20:19:38 UTC+2, Volker Braun a écrit :
>>>
>>> Sage is supposedly requiring Python 2.7 or 3.3+ to build, but it isn't 
>>> tested with py3 so its unlikely to actually work.
>>>
>>>
>>>
>>> On Friday, June 10, 2016 at 2:10:38 PM UTC-4, Frédéric Chapoton wrote:

 Hello,

 What is the correct way to start trying to build sage in a python3 
 (virtual) environnement ?

 When I do a "make" inside a py3 virtual env, sage just setups its own 
 environnement, using py2, of course.

 When I try to import parts of sage from an ipython3 session, I run into 
 several things:

 * first one is #20706.

 * another one is the fact that cython extensions are not available, so 
 that I get messages like

 ImportError: No module named 'sage.misc.lazy_import'

 Is there a way to tell sage to try to build using py3 ?

 Frederic

>>>

-- 
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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: import and build with py3

2016-06-10 Thread Volker Braun
Whats your question

a) you want to build Sage in a py3 environment? Then build Sage in a py3 
environment. What hat do you mean by "flag to pass to make"??

b) you want to build Sage in a py2 environment but you want Sage to build 
its own Python 3. Then run "SAGE_PYTHON3=yes make"






On Friday, June 10, 2016 at 2:37:43 PM UTC-4, Frédéric Chapoton wrote:
>
> Sure, but how can I try ? Is there something like a flag to pass to make ?
>
> Le vendredi 10 juin 2016 20:19:38 UTC+2, Volker Braun a écrit :
>>
>> Sage is supposedly requiring Python 2.7 or 3.3+ to build, but it isn't 
>> tested with py3 so its unlikely to actually work.
>>
>>
>>
>> On Friday, June 10, 2016 at 2:10:38 PM UTC-4, Frédéric Chapoton wrote:
>>>
>>> Hello,
>>>
>>> What is the correct way to start trying to build sage in a python3 
>>> (virtual) environnement ?
>>>
>>> When I do a "make" inside a py3 virtual env, sage just setups its own 
>>> environnement, using py2, of course.
>>>
>>> When I try to import parts of sage from an ipython3 session, I run into 
>>> several things:
>>>
>>> * first one is #20706.
>>>
>>> * another one is the fact that cython extensions are not available, so 
>>> that I get messages like
>>>
>>> ImportError: No module named 'sage.misc.lazy_import'
>>>
>>> Is there a way to tell sage to try to build using py3 ?
>>>
>>> Frederic
>>>
>>

-- 
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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: limit bug that I'm really sure used to work correctly

2016-06-10 Thread saad khalid
On page 3 at the top, is that a typo with how (9)(1/2) is formatted? 

-- 
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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: limit bug that I'm really sure used to work correctly

2016-06-10 Thread rjf
Relying  on what Maxima does for infinities is probably not a great tactic.
There are two models, conflicting and yet both in use. And neither one
quite covers what you might want. 
See
http://people.eecs.berkeley.edu/~fateman/papers/infinity.pdf

for some discussion.  Is there "one point" where +-infinity sits?
or would that place be "undefined"?

or you might want something like Mathematica's  DirectedInfinity.

Comments on that (draft) paper above are welcome.

RJF

On Tuesday, June 7, 2016 at 1:53:33 PM UTC-7, john_perry_usm wrote:
>
>  I should elaborate on this after rereading the limit documentation more 
> carefully. It states:
>
> Return the limit as the variable v approaches a from the given
>direction.
>
>   expr.limit(x = a)
>   expr.limit(x = a, dir='above')
>
>INPUT:
>
>* "dir" - (default: None); dir may have the value 'plus' (or '+'
>  or 'right') for a limit from above, 'minus' (or '-' or 'left')
>  for a limit from below, or may be omitted (implying a two-sided
>  limit is to be computed).
>
> The second expression (right before INPUT) seems to imply that the default 
> value for dir is 'above'. That might explain why Sage hands back Infinity, 
> but the description of "dir" implies that the default is None.
>
> So I'm totally confused.
>

-- 
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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: import and build with py3

2016-06-10 Thread Frédéric Chapoton
Sure, but how can I try ? Is there something like a flag to pass to make ?

Le vendredi 10 juin 2016 20:19:38 UTC+2, Volker Braun a écrit :
>
> Sage is supposedly requiring Python 2.7 or 3.3+ to build, but it isn't 
> tested with py3 so its unlikely to actually work.
>
>
>
> On Friday, June 10, 2016 at 2:10:38 PM UTC-4, Frédéric Chapoton wrote:
>>
>> Hello,
>>
>> What is the correct way to start trying to build sage in a python3 
>> (virtual) environnement ?
>>
>> When I do a "make" inside a py3 virtual env, sage just setups its own 
>> environnement, using py2, of course.
>>
>> When I try to import parts of sage from an ipython3 session, I run into 
>> several things:
>>
>> * first one is #20706.
>>
>> * another one is the fact that cython extensions are not available, so 
>> that I get messages like
>>
>> ImportError: No module named 'sage.misc.lazy_import'
>>
>> Is there a way to tell sage to try to build using py3 ?
>>
>> Frederic
>>
>

-- 
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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: import and build with py3

2016-06-10 Thread Volker Braun
Sage is supposedly requiring Python 2.7 or 3.3+ to build, but it isn't 
tested with py3 so its unlikely to actually work.



On Friday, June 10, 2016 at 2:10:38 PM UTC-4, Frédéric Chapoton wrote:
>
> Hello,
>
> What is the correct way to start trying to build sage in a python3 
> (virtual) environnement ?
>
> When I do a "make" inside a py3 virtual env, sage just setups its own 
> environnement, using py2, of course.
>
> When I try to import parts of sage from an ipython3 session, I run into 
> several things:
>
> * first one is #20706.
>
> * another one is the fact that cython extensions are not available, so 
> that I get messages like
>
> ImportError: No module named 'sage.misc.lazy_import'
>
> Is there a way to tell sage to try to build using py3 ?
>
> Frederic
>

-- 
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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: limit bug that I'm really sure used to work correctly

2016-06-10 Thread saad khalid
Will there be a trac made about this? 

On Tuesday, June 7, 2016 at 3:36:50 PM UTC-5, john_perry_usm wrote:
>
> This surprised me today:
>
> > limit(1/x, x=0)
> Infinity
>
> I was expecting something more like this:
>
> > limit(x/abs(x), x=0)
> und
>
> The help on Infinity wasn't illuminating:
>
> > Infinity?
> Type:  PlusInfinity
> String form:   +Infinity
>
> ...and so forth. This implies to me that Infinity and +Infinity are the 
> same, but Sage seems to give a different result for the one-sided limit:
>
> > limit(1/x, x=0, dir='right')
> +Infinity
>
> Why am I getting a different answer this time? I'll grant that Sage 
> eventually simplifies them to the same:
>
> > (limit(1/x, x=0, dir='right') == limit(1/x, x=0)).full_simplify()
> 1
> > (limit(1/x, x=0, dir='left') == limit(1/x, x=0)).full_simplify()
> 0
>
> ...but they print differently for some reason, and in any case I don't see 
> why Sage would report a limit when the two one-sided limits disagree. The 
> documentation on limit didn't help, either.
>
> Is this a bug, or do I misunderstand something?
>

-- 
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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] import and build with py3

2016-06-10 Thread Frédéric Chapoton
Hello,

What is the correct way to start trying to build sage in a python3 
(virtual) environnement ?

When I do a "make" inside a py3 virtual env, sage just setups its own 
environnement, using py2, of course.

When I try to import parts of sage from an ipython3 session, I run into 
several things:

* first one is #20706.

* another one is the fact that cython extensions are not available, so that 
I get messages like

ImportError: No module named 'sage.misc.lazy_import'

Is there a way to tell sage to try to build using py3 ?

Frederic

-- 
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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Global namespace and independent python packages

2016-06-10 Thread Travis Scrimshaw
Something else you can do on the Sage side is to have something like:

try:
from sage.foo import Bar
except ImportError:
pass

So it only gets included into the global namespace if you have the module 
installed.

Best,
Travis

-- 
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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.