Skip to content
This repository was archived by the owner on Apr 24, 2026. It is now read-only.

python 3.10 related: import from "collections.abc" instead "collections" - #27

Open
anssiranta wants to merge 2 commits into
gluster:masterfrom
anssiranta:python-3.10-fix
Open

python 3.10 related: import from "collections.abc" instead "collections"#27
anssiranta wants to merge 2 commits into
gluster:masterfrom
anssiranta:python-3.10-fix

Conversation

@anssiranta

Copy link
Copy Markdown

Iterator import in python console:

Python3.9.9 (main, Dec212021, 10:35:05)
[GCC8.3.0] onlinuxType"help", "copyright", "credits"or"license"formoreinformation.
>>>fromcollectionsimportIterator<stdin>:1: DeprecationWarning: UsingorimportingtheABCsfrom'collections'insteadoffrom'collections.abc'isdeprecatedsincePython3.3, andin3.10itwillstopworking>>>Python3.10.1 (main, Dec212021, 09:50:13) [GCC8.3.0] onlinuxType"help", "copyright", "credits"or"license"formoreinformation.
>>>fromcollectionsimportIteratorTraceback (mostrecentcalllast):
File"<stdin>", line1, in<module>ImportError: cannotimportname'Iterator'from'collections' (/usr/local/lib/python3.10/collections/__init__.py)
>>>fromcollections.abcimportIterator>>>

gfapi import in python 3.10 console

Python3.10.1 (main, Dec212021, 09:50:13) [GCC8.3.0] onlinuxType"help", "copyright", "credits"or"license"formoreinformation.
>>>fromglusterimportgfapiTraceback (mostrecentcalllast):
File"<stdin>", line1, in<module>File"/usr/local/lib/python3.10/site-packages/gluster/gfapi/__init__.py", line13, in<module>from .gfapiimportFile, Dir, DirEntry, VolumeFile"/usr/local/lib/python3.10/site-packages/gluster/gfapi/gfapi.py", line21, in<module>fromcollectionsimportIteratorImportError: cannotimportname'Iterator'from'collections' (/usr/local/lib/python3.10/collections/__init__.py)

Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@anssiranta