New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port contrib/node to py3 #6158

Merged
merged 2 commits into from Jul 20, 2018

Conversation

Projects
None yet
2 participants
@GoingTharn
Copy link
Contributor

GoingTharn commented Jul 17, 2018

Mostly imports, an occasional cast to list.
Largest change perhaps was the dict comp in test_node_task.py

Problem

port to py3

Solution

only significant change:
-- type_check_results = [(type, type_check_function(self.make_target(target_name, type)))
for (type, target_name) in types_with_target_names]
++ type_check_results = {type: type_check_function(self.make_target(target_name, type))
for type, target_name in types_with_target_names}

-- return dict(type_check_results)
++ return type_check_results

Port node to py3
Mostly imports, an occasional cast to list.
Largest change perhaps was the dict comp in test_node_task.py
@stuhood
Copy link
Member

stuhood left a comment

Sorry, one change needed here.

@@ -4,10 +4,12 @@

from __future__ import absolute_import, division, print_function, unicode_literals


# TODO(John Sirois): UnionProducts? That seems broken though for ranged version constraints,

This comment has been minimized.

@stuhood

stuhood Jul 17, 2018

Member

This comment should go after the import, as it is specific to NodePaths I think.

@stuhood

This comment has been minimized.

Copy link
Member

stuhood commented Jul 19, 2018

Thanks! Will merge afterhours.

@stuhood stuhood merged commit 1be6113 into pantsbuild:master Jul 20, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

CMLivingston pushed a commit to CMLivingston/pants that referenced this pull request Aug 27, 2018

Port contrib/node to py3 (pantsbuild#6158)
Mostly imports, an occasional cast to list.
Largest change perhaps was the dict comp in test_node_task.py

### Problem

port to py3

### Solution

only significant change:
   -- type_check_results = [(type, type_check_function(self.make_target(target_name, type)))
                          for (type, target_name) in types_with_target_names]
   ++ type_check_results = {type: type_check_function(self.make_target(target_name, type))
                          for type, target_name in types_with_target_names}

   -- return dict(type_check_results)
   ++ return type_check_results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment