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: Change names of some method attributes #15986

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

Python 3 preparation: Change names of some method attributes #15986

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

Comments

@wluebbe
Copy link
Mannequin

wluebbe mannequin commented Mar 20, 2014

Only the modern syntax like method.__func__ is accepted by Python 3.

Changes according to lib2to3/fixes/fix_methodattrs.py:

method.im_? -> method.__?__
for
('im_func' | 'im_self' | 'im_class')

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

Component: distribution

Author: Wilfried Luebbe

Branch/Commit: addb5a6

Reviewer: R. Andrew Ohana

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

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

wluebbe mannequin commented Mar 22, 2014

comment:1

For additional information from http://docs.python.org/2/reference/datamodel.html#index-39

//Changed in version 2.6: For Python 3 forward-compatibility, im_func is also available as !func!, and im_self as !self!.//

@wluebbe
Copy link
Mannequin Author

wluebbe mannequin commented Mar 22, 2014

Commit: a9713ec

@wluebbe
Copy link
Mannequin Author

wluebbe mannequin commented Mar 22, 2014

comment:2

8 modules were changed. Only the case "im_func -> !func!" was found.

One occurrence in sage/structure/element.pyx had already been handled in ticket:15983.


New commits:

a9713ecchanged to new method attribute names (im_func -> `__func__`)

@wluebbe
Copy link
Mannequin Author

wluebbe mannequin commented Mar 22, 2014

Branch: u/wluebbe/ticket/15986

@wluebbe wluebbe mannequin added the s: needs review label Mar 22, 2014
@wluebbe
Copy link
Mannequin Author

wluebbe mannequin commented Mar 26, 2014

comment:3

needs work since automerging failed

@wluebbe wluebbe mannequin added s: needs work and removed s: needs review labels Mar 26, 2014
@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 26, 2014

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

addb5a6changed to new method attribute names (im_func -> `__func__`)

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 26, 2014

Changed commit from a9713ec to addb5a6

@wluebbe
Copy link
Mannequin Author

wluebbe mannequin commented Mar 26, 2014

comment:5

Resolved automerge conflict by rebasing on 6.2.beta5.

1 file was already fixed in 6.2.beta5. So only 7 files remain.

@wluebbe
Copy link
Mannequin Author

wluebbe mannequin commented Mar 27, 2014

comment:6

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!

@wluebbe wluebbe mannequin added s: needs review and removed s: needs work labels Mar 27, 2014
@ohanar
Copy link
Member

ohanar commented Apr 2, 2014

Author: Wilfried Luebbe

@ohanar
Copy link
Member

ohanar commented Apr 2, 2014

Reviewer: R. Andrew Ohana

@ohanar
Copy link
Member

ohanar commented Apr 2, 2014

comment:7

Looks good.

@vbraun
Copy link
Member

vbraun commented Apr 4, 2014

Changed branch from u/wluebbe/ticket/15986 to addb5a6

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