Force ascii for jar Manifest contents

Review Request #238 — Created April 16, 2014 and submitted

patricklaw
pants
pants-reviews
benjyw, jsirois
The unicode_literals import introduced a regression where jar manifests are written out in UCS-4 due to some implementation details in Manifest.  This change forces the output to be ASCII bytes, and will fail if any non-ASCII characters are written to the manifest header.  Technically there are some places where UTF-8 is allowed in the manifest, but implementing it properly will require a rewrite of our implementation of the spec, and this gets us out of the current situation where jars are output successfully but are silently unrunnable.


JS
  1. 
      
  2. src/python/pants/java/jar/manifest.py (Diff revision 1)
     
     
    text.encode('ascii') ? bytes takes 2 args under python3
  3. 
      
PA
JS
  1. Ship It!
  2. 
      
LA
  1. oh man I thought I'd forgotten how to run bundles, but I just needed this patch
  2. 
      
BE
  1. Ship It!
  2. 
      
PA
Review request changed

Status: Closed (submitted)

Loading...