Skip to content

Import Iterator/Iterable from collections.abc#643

Open
icanhasmath wants to merge 1 commit into
blaze:masterfrom
ActiveState:fix-collections-abc-imports
Open

Import Iterator/Iterable from collections.abc#643
icanhasmath wants to merge 1 commit into
blaze:masterfrom
ActiveState:fix-collections-abc-imports

Conversation

@icanhasmath

@icanhasmath icanhasmath commented Jun 23, 2026

Copy link
Copy Markdown

Fixes #626.

Iterator and Iterable were moved to collections.abc in Python 3.3, and importing them from the collections top-level namespace was deprecated and removed in Python 3.10 — so from collections import Iterator now raises ImportError on modern Python.

No behavioral change — purely an import-location fix for Python 3.10+ compatibility.

The Iterator and Iterable abstract base classes were moved to
collections.abc in Python 3.3, and importing them from the collections
top-level namespace was deprecated and removed in Python 3.10. Import
them from collections.abc so odo works on modern Python. namedtuple
continues to be imported from collections where it still lives.

Fixes blaze#626.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Importing ABC directly from collections was deprecated and will be removed in Python 3.10. Use collections.abc

1 participant