white-appointment-6770
09/09/2024, 8:14 PM__init__.py
contains imports like, from . my_package_component import *
? I've tried running with use_rust_parser set to true and false, but no difference. Preserving the sandboxes shows that the dependency's __init__.py
file is imported, but none of the files it imports are being pulled in to the sandbox.
Neither pants peek __init__.py
nor pants dependencies __init__.py
list any dependencies aside from another __init__.py
in a package subfolder.
I've been struggling with this for about a week now, but I can't find any solutions in the github issues or from google searches. Any suggests would be greatly appreciated. Thanks!fast-nail-55400
09/09/2024, 8:46 PMwhite-appointment-6770
09/09/2024, 8:47 PMwhite-appointment-6770
09/09/2024, 8:55 PMwhite-appointment-6770
09/09/2024, 9:08 PMwhite-appointment-6770
09/09/2024, 9:08 PMwhite-appointment-6770
09/09/2024, 9:10 PMwide-midnight-78598
09/09/2024, 11:39 PMuse_rust_parser
made a difference for anyone, that's strangewide-midnight-78598
09/09/2024, 11:39 PMwide-midnight-78598
09/09/2024, 11:43 PMpants peek :: > before.json
pants --python-infer-use-rust-parser=False peek :: > after.json
wide-midnight-78598
09/09/2024, 11:43 PM--python-infer-init-files=always
https://www.pantsbuild.org/stable/reference/subsystems/python-infer#init_fileswhite-appointment-6770
09/10/2024, 3:13 PMwhite-appointment-6770
09/10/2024, 3:38 PM# This works
from .my_class import MyClass
# This causes inference error
from . my_class import MyClass
When we cleaned up the code to get rid of the inappropriate spaces then things began working under 2.21.1 just as they did under 2.18.0.
It does not matter whether user_rust_parser is true or false, the inference errors are consistent.wide-midnight-78598
09/10/2024, 3:49 PMwhite-appointment-6770
09/10/2024, 5:41 PMfast-nail-55400
09/10/2024, 5:46 PMfast-nail-55400
09/10/2024, 5:46 PMtree-sittter-python
crate.fast-nail-55400
09/10/2024, 5:46 PMfast-nail-55400
09/10/2024, 5:47 PMtree-sitter-python
first?fast-nail-55400
09/10/2024, 5:48 PMtree-sitter-python
than in use by Pants?