carla-simulator / leaderboard

CARLA Autonomous Driving leaderboard
MIT License
164 stars 77 forks source link

Python 3.9+ support for route_parser; deprecated xml code. #182

Open Daraan opened 3 months ago

Daraan commented 3 months ago

This PR adds the already merged one-line fix from https://github.com/carla-simulator/scenario_runner/pull/1053

Replace xml.etree.ElementTree.Element.getchildren method which is deprecated from python 3.2 and removed in python 3.9 with a suggested replacement https://docs.python.org/3.8/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.getchildren

- for elem in scenario.getchildren():
+ for elem in list(scenario):

Tested with Python 3.7 and 3.10+; from the deprecation notice should work with 3.2+


This change is Reviewable