8000 Fix collections.abc imports for Python 3.9 · DavidKorczynski/http-parser@352841c · GitHub
[go: up one dir, main page]

Skip to content

Commit 352841c

Browse files
committed
Fix collections.abc imports for Python 3.9
1 parent fbddc2e commit 352841c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

http_parser/util.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@
55

66

77
import sys
8-
from collections import MutableMapping
8+
try:
9+
# Python 3.3+
10+
from collections.abc import MutableMapping
11+
except ImportError:
12+
from collections import MutableMapping
13+
914

1015
if sys.version_info[0] == 3:
1116
from urllib.parse import unquote

0 commit comments

Comments
 (0)
0