fix: replace deprecated pkg_resources#7026
fix: replace deprecated pkg_resources#7026desaxce wants to merge 2 commits intotensorflow:masterfrom
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
Thank you @desaxce ! Sorry for the delay. I will look into this next week! |
|
So sorry for the delay again. Our CI workflows are currently broken because we seem to have reached the limit of the provisioned VM for GH Actions, and it'll take a little while to resolve this. I'll come back to check this when that is resolved. |
|
+1 |
|
The package 'pkg_resources' has now been removed: python -c "import pkg_resources; print('pkg_resources is available')" The old version of setuptools: |
Hi @arcra , any news on this? |
…o address a compatibility issue with Tensorboard. * **`setuptools<82.0.0`**: The requirement for `setuptools` has been changed from `>=68.0` to `<82.0.0`. This upper bound is necessary for Tensorboard, as indicated by the added comment referencing tensorflow/tensorboard#7026.
| ":grpc_provider", | ||
| ":ingester", | ||
| "//tensorboard:expect_grpc_installed", | ||
| "//tensorboard:expect_pkg_resources_installed", |
There was a problem hiding this comment.
I think we need an equivalent expect_packaging_installed, for this to work with our internal repo.
| grpcio >= 1.48.2 | ||
| markdown >= 2.6.8 | ||
| numpy >= 1.12.0 | ||
| # NOTE: The packaging dependency was introduced in order to compare installed |
There was a problem hiding this comment.
Could you also remove this comment, please?
| # This is a dummy rule used as a pkg-resources dependency in open-source. | ||
| # We expect pkg-resources to already be installed on the system, e.g., via | ||
| # `pip install setuptools`. | ||
| py_library(name = "expect_pkg_resources_installed") |
There was a problem hiding this comment.
Here's where it would need to be updated for the new library instead.
| compliant_version = parse_version("1.0.0") | ||
| try: | ||
| legacy_version = pkg_resources.parse_version("arbitrary string") | ||
| legacy_version = parse_version("arbitrary string") |
There was a problem hiding this comment.
I think the replacement for this function should have a consistent behavior for the non-compliant ones, so this try-except shouldn't be necessary anymore.
|
Hello, our CI workflow should be working now (I think). I just reviewed #7057 thinking it was this PR, and I just realized it's a separate one recently created with practically the same content. I'd like to thank you again for your contribution. There are a couple things that are a bit better handled on that other PR, and I made some comments about those in this PR. I'll probably merge whichever is ready to merge first. |
Motivation for features / changes
Fixes #7003
When I run tensorboard, I get the deprecation warning, which I don't want:
Technical description of changes
I replaced all occurrences of
pkg_resourcesby importlib or packaging.version.Screenshots of UI changes (or N/A)
==> not applicable
Detailed steps to verify changes work correctly (as executed by you)
On both master and replace_pkg_resources branches, I ran
bazel run //tensorboard -- --logdir runswith outputs:Output on master:
Output on
replace_pkg_resources(no pkg_resources warning):Alternate designs / implementations considered (or N/A)
--> not applicable