psads / pythonds3

Data Structures package for Problem Solving with Algorithms and Data Structures using Python
GNU General Public License v3.0
35 stars 16 forks source link

v_3.1.0---Can't import normally #10

Closed dhaomy closed 2 years ago

dhaomy commented 2 years ago

Hey, I'm a junior developer, and found an error when importing this library. *****In v_3.1.0, it prints:** Traceback (most recent call last): File "", line 991, in _find_and_load File "", line 961, in _find_and_load_unlocked File "", line 219, in _call_with_frames_removed File "D:\Program Files\Python3810\lib\site-packages\pythonds3__init.py", line 9, in from pythonds3.trees import ( File "D:\Program Files\Python3810\lib\site-packages\pythonds3\trees\init__.py", line 7, in from pythonds3.trees.binary_heap import BinaryHeap File "D:\Program Files\Python3810\lib\site-packages\pythonds3\trees\binary_heap.py", line 13, in class BinaryHeap: File "D:\Program Files\Python3810\lib\site-packages\pythonds3\trees\binary_heap.py", line 52, in BinaryHeap def heapify(self, not_a_heap: list[Any], show_details: bool = False) -> None: TypeError: 'type' object is not subscriptabl v_3 1 0


But after I change the version to v_3.0.3, it can work well;

Development platform: Windows10+python3.8.10+PycharmPro2022.1

yasinovskyy commented 2 years ago

pythonds3 v3.1.0 requires Python v3.9 or later. Sorry about the confusion, I'll have to find a way to make it clear either here or on PyPI. Older version of the package (3.0.3) should work with older version of Python.