♻️ Py3: collections.{Iterable,KeysView} => collections.abc.{...}
This commit is contained in:
1 parent
ac347c4e06
commit
f510cc4218
2 files changed
+2
-10
No files matched your search
@@ -28,15 +28,11 @@ import re
|
||||
import sys
|
||||
import time
|
||||
from collections import ChainMap
|
||||
from collections.abc import KeysView
|
||||
|
||||
import yaml
|
||||
import yaml.parser
|
||||
|
||||
try:
|
||||
from collections.abc import KeysView
|
||||
except ImportError:
|
||||
from collections import KeysView
|
||||
|
||||
from octoprint.util import (
|
||||
CaseInsensitiveSet,
|
||||
atomic_write,
|
||||
|
||||
@@ -1636,11 +1636,7 @@ class CountedEvent:
|
||||
|
||||
class InvariantContainer:
|
||||
def __init__(self, initial_data=None, guarantee_invariant=None):
|
||||
try:
|
||||
from collections import Iterable
|
||||
except ImportError:
|
||||
# Python >= 3.8
|
||||
from collections.abc import Iterable
|
||||
from collections.abc import Iterable
|
||||
from threading import RLock
|
||||
|
||||
if guarantee_invariant is None:
|
||||
|
||||
Reference in new issue
Block a user