-
Notifications
You must be signed in to change notification settings - Fork 1.4k
KIP-70: Auto-commit offsets on consumer.unsubscribe(), defer assignment changes to rejoin #2560
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
Conversation
from collections import Sequence | ||
except ImportError: | ||
from collections.abc import Sequence |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This causes DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
I think the imports should be reversed here:
from collections import Sequence | |
except ImportError: | |
from collections.abc import Sequence | |
from collections.abc import Sequence | |
except ImportError: | |
from collections import Sequence |
Or possibly just replace the entire try/except with a single import since the other import is only valid on very old/outdated Pythons.
from collections.abc import Sequence
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, yea we still support very old pythons (2.7). I did try old, except new
but that does cause deprecation warnings for interim pythons. I can see how you might prefer try new, except old
Fix #1242