c5c3285c1e9afa1b29eecbc2ff00bb6fde65d986,src/python/pants/backend/python/util_rules/pex.py,PexInterpreterConstraints,create_from_targets,#Any#Any#Any#,208
Before Change
def create_from_targets(
cls, targets: Iterable[Target], python_setup: PythonSetup
) -> "PexInterpreterConstraints":
fields = []
for tgt in targets:
has_deprecated = tgt.has_field(PythonInterpreterCompatibility)
has_new = tgt.has_field(InterpreterConstraintsField)
if has_deprecated and has_new:
fields.append(
cls.resolve_conflicting_fields(
tgt[PythonInterpreterCompatibility],
tgt[InterpreterConstraintsField],
tgt.address,
)
)
elif has_deprecated:
fields.append(tgt[PythonInterpreterCompatibility])
elif has_new:
fields.append(tgt[InterpreterConstraintsField])
return cls.create_from_compatibility_fields(fields, python_setup)
@classmethod
def create_from_compatibility_fields(
After Change
cls, targets: Iterable[Target], python_setup: PythonSetup
) -> "PexInterpreterConstraints":
return cls.create_from_compatibility_fields(
(
tgt[InterpreterConstraintsField]
for tgt in targets
if tgt.has_field(InterpreterConstraintsField)
),
python_setup,
)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 12
Instances
Project Name: pantsbuild/pants
Commit Name: c5c3285c1e9afa1b29eecbc2ff00bb6fde65d986
Time: 2020-11-21
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/backend/python/util_rules/pex.py
Class Name: PexInterpreterConstraints
Method Name: create_from_targets
Project Name: pantsbuild/pants
Commit Name: f6dc5a24788bb3ff9b151e84d618ae776a48a006
Time: 2020-04-27
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/backend/python/rules/pex_from_targets.py
Class Name:
Method Name: pex_from_targets
Project Name: pantsbuild/pants
Commit Name: f6dc5a24788bb3ff9b151e84d618ae776a48a006
Time: 2020-04-27
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/backend/python/rules/pytest_runner.py
Class Name:
Method Name: setup_pytest_for_target