Commits

anatoly techtonik committed 8fc6192

Add patches per module classification for stdlib.

Open issues with patch keyword: 1654
Issues with confirmed patches: 1583

Files attached: 3432
Patches: 2926

json: 8
distutils: 58

Finished in 0:04:32.32

  • Participants
  • Parent commits 76595b4

Comments (0)

Files changed (1)

   import xmlrpclib
   input = raw_input
 
+import stdlib
+
 # -- 0. Bootstrap locally --
 
 from os import makedirs
 
 issue_files = {}    # 'number' => []
 issue_patches = {}  # 'number' => []
+module_issues = {}
 for issue in open_issues:
   print(issue)
   issue_files[issue] = bpo.display('issue'+issue, 'files')['files']
       if issue not in issue_patches:
         issue_patches[issue] = []
       issue_patches[issue].append(path)
+      # detect if there is a module for the patch path
+      for entry in patchset.items:
+        module = (stdlib.getmodname(entry.source) or
+                  stdlib.getmodname(entry.target))
+        if module:
+          stdout.write(' (module: %s)' % module)
+          if module not in module_issues:
+            module_issues[module] = []
+          if issue not in module_issues[module]:
+            module_issues[module].append(issue)
+        else:
+          # [ ] handle unknown path - ask to add to unknown paths cache
+          pass
     else:
       stdout.write(' (not a patch)')
     stdout.write('\n')
 print('Files attached: %s' % files_attached)
 print('Patches: %s' % files_patches)
 print('')
+for module, issues in module_issues.items():
+  print('  %s: %d' % (module, len(issues)))
+print('')
 print('Finished in ' + str(datetime.now() - START)[:-4])