2d01e912dd8e3b5220c5d63acc235f18fa0e4604,src/python/pants/backend/python/interpreter_cache.py,PythonInterpreterCache,select_interpreter_for_targets,#PythonInterpreterCache#Any#,54

Before Change



  def select_interpreter_for_targets(self, targets):
    Pick an interpreter compatible with all the specified targets.
    allowed_interpreters = OrderedSet(self.interpreters)
    tgts_with_compatibilities = []  // Used only for error messages.

    // Constrain allowed_interpreters based on each target"s compatibility requirements.
    for target in targets:

After Change


  def select_interpreter_for_targets(self, targets):
    Pick an interpreter compatible with all the specified targets.
    tgts_with_compatibilities = []
    filters = set()
    for target in targets:
      if isinstance(target, PythonTarget) and target.compatibility:
        tgts_with_compatibilities.append(target)
        filters.update(target.compatibility)

    allowed_interpreters = set(self.setup(filters=filters))

    // Constrain allowed_interpreters based on each target"s compatibility requirements.
    for target in tgts_with_compatibilities:
      compatible_with_target = set(self._matching(allowed_interpreters, target.compatibility))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: pantsbuild/pants
Commit Name: 2d01e912dd8e3b5220c5d63acc235f18fa0e4604
Time: 2017-11-10
Author: john.sirois@gmail.com
File Name: src/python/pants/backend/python/interpreter_cache.py
Class Name: PythonInterpreterCache
Method Name: select_interpreter_for_targets


Project Name: pantsbuild/pants
Commit Name: 43ffe73ada2fcbc2571172193c30b906d2de944f
Time: 2019-12-21
Author: blorente@users.noreply.github.com
File Name: src/python/pants/backend/project_info/tasks/export_dep_as_jar.py
Class Name: ExportDepAsJar
Method Name: _process_target


Project Name: pantsbuild/pants
Commit Name: 0ea28ad0dfa94411a51d8c666aa780d3f254d786
Time: 2014-10-02
Author: zundel@squareup.com
File Name: src/python/pants/backend/codegen/targets/java_protobuf_library.py
Class Name: JavaProtobufLibrary
Method Name: imports