On Thu, Jun 1, 2017 at 4:01 PM, William Stein <wst...@gmail.com> wrote:
>
>
> On Thursday, June 1, 2017, Erik Bray <erik.m.b...@gmail.com> wrote:
>>
>> On Wed, May 31, 2017 at 10:00 PM, John H Palmieri
>> <jhpalmier...@gmail.com> wrote:
>> > I have a proposal for making the transition to use Sage with Python 3.
>> > See
>> > https://trac.sagemath.org/ticket/23119 for details (and a branch which
>> > works, at least in my limited testing). The proposal:
>> >
>> > - Have a new command "sage3" which runs Sage using Python 3.
>> >
>> > - If you build Sage with the environment variable SAGE_PYTHON3 set to
>> > "yes",
>> > then build for both Python 2 and Python 3. Although this will increase
>> > the
>> > build time and the required disk space (by 800MB when I tried it), it
>> > means
>> > that you should have a choice about how to run Sage which does not
>> > depend on
>> > how you built it.
>> >
>> > - Although for now, SAGE_PYTHON3 will not be set, eventually we could
>> > switch
>> > to having it always set to "yes", to encourage Python 3 development and
>> > prevent Python 3 incompatibilities. (Then later we can change the
>> > behavior
>> > again, only building for Python 3.)
>> >
>> > - It would probably be good to have a ./configure option instead of the
>> > environment variable, but I have not tried to implement that.
>> >
>> > Please provide feedback. I have not heard any other suggestions for how
>> > to
>> > run Sage with Python 3, so I thought a concrete proposal would be good
>> > to
>> > get the ball rolling.
>> >
>> > This proposal still requires solving the problems Frédéric has already
>> > mentioned
>> > (https://groups.google.com/d/msg/sage-devel/FqR-37Fu3tY/RjDx_SG_BAAJ),
>> > as
>> > well as ongoing work to make the Sage library compatible with Python 3.
>> > Everyone is encouraged to contribute!
>>
>> I basically like this idea.  Though rather than a separate `sage3`
>> command why not just a simple flag to the existing `sage` command?
>> E.g. `sage -3`.  This would have the effect of setting the default
>> Python for all things that use Python (`sage -pip`, `sage -python`,
>> and just the sage interpreter itself) to Python 3.
>
>
>
> Maybe we could also redo the command line options parsing properly for the
> new sage3 command?  Eg use sub commands like git, use the python argparse
> module properly, etc.

I've been thinking of cleaning up the main `sage` command anyways,
though it would be good to transition to a new, better UI for it as
well.

For the top level of the `sage` command I wouldn't use Python.  For
example, for things like `sage -sh` (or whatever the future equivalent
is) starting up the Python interpreter just to launch a shell is too
slow.  But sub-command handling can still be implemented cleanly and
nicely in a bash script.  Individual sub-commands may, in turn, be
written in Python depending on how relevant the overhead is.

-- 
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.

Reply via email to