Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pants reports tomllib as a unowned dependency for a Python 3.11.* IC. #18055

Open
jsirois opened this issue Jan 22, 2023 · 1 comment
Open

Pants reports tomllib as a unowned dependency for a Python 3.11.* IC. #18055

jsirois opened this issue Jan 22, 2023 · 1 comment
Labels
backend: Python Python backend-related issues bug

Comments

@jsirois
Copy link
Contributor

jsirois commented Jan 22, 2023

Looks like:

05:56:35.60 [WARN] Pants cannot infer owners for the following imports in the target science/config.py:

  * tomllib (line: 4)

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/v2.15/docs/troubleshooting#import-errors-and-missing-dependencies for common problems.

The issue is ~by design from #13491 which freezes in a global list from Python 3.10. Either that list has to be added to, or, it seems better, the list should be generated by a rule that runs a Python Process using the target Python > 3.10 interpreter in-question when the interpreter in question is of version > 3.10.

@jsirois jsirois added the bug label Jan 22, 2023
@jsirois jsirois changed the title Pants reports tomllib as a unowned dependency. Pants reports tomllib as a unowned dependency for a Python 3.11.* IC. Jan 22, 2023
@thejcannon
Copy link
Member

thejcannon commented Jan 23, 2023

I don't remember which (if any) modules have been removed from stdlib, but it might be safer to union the stdlib from ALL versions of Python to ward against removed modules.

EDIT: Oh you mean run a Python process in a rule on the user's behalf. Not a process to generate this static list? Yeah that'd work too. I'd +1 that.

@thejcannon thejcannon added the backend: Python Python backend-related issues label Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend: Python Python backend-related issues bug
Projects
None yet
Development

No branches or pull requests

2 participants