Skip to content

bpo-32046: Update 2to3 when converts operator.isCallable(obj).#4417

Merged
merwok merged 1 commit into
python:masterfrom
corona10:bpo-32046
Nov 28, 2017
Merged

bpo-32046: Update 2to3 when converts operator.isCallable(obj).#4417
merwok merged 1 commit into
python:masterfrom
corona10:bpo-32046

Conversation

@corona10

@corona10 corona10 commented Nov 16, 2017

Copy link
Copy Markdown
Member

@corona10 corona10 changed the title Update 2to3 when converts operator.isCallable(obj). bpo-32046: Update 2to3 when converts operator.isCallable(obj). Nov 16, 2017
@ilevkivskyi

Copy link
Copy Markdown
Member

Could you please update the test (see failures) and docs (in Doc/library/2to3.rst)?

@corona10
corona10 force-pushed the bpo-32046 branch 3 times, most recently from a716819 to cda4cde Compare November 16, 2017 12:40
@corona10

Copy link
Copy Markdown
Member Author

@ilevkivskyi
Thanks for the review!
I've updated it.

Comment thread Lib/lib2to3/fixes/fix_operator.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use the built-in callable? It’s been re-added to Python 3 a few versions ago.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since callable is not available in all 3.x versions, this is probably a safer solution.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It depends if 2to3 is meant to convert code to Python 3 all versions, Python 3 currently maintained branches, or specific Python 3.X that shipped that particular 2to3. Probably a question for python-dev!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I send this issue to the mailing list?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so, to clarify the compatibility policy of lib2to3.

@Munyola

Munyola commented Nov 17, 2017

Copy link
Copy Markdown

I thought on this article on low version regulations and can automatically trigger highly on focused platforms when fixed properly.

@corona10

Copy link
Copy Markdown
Member Author

@ilevkivskyi

Copy link
Copy Markdown
Member

@corona10 Could you please update the PR as suggested on python-dev?

@corona10

Copy link
Copy Markdown
Member Author

Sure

@corona10

Copy link
Copy Markdown
Member Author

@ilevkivskyi
Updated!

@corona10

Copy link
Copy Markdown
Member Author

@ilevkivskyi
Can you take a look?

@ilevkivskyi ilevkivskyi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@corona10 Thanks! This looks good to me, but I can't merge since I am not a core dev.

@corona10

Copy link
Copy Markdown
Member Author

@serhiy-storchaka Can you take a look?

@merwok
merwok merged commit a489599 into python:master Nov 28, 2017
@merwok

merwok commented Nov 28, 2017

Copy link
Copy Markdown
Member

Thanks for the patch!

@corona10
corona10 deleted the bpo-32046 branch November 28, 2017 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants