#15980: Meta-ticket for Python 3.3+ preparation (sage library) - stage 1
--------------------------------+--------------------------
Reporter: wluebbe | Owner:
Type: task | Status: needs_work
Priority: major | Milestone: sage-6.8
Component: distribution | Resolution:
Keywords: python3 | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
--------------------------------+--------------------------
Description changed by jdemeyer:
Old description:
> This ticket tracks a number of other tickets that relate to various tasks
> to prepare Sage code for Python 3.
> [[br]]
> The following table lists those fixers from
> [[http://docs.python.org/2.7/library/2to3.html?highlight=2to3#|2to3]]
> that are applicable for stage 1.
>
> //stage 1// includes those 2to3 fixers that produce code which can run on
> Python 2.7 (possibly using some
> [[http://docs.python.org/2.7/library/__future__.html?highlight=__future__#__future__|from
> __future__ import ...]] or
> [[http://docs.python.org/2.7/library/future_builtins.html?highlight=future#future_builtins|from
> future_builtins import ...]]). The code will usually not run on Python 3.
>
> //stage 2// has those 2to3 fixers (and possibly others) that produce code
> which can run on Python 3 (more precisely Python 3.3+). The code can run
> on Python 2 only with the support of imported "compatibility" libraries.
> Stage 2 is now meta-ticket #16052.
>
> After completion of stage 1 and 2 Sage should have a single, common code
> base for Python 2.7 and Python 3.3+.
>
> ||No. ||2to3 fixer ||see ticket ||Comment ||
> || 1||apply ||none ||Nothing to change ||
> || 3||buffer ||none ||Nothing to change ||
> || 4||callable ||none ||No need to change (reintroduced in
> Python 3.2) ||
> || 6||except ||#15982 ||about 98 py&pyx modules||
> || 9||exitfunc ||none ||Nothing to change ||
> || 10||filter ||#16067 ||about 53 modules||
> || 11||funcattrs ||#15983 ||about 17 py&pyx modules; since Py2.6
> compatible fcts available ||
> || 12||future ||none ||do NOT run, as we want to keep {{{from
> __future__ import xxx}}} ||
> || 13||getcwdu ||none ||Nothing to change ||
> || 14||has_key ||#15784 ||Nothing to change, since already done ||
> || 15||idioms ||#15984 ||about 145 py&pyx modules; details see
> ticket ||
> || 16||import ||#15985 ||about 568 py modules; with {{{from
> __future__ import absolute_import}}}||
> || 18||imports2 ||none ||Nothing to change ||
> || 19||input ||none ||Nothing to change ||
> || 20||intern ||none ||Nothing to change ||
> || 21||isinstance ||none ||Nothing to change ||
> || 27||methodattrs ||#15986 ||7 py&pyx modules; since Py2.6 compatible
> fcts available ||
> || 28||ne ||#15734 ||Done||
> ||29a||next ||#16075 ||about 84 modules||
> || 32||operator ||none ||Nothing to change ||
> || 33||paren ||#15988 ||2 py modules||
> || 34||print ||#15989 ||about 204 py modules and many doctests;
> with {{{from __future__ import print_function}}}||
> || 35||raise ||#15990 ||about 505 py modules||
> || 37||reduce ||#16078 ||about 24 modules||
> || 38||renames ||#15991 ||18 py&pyx modules||
> || 39||repr ||#15992 ||4 py modules||
> || 40||set_literal ||none ||do NOT run, as it is mere style change
> ||
> || 41||standard_error ||none ||Nothing to change ||
> || 42||sys_exc ||none ||Nothing to change ||
> || 43||throw ||none ||Nothing to change ||
> || 44||tuple_params ||#15993 ||25 py modules||
> || 45||types ||#15994 ||5 py modules||
> || 48||ws_comma ||none ||do NOT run; about 13,049 changes; just
> to enhance readability and PEP8 compliance ||
> || 50||xreadlines ||none ||Nothing to change ||
>
> The following changes do not relate to 2to3:
> || 61||division ||#18622, #18578, #15995, #19535, #19536 ||up to 411
> py modules; with {{{from __future__ import division}}}||
> || 62||cmp parameter ||#16536 ||a few modules affected||
> || 63||rich comparison ||#16537 ||many modules affected||
> * Note 1: The //No.// in the above table is an enumeration of the fixers
> of {{{lib2to3/fixes/*}}}.
> * Note 2: No. starting with denote fixers not included in
> {{{lib2to3/fixes/*}}}.
New description:
This ticket tracks a number of other tickets that relate to various tasks
to prepare Sage code for Python 3.
[[br]]
The following table lists those fixers from
[[http://docs.python.org/2.7/library/2to3.html?highlight=2to3#|2to3]] that
are applicable for stage 1.
//stage 1// includes those 2to3 fixers that produce code which can run on
Python 2.7 (possibly using some
[[http://docs.python.org/2.7/library/__future__.html?highlight=__future__#__future__|from
__future__ import ...]] or
[[http://docs.python.org/2.7/library/future_builtins.html?highlight=future#future_builtins|from
future_builtins import ...]]). The code will usually not run on Python 3.
//stage 2// has those 2to3 fixers (and possibly others) that produce code
which can run on Python 3 (more precisely Python 3.3+). The code can run
on Python 2 only with the support of imported "compatibility" libraries.
Stage 2 is now meta-ticket #16052.
After completion of stage 1 and 2 Sage should have a single, common code
base for Python 2.7 and Python 3.3+.
||No. ||2to3 fixer ||see ticket ||Comment ||
|| 1||apply ||none ||Nothing to change ||
|| 3||buffer ||none ||Nothing to change ||
|| 4||callable ||none ||No need to change (reintroduced in
Python 3.2) ||
|| 6||except ||#15982 ||about 98 py&pyx modules||
|| 9||exitfunc ||none ||Nothing to change ||
|| 10||filter ||#16067 ||about 53 modules||
|| 11||funcattrs ||#15983 ||about 17 py&pyx modules; since Py2.6
compatible fcts available ||
|| 12||future ||none ||do NOT run, as we want to keep {{{from
__future__ import xxx}}} ||
|| 13||getcwdu ||none ||Nothing to change ||
|| 14||has_key ||#15784 ||Nothing to change, since already done ||
|| 15||idioms ||#15984 ||about 145 py&pyx modules; details see ticket
||
|| 16||import ||#15985 ||about 568 py modules; with {{{from
__future__ import absolute_import}}}||
|| 18||imports2 ||none ||Nothing to change ||
|| 19||input ||none ||Nothing to change ||
|| 20||intern ||none ||Nothing to change ||
|| 21||isinstance ||none ||Nothing to change ||
|| 27||methodattrs ||#15986 ||7 py&pyx modules; since Py2.6 compatible
fcts available ||
|| 28||ne ||#15734 ||Done||
||29a||next ||#16075 ||about 84 modules||
|| 32||operator ||none ||Nothing to change ||
|| 33||paren ||#15988 ||2 py modules||
|| 34||print ||#15989 ||about 204 py modules and many doctests; with
{{{from __future__ import print_function}}}||
|| 35||raise ||#15990 ||about 505 py modules||
|| 37||reduce ||#16078 ||about 24 modules||
|| 38||renames ||#15991 ||18 py&pyx modules||
|| 39||repr ||#15992 ||4 py modules||
|| 40||set_literal ||none ||do NOT run, as it is mere style change
||
|| 41||standard_error ||none ||Nothing to change ||
|| 42||sys_exc ||none ||Nothing to change ||
|| 43||throw ||none ||Nothing to change ||
|| 44||tuple_params ||#15993 ||25 py modules||
|| 45||types ||#15994 ||5 py modules||
|| 48||ws_comma ||none ||do NOT run; about 13,049 changes; just
to enhance readability and PEP8 compliance ||
|| 50||xreadlines ||none ||Nothing to change ||
The following changes do not relate to 2to3:
|| 61||division ||#18622, #18578, #15995, #19535, #19536, #19842 ||up
to 411 py modules; with {{{from __future__ import division}}}||
|| 62||cmp parameter ||#16536 ||a few modules affected||
|| 63||rich comparison ||#16537 ||many modules affected||
* Note 1: The //No.// in the above table is an enumeration of the fixers
of {{{lib2to3/fixes/*}}}.
* Note 2: No. starting with denote fixers not included in
{{{lib2to3/fixes/*}}}.
--
--
Ticket URL: <http://trac.sagemath.org/ticket/15980#comment:22>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.