Skip to content

Commit

Permalink
Updated for 3.10 (#24)
Browse files Browse the repository at this point in the history
* Updated collections imports for 3.10

* Update Iterable call

Co-authored-by: Volodymyr <volodymyrss@users.noreply.github.com>

* Update collections import for compatibility

* Removed redundant collections import

* Update core.py

---------

Co-authored-by: Volodymyr <volodymyrss@users.noreply.github.com>
  • Loading branch information
Durfeldt and volodymyrss committed Jan 25, 2024
1 parent 4a0d9eb commit f00963c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions dataanalysis/core.py
@@ -1,6 +1,5 @@
from io import StringIO
from pathlib import Path
import collections
import threading
import gzip
import json
Expand All @@ -15,7 +14,11 @@
import time
import glob
import socket
from collections import Mapping, Set, Sequence, OrderedDict
try:
from collections.abc import Mapping, Set, Sequence, Iterable
from collections import OrderedDict
except ImportError:
from collections import Mapping, Set, Sequence, OrderedDict

from future.utils import with_metaclass

Expand Down Expand Up @@ -1158,7 +1161,7 @@ def process_run_main(self):
if mr is not None:
log("main returns",mr,"attaching to the object as list")

if isinstance(mr, collections.Iterable):
if isinstance(mr, Iterable):
mr=list(mr)
else:
mr=[mr]
Expand Down

0 comments on commit f00963c

Please sign in to comment.