Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

Daraan
Copy link
Contributor

@Daraan Daraan commented Jul 3, 2024

This PR adds the already merged one-line fix from carla-simulator/scenario_runner#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

@Daraan
Copy link
Contributor Author

Daraan commented Jan 25, 2025

@PabloVD can you please merge this PR so a manual fix is not longer needed when someone wants to use a higher python version. Thanks a lot.

Copy link
Contributor

@PabloVD PabloVD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Daraan)

@PabloVD
Copy link
Contributor

PabloVD commented Jan 27, 2025

Merged, thanks!

@PabloVD PabloVD merged commit 40d507c into carla-simulator:master Jan 27, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants