p_tqdm icon indicating copy to clipboard operation
p_tqdm copied to clipboard

Does not work with Python 3.10

Open slhck opened this issue 2 years ago • 1 comments

I am getting this error using v1.3.3 of this package:

    from p_tqdm import p_imap
  File "/Users/werner/.pyenv/versions/3.10.0/lib/python3.10/site-packages/p_tqdm/__init__.py", line 1, in <module>
    from p_tqdm.p_tqdm import p_map, p_imap, p_umap, p_uimap, t_map, t_imap
  File "/Users/werner/.pyenv/versions/3.10.0/lib/python3.10/site-packages/p_tqdm/p_tqdm.py", line 11, in <module>
    from collections import Sized
ImportError: cannot import name 'Sized' from 'collections' (/Users/werner/.pyenv/versions/3.10.0/lib/python3.10/collections/__init__.py)

The import should come from collections.abc instead of collections.

slhck avatar Mar 02 '22 12:03 slhck

Ah, I see this has been addressed here: https://github.com/swansonk14/p_tqdm/pull/42

Is this project still alive? I see there hasn't been much activity …

slhck avatar Mar 02 '22 12:03 slhck

It appears the tests use a package (nose) with a similar issue (also an import from collections instead of collections.abc). Perhaps this is stopping a release?

Would be really nice to have an updated version appear on PyPI.

bridgerdier avatar Aug 17 '22 06:08 bridgerdier

Hi @slhck and @bridgerdier,

I apologize for the issues! I have not been actively maintaining p_tqdm. I merged in a few PRs that fix this issue and published a new release (https://github.com/swansonk14/p_tqdm/releases/tag/v_1.4.0), which I also pushed to PyPI. So this issue should be fixed now.

Thank you for bringing up this issue and for using p_tqdm!

Best, Kyle

swansonk14 avatar Aug 27 '22 18:08 swansonk14

Thanks! Still a very happy user of this package 😊

Hope you will find some time to make the occasional release.

slhck avatar Aug 27 '22 19:08 slhck