Hello! I was wondering if there is some way to mak...
# general
a
Hello! I was wondering if there is some way to make these warnings:
Copy code
If you do not expect an import to be inferrable, add `# pants: no-infer-dep` to the import line. Otherwise, see <https://www.pantsbuild.org/2.22/docs/using-pants/troubleshooting-common-issues#import-errors-and-missing-dependencies> for common problems.
13:31:29.58 [WARN] Pants cannot infer owners for the following imports in the target 
python/file/target.py:

  * google.protobuf.descriptor (line: 6)
  * google.protobuf.descriptor_pool (line: 7)
  * google.protobuf.internal.builder (line: 9)
  * google.protobuf.symbol_database (line: 8)
an error instead of a warning?
b
I think https://www.pantsbuild.org/stable/reference/subsystems/python-infer#unowned_dependency_behavior might be what you want:
Copy code
[python-infer]
unowned_dependency_behaviour = "error"
a
ooo perf thanks
Copy code
15:20:28.03 [ERROR] Invalid option 'unowned_dependency_behaviour' under [python-infer] in /Users/nate/srv/pants.toml
15:20:28.03 [ERROR] Invalid config entries detected. See log for details on which entries to update or remove.
😮 1
here's my whole config:
Copy code
[GLOBAL]
pants_version = "2.22.0"
backend_packages = [
                 "pants.backend.python",
                 "pants.backend.docker",
                 "pants.backend.experimental.docker.podman"
                 ]


[source]
root_patterns = [
              "/",
              "/src/",
              "/apps/",
]

[python-bootstrap]
search_path = ["<PYENV>"]

[python-infer]
unowned_dependency_behaviour = "error"

[python]
interpreter_constraints = ["CPython==3.8.*"]
enable_resolves = true
I noticed this is broken in the same way as well?
Copy code
[docker]
experimental_enable_podman = true
oh! @broad-processor-92400 - figured it out (haha) it's
unowned_dependency_behavior
(no u)
🇺🇸 3
b
oh, sorry, my 🇦🇺 is shining through