Commits

anatoly techtonik  committed e5bb023

Enumerate files per issue, add TODO about patch detection not being reliable

  • Participants
  • Parent commits ba19174

Comments (0)

Files changed (1)

 #---
 """
   [ ] open patches per module
-    [ ] get list of all open issues with patches
-      [ ] patch keyword is not reliable
-          http://bugs.python.org/issue15849
-        [ ] get list of all issues with attachments
-        [ ] filter patches
+    [x] get list of all open issues with patches
     [ ] get patch files for each issue
     [ ] extract paths from each patch
     [ ] detect modules for the issue using paths
 # -- 1. Get list of all open issues with patches --
 #
 # Using http://roundup.sourceforge.net/docs/xmlrpc.html
+# 
+# [ ] patch keyword filtering may not be reliable
+#   [ ] get list of all issues with attachments
+#   [ ] filter patches
+#
 
 try:
   import xmlrpclib
 open_issues = bpo.filter('issue', None, {'status':open_status, 'keywords':patch_keyword})
 #print(open_issues)
 print('Opened issues with patch keyword: %s' % len(open_issues))
+
+
+# -- 2. read patch files for each issue and get paths per issue
+
+files_attached = 0
+files_patches = []
+
+for issue in open_issues:
+  print(issue)
+  for filename in bpo.display('issue'+issue, 'files')['files']:
+    print("  " + filename)
+    files_attached += 1
+