robertlugg / easygui

easygui for Python
http://easygui.readthedocs.org/en/master/
BSD 3-Clause "New" or "Revised" License
455 stars 114 forks source link

Importing ABC directly from collections has been deprecated and will be removed in Python 3.10 #172

Closed tirkarthi closed 2 years ago

tirkarthi commented 4 years ago

Use collections.abc for Python 3 and collections for Python 2.

easygui/boxes/choice_box.py
72:    if not isinstance(obj, collections.Sequence):
ASobrino commented 2 years ago

Now this is happening with Python 3.10

tirkarthi commented 2 years ago

I will create a PR

tirkarthi commented 2 years ago

Looks like this is fixed in https://github.com/tirkarthi/easygui/commit/0f6abd5b37c8295618412f9ea38aa7da5d3d87af#diff-fef111e52e6c8332a082cc8d35153b1057c8f3c92e75d59d8be4a82051417195 . Closing.

tirkarthi commented 2 years ago

Sorry, https://github.com/robertlugg/easygui/commit/652134c814e57b4c523683f77f97803d6d8e3b0c

zadacka commented 2 years ago

Yep - sorry, should have seen your previous open issue.

The collections movement got back ported for quite a few Python 3 versions for compatibility, so we got away with the old import location for a while!

Thanks for raising, investigating, and closing this out with information 👍

Joeri-G commented 2 years ago

It looks like this patch has not yet been pushed to the pypi repository. I encountered this issue when running my scripts on a different PC, which resulted in the classic "well it works on my machine" and was hot-fixed by downgrading the python install.

toccata10 commented 2 years ago

Same here: pip install easygui doesn't install the corrected collections.abc version: it's still the old version.