carla-simulator / scenario_runner

Traffic scenario definition and execution engine
https://carla-scenariorunner.readthedocs.io/en/latest/
MIT License
519 stars 358 forks source link

Backward compatible upgrade to fix deprecation warnings concerning LooseVersion and pkg_resources for Python3.8+ #1058

Closed Daraan closed 4 months ago

Daraan commented 7 months ago

Description

distutils LooseVersion and pkg_resources are deprecated and not available in later python versions. This introduces two commits fixing these deprecation for Python3.8+ while maintaining functionality for Python3.7 and before.

NOTE: Reverting the second commit removes the backward compatibility to Python3.7, as importlib.metadata is introduced in Python3.8.

Fixes #

Where has this been tested?

Possible Drawbacks

The second commit bloats the code a bit and should be reverted when python3.7 should not be supported anymore removing pkg_resources entirely.


This change is Reviewable

glopezdiest commented 4 months ago

Approved, nice deprecation check