<#21673 Python upgrade deprecation warnings> Issue...
# github-notifications
c
#21673 Python upgrade deprecation warnings Issue created by tdyas Some deprecation warnings seen with the Python 3.11 upgrade in Pants sources:
Copy code
src/python/pants/backend/python/subsystems/python_tool_base.py:228: DeprecationWarning: read_binary is deprecated. Use files() instead. Refer to <https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy> for migration advice.
  lock_bytes = importlib.resources.read_binary(parts.netloc, lockfile_path)
Copy code
src/python/pants/jvm/resolve/coursier_fetch.py:783: DeprecationWarning: read_binary is deprecated. Use files() instead. Refer to <https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy> for migration advice.
  lockfile_bytes = importlib.resources.read_binary(
Copy code
src/python/pants/backend/python/util_rules/pex_requirements.py:213: DeprecationWarning: read_binary is deprecated. Use files() instead. Refer to <https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy> for migration advice.
  importlib.resources.read_binary(parts.netloc, lockfile_path),
pantsbuild/pants