pariyatti / kosa

Digital library service
GNU Affero General Public License v3.0
8 stars 3 forks source link

Python 3.10 related fixes for Ubuntu 22.04 s3 backup script #91

Closed balwa closed 1 year ago

balwa commented 1 year ago

The ubuntu 22.04 upgrade resulted in the backup in sandbox not running yesterday. Which made me look at the logs(relevant snippet):

  File "/usr/lib/python3/dist-packages/pipenv/vendor/requests/cookies.py", line 172, in <module>
    class RequestsCookieJar(cookielib.CookieJar, collections.MutableMapping):
AttributeError: module 'collections' has no attribute 'MutableMapping'

The collections module changed in python 3.10 and the simple fix was to update the dependency on requests. However, discord library also had an update in method calls so including it as part of the script maintenance.