AttributeError: 'ImageDraw' object has no attribute 'textsize'
w, h = draw.textsize("hello", font=font)
left, top, right, bottom = draw.textbbox((0, 0), "hello", font=font)
w = right - left
h = bottom - top
textsize returned a width and a height. textbbox returns a four value box relative to the anchor point you pass in. The extra information is useful, because text has parts that hang below the baseline and the old call could not tell you about them, but it does mean the surrounding code has to change.
w = draw.textlength("hello", font=font)
This returns a float and is the right call for laying out a single line.
Most code that measured text was doing it to centre the text. The anchor argument removes the need:
draw.text((200, 150), "hello", font=font, fill="black", anchor="mm")
mm means middle horizontally and middle vertically, so the coordinate you give becomes the centre of the text rather than its top left corner.
ImageFont.getsize() went in the same release. Use font.getbbox(text) or font.getlength(text).
See the ImageDraw module for the rest.
The PIL to Pillow converter finds most of these automatically, and the other error pages cover the rest.