robotlearn / pyrobolearn

PyRoboLearn: a Python framework for Robot Learning
Apache License 2.0
402 stars 62 forks source link

Change collections to collections.abc to prevent breaking with Python 3.9 #50

Open lukasfro opened 4 years ago

lukasfro commented 4 years ago

At many locations in the code, arguments that are parsed to methods are checked for being an instance of Iterable. At the current state, this raises the following warning: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working (tested with Python 3.7). To get rid of the warning as well as to prevent breaking when moving to Python 3.9, I replaced all occurences of collections with collections.abc. Note that I only did a string replacement in vim for all *.py files and tested a few of the provided worlds if they still run. Having some unit or integration tests would help tremendously changes like this one :)