Remove deprecated pkg_resources fallback from resource loading - #166
Remove deprecated pkg_resources fallback from resource loading#166bjornrun wants to merge 1 commit into
Conversation
|
Thanks for contributing this improvement! Could you please share a little more information about the error you encountered, such as the full traceback, Python and Setuptools versions, and how ProjectAirSim was installed? |
|
Thanks for taking a look — your reading is correct. I cannot reproduce a Python 3.14 failure of the current
That missing-module error is what prompted the change. I agree it is not evidence that the 3.9+ The remaining reason for the patch is the one you described: drop the deprecated |
Summary
pkg_resourcesfallback inprojectairsim.utils.load_text_resourceimportlib.resources.files(), with the maintainedimportlib-resourcesbackport on Python <3.9joinpath(*resource_path.split("/"))Motivation
This is a maintenance and compatibility change. Current
mainalready prefersimportlib.resources.files()on Python >=3.9, so thepkg_resourcesbranch is not normally reached on Python 3.14. Removing it still drops a deprecated runtime dependency on setuptools/pkg_resourcesand keeps schema loading working on environments that no longer shippkg_resourcesby default.Verification
python3 -m compileall -q client/python/projectairsim/src/projectairsim/utils.pyschema/robot_config_schema.jsonc, confirmingpkg_resourcesis not importedgit diff --check -- client/python/projectairsim/src/projectairsim/utils.py client/python/projectairsim/pyproject.tomlFull package import was not run because this local Python 3.14 environment does not have the package runtime dependencies installed (
msgpackfails first).