Skip to content

Commit e8f20a2

Browse files
committed
Mention collections.abc for Sequence
In the deprecation comment for importing Sequence from the top level git module. Although the git module imports it from typing, collections.abc.Sequence supports __class_getitem__ since Python 3.9 (and typing.Sequence is actually itself deprecated since then).
1 parent 903f328 commit e8f20a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"RepositoryDirtyError",
5959
"RootModule",
6060
"RootUpdateProgress",
61-
"Sequence", # Deprecated - import this from `typing` instead.
61+
"Sequence", # Deprecated - import from `typing`, or `collections.abc` in Python 3.9+.
6262
"StageType",
6363
"Stats",
6464
"Submodule",

0 commit comments

Comments
 (0)