-
Notifications
You must be signed in to change notification settings - Fork 386
Importing ABC directly from collections was deprecated and will be removed in Python 3.10 #231
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
Comments
Can you show an example of the current vs future import name? I don't understand the difference here. |
Below is the common pattern to fix the import issue.
|
ah literally "abc"!
…On Tue, 21 Apr 2020, 10:29 Karthikeyan Singaravelan, < ***@***.***> wrote:
Below is the common pattern to fix the import issue.
try:
# Try collections.abc for 3.4+
from collections.abc import Iterable
except ImportError:
# Fallback to collections for Python 2
from collections import Iterable
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#231 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABUZDBWKFBNT7HFYJOAE4LRNXJXJANCNFSM4MNLIN4Q>
.
|
chombourger
added a commit
to chombourger/zerorpc-python
that referenced
this issue
Jan 5, 2022
Kill a depreciation warning by importing "collections.abc" and fallback to "collections" on failure in order to maintain support for older versions of Python. Fixes: 0rpc#231 Signed-off-by: Cedric Hombourger <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Importing ABC directly from collections was deprecated and will be removed in Python 3.10 . Use collections.abc instead.
The text was updated successfully, but these errors were encountered: