Could somebody help with `DEPRECATED: Target.compu...
# general
g
Could somebody help with
DEPRECATED: Target.compute_injectable_specs() will be removed in version 1.27.0.dev0
How could I fix it?
w
the whole error should be:
Copy code
warn_or_error(
            removal_version="1.27.0.dev0",
            deprecated_entity_description="Target.compute_injectable_specs()",
            hint="Use `Target.compute_injectable_address_specs()` instead. The API is the same as "
            "before. This change is to prepare for Pants eventually supporting file system specs, "
            "e.g. `./pants cloc foo.py`. In preparation, we renamed `Spec` to `AddressSpec`.",
        )
is this warning coming from a plugin that you control, or somewhere else?
g
Looks like it comes from
[jar-dependency-management]
Full log is:
Copy code
[jar-dependency-management]05:25:43 [WARN] /home/user/.cache/pants/setup/bootstrap-Linux-x86_64/1.25.0_py36/lib/python3.6/site-packages/pants/build_graph/target.py:622: DeprecationWarning: DEPRECATED: Target.compute_injectable_specs() will be removed in version 1.27.0.dev0.
  Use `Target.compute_injectable_address_specs()` instead. The API is the same as before. This change is to prepare for Pants eventually supporting file system specs, e.g. `./pants cloc foo.py`. In preparation, we renamed `Spec` to `AddressSpec`.
  cls._compute_injectable_specs_warn_or_error()
h
Hm, which Pants version are you on?
w
looks like
1.25.0
based on filenames
๐Ÿ‘ 2
g
Yes, 1.25
w
but i think that this might be
src/python/pants/backend/jvm/targets/managed_jar_dependencies.py
... it still has a definition of that method
๐Ÿ‘ 1
although the deprecation* is gone now in master
h
Oh, hm, youโ€™re right. We should fix that in 1.25.1rc1. In the mean time, @gentle-room-19215, you can ignore the deprecation message by adding this to pants.ini
Copy code
[GLOBAL]
ignore_pants_warnings: ['Target.compute_injectable_specs() will be removed']
w
might need escapes there: it's a regex
๐Ÿ‘ 1
might be
'DEPRECATED: Target.compute_injectable_specs.. will be removed'
๐Ÿ‘ 1
g
Thank you guys!
โค๏ธ 1
h
Thanks for flagging the issue!