Opened 9 years ago

Closed 2 years ago

Last modified 2 years ago

#16072 closed enhancement (worksforme)

Python 3 preparation: integer types

Reported by: Wilfried Luebbe Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: python3 Keywords: python3
Cc: Frédéric Chapoton, Matthias Köppe, Travis Scrimshaw Merged in:
Authors: Reviewers: Matthias Koeppe
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by Jeroen Demeyer)

Python 2 has two integer types int and long. In Python 3, int is gone and long is renamed int.

The tool 2to3 simply renames long to int.

There are 72 affected modules.

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

Tickets: #24221, #24225, #24227, #24244, #24247, #24248.

Change History (15)

comment:1 Changed 9 years ago by For batch modifications

Milestone: sage-6.2sage-6.3

comment:2 Changed 8 years ago by For batch modifications

Milestone: sage-6.3sage-6.4

comment:3 Changed 7 years ago by Jeroen Demeyer

Component: distributionpython3

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

Milestone: sage-6.4sage-8.0

one step done in #22871

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

more steps in #24155 and #24218

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

after which there remains

git grep -c "^[^#:]*[^_la]long(" *.py
src/sage/interfaces/fricas.py:1
src/sage/interfaces/gp.py:1
src/sage/interfaces/interface.py:2
src/sage/misc/sage_input.py:3
src/sage/rings/finite_rings/element_ext_pari.py:1
src/sage/rings/polynomial/polynomial_quotient_ring_element.py:1
src/sage/rings/quotient_ring_element.py:1

among which

src/sage/misc/sage_input.py:3

is only in doctests

Last edited 5 years ago by Frédéric Chapoton (previous) (diff)

comment:7 Changed 5 years ago by Jeroen Demeyer

Cc: Frédéric Chapoton Erik Bray added
Description: modified (diff)

Adding some tickets.

comment:8 Changed 5 years ago by Samuel Lelièvre

Should the ticket summary say 'The Py2 type "long" is gone in Py3' rather than 'The Py3 type "long" is gone in Py3'?

comment:9 Changed 5 years ago by Jeroen Demeyer

Description: modified (diff)
Summary: Python 3 preparation: The Py3 type "long" is gone in Py3Python 3 preparation: integer types

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

new state of affairs on 8.2.b3

src/mac-app/tools/createDSStore/mac_alias/alias.py:2
src/sage/interfaces/fricas.py:1
src/sage/interfaces/gp.py:1
src/sage/interfaces/interface.py:1
src/sage/misc/sage_input.py:3
src/sage/rings/polynomial/polynomial_quotient_ring_element.py:1
src/sage/rings/quotient_ring_element.py:1

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

see #24559

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

Cc: Matthias Köppe Travis Scrimshaw added; Erik Bray removed
Milestone: sage-8.0sage-duplicate/invalid/wontfix
Status: newneeds_review

shall we close this one ?

comment:13 Changed 2 years ago by Matthias Köppe

Reviewers: Matthias Koeppe
Status: needs_reviewpositive_review

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

Resolution: invalid
Status: positive_reviewclosed

comment:15 Changed 2 years ago by Erik Bray

Resolution: invalidworksforme
Note: See TracTickets for help on using tickets.