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

Python 3 preparation: Rename sys.maxint to sys.maxsize #15991

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

Python 3 preparation: Rename sys.maxint to sys.maxsize #15991

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

Comments

@wluebbe
Copy link
Mannequin

wluebbe mannequin commented Mar 20, 2014

Only the modern name is accepted by Python 3.

Changes according to lib2to3/fixes/renames.py:

sys.maxint -> sys.maxsize

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

Component: distribution

Author: Frédéric Chapoton

Branch/Commit: 1f0a49b

Reviewer: Wilfried Luebbe

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

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

Branch: u/chapoton/15991

@fchapoton
Copy link
Contributor

Author: Frédéric Chapoton

@fchapoton
Copy link
Contributor

New commits:

1f0a49btrac #15991 towards p3 maxint --> maxsize

@fchapoton
Copy link
Contributor

Commit: 1f0a49b

@wluebbe
Copy link
Mannequin Author

wluebbe mannequin commented Mar 22, 2014

comment:2

Some additional information form WhatsNew Python 3

//The sys.maxint constant was removed, since there is no longer a limit to the value of integers. However, sys.maxsize can be used as an integer larger than any practical list or string index. It conforms to the implementation’s “natural” integer size and is typically the same as sys.maxint in previous releases on the same platform (assuming the same build options).//

and from the Python 3 docmentation

sys.maxsize
An integer giving the maximum value a variable of type Py_ssize_t can take. It’s usually 2!**31 - 1 on a 32-bit platform and 2!**63 - 1 on a 64-bit platform.

@wluebbe
Copy link
Mannequin Author

wluebbe mannequin commented Mar 27, 2014

comment:3

The patch looks good.

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):

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

@vbraun
Copy link
Member

vbraun commented Mar 31, 2014

comment:4

Reviewer name

@fchapoton
Copy link
Contributor

Reviewer: Wilfried Luebbe

@vbraun
Copy link
Member

vbraun commented Apr 1, 2014

Changed branch from u/chapoton/15991 to 1f0a49b

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

2 participants