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 rhettinger
Recipients benjamin.peterson, devarakondapranav, rhettinger, serhiy.storchaka, xtreak
Date 2018-10-07.17:53:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1538934809.13.0.545547206417.issue34893@psf.upfronthosting.co.za>
In-reply-to
Content
> I have tweaked that fixer to handle the pointed cases 
> and a few additional ones too

Playing whack-a-mole with a few cases will always fall short of being able to guarantee correct transformations and not break existing code that is working correctly.

One possibility is to add a type check to the generated code, "send(x)" -> send(x.encode() if type(x)==bytes else x)" but this has its own issues and isn't satisfying.
History
Date User Action Args
2018-10-07 17:53:29rhettingersetrecipients: + rhettinger, benjamin.peterson, serhiy.storchaka, xtreak, devarakondapranav
2018-10-07 17:53:29rhettingersetmessageid: <1538934809.13.0.545547206417.issue34893@psf.upfronthosting.co.za>
2018-10-07 17:53:29rhettingerlinkissue34893 messages
2018-10-07 17:53:29rhettingercreate