Python 3.9 is now generally available.

google.appengine.api.urlfetch.CreateHTTPHeaders

Creates HTTPHeaders that are compatible with both Python 2 or Python 3.