careful-address-89803
11/20/2022, 11:44 PMinterpreter_constraints
(link). This is distinct from the similar (?) check done in the PythonToolBase
(link) (link to issue discussing this)
Questions: Is it still necessary to do this check in lockfile generation? What effect does this actually have, given the additional check? Should the other tools do this check as well?happy-kitchen-89482
11/21/2022, 2:08 PMhundreds-father-404
11/21/2022, 4:22 PMtyped-ast
to understand different versions of Python than the Python interpreter being used. A neat feature of typed-ast
is it let you understand both older and newer versions of the current interpreter
Unfortuantely, typed-ast stopped being updated because the std-lib gained this functionality. Except, the std-lib only can look backwards, as it doesn't know the syntax of future Python versions. This means that when you run Black with Python 3.8, it can't understand Python 3.9+ syntax. So, instead, you need to run the tool with 3.9+
Pants gets clever to try to do the right thing for users automatically. We detect if your code is 3.8+ (where typed-ast stopped working), and if so, use your code's constraints rather than tool constraints; but only if you didn't explicitly set the tool's optioncareful-address-89803
11/22/2022, 5:18 PMhundreds-father-404
11/22/2022, 5:19 PM