Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#20694 closed enhancement (fixed)

use six to import builtins

Reported by: Frédéric Chapoton Owned by:
Priority: major Milestone: sage-7.3
Component: python3 Keywords: days74
Cc: Travis Scrimshaw, Jori Mäntysalo, Jeroen Demeyer Merged in:
Authors: Frédéric Chapoton Reviewers: Vincent Delecroix
Report Upstream: N/A Work issues:
Branch: e87c370 (Commits, GitHub, GitLab) Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by Frédéric Chapoton)

change import __builtin__ to from six.moves import builtins

as a small step towards python3

Change History (15)

comment:1 Changed 6 years ago by Frédéric Chapoton

Branch: public/20694
Cc: Travis Scrimshaw Jori Mäntysalo Jeroen Demeyer added
Commit: 22c79f1496229d4a0318bfe3b1f9818d06cff720
Status: newneeds_review

New commits:

22c79f1trac 20694 using six.moves import builtins

comment:2 Changed 6 years ago by Frédéric Chapoton

Description: modified (diff)

comment:3 Changed 6 years ago by git

Commit: 22c79f1496229d4a0318bfe3b1f9818d06cff720d5ae950877412a3d87d96498c2116ad229dc4f75

Branch pushed to git repo; I updated commit sha1. New commits:

d5ae950trac 20694 undo change in pyx file

comment:4 Changed 6 years ago by Julian Rüth

Status: needs_reviewpositive_review

comment:5 Changed 6 years ago by Frédéric Chapoton

Status: positive_reviewneeds_work

hum, wait a moment, it seems that the tests do not pass

comment:6 Changed 6 years ago by Frédéric Chapoton

Tried to investigate, but so far got no idea why this can fail.

This import works in a python session in sage-shell. And in sage itself too. And there are other places in the code of sage where six.moves is already used.

comment:7 Changed 6 years ago by git

Commit: d5ae950877412a3d87d96498c2116ad229dc4f753b48926336a4be734ae336e334e2ffdf49f41718

Branch pushed to git repo; I updated commit sha1. New commits:

28b1463Merge branch 'public/20694' into 7.3.b2
3b48926trac 20694 undid change in functional.py

comment:8 Changed 6 years ago by git

Commit: 3b48926336a4be734ae336e334e2ffdf49f41718c9695ddc5d478e4eaf7d257cac51f49565c9b5d4

Branch pushed to git repo; I updated commit sha1. New commits:

c9695ddtrac 20694 wrong import of builtins

comment:9 Changed 6 years ago by Frédéric Chapoton

Status: needs_workneeds_review

comment:10 Changed 6 years ago by Frédéric Chapoton

Status: needs_reviewneeds_work

still not working. This ticket seems to be much more tricky than expected.

comment:11 Changed 6 years ago by git

Commit: c9695ddc5d478e4eaf7d257cac51f49565c9b5d4e87c370b3e2429f166473ac5835e7c0e9cfe9d1d

Branch pushed to git repo; I updated commit sha1. New commits:

e87c370trac 20694 fixing the problems by adding from future import

comment:12 Changed 6 years ago by Frédéric Chapoton

Status: needs_workneeds_review

ok, this trouble was all caused by the existence of a module named "six" in sage/misc.

Should be good now.

comment:13 Changed 6 years ago by Vincent Delecroix

Reviewers: Vincent Delecroix
Status: needs_reviewpositive_review

comment:14 Changed 6 years ago by Volker Braun

Branch: public/20694e87c370b3e2429f166473ac5835e7c0e9cfe9d1d
Resolution: fixed
Status: positive_reviewclosed

comment:15 Changed 6 years ago by Travis Scrimshaw

Commit: e87c370b3e2429f166473ac5835e7c0e9cfe9d1d
Keywords: days74 added
Note: See TracTickets for help on using tickets.