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

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

Merged
merged 4 commits into from
May 3, 2024

Conversation

Daraan
Copy link
Contributor

@Daraan Daraan commented Feb 21, 2024

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?

  • Platform(s): Ubuntu 22.04
  • Python version(s): 3.7, 3.8, 3.10
  • Unreal Engine version(s): 4.26
  • CARLA version: 0.9.14 (fails as expected), 0.9.15

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

Copy link
Contributor

@glopezdiest glopezdiest 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)

@glopezdiest
Copy link
Contributor

Approved, nice deprecation check

@glopezdiest glopezdiest merged commit 7337855 into carla-simulator:master May 3, 2024
1 of 4 checks passed
glopezdiest pushed a commit that referenced this pull request May 3, 2024
…ings concerning LooseVersion and pkg_resources for Python3.8+ (#1058 analog) (#1065)

* upgraded version checking to fix deprecation warnings

Removed usage of pgk_resources and distutils.version.LooseVersion

* < python3.8 backward compatible version checking

* Compacter version checking.
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