srobo / competition-simulator

A simulator for Student Robotics Virtual Competitions
https://studentrobotics.org/docs/simulator/
MIT License
8 stars 2 forks source link

Remove pkg_resources usage (move to `importlib.metadata` & friends) #398

Closed PeterJCLaw closed 1 year ago

PeterJCLaw commented 1 year ago

The simulator aims to have no dependencies at runtime, yet it does actually need setuptools at the moment. Now that importlib.metadata is in all supported versions of Python we should probably be able to use that instead. pkg_resources also seems like something the Python community is likely to try to deprecate over time, so there are other benefits from doing this.

One challenge I see here is ensuring we keep useful semantics, in particular working out what happens to PyTorch's +cpu versions on various platforms. That may be something we can either handle explicitly ourselves or ignore until it becomes an issue though.

PeterJCLaw commented 1 year ago

I've just spotted that in the latest version of webots (possibly previously too?) there's a red warning about this. We therefore probably want to pick this up for SR2024, though at low priority.