[ 
https://issues.apache.org/jira/browse/AURORA-529?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14031728#comment-14031728
 ] 

Joe Smith commented on AURORA-529:
----------------------------------

hm... needed to make a change to pants:

{noformat}
$ git diff master
diff --git a/src/python/pants/backend/python/thrift_builder.py 
b/src/python/pants/backend/python/thrift_builder.py
index 698aca7..96ec59d 100644
--- a/src/python/pants/backend/python/thrift_builder.py
+++ b/src/python/pants/backend/python/thrift_builder.py
@@ -108,10 +108,11 @@ class PythonThriftBuilder(CodeGenerator):
 
     rewrites.append(replace_tokens)
     with open(source) as contents:
-      modified = functools.reduce(lambda txt, rewrite: rewrite(txt), rewrites, 
contents.read())
+      decoded_source = contents.read().decode('utf-8')
+      modified = functools.reduce(lambda txt, rewrite: rewrite(txt), rewrites, 
decoded_source)
       contents.close()
       with open(source, 'w') as thrift:
-        thrift.write(modified)
+        thrift.write(modified.encode('utf-8'))
     return source
 
   @property
{noformat}

But then that gets us:

{noformat}
====================================================================================
 test session starts 
====================================================================================
platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
plugins: cov, timeout
collected 9 items 

src/test/python/apache/aurora/admin/test_host_maintenance.py .........

=================================================================================
 9 passed in 1.73 seconds 
==================================================================================
src.test.python.apache.aurora.admin.host_maintenance                            
.....   SUCCESS
{noformat}

I'm going to kick off an :all test and see how it goes.

> pants is broken
> ---------------
>
>                 Key: AURORA-529
>                 URL: https://issues.apache.org/jira/browse/AURORA-529
>             Project: Aurora
>          Issue Type: Bug
>            Reporter: Joe Smith
>            Assignee: Joe Smith
>            Priority: Blocker
>
> {noformat}
> [tw-mbp13-jsmith aurora (master)]$ ./pants 
> ./src/test/python/apache/aurora/admin:all
> Build operating on targets: 
> OrderedSet([PythonTestSuite(src/test/python/apache/aurora/admin/BUILD:all)])
> Failed to run test!
> Traceback (most recent call last):
>   File 
> "/Users/jsmith/.pex/install/twitter.pants-0.0.23-py2-none-any.whl.acd44f4c0cf3576608ff18b2adafeff6f0b8f65f/twitter.pants-0.0.23-py2-none-any.whl/twitter/pants/python/test_builder.py",
>  line 204, in _run_python_test
>     builder = chroot.dump()
>   File 
> "/Users/jsmith/.pex/install/twitter.pants-0.0.23-py2-none-any.whl.acd44f4c0cf3576608ff18b2adafeff6f0b8f65f/twitter.pants-0.0.23-py2-none-any.whl/twitter/pants/python/python_chroot.py",
>  line 201, in dump
>     platforms=platforms)
>   File 
> "/Users/jsmith/.pex/install/twitter.pants-0.0.23-py2-none-any.whl.acd44f4c0cf3576608ff18b2adafeff6f0b8f65f/twitter.pants-0.0.23-py2-none-any.whl/twitter/pants/python/resolver.py",
>  line 109, in resolve_multi
>     platform=platform)
>   File 
> "/Users/jsmith/.pex/install/twitter.common.python-0.5.6-py2-none-any.whl.966710ef4887d077b27ee1d9cc3725372604d0ef/twitter.common.python-0.5.6-py2-none-any.whl/twitter/common/python/resolver.py",
>  line 98, in resolve
>     raise Unsatisfiable('Cannot satisfy requirements: %s' % 
> requirement_set[requirement.key])
> Unsatisfiable: Cannot satisfy requirements: 
> [PythonRequirement(coverage==3.6b1), Requirement.parse('coverage>=3.6')]
> src.test.python.apache.aurora.admin.host_maintenance                          
>   ..... EXCEPTION
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to