7d489cf4b3aad53ac7e5ec040af4f63aed8f0b50,src/python/pants/build_graph/injectables_mixin.py,InjectablesMixin,injectables_spec_for_key,#InjectablesMixin#Any#,54

Before Change


    
    specs = self.injectables_specs_for_key(key)
    specs_len = len(specs)
    if specs_len == 0:
      return None
    if specs_len != 1:
      raise self.TooManySpecsForKey("injectables spec mapping for key included {} elements, "
                                    "expected 1".format(specs_len))
    return specs[0]

After Change



    :API: public
    
    warn_or_error(
      removal_version="1.27.0.dev0",
      deprecated_entity_description="injectables_spec_for_key()",
      hint="Use `injectables_spec_for_key()` instead. The API is the same as "
           "before. This change is to prepare for Pants eventually supporting file system specs, "
           "e.g. `./pants cloc foo.py`. In preparation, we renamed `Spec` to `AddressSpec`."
    )
    return self.injectables_address_spec_for_key(key)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: pantsbuild/pants
Commit Name: 7d489cf4b3aad53ac7e5ec040af4f63aed8f0b50
Time: 2020-01-11
Author: ericarellano@me.com
File Name: src/python/pants/build_graph/injectables_mixin.py
Class Name: InjectablesMixin
Method Name: injectables_spec_for_key


Project Name: pantsbuild/pants
Commit Name: 083309d40076138c62597dc27cd438968cbaf503
Time: 2016-04-21
Author: benjyw@gmail.com
File Name: src/python/pants/option/parser.py
Class Name: Parser
Method Name: _check_deprecated


Project Name: pantsbuild/pants
Commit Name: 083309d40076138c62597dc27cd438968cbaf503
Time: 2016-04-21
Author: benjyw@gmail.com
File Name: src/python/pants/base/deprecated.py
Class Name:
Method Name: deprecated_module