glutanimate / review-heatmap

Anki add-on to help you keep track of your review activity
https://ankiweb.net/shared/info/1771074083
Other
1.2k stars 90 forks source link

Fix crash due to deprecation of collections in python 3.10 #142

Closed contra-bit closed 2 years ago

contra-bit commented 2 years ago

Description

DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working

This correctly imports from collections.abc

Checklist:

Please replace the space inside the brackets with an x and fill out the ellipses if the following items apply:

paulkerschner commented 2 years ago

I tried your fix and it work for me. What would happen to people with version 3.9? Maby try both ways?

goedel-gang commented 2 years ago

I tried your fix and it work for me. What would happen to people with version 3.9? Maby try both ways?

@paulcool234, This change shouldn't cause any problems for people with a Python version of at least 3.3 (so it should certainly be fine for anyone that has an officially supported version of Python 3), since that's when all those things moved to collections.abc. It's just that until version 3.10, you could still import them from collections for backward compatibility, but you're officially supposed to import from collections.abc anyway. See the documentation from 3.3 already here: https://docs.python.org/3.3/library/collections.abc.html

glutanimate commented 2 years ago

Hey contra-bit, thanks for the PR! This should now be addressed in v1.0.0 (as part of other refactoring changes). Still, I do appreciate the contribution and apologize for getting to this so late.