Re: [sage-devel] Re: python3 : help needed

2017-05-29 Thread Nils Bruin
On Monday, May 29, 2017 at 2:08:37 AM UTC-6, vdelecroix wrote: > > Note that __hex__ is not used anymore in py3 (calling `hex(obj)` goes > through `obj.__index__()`). What I proposed in cypari2 [1] is to use > Cython macros for py2/py3 changes. That solved all py2/py3 issues we had. > > Ah. So a

Re: [sage-devel] Re: python3 : help needed

2017-05-29 Thread Vincent Delecroix
On 26/05/2017 03:01, Nils Bruin wrote: On Thursday, May 25, 2017 at 4:36:49 PM UTC-7, Nils Bruin wrote: TypeError: __str__ returned non-string (type bytes) which happens in the Parent stuff for "rings/infinity.py" somewhere. The problem is clear: we end up with some byte string from what sho

[sage-devel] Re: python3 : help needed

2017-05-28 Thread John H Palmieri
On Friday, May 26, 2017 at 8:40:22 AM UTC-7, Nils Bruin wrote: > > On Friday, May 26, 2017 at 7:52:57 AM UTC-7, John H Palmieri wrote: >> >> If you build Sage's IPython package with SAGE_PYTHON3=yes, then it will >> install a script local/bin/ipython3. (Note then that if the sage-location >> sc

Re: [sage-devel] Re: python3 : help needed

2017-05-28 Thread François Bissey
Originally only sent to Frederic instead of the group Forwarded Message Subject: Re: [sage-devel] Re: python3 : help needed Date: Mon, 29 May 2017 10:00:25 +1200 From: François Bissey To: Frédéric Chapoton On 25/05/17 20:49, Frédéric Chapoton wrote: ok, now with 8.0.b8

[sage-devel] Re: python3 : help needed

2017-05-26 Thread Nils Bruin
On Friday, May 26, 2017 at 7:52:57 AM UTC-7, John H Palmieri wrote: > > If you build Sage's IPython package with SAGE_PYTHON3=yes, then it will > install a script local/bin/ipython3. (Note then that if the sage-location > script runs, its function make_scripts_relative will break > local/bin/ipy

[sage-devel] Re: python3 : help needed

2017-05-26 Thread John H Palmieri
On Thursday, May 25, 2017 at 6:11:02 PM UTC-7, Nils Bruin wrote: > > On Thursday, May 25, 2017 at 5:07:22 PM UTC-7, John H Palmieri wrote: >> >> >> >> On Thursday, May 25, 2017 at 4:40:01 PM UTC-7, Nils Bruin wrote: >>> >>> incidentally, it would be nice if we could equiv local/bin/ipython with

[sage-devel] Re: python3 : help needed

2017-05-26 Thread Frédéric Chapoton
pip upgrade is waiting at https://trac.sagemath.org/ticket/21835 (but may not be ready) I am working on a ticket for changes concerning ETuple and map. Le vendredi 26 mai 2017 09:34:57 UTC+2, Dima Pasechnik a écrit : > > > > On Friday, May 26, 2017 at 2:11:02 AM UTC+1, Nils Bruin wrote: >> >> On

[sage-devel] Re: python3 : help needed

2017-05-26 Thread Dima Pasechnik
On Friday, May 26, 2017 at 2:11:02 AM UTC+1, Nils Bruin wrote: > > On Thursday, May 25, 2017 at 5:07:22 PM UTC-7, John H Palmieri wrote: >> >> >> >> On Thursday, May 25, 2017 at 4:40:01 PM UTC-7, Nils Bruin wrote: >>> >>> incidentally, it would be nice if we could equiv local/bin/ipython with >>

[sage-devel] Re: python3 : help needed

2017-05-25 Thread Nils Bruin
On Thursday, May 25, 2017 at 5:07:22 PM UTC-7, John H Palmieri wrote: > > > > On Thursday, May 25, 2017 at 4:40:01 PM UTC-7, Nils Bruin wrote: >> >> incidentally, it would be nice if we could equiv local/bin/ipython with >> the proper sage-python23 as well. Having a functional shell with an >> in

[sage-devel] Re: python3 : help needed

2017-05-25 Thread Nils Bruin
On Thursday, May 25, 2017 at 4:36:49 PM UTC-7, Nils Bruin wrote: > > > TypeError: __str__ returned non-string (type bytes) > > which happens in the Parent stuff for "rings/infinity.py" somewhere. The > problem is clear: we end up with some byte string from what should be a > "str". I don't know

[sage-devel] Re: python3 : help needed

2017-05-25 Thread John H Palmieri
On Thursday, May 25, 2017 at 4:40:01 PM UTC-7, Nils Bruin wrote: > > incidentally, it would be nice if we could equiv local/bin/ipython with > the proper sage-python23 as well. Having a functional shell with an > interactive debugger is a much nicer way to debug "import sage.all". > This is a

[sage-devel] Re: python3 : help needed

2017-05-25 Thread Nils Bruin
incidentally, it would be nice if we could equiv local/bin/ipython with the proper sage-python23 as well. Having a functional shell with an interactive debugger is a much nicer way to debug "import sage.all". -- You received this message because you are subscribed to the Google Groups "sage-de

[sage-devel] Re: python3 : help needed

2017-05-25 Thread Nils Bruin
Thank you! I can confirm that, after a distclean, building your branch with `SAGE_PYTHON3=yes` gets me to the same point as you describe. The first few issues are fairly simple. I've pushed some coarse fixes for them to trac u/nbruin/py3_compat (based on your ugly_python3). I consider these mor

[sage-devel] Re: python3 : help needed

2017-05-25 Thread Frédéric Chapoton
I have made a git branch (public/ugly_python3) with the ad-hoc changes..With this, one meets as wanted (this is my aim) a first real problem in sage-code (namely unicode in sageinspect for the moment). Frederic Le jeudi 25 mai 2017 17:37:10 UTC+2, Frédéric Chapoton a écrit : > > Hello, > > I wo

[sage-devel] Re: python3 : help needed

2017-05-25 Thread John H Palmieri
On Thursday, May 25, 2017 at 10:08:21 AM UTC-7, Kwankyu Lee wrote: > > The successful launch with my built of sage with python3 seems well > explained by John. > > On Thursday, May 25, 2017 at 5:37:10 PM UTC+2, Frédéric Chapoton wrote >> >> The road towards a full python3 sage is still quite lon

[sage-devel] Re: python3 : help needed

2017-05-25 Thread Kwankyu Lee
The successful launch with my built of sage with python3 seems well explained by John. On Thursday, May 25, 2017 at 5:37:10 PM UTC+2, Frédéric Chapoton wrote > > The road towards a full python3 sage is still quite long, and my > motivation gets weaker, as it seems that not so many people care ab

[sage-devel] Re: python3 : help needed

2017-05-25 Thread Frédéric Chapoton
Hello, I would like the design discussion to take place now, for sure. I would like that we have a clean way to build and run sage with python3, so that we can concentrate on fixing the many remaining issues inside sage code itself, with a python3 build correctly in place. The road towards a fu

[sage-devel] Re: python3 : help needed

2017-05-25 Thread John H Palmieri
On Thursday, May 25, 2017 at 1:49:34 AM UTC-7, Frédéric Chapoton wrote: > > ok, now with 8.0.b8, you can just do > > "export SAGE_PYTHON3=yes" > > and then "make build". This should succeed, with no error message. > > Then try "./sage" > > This fails with some traceback about not finding sage.rep

[sage-devel] Re: python3 : help needed

2017-05-25 Thread Frédéric Chapoton
ah, indeed, that's a possibility. I hope that I said loud enough not to play with SAGE_PYTHON in the usual sage install... Le jeudi 25 mai 2017 17:01:14 UTC+2, John H Palmieri a écrit : > > > > On Thursday, May 25, 2017 at 7:49:42 AM UTC-7, Kwankyu Lee wrote: >> >> >> >> On Thursday, May 25, 2017

[sage-devel] Re: python3 : help needed

2017-05-25 Thread John H Palmieri
On Thursday, May 25, 2017 at 7:49:42 AM UTC-7, Kwankyu Lee wrote: > > > > On Thursday, May 25, 2017 at 4:36:04 PM UTC+2, Frédéric Chapoton wrote: >> >> Very surprising that sage starts.. Did you really launch the sage that >> you just compiled ? >> > > I suspect this as well... I will respond la

[sage-devel] Re: python3 : help needed

2017-05-25 Thread Kwankyu Lee
On Thursday, May 25, 2017 at 4:36:04 PM UTC+2, Frédéric Chapoton wrote: > > Very surprising that sage starts.. Did you really launch the sage that you > just compiled ? > I suspect this as well... I will respond later when I am sure about everything. I am a bit busy for other things right now.

[sage-devel] Re: python3 : help needed

2017-05-25 Thread Frédéric Chapoton
Very surprising that sage starts.. Did you really launch the sage that you just compiled ? I am using Linux, and do not know anything about macs, sorry. Did you check that "echo $SAGE_PYTHON3" answered yes ? Yes, another aspect of the same problem is this complete recompilation every time. It

[sage-devel] Re: python3 : help needed

2017-05-25 Thread Kwankyu Lee
On Thursday, May 25, 2017 at 10:49:34 AM UTC+2, Frédéric Chapoton wrote: > > ok, now with 8.0.b8, you can just do > > "export SAGE_PYTHON3=yes" > > and then "make build". This should succeed, with no error message. > > Then try "./sage" > Following your instructions, I built sage on mac. Then sa

[sage-devel] Re: python3 : help needed

2017-05-25 Thread Frédéric Chapoton
ok, now with 8.0.b8, you can just do "export SAGE_PYTHON3=yes" and then "make build". This should succeed, with no error message. Then try "./sage" This fails with some traceback about not finding sage.repl.interpreter. Once again, can *please* someone help to fix that ? Frederic Le vendred

[sage-devel] Re: python3 : help needed

2017-05-20 Thread John H Palmieri
On Saturday, May 20, 2017 at 1:12:48 PM UTC-7, John H Palmieri wrote: > > In the file src/sage_setup/clean.py, the variable CEXTMOD_EXTS could > perhaps be modified from (on OS X) ".so" to ".cpython-36m-darwin.so". That > fixes the problem for me, but I'm not what Python code to use to come wit

[sage-devel] Re: python3 : help needed

2017-05-20 Thread John H Palmieri
On Saturday, May 20, 2017 at 8:33:20 AM UTC-7, John H Palmieri wrote: > > We do not have a plan for how to *run* Sage using Python3, only for how to > build it: set SAGE_PYTHON3=yes. Should there be a separate command, > `sage3`, which uses Python3? Or once you build with SAGE_PYTHON3=yes, > s

[sage-devel] Re: python3 : help needed

2017-05-20 Thread John H Palmieri
On Saturday, May 20, 2017 at 1:12:48 PM UTC-7, John H Palmieri wrote: > > In the file src/sage_setup/clean.py, the variable CEXTMOD_EXTS could > perhaps be modified from (on OS X) ".so" to ".cpython-36m-darwin.so". That > fixes the problem for me, but I'm not what Python code to use to come wit

[sage-devel] Re: python3 : help needed

2017-05-20 Thread John H Palmieri
In the file src/sage_setup/clean.py, the variable CEXTMOD_EXTS could perhaps be modified from (on OS X) ".so" to ".cpython-36m-darwin.so". That fixes the problem for me, but I'm not what Python code to use to come with "cpython-36m-darwin". Something in distutils? Along similar lines, building

[sage-devel] Re: python3 : help needed

2017-05-20 Thread John H Palmieri
With Python 2, the .so files are just called "sage_object.so", while with Python 3, the .so files are called "sage_object.cpython-36m-darwin.so" (on OS X). Is that file name difference causing Sage to treat them as stale (= not connected to existing Sage library files) and thus removing them? I

[sage-devel] Re: python3 : help needed

2017-05-20 Thread John H Palmieri
We do not have a plan for how to *run* Sage using Python3, only for how to build it: set SAGE_PYTHON3=yes. Should there be a separate command, `sage3`, which uses Python3? Or once you build with SAGE_PYTHON3=yes, should everything use Python3 aftewards? (I essentially proposed that at #22582 an

[sage-devel] Re: python3 : help needed

2017-05-19 Thread Frédéric Chapoton
There are many files in src/bin with the first line being "#!/usr/bin/env python" Should we convert all of them to cal sage-python23 or only a few critical ones ? Le samedi 20 mai 2017 07:59:34 UTC+2, Frédéric Chapoton a écrit : > > Thanks, John, for the helping hand. > > Yes, this unicode err

[sage-devel] Re: python3 : help needed

2017-05-19 Thread Frédéric Chapoton
Thanks, John, for the helping hand. Yes, this unicode error will be the next one we need to handle. But first we need to understand what is going wrong before. Commenting the line in src/setup.py is certainly not the right solution.. Le samedi 20 mai 2017 00:43:25 UTC+2, John H Palmieri a écri

[sage-devel] Re: python3 : help needed

2017-05-19 Thread John H Palmieri
On Friday, May 19, 2017 at 3:27:54 PM UTC-7, John H Palmieri wrote: > > > > On Friday, May 19, 2017 at 2:46:15 PM UTC-7, John H Palmieri wrote: >> >> >> >> On Friday, May 19, 2017 at 9:51:46 AM UTC-7, Frédéric Chapoton wrote: >>> >>> Dear all, >>> >>> We have almost reached the state of vanilla s

[sage-devel] Re: python3 : help needed

2017-05-19 Thread John H Palmieri
On Friday, May 19, 2017 at 2:46:15 PM UTC-7, John H Palmieri wrote: > > > > On Friday, May 19, 2017 at 9:51:46 AM UTC-7, Frédéric Chapoton wrote: >> >> Dear all, >> >> We have almost reached the state of vanilla sage building with >> SAGE_PYTHON3=yes (this does not mean working !). But something

[sage-devel] Re: python3 : help needed

2017-05-19 Thread John H Palmieri
On Friday, May 19, 2017 at 9:51:46 AM UTC-7, Frédéric Chapoton wrote: > > Dear all, > > We have almost reached the state of vanilla sage building with > SAGE_PYTHON3=yes (this does not mean working !). But something seems to go > wrong, and I would like help to find and fix the current problem.