mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Try importing from collections.abc for compatibility with Python 3.8
This commit is contained in:
parent
45c884cba5
commit
9ae32b8ff9
3 changed files with 13 additions and 3 deletions
|
|
@ -2,7 +2,10 @@
|
|||
from __future__ import print_function, unicode_literals
|
||||
|
||||
import argparse
|
||||
import collections
|
||||
try:
|
||||
import collections.abc as collections
|
||||
except ImportError:
|
||||
import collections
|
||||
import locale
|
||||
import logging
|
||||
import multiprocessing
|
||||
|
|
|
|||
|
|
@ -5,7 +5,11 @@ import locale
|
|||
import logging
|
||||
import os
|
||||
import sys
|
||||
from collections import Mapping, defaultdict
|
||||
from collections import defaultdict
|
||||
try:
|
||||
from collections.abc import Mapping
|
||||
except ImportError:
|
||||
from collections import Mapping
|
||||
|
||||
import six
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,10 @@ import re
|
|||
import shutil
|
||||
import sys
|
||||
import traceback
|
||||
from collections import Hashable
|
||||
try:
|
||||
from collections.abc import Hashable
|
||||
except ImportError:
|
||||
from collections import Hashable
|
||||
from contextlib import contextmanager
|
||||
from functools import partial
|
||||
from itertools import groupby
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue