Switch away from text_type shims.
Review Request #11854 — Created Oct. 15, 2021 and submitted
In the Python 2 to 3 conversion, the name of the binary type was changed
fromstrtobytes, and the name of the string type was changed from
unicodetostr. In addition, there were some other changes such as
the removal of thebasestringtype. Thesixlibrary included a bunch
of helpers to ease this transition. Now that we're Python 3+ only on the
master branch, we can get rid of these and just use the builtins.
Ran unit tests.
-
The code looks fine, but I want to discuss where changes like this should land, and an approach for the 5.0 release.
We'll likely need to maintain 4 and 5 for a while (given how hard it'll be to move customers off of Python 2.7), both merging changes from 4 to 5 and backporting changes from 5 to 4. That'll be easier if we don't drop or convert too much code to Python 3-only.
So I'm thinking:
- We create a
release-5.0.xbranch, keep it focused on the Django 1.11 port and features we want to land, but avoid too much code churn (like droppingsixusage). - We then finish the move with bigger, wider-reaching changes like this on
master, targetting 6.0.
That should be enough of a transition time to get people from 4 to 5, making it safer to backport/merge changes, since we won't need to worry about things like
str()doing the wrong thing accidentally.What do you think of that plan?
- We create a