diff options
author | Universebenzene | 2022-08-22 16:34:32 +0800 |
---|---|---|
committer | Universebenzene | 2022-08-22 16:34:32 +0800 |
commit | 666d147aa2812e85f0eb0a168fd005ec90bc80fb (patch) | |
tree | fc041baded4f36bfe03495a777c209091cbd528c /fix-collection-py3.10.patch | |
parent | aac45757655821f50d5de33d1fa4da46db925492 (diff) | |
download | aur-666d147aa2812e85f0eb0a168fd005ec90bc80fb.tar.gz |
Fix collection.Iterable
Diffstat (limited to 'fix-collection-py3.10.patch')
-rw-r--r-- | fix-collection-py3.10.patch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/fix-collection-py3.10.patch b/fix-collection-py3.10.patch new file mode 100644 index 000000000000..ac3a3738dab9 --- /dev/null +++ b/fix-collection-py3.10.patch @@ -0,0 +1,23 @@ +--- a/astrodendro/dendrogram.py 2016-09-29 17:23:53.000000000 +0800 ++++ b/astrodendro/dendrogram.py 2022-08-22 16:14:19.114340172 +0800 +@@ -5,7 +5,12 @@ + # - An ancestor is the largest structure that a structure is part of + + import numpy as np +-from collections import Iterable ++try: ++ # Python > 3.9 ++ from collections.abc import Iterable ++except ImportError: ++ # Python <= 3.9 ++ from collections import Iterable + import copy + import warnings + +@@ -847,4 +852,4 @@ + # To make the structure.level property fast, we ensure all the structures in the + # trunk have their level cached as "0" + for structure in dendrogram.trunk: +- structure._level = 0 # See the definition of level() in structure.py +\ No newline at end of file ++ structure._level = 0 # See the definition of level() in structure.py |