Opened 6 years ago

Closed 6 years ago

#20505 closed enhancement (fixed)

converting a few modules to python3 print

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

Status badges

Description

another small step on the long road to python3

Change History (28)

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

Branch: public/20505
Commit: 182886a7900f0ef81217baf58c45fd07ed8eb14c
Status: newneeds_review

New commits:

182886aa first round of converting the print to python3

comment:2 Changed 6 years ago by git

Commit: 182886a7900f0ef81217baf58c45fd07ed8eb14ccd39942e9e033ca0135f0710b6d89fa15e59f80d

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

cd39942another bunch of print converted to py3

comment:3 Changed 6 years ago by git

Commit: cd39942e9e033ca0135f0710b6d89fa15e59f80d0095eeb5db5521173fc1c9f2ba3b7288643585ab

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

0095eebconverting print to py3 in quivers

comment:4 Changed 6 years ago by git

Commit: 0095eeb5db5521173fc1c9f2ba3b7288643585ab098603dfc1753d812aa07d565ec1f8e1c8292947

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

098603dpython3 prints in manifolds

comment:5 Changed 6 years ago by git

Commit: 098603dfc1753d812aa07d565ec1f8e1c82929473390c19cc5792ab96eb62f2d0f11b9a5fd15bdb7

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

3390c19trac 20505 fixing two failing doctests due to change in banner file

comment:6 Changed 6 years ago by Vincent Delecroix

Component: PLEASE CHANGEpython3

comment:7 Changed 6 years ago by Vincent Delecroix

Reviewers: Vincent Delecroix
Status: needs_reviewneeds_work

With your modifications there is a lot of line break which makes the doctest output unreadable. There must be a Python3 equivalent to

print "a",
print "b"

comment:9 Changed 6 years ago by git

Commit: 3390c19cc5792ab96eb62f2d0f11b9a5fd15bdb7e73800fb766d1df5325c5e8cd3ebde2002cff0cd

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

e73800fMerge branch 'public/20505' into 7.2.b6

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

Status: needs_workneeds_review

I did enhance things in the manifold file. Is this what you wanted ? or is there something else ?

comment:11 Changed 6 years ago by git

Commit: e73800fb766d1df5325c5e8cd3ebde2002cff0cd1574116edf098740d6a48c907485d3058f1da235

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

1574116trac 20505 change in manifold print

comment:12 Changed 6 years ago by Vincent Delecroix

Could you simplify the print like

print("{} : {}".format(ind1, list(M.index_generator(2))))

into more readable format like

print(ind1, ":", list(M.index_generator(2)))

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

No, because I need something that gives the same result in py2 and py3.

Your proposal in py2

In [1]: print('a', ":", 'b')
('a', ':', 'b')

and in py3

In [1]: print('a', ":", 'b')
a : b

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

Vincent, are you planning to finish this review ?

comment:15 Changed 6 years ago by Jori Mäntysalo

Cc: Jori Mäntysalo added

CC'ing myself as a possible reviewer.

comment:16 Changed 6 years ago by Jori Mäntysalo

I guess that removing a space in

- print "hilbert_conductor_inverse failed for d =", d
+ print("hilbert_conductor_inverse failed for d ={}".format(d))

is an error. Or then it should be d=, not d =.

comment:17 Changed 6 years ago by Jori Mäntysalo

Reviewers: Vincent DelecroixVincent Delecroix, Jori Mäntysalo

I read this, ran long tests for modified files, and tested files that had failed tests in a pathcbot. Everything seems to be good.

So feel free to mark this as positive_review on behalf of me. Or correct the missing space I mentioned in previous comment before that if you want.

comment:18 Changed 6 years ago by git

Commit: 1574116edf098740d6a48c907485d3058f1da2355fcf6c1e08da6a68d96e8047e20d53ce910acee2

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

ec272f4Merge branch 'public/20505' into 7.2.rc1
5fcf6c1trac 20505, detail

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

Status: needs_reviewpositive_review

thanks

comment:20 Changed 6 years ago by Volker Braun

Status: positive_reviewneeds_work

Merge conflict, try next beta...

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

oh, shoot. I hope that this will not happen for all of my 20 or so tickets on python3 print.

comment:22 Changed 6 years ago by git

Commit: 5fcf6c1e08da6a68d96e8047e20d53ce910acee2573e76aadb9bf6fceb7788b5071ae6344ffd0ab0

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

573e76aMerge branch 'public/20505' into 7.2

comment:23 Changed 6 years ago by Jori Mäntysalo

What should I do to re-review this (and other similar tickets)? From your push ​573e76a I can not see what you really did in this merge.

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

I did nothing. There was no conflict. I think one will have to wait for 7.3.b0 to see the conflict.

comment:25 Changed 6 years ago by git

Commit: 573e76aadb9bf6fceb7788b5071ae6344ffd0ab06eef06aac9151c0b25f40a88d6e640819dbf54b9

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

6eef06aMerge branch 'public/20505' into 7.3.b0

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

Status: needs_workneeds_review

now waiting for a bot report

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

Status: needs_reviewpositive_review

ok, patchbot is green, except for the 4 doctests due to #20529

I allow myself to put this back to positive review

comment:28 Changed 6 years ago by Volker Braun

Branch: public/205056eef06aac9151c0b25f40a88d6e640819dbf54b9
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.