Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation Warning for import of namedtuple from collections instead of collections.abc #19

Open
Ce-eM opened this issue Apr 25, 2021 · 7 comments
Assignees
Labels

Comments

@Ce-eM
Copy link

Ce-eM commented Apr 25, 2021

Got the following warnings by pytest:

/uri/bucket.py:5: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working
    from collections import ItemsView, KeysView, MutableMapping, MutableSequence, ValuesView, deque, namedtuple

uri/qso.py:5: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working
    from collections import Mapping, MutableMapping, deque, namedtuple

-- Docs: https://docs.pytest.org/en/stable/warnings.html

The library still seems to work in Python 3.9 (Tried it) but changing the import location would be reasonable.

@amcgregor
Copy link
Member

amcgregor commented Apr 26, 2021

Could you give that a shot against the current develop branch? The uri.bucket module makes no reference, currently, and uri.qso imports from the correct location. Tests pass.

@Ce-eM
Copy link
Author

Ce-eM commented Apr 26, 2021

My fault, all good in the dev branch. Keep up the good work 👍

@amcgregor
Copy link
Member

amcgregor commented Apr 26, 2021

Closing as preemptively corrected. Release will be Real Soon Now™, once I finally accept that some features are best left unimplemented. 😉

@AndreasVerden
Copy link

Hi @amcgregor
I know you have fixed the issue on develop, but I am sorry to report that Python 3.10 turned this "Deprecation Warning" into ImportError: cannot import name 'ItemsView' from 'collections' (/usr/lib64/python3.10/collections/__init__.py).

@amcgregor
Copy link
Member

I will bundle up a release as soon as is feasible given the escalation. ¬_¬ And my restored attention to my open source projects.

@jholloc
Copy link

jholloc commented May 17, 2022

Hi. I'm seeing a version 3.0.0 listed in the README that fixes this issue but i'm not finding this version on github or pypi?

@Xeverous
Copy link

The issue still exists. Can't use uri 2.0.1 in Python 3.10:

site-packages\uri\bucket.py", line 5, in <module>
    from collections import ItemsView, KeysView, MutableMapping, MutableSequence, ValuesView, deque, namedtuple
ImportError: cannot import name 'ItemsView' from 'collections'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants