Python upgrades results in "AttributeError: module 'collections' has no attribute 'MutableMapping'" error when starting shell

I had the same error in my project with request module. Seems like MutableMapping moved in the hierarchy into additional abstract class, so in the python3.10/site-packages/requests/cookies.py change

class RequestsCookieJar(cookielib.CookieJar, collections.MutableMapping):

with

class RequestsCookieJar(cookielib.CookieJar, collections.abc.MutableMapping):