Description: Support for python3
Origin: upstream, https://github.com/facebook/watchman/issues/631#issuecomment-413076214
Bug: https://github.com/facebook/watchman/issues/631
Last-Update: 2019-10-04

--- watchman-4.9.0.orig/python/bin/watchman-make
+++ watchman-4.9.0/python/bin/watchman-make
@@ -100,7 +100,7 @@ class DefineTarget(argparse.Action):
             targets = []
             setattr(namespace, self.dest, targets)
 
-        if isinstance(values, basestring):
+        if isinstance(values, str):
             values = [values]
 
         if namespace.pattern is None or len(namespace.pattern) == 0:
@@ -209,7 +209,7 @@ while True:
         client.setTimeout(600)
 
         result = client.receive()
-        for _, t in targets.iteritems():
+        for _, t in targets.items():
             t.consumeEvents(client)
 
         # Now we wait for events to settle
@@ -218,7 +218,7 @@ while True:
         while not settled:
             try:
                 result = client.receive()
-                for _, t in targets.iteritems():
+                for _, t in targets.items():
                     t.consumeEvents(client)
             except pywatchman.SocketTimeout as ex:
                 # Our short settle timeout hit, so we're now settled
@@ -226,7 +226,7 @@ while True:
                 break
 
         # Now we can work on executing the targets
-        for _, t in targets.iteritems():
+        for _, t in targets.items():
             t.execute()
 
         # Print this at the bottom of the loop rather than the top
--- watchman-4.9.0.orig/python/bin/watchman-wait
+++ watchman-4.9.0/python/bin/watchman-wait
@@ -182,7 +182,7 @@ client = pywatchman.client()
 try:
     client.capabilityCheck(
         required=['term-dirname', 'cmd-watch-project', 'wildmatch'])
-    for _, sub in subscriptions.iteritems():
+    for _, sub in subscriptions.items():
         sub.start(client)
 
 except pywatchman.CommandError as ex:
@@ -200,7 +200,7 @@ while deadline is None or time.time() <
         # the client object will accumulate all subscription results
         # over time, so we ask it to remove and return those values
         # for each of the subscriptions
-        for _, sub in subscriptions.iteritems():
+        for _, sub in subscriptions.items():
             sub.emit(client)
 
     except pywatchman.SocketTimeout as ex:
