[issue38003] Change 2to3 to replace 'basestring' with '(str,bytes)'

2019-09-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Replace 2. above with "2. Replace 'basestring' with '(unicode, bytes)'." -- ___ Python tracker ___ __

[issue38003] Change 2to3 to replace 'basestring' with '(str,bytes)'

2019-09-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Replacing 'basestring' with 'str' is not a bug in the behavioral sense because it is intended and documented. https://docs.python.org/3/library/2to3.html#2to3fixer-basestring How the current behavior is correct: 2to3 converts syntactically valid 2.x code to

[issue38003] Change 2to3 to replace 'basestring' with '(str,bytes)'

2019-09-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: meant to say "really couldn't" -- ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue38003] Change 2to3 to replace 'basestring' with '(str,bytes)'

2019-09-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: Even at this late stage, we could really change 2to3's behavior here. Presumably many others are relying on the current behavior. -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python

[issue38003] Change 2to3 to replace 'basestring' with '(str,bytes)'

2019-09-07 Thread Bob Kline
Bob Kline added the comment: OK, I give up. In parting I will point out that the official Python 2 documentation says "basestring() This abstract type is the superclass for str and unicode. It cannot be called or instantiated, but it can be used to test whether an object is an instance of st

[issue38003] Change 2to3 to replace 'basestring' with '(str,bytes)'

2019-09-06 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +benjamin.peterson title: Incorrect "fixing" of isinstance tests for basestring -> Change 2to3 to replace 'basestring' with '(str,bytes)' versions: +Python 3.9 -Python 3.7 ___ Python tracker