Skip to content

Commit

Permalink
Port source to Python 3 (pantsbuild#6197)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric-Arellano authored and Chris Livingston committed Aug 27, 2018
1 parent 51f4f5f commit 3301a7e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/python/pants/source/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
python_library(
sources = globs('*.py', exclude=[globs('payload_fields.py')]),
dependencies=[
'3rdparty/python:future',
'3rdparty/python:six',
'3rdparty/python/twitter/commons:twitter.common.dirutil',
'src/python/pants/base:build_environment',
Expand Down
3 changes: 1 addition & 2 deletions src/python/pants/source/source_root.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
from __future__ import absolute_import, division, print_function, unicode_literals

import os
from builtins import object, range
from collections import namedtuple

from six.moves import range

from pants.base.project_tree_factory import get_project_tree
from pants.subsystem.subsystem import Subsystem
from pants.util.memo import memoized_method, memoized_property
Expand Down
2 changes: 1 addition & 1 deletion src/python/pants/source/wrapped_globs.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ class Files(FilesetRelPathWrapper):

@staticmethod
def _literal_files(*args, **kwargs):
if kwargs.keys() != ['root']:
if list(kwargs.keys()) != ['root']:
raise ValueError('Literal file globs do not support kwargs other than `root`: {}'.format(kwargs))
return args

Expand Down
2 changes: 1 addition & 1 deletion tests/python/pants_test/source/test_wrapped_globs.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def test_iter_relative_paths(self):
efws = self.sources_for(['a', 'b', 'c'], 'test_root')
self.assertEquals(
efws.files_hash,
str('cb11a7f0b5a1e22b93c36783608ba531ea831c2f68a5c9f9498417b211bcfea4'),
'cb11a7f0b5a1e22b93c36783608ba531ea831c2f68a5c9f9498417b211bcfea4',
)
self.assertEquals(
list(efws.paths_from_buildroot_iter()),
Expand Down

0 comments on commit 3301a7e

Please sign in to comment.