This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author devarakondapranav
Recipients benjamin.peterson, devarakondapranav, xtreak
Date 2018-10-04.17:56:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1538675783.47.0.545547206417.issue34893@psf.upfronthosting.co.za>
In-reply-to
Content
Thanks for taking time and updating this, Karthikeyan Singaravelan. I do agree that there there is no proper way to find out if an object is of type socket or not. 

However other fixers in lib2to3 are not any different. For example the fix_dict.py changes every instance of viewkeys() method to keys() irrespective of the type of the object. And I guess that applies to all other fixers in lib2to3 as well. So that convinced me that a fix for this can also be accommodated.

A compromise that we could foster, as I already mentioned is to make this fix explicit so users can use this only if they need it. Please find attached the fixer I wrote. I haven't made a PR yet.
History
Date User Action Args
2018-10-04 17:56:23devarakondapranavsetrecipients: + devarakondapranav, benjamin.peterson, xtreak
2018-10-04 17:56:23devarakondapranavsetmessageid: <1538675783.47.0.545547206417.issue34893@psf.upfronthosting.co.za>
2018-10-04 17:56:23devarakondapranavlinkissue34893 messages
2018-10-04 17:56:23devarakondapranavcreate