Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meta-ticket for Python 3.6+ preparation (sage library) - stage 1 #15980

Closed
wluebbe mannequin opened this issue Mar 20, 2014 · 26 comments
Closed

Meta-ticket for Python 3.6+ preparation (sage library) - stage 1 #15980

wluebbe mannequin opened this issue Mar 20, 2014 · 26 comments

Comments

@wluebbe
Copy link
Mannequin

wluebbe mannequin commented Mar 20, 2014

For progress on making all doctests pass, see #26212

This ticket tracks a number of other tickets that relate to various tasks to prepare Sage code for Python 3.

The following table lists those fixers from 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 from __future__ import ... or 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, #22808 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, #20554
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/*.

Component: python3

Issue created by migration from https://trac.sagemath.org/ticket/15980

@wluebbe wluebbe mannequin added this to the sage-6.2 milestone Mar 20, 2014
@wluebbe wluebbe mannequin added c: distribution labels Mar 20, 2014
@wluebbe

This comment has been minimized.

@wluebbe

This comment has been minimized.

@wluebbe

This comment has been minimized.

@ohanar
Copy link
Member

ohanar commented Apr 2, 2014

comment:4

Hi Wilfried,

There is currently a meta-ticket pertaining to supporting Python 3.3 for the Sage distribution, which includes making various changes to the build system and upgrading various dependencies (see #15530). I've added this meta-ticket to that meta-ticket and changed the summary of this one to better reflect that it is specifically referring to the sage library.

I'm a little confused on your distinction between stage 1 and stage 2. What exactly are things that go into stage 2 but not into stage 1?

I don't see anywhere in this list issues with renamed/reorganized libraries like urllib or StringIO, maybe this is part of the compatibility library that you mention as part of stage 2? Also, probably the biggest issue with Python 3 support is the requirement for rich comparison, which again wasn't mentioned in here.

@ohanar ohanar changed the title Meta-ticket for Python 3.3+ preparation - stage 1 Meta-ticket for Python 3.3+ preparation (sage library) - stage 1 Apr 2, 2014
@wluebbe
Copy link
Mannequin Author

wluebbe mannequin commented Apr 3, 2014

comment:5

Hi Andrew,

Thanks for linking the ticket:15530 and improving the ticket's title.

As for stage 2 I guess I should soon open the respective meta-ticket.

Some reasons for assigning tasks to stage 2:

  • The code can run on Python 2 only with the support of imported "compatibility" libraries. [copied from description]
    Maybe we have to check the licenses of the used compatibility libraries.
  • The tasks are usually more complicated. The approach may not be obvious or uncontroversial.
  • To make progress we need a Python 3.3 test environment for them (can ticket:15530 help?).

And yes, the issues to mention belong to stage 2.

Hopefully the tasks assigned to stage 1 turn out (relatively) easy :-)

@wluebbe

This comment has been minimized.

@wluebbe

This comment has been minimized.

@wluebbe wluebbe mannequin added the s: needs review label Apr 3, 2014
@wluebbe
Copy link
Mannequin Author

wluebbe mannequin commented Apr 3, 2014

comment:8

Was changed to "needs review" to allow "needs work".

@wluebbe wluebbe mannequin added s: needs work and removed s: needs review labels Apr 3, 2014
@wluebbe

This comment has been minimized.

@wluebbe

This comment has been minimized.

@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.2, sage-6.3 May 6, 2014
@wluebbe

This comment has been minimized.

@wluebbe
Copy link
Mannequin Author

wluebbe mannequin commented May 29, 2014

comment:12

Changed No. 10 (ticket:16067) and No. 37 (ticket:16078) from stage 2 to stage 1.

Corrected the fixer name in No. 50 to "xreadlines".

@wluebbe

This comment has been minimized.

@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@jdemeyer

This comment has been minimized.

@jdemeyer jdemeyer modified the milestones: sage-6.4, sage-6.8 Jun 6, 2015
@wluebbe

This comment has been minimized.

@jdemeyer

This comment has been minimized.

@jdemeyer

This comment has been minimized.

@jdemeyer

This comment has been minimized.

@jdemeyer

This comment has been minimized.

@jdemeyer

This comment has been minimized.

@jdemeyer

This comment has been minimized.

@jdemeyer

This comment has been minimized.

@jdemeyer

This comment has been minimized.

@fchapoton fchapoton modified the milestones: sage-6.8, sage-8.0 May 11, 2017
@embray embray removed this from the sage-8.0 milestone Feb 23, 2018
@embray embray added the pending label Feb 23, 2018
@embray embray changed the title Meta-ticket for Python 3.3+ preparation (sage library) - stage 1 Meta-ticket for Python 3.6+ preparation (sage library) - stage 1 Feb 23, 2018
@fchapoton

This comment has been minimized.

@mkoeppe
Copy link
Member

mkoeppe commented Apr 12, 2020

comment:30

Can this be closed?

@fchapoton
Copy link
Contributor

comment:31

ok, let us close this one too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants