Add a unicode-safe shlex wrapper.

Review Request #1139 — Created Oct. 8, 2014 and submitted

benjyw
pants
65ffeb4...
pants-reviews
jsirois, zundel

Add a unicode-safe shlex wrapper.

ci baking.

  • 1
  • 0
  • 2
  • 0
  • 3
Description From Last Updated
six doesn't appear to have an equivalent of to_bytes. I can improvise one based on type testing, which is all ... BE benjyw
PA
  1. 
      
  2. src/python/pants/util/strutil.py (Diff revision 1)
     
     

    We have six now, we should always use it in new code. Soon I'm going to go clean out all of the old uses of t.c.lang too.

  3. 
      
BE
  1. 
      
  2. src/python/pants/util/strutil.py (Diff revision 1)
     
     

    six doesn't appear to have an equivalent of to_bytes. I can improvise one based on type testing, which is all to_bytes does anyway.

    1. Yeah, and this is a utility we really need anyway, might make sense to toss it into an internal helper module.

  3. 
      
BE
ZU
  1. 
      
  2. src/python/pants/util/strutil.py (Diff revision 2)
     
     

    Can we get a unit test for this?

  3. 
      
PA
  1. 
      
  2. src/python/pants/util/strutil.py (Diff revision 2)
     
     

    I'd check for six.text_type, then throw in the else, just for completeness.

  3. 
      
BE
BE
Review request changed

Status: Closed (submitted)

Loading...