Skip to content

Commit

Permalink
Change collections import to collections.abc
Browse files Browse the repository at this point in the history
Fix for no Iterable in Collections since Python 3.10 removed the backward compatibility. Collections.abc available since 3.3 so no fallback needed (this plugin targets 3.5+)
  • Loading branch information
nwesterhausen authored and lukasgeiter committed Oct 14, 2021
1 parent 814a13e commit 88c4329
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mkdocs_awesome_pages_plugin/meta.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import collections
import collections.abc
import re
from enum import Enum
from pathlib import PurePath
Expand Down Expand Up @@ -75,7 +75,7 @@ def is_rest(item: Any) -> bool:
return isinstance(item, str) and (item == '...' or re.search(MetaNavRestItem._REGEX, item))


class RestItemList(collections.Iterable):
class RestItemList(collections.abc.Iterable):
def __init__(self):
self.patterns = []
self.all = None
Expand Down

0 comments on commit 88c4329

Please sign in to comment.