Opened 7 years ago

Closed 6 years ago

#15992 closed enhancement (fixed)

Python 3 preparation: Change backticks into repr()

Reported by: wluebbe Owned by:
Priority: major Milestone: sage-6.2
Component: distribution Keywords: python3
Cc: Merged in:
Authors: Wilfried Luebbe Reviewers: Frédéric Chapoton, Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 7daa857 (Commits) Commit: 7daa85799b098fc9099412bd2cc095e465082c89
Dependencies: Stopgaps:


Backticks are deprecated since long ago and not accepted by Python 3.

Changes according to lib2to3/fixes/

transforms `xyzzy` into repr(xyzzy)

This ticket is tracked as a dependency of meta-ticket ticket:15980.

Change History (8)

comment:1 Changed 7 years ago by wluebbe

  • Branch set to u/wluebbe/ticket/15992
  • Commit set to 289b3464151cfffe0dea435752141715ded7843f
  • Status changed from new to needs_review

2to3 changed 4 affected .py modules.

I have not found a way to identify the relevant backtick usages (too many backticks in comments and doc-test):

  • .pyx modules may be affected. But cython is said to be Python 3 enabled, so that should be no problem.
  • If there backticks in doc-tests they will be found during tests in a Python 3 environment.

New commits:

289b346changes the deprecated backticks usage to repr() function calls

comment:2 Changed 7 years ago by wluebbe

  • Status changed from needs_review to needs_work

Apparently the automerge fails. How to locate the conflicting parts?

comment:3 Changed 7 years ago by git

  • Commit changed from 289b3464151cfffe0dea435752141715ded7843f to 8c99a208810f5f47b202630eb8866f4f58330d1f

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

8c99a20changes the deprecated backticks usage to repr() function calls

comment:4 Changed 7 years ago by wluebbe

branch was rebased to resolve merge conflict

comment:5 Changed 7 years ago by wluebbe

  • Status changed from needs_work to needs_review

I did

git merge u/chapoton/15991 u/wluebbe/ticket/15986 u/wluebbe/ticket/15987

on top of u/wluebbe/ticket/15992 (which is rebased on 6.2.beta5)

Test report:

./sage -t -p --all --long --logfile=logs/ptestlong-alle4.log
All tests passed!

comment:6 Changed 6 years ago by chapoton

  • Branch changed from u/wluebbe/ticket/15992 to public/ticket/15992
  • Commit changed from 8c99a208810f5f47b202630eb8866f4f58330d1f to 7daa85799b098fc9099412bd2cc095e465082c89
  • Reviewers set to Frédéric Chapoton

Here is a reviewer branch. I have taken the opportunity to make small changes in the close nieghborhood of the modified code, and to add some doctests.

If you agree with my changes, you can set this to positive review.

New commits:

7daa857trac #15992 reviewer patch

comment:7 Changed 6 years ago by tscrim

  • Authors set to Wilfried Luebbe
  • Reviewers changed from Frédéric Chapoton to Frédéric Chapoton, Travis Scrimshaw
  • Status changed from needs_review to positive_review

Eeek, I'm surprised I've never noticed that not raising an error message in NCSF. I agree with the changes, so positive review.

comment:8 Changed 6 years ago by vbraun

  • Branch changed from public/ticket/15992 to 7daa85799b098fc9099412bd2cc095e465082c89
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.