I'm looking at the standard library documentation, and I see that from typing import Sequence is just calling collections.abc under the hood.
Now originally, there was a deprecation warning/error and migration from the collections package to collections.abc for some abstract classes. See here. However, now that the abstractions have settled in a new location, is it fine to use either? I see from collections.abc import [etc] in the codebase, and I wonder if it would be more practical to just import from typing when trying to do type annotations?
Cython source code:
Sequence = _alias(collections.abc.Sequence, 1)
from collections.abcimports for everything that is there. "Importing those from typing is deprecated"ruff, you can writefrom typing import...and get it correctly moved tocollections.abcandreby autofixer without typing that manually, it's quite convenient.