We changed `pkg_resources.resource_filename` to `importlib.resources.files`, but the return of `resources.files()` API is a traversable object implementing a subset of the [pathlib.Path](https://docs.python.org/3/library/pathlib.html#pathlib.Path) interface instead of string, thus we're seeing errors like `AttributeError: 'PosixPath' object has no attribute 'rstrip'`.
This PR converts the result of `files()` to str to prevent those kinds of errors.
Test run:
* [x] [grpc/core/master/linux/grpc_interop_tocloud](http://sponge/ee5d493b-e23e-4358-8084-3dba1df1d42f)
<!--
If you know who should review your pull request, please assign it to that
person, otherwise the pull request would get assigned randomly.
If your pull request is for a specific language, please add the appropriate
lang label.
-->
Closes #35810
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35810 from XuanWang-Amos:fix_import_pkg_resources_2
|
||
|---|---|---|
| .. | ||
| api_reference | ||
| bazelify_tests | ||
| buildgen | ||
| codegen/core | ||
| debug/core | ||
| distrib | ||
| docker_runners | ||
| dockerfile | ||
| doxygen | ||
| fuzzing | ||
| gce | ||
| gcp/utils | ||
| gource | ||
| http2_interop | ||
| internal_ci | ||
| interop_matrix | ||
| package_hosting | ||
| profiling | ||
| release | ||
| remote_build | ||
| run_tests | ||
| README.md | ||
| bazel | ||
| bazel.rc | ||
| fuzztest.bazelrc | ||
README.md
buildgen: Template renderer for our build system.
distrib: Scripts to distribute language-specific packages and other distribution-related helper scripts.
dockerfile: Docker files to test gRPC.
doxygen: gRPC C/C++ documentation generation via Doxygen.
gce: Scripts to help setup testing infrastructure on GCE.
gcp: Helper scripts for interacting with various services on GCP (like Google container engine, BigQuery etc)
internal_ci: Support for running tests on an internal CI platform.
interop_matrix: Scripts to build, upload, and run gRPC clients in docker with various language/runtimes.
jenkins: Support for running tests on Jenkins.
run_tests: Scripts to run gRPC tests in parallel.
run_tests/performance: See the README for more notes on the performance tests.