Split literal from netrc credentials to allow pickling

Review Request #3605 - Created March 24, 2016 and submitted

Stu Hood
3058, 3088
benjyw, kwlzn, lahosken

The goal of this change is to eliminate the usage of lambdas in credentials, which prevents credentials objects from being pickled (and thus blocks the new engine: see 3058). It also has the benefit of making the common case simpler (a one liner to use netrc_credentials instead).

While it's possible that folks were using raw python code to pass other callables here, I'm willing to bet that those usecases would be significantly cleaner as plugins (or in the core).

  • Deprecate passing lambdas to LiteralCredentials (which will remain unpickleable until after the deprecation is removed)
  • Add NetrcCredentials and use it for pantsbuild/pants


Kris Wilson
Benjy Weinberger
Stu Hood
Review request changed

Status: Closed (submitted)

Change Summary:

Merged as 35c88f74d718e98fd4eb21c66c65daaf1eceacc3