bee_python 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (503) hide show
  1. data/LICENSE +202 -0
  2. data/build/README +23 -0
  3. data/egg/egg/build.yml +70 -0
  4. data/egg/egg/ez_setup.py +280 -0
  5. data/egg/egg/script.py +12 -0
  6. data/egg/egg/setup.erb +11 -0
  7. data/egg/egg/suite.py +37 -0
  8. data/egg/egg/test.py +31 -0
  9. data/egg/egg.yml +69 -0
  10. data/egg/http/build.erb +53 -0
  11. data/egg/http/server.py +34 -0
  12. data/egg/http.yml +50 -0
  13. data/egg/mysql/mysql.py +43 -0
  14. data/egg/mysql.yml +44 -0
  15. data/egg/project/build.erb +77 -0
  16. data/egg/project/script.py +42 -0
  17. data/egg/project/test.py +31 -0
  18. data/egg/project.yml +59 -0
  19. data/egg/script/build.erb +35 -0
  20. data/egg/script/script.py +42 -0
  21. data/egg/script.yml +50 -0
  22. data/egg/soap/build.erb +52 -0
  23. data/egg/soap/client.py +18 -0
  24. data/egg/soap/server.py +30 -0
  25. data/egg/soap.yml +58 -0
  26. data/egg/source/source.py +42 -0
  27. data/egg/source.yml +47 -0
  28. data/egg/test/test.py +28 -0
  29. data/egg/test.yml +44 -0
  30. data/egg/xmlrpc/build.erb +52 -0
  31. data/egg/xmlrpc/client.py +22 -0
  32. data/egg/xmlrpc/server.py +24 -0
  33. data/egg/xmlrpc.yml +51 -0
  34. data/lib/bee_task_python.rb +390 -0
  35. data/test/build.yml +16 -0
  36. data/test/tc_bee_task_python.rb +27 -0
  37. data/test/test_build.rb +26 -0
  38. data/test/test_build_listener.rb +62 -0
  39. data/test/ts_bee_python.rb +26 -0
  40. data/tools/common/__init__.py +5 -0
  41. data/tools/common/common/__init__.py +140 -0
  42. data/tools/common/common/__pkginfo__.py +43 -0
  43. data/tools/common/common/adbh.py +35 -0
  44. data/tools/common/common/cache.py +114 -0
  45. data/tools/common/common/changelog.py +234 -0
  46. data/tools/common/common/clcommands.py +181 -0
  47. data/tools/common/common/cli.py +212 -0
  48. data/tools/common/common/compat.py +328 -0
  49. data/tools/common/common/configuration.py +1087 -0
  50. data/tools/common/common/contexts.py +58 -0
  51. data/tools/common/common/corbautils.py +117 -0
  52. data/tools/common/common/daemon.py +171 -0
  53. data/tools/common/common/date.py +279 -0
  54. data/tools/common/common/db.py +49 -0
  55. data/tools/common/common/dbf.py +229 -0
  56. data/tools/common/common/debugger.py +208 -0
  57. data/tools/common/common/decorators.py +190 -0
  58. data/tools/common/common/deprecation.py +118 -0
  59. data/tools/common/common/fileutils.py +409 -0
  60. data/tools/common/common/graph.py +259 -0
  61. data/tools/common/common/html.py +142 -0
  62. data/tools/common/common/interface.py +76 -0
  63. data/tools/common/common/logging_ext.py +166 -0
  64. data/tools/common/common/modutils.py +670 -0
  65. data/tools/common/common/optik_ext.py +383 -0
  66. data/tools/common/common/optparser.py +92 -0
  67. data/tools/common/common/pdf_ext.py +111 -0
  68. data/tools/common/common/proc.py +276 -0
  69. data/tools/common/common/pyro_ext.py +146 -0
  70. data/tools/common/common/pytest.py +754 -0
  71. data/tools/common/common/shellutils.py +383 -0
  72. data/tools/common/common/sphinx_ext.py +87 -0
  73. data/tools/common/common/sphinxutils.py +122 -0
  74. data/tools/common/common/sqlgen.py +31 -0
  75. data/tools/common/common/table.py +930 -0
  76. data/tools/common/common/tasksqueue.py +97 -0
  77. data/tools/common/common/test/__init__.py +1 -0
  78. data/tools/common/common/test/data/ChangeLog +184 -0
  79. data/tools/common/common/test/data/MyPyPa-0.1.0-py2.5.egg +0 -0
  80. data/tools/common/common/test/data/__init__.py +1 -0
  81. data/tools/common/common/test/data/content_differ_dir/NOTHING +0 -0
  82. data/tools/common/common/test/data/content_differ_dir/README +1 -0
  83. data/tools/common/common/test/data/content_differ_dir/subdir/coin +1 -0
  84. data/tools/common/common/test/data/content_differ_dir/subdir/toto.txt +53 -0
  85. data/tools/common/common/test/data/file_differ_dir/NOTHING +0 -0
  86. data/tools/common/common/test/data/file_differ_dir/README +1 -0
  87. data/tools/common/common/test/data/file_differ_dir/subdir/toto.txt +53 -0
  88. data/tools/common/common/test/data/file_differ_dir/subdirtwo/Hello +0 -0
  89. data/tools/common/common/test/data/find_test/__init__.py +0 -0
  90. data/tools/common/common/test/data/find_test/foo.txt +0 -0
  91. data/tools/common/common/test/data/find_test/module.py +0 -0
  92. data/tools/common/common/test/data/find_test/module2.py +0 -0
  93. data/tools/common/common/test/data/find_test/newlines.txt +0 -0
  94. data/tools/common/common/test/data/find_test/noendingnewline.py +0 -0
  95. data/tools/common/common/test/data/find_test/nonregr.py +0 -0
  96. data/tools/common/common/test/data/find_test/normal_file.txt +0 -0
  97. data/tools/common/common/test/data/find_test/spam.txt +0 -0
  98. data/tools/common/common/test/data/find_test/sub/doc.txt +0 -0
  99. data/tools/common/common/test/data/find_test/sub/momo.py +0 -0
  100. data/tools/common/common/test/data/find_test/test.ini +0 -0
  101. data/tools/common/common/test/data/find_test/test1.msg +0 -0
  102. data/tools/common/common/test/data/find_test/test2.msg +0 -0
  103. data/tools/common/common/test/data/find_test/write_protected_file.txt +0 -0
  104. data/tools/common/common/test/data/foo.txt +9 -0
  105. data/tools/common/common/test/data/module.py +88 -0
  106. data/tools/common/common/test/data/module2.py +77 -0
  107. data/tools/common/common/test/data/newlines.txt +3 -0
  108. data/tools/common/common/test/data/noendingnewline.py +36 -0
  109. data/tools/common/common/test/data/nonregr.py +14 -0
  110. data/tools/common/common/test/data/normal_file.txt +0 -0
  111. data/tools/common/common/test/data/reference_dir/NOTHING +0 -0
  112. data/tools/common/common/test/data/reference_dir/README +1 -0
  113. data/tools/common/common/test/data/reference_dir/subdir/coin +1 -0
  114. data/tools/common/common/test/data/reference_dir/subdir/toto.txt +53 -0
  115. data/tools/common/common/test/data/same_dir/NOTHING +0 -0
  116. data/tools/common/common/test/data/same_dir/README +1 -0
  117. data/tools/common/common/test/data/same_dir/subdir/coin +1 -0
  118. data/tools/common/common/test/data/same_dir/subdir/toto.txt +53 -0
  119. data/tools/common/common/test/data/spam.txt +9 -0
  120. data/tools/common/common/test/data/sub/doc.txt +1 -0
  121. data/tools/common/common/test/data/sub/momo.py +1 -0
  122. data/tools/common/common/test/data/subdir_differ_dir/NOTHING +0 -0
  123. data/tools/common/common/test/data/subdir_differ_dir/README +1 -0
  124. data/tools/common/common/test/data/subdir_differ_dir/subdir/coin +1 -0
  125. data/tools/common/common/test/data/subdir_differ_dir/subdir/toto.txt +53 -0
  126. data/tools/common/common/test/data/test.ini +20 -0
  127. data/tools/common/common/test/data/test1.msg +30 -0
  128. data/tools/common/common/test/data/test2.msg +42 -0
  129. data/tools/common/common/test/data/write_protected_file.txt +0 -0
  130. data/tools/common/common/test/foomod.py +17 -0
  131. data/tools/common/common/test/unittest_cache.py +129 -0
  132. data/tools/common/common/test/unittest_changelog.py +37 -0
  133. data/tools/common/common/test/unittest_compat.py +239 -0
  134. data/tools/common/common/test/unittest_configuration.py +348 -0
  135. data/tools/common/common/test/unittest_date.py +154 -0
  136. data/tools/common/common/test/unittest_decorators.py +62 -0
  137. data/tools/common/common/test/unittest_deprecation.py +76 -0
  138. data/tools/common/common/test/unittest_fileutils.py +133 -0
  139. data/tools/common/common/test/unittest_graph.py +50 -0
  140. data/tools/common/common/test/unittest_html.py +76 -0
  141. data/tools/common/common/test/unittest_interface.py +87 -0
  142. data/tools/common/common/test/unittest_modutils.py +244 -0
  143. data/tools/common/common/test/unittest_pytest.py +50 -0
  144. data/tools/common/common/test/unittest_shellutils.py +248 -0
  145. data/tools/common/common/test/unittest_table.py +448 -0
  146. data/tools/common/common/test/unittest_taskqueue.py +71 -0
  147. data/tools/common/common/test/unittest_testlib.py +956 -0
  148. data/tools/common/common/test/unittest_textutils.py +247 -0
  149. data/tools/common/common/test/unittest_tree.py +248 -0
  150. data/tools/common/common/test/unittest_umessage.py +55 -0
  151. data/tools/common/common/test/unittest_ureports_html.py +64 -0
  152. data/tools/common/common/test/unittest_ureports_text.py +105 -0
  153. data/tools/common/common/test/unittest_xmlutils.py +75 -0
  154. data/tools/common/common/test/utils.py +87 -0
  155. data/tools/common/common/testlib.py +1927 -0
  156. data/tools/common/common/textutils.py +476 -0
  157. data/tools/common/common/tree.py +372 -0
  158. data/tools/common/common/umessage.py +161 -0
  159. data/tools/common/common/ureports/__init__.py +174 -0
  160. data/tools/common/common/ureports/docbook_writer.py +139 -0
  161. data/tools/common/common/ureports/html_writer.py +131 -0
  162. data/tools/common/common/ureports/nodes.py +201 -0
  163. data/tools/common/common/ureports/text_writer.py +140 -0
  164. data/tools/common/common/vcgutils.py +216 -0
  165. data/tools/common/common/visitor.py +107 -0
  166. data/tools/common/common/xmlrpcutils.py +136 -0
  167. data/tools/common/common/xmlutils.py +61 -0
  168. data/tools/compile/compile.py +16 -0
  169. data/tools/coverage/coverage.py +602 -0
  170. data/tools/epydoc/__init__.py +227 -0
  171. data/tools/epydoc/__init__.pyc +0 -0
  172. data/tools/epydoc/apidoc.py +2203 -0
  173. data/tools/epydoc/apidoc.pyc +0 -0
  174. data/tools/epydoc/checker.py +349 -0
  175. data/tools/epydoc/checker.pyc +0 -0
  176. data/tools/epydoc/cli.py +1470 -0
  177. data/tools/epydoc/cli.pyc +0 -0
  178. data/tools/epydoc/compat.py +250 -0
  179. data/tools/epydoc/compat.pyc +0 -0
  180. data/tools/epydoc/docbuilder.py +1358 -0
  181. data/tools/epydoc/docbuilder.pyc +0 -0
  182. data/tools/epydoc/docintrospecter.py +1056 -0
  183. data/tools/epydoc/docintrospecter.pyc +0 -0
  184. data/tools/epydoc/docparser.py +2113 -0
  185. data/tools/epydoc/docparser.pyc +0 -0
  186. data/tools/epydoc/docstringparser.py +1111 -0
  187. data/tools/epydoc/docstringparser.pyc +0 -0
  188. data/tools/epydoc/docwriter/__init__.py +12 -0
  189. data/tools/epydoc/docwriter/__init__.pyc +0 -0
  190. data/tools/epydoc/docwriter/dotgraph.py +1351 -0
  191. data/tools/epydoc/docwriter/dotgraph.pyc +0 -0
  192. data/tools/epydoc/docwriter/html.py +3491 -0
  193. data/tools/epydoc/docwriter/html.pyc +0 -0
  194. data/tools/epydoc/docwriter/html_colorize.py +909 -0
  195. data/tools/epydoc/docwriter/html_colorize.pyc +0 -0
  196. data/tools/epydoc/docwriter/html_css.py +550 -0
  197. data/tools/epydoc/docwriter/html_css.pyc +0 -0
  198. data/tools/epydoc/docwriter/html_help.py +190 -0
  199. data/tools/epydoc/docwriter/html_help.pyc +0 -0
  200. data/tools/epydoc/docwriter/latex.py +1187 -0
  201. data/tools/epydoc/docwriter/latex.pyc +0 -0
  202. data/tools/epydoc/docwriter/plaintext.py +276 -0
  203. data/tools/epydoc/docwriter/plaintext.pyc +0 -0
  204. data/tools/epydoc/docwriter/xlink.py +505 -0
  205. data/tools/epydoc/docwriter/xlink.pyc +0 -0
  206. data/tools/epydoc/gui.py +1148 -0
  207. data/tools/epydoc/gui.pyc +0 -0
  208. data/tools/epydoc/log.py +204 -0
  209. data/tools/epydoc/log.pyc +0 -0
  210. data/tools/epydoc/markup/__init__.py +623 -0
  211. data/tools/epydoc/markup/__init__.pyc +0 -0
  212. data/tools/epydoc/markup/doctest.py +311 -0
  213. data/tools/epydoc/markup/doctest.pyc +0 -0
  214. data/tools/epydoc/markup/epytext.py +2116 -0
  215. data/tools/epydoc/markup/epytext.pyc +0 -0
  216. data/tools/epydoc/markup/javadoc.py +250 -0
  217. data/tools/epydoc/markup/javadoc.pyc +0 -0
  218. data/tools/epydoc/markup/plaintext.py +78 -0
  219. data/tools/epydoc/markup/plaintext.pyc +0 -0
  220. data/tools/epydoc/markup/pyval_repr.py +532 -0
  221. data/tools/epydoc/markup/pyval_repr.pyc +0 -0
  222. data/tools/epydoc/markup/restructuredtext.py +906 -0
  223. data/tools/epydoc/markup/restructuredtext.pyc +0 -0
  224. data/tools/epydoc/test/__init__.py +97 -0
  225. data/tools/epydoc/test/__init__.pyc +0 -0
  226. data/tools/epydoc/test/util.py +226 -0
  227. data/tools/epydoc/test/util.pyc +0 -0
  228. data/tools/epydoc/util.py +289 -0
  229. data/tools/epydoc/util.pyc +0 -0
  230. data/tools/logilab/logilab/__init__.py +5 -0
  231. data/tools/logilab/logilab/astng/__init__.py +82 -0
  232. data/tools/logilab/logilab/astng/__pkginfo__.py +76 -0
  233. data/tools/logilab/logilab/astng/_exceptions.py +64 -0
  234. data/tools/logilab/logilab/astng/_nodes_ast.py +667 -0
  235. data/tools/logilab/logilab/astng/_nodes_compiler.py +758 -0
  236. data/tools/logilab/logilab/astng/bases.py +608 -0
  237. data/tools/logilab/logilab/astng/builder.py +239 -0
  238. data/tools/logilab/logilab/astng/inference.py +426 -0
  239. data/tools/logilab/logilab/astng/inspector.py +289 -0
  240. data/tools/logilab/logilab/astng/manager.py +421 -0
  241. data/tools/logilab/logilab/astng/mixins.py +165 -0
  242. data/tools/logilab/logilab/astng/node_classes.py +848 -0
  243. data/tools/logilab/logilab/astng/nodes.py +85 -0
  244. data/tools/logilab/logilab/astng/nodes_as_string.py +389 -0
  245. data/tools/logilab/logilab/astng/patchcomptransformer.py +159 -0
  246. data/tools/logilab/logilab/astng/protocols.py +333 -0
  247. data/tools/logilab/logilab/astng/raw_building.py +212 -0
  248. data/tools/logilab/logilab/astng/rebuilder.py +307 -0
  249. data/tools/logilab/logilab/astng/scoped_nodes.py +951 -0
  250. data/tools/logilab/logilab/astng/test/__init__.py +19 -0
  251. data/tools/logilab/logilab/astng/test/data/MyPyPa-0.1.0-py2.5.egg +0 -0
  252. data/tools/logilab/logilab/astng/test/data/MyPyPa-0.1.0-py2.5.zip +0 -0
  253. data/tools/logilab/logilab/astng/test/data/SSL1/Connection1.py +33 -0
  254. data/tools/logilab/logilab/astng/test/data/SSL1/__init__.py +20 -0
  255. data/tools/logilab/logilab/astng/test/data/__init__.py +20 -0
  256. data/tools/logilab/logilab/astng/test/data/all.py +29 -0
  257. data/tools/logilab/logilab/astng/test/data/appl/__init__.py +23 -0
  258. data/tools/logilab/logilab/astng/test/data/appl/myConnection.py +30 -0
  259. data/tools/logilab/logilab/astng/test/data/format.py +34 -0
  260. data/tools/logilab/logilab/astng/test/data/module.py +90 -0
  261. data/tools/logilab/logilab/astng/test/data/module2.py +112 -0
  262. data/tools/logilab/logilab/astng/test/data/noendingnewline.py +57 -0
  263. data/tools/logilab/logilab/astng/test/data/nonregr.py +76 -0
  264. data/tools/logilab/logilab/astng/test/data/notall.py +28 -0
  265. data/tools/logilab/logilab/astng/test/data2/__init__.py +20 -0
  266. data/tools/logilab/logilab/astng/test/data2/clientmodule_test.py +51 -0
  267. data/tools/logilab/logilab/astng/test/data2/suppliermodule_test.py +32 -0
  268. data/tools/logilab/logilab/astng/test/regrtest.py +135 -0
  269. data/tools/logilab/logilab/astng/test/regrtest_data/absimport.py +22 -0
  270. data/tools/logilab/logilab/astng/test/regrtest_data/descriptor_crash.py +31 -0
  271. data/tools/logilab/logilab/astng/test/regrtest_data/import_package_subpackage_module.py +68 -0
  272. data/tools/logilab/logilab/astng/test/regrtest_data/package/__init__.py +24 -0
  273. data/tools/logilab/logilab/astng/test/regrtest_data/package/subpackage/__init__.py +20 -0
  274. data/tools/logilab/logilab/astng/test/regrtest_data/package/subpackage/module.py +20 -0
  275. data/tools/logilab/logilab/astng/test/unittest_builder.py +684 -0
  276. data/tools/logilab/logilab/astng/test/unittest_inference.py +1112 -0
  277. data/tools/logilab/logilab/astng/test/unittest_inspector.py +105 -0
  278. data/tools/logilab/logilab/astng/test/unittest_lookup.py +302 -0
  279. data/tools/logilab/logilab/astng/test/unittest_manager.py +98 -0
  280. data/tools/logilab/logilab/astng/test/unittest_nodes.py +302 -0
  281. data/tools/logilab/logilab/astng/test/unittest_scoped_nodes.py +501 -0
  282. data/tools/logilab/logilab/astng/test/unittest_utils.py +104 -0
  283. data/tools/logilab/logilab/astng/utils.py +342 -0
  284. data/tools/logilab/logilab/common/__init__.py +140 -0
  285. data/tools/logilab/logilab/common/__pkginfo__.py +43 -0
  286. data/tools/logilab/logilab/common/adbh.py +35 -0
  287. data/tools/logilab/logilab/common/cache.py +114 -0
  288. data/tools/logilab/logilab/common/changelog.py +234 -0
  289. data/tools/logilab/logilab/common/clcommands.py +181 -0
  290. data/tools/logilab/logilab/common/cli.py +212 -0
  291. data/tools/logilab/logilab/common/compat.py +328 -0
  292. data/tools/logilab/logilab/common/configuration.py +1087 -0
  293. data/tools/logilab/logilab/common/contexts.py +58 -0
  294. data/tools/logilab/logilab/common/corbautils.py +117 -0
  295. data/tools/logilab/logilab/common/daemon.py +171 -0
  296. data/tools/logilab/logilab/common/date.py +279 -0
  297. data/tools/logilab/logilab/common/db.py +49 -0
  298. data/tools/logilab/logilab/common/dbf.py +229 -0
  299. data/tools/logilab/logilab/common/debugger.py +208 -0
  300. data/tools/logilab/logilab/common/decorators.py +190 -0
  301. data/tools/logilab/logilab/common/deprecation.py +118 -0
  302. data/tools/logilab/logilab/common/fileutils.py +409 -0
  303. data/tools/logilab/logilab/common/graph.py +259 -0
  304. data/tools/logilab/logilab/common/html.py +142 -0
  305. data/tools/logilab/logilab/common/interface.py +76 -0
  306. data/tools/logilab/logilab/common/logging_ext.py +166 -0
  307. data/tools/logilab/logilab/common/modutils.py +670 -0
  308. data/tools/logilab/logilab/common/optik_ext.py +383 -0
  309. data/tools/logilab/logilab/common/optparser.py +92 -0
  310. data/tools/logilab/logilab/common/pdf_ext.py +111 -0
  311. data/tools/logilab/logilab/common/proc.py +276 -0
  312. data/tools/logilab/logilab/common/pyro_ext.py +146 -0
  313. data/tools/logilab/logilab/common/pytest.py +754 -0
  314. data/tools/logilab/logilab/common/shellutils.py +383 -0
  315. data/tools/logilab/logilab/common/sphinx_ext.py +87 -0
  316. data/tools/logilab/logilab/common/sphinxutils.py +122 -0
  317. data/tools/logilab/logilab/common/sqlgen.py +31 -0
  318. data/tools/logilab/logilab/common/table.py +930 -0
  319. data/tools/logilab/logilab/common/tasksqueue.py +97 -0
  320. data/tools/logilab/logilab/common/test/__init__.py +1 -0
  321. data/tools/logilab/logilab/common/test/data/ChangeLog +184 -0
  322. data/tools/logilab/logilab/common/test/data/MyPyPa-0.1.0-py2.5.egg +0 -0
  323. data/tools/logilab/logilab/common/test/data/__init__.py +1 -0
  324. data/tools/logilab/logilab/common/test/data/content_differ_dir/NOTHING +0 -0
  325. data/tools/logilab/logilab/common/test/data/content_differ_dir/README +1 -0
  326. data/tools/logilab/logilab/common/test/data/content_differ_dir/subdir/coin +1 -0
  327. data/tools/logilab/logilab/common/test/data/content_differ_dir/subdir/toto.txt +53 -0
  328. data/tools/logilab/logilab/common/test/data/file_differ_dir/NOTHING +0 -0
  329. data/tools/logilab/logilab/common/test/data/file_differ_dir/README +1 -0
  330. data/tools/logilab/logilab/common/test/data/file_differ_dir/subdir/toto.txt +53 -0
  331. data/tools/logilab/logilab/common/test/data/file_differ_dir/subdirtwo/Hello +0 -0
  332. data/tools/logilab/logilab/common/test/data/find_test/__init__.py +0 -0
  333. data/tools/logilab/logilab/common/test/data/find_test/foo.txt +0 -0
  334. data/tools/logilab/logilab/common/test/data/find_test/module.py +0 -0
  335. data/tools/logilab/logilab/common/test/data/find_test/module2.py +0 -0
  336. data/tools/logilab/logilab/common/test/data/find_test/newlines.txt +0 -0
  337. data/tools/logilab/logilab/common/test/data/find_test/noendingnewline.py +0 -0
  338. data/tools/logilab/logilab/common/test/data/find_test/nonregr.py +0 -0
  339. data/tools/logilab/logilab/common/test/data/find_test/normal_file.txt +0 -0
  340. data/tools/logilab/logilab/common/test/data/find_test/spam.txt +0 -0
  341. data/tools/logilab/logilab/common/test/data/find_test/sub/doc.txt +0 -0
  342. data/tools/logilab/logilab/common/test/data/find_test/sub/momo.py +0 -0
  343. data/tools/logilab/logilab/common/test/data/find_test/test.ini +0 -0
  344. data/tools/logilab/logilab/common/test/data/find_test/test1.msg +0 -0
  345. data/tools/logilab/logilab/common/test/data/find_test/test2.msg +0 -0
  346. data/tools/logilab/logilab/common/test/data/find_test/write_protected_file.txt +0 -0
  347. data/tools/logilab/logilab/common/test/data/foo.txt +9 -0
  348. data/tools/logilab/logilab/common/test/data/module.py +88 -0
  349. data/tools/logilab/logilab/common/test/data/module2.py +77 -0
  350. data/tools/logilab/logilab/common/test/data/newlines.txt +3 -0
  351. data/tools/logilab/logilab/common/test/data/noendingnewline.py +36 -0
  352. data/tools/logilab/logilab/common/test/data/nonregr.py +14 -0
  353. data/tools/logilab/logilab/common/test/data/normal_file.txt +0 -0
  354. data/tools/logilab/logilab/common/test/data/reference_dir/NOTHING +0 -0
  355. data/tools/logilab/logilab/common/test/data/reference_dir/README +1 -0
  356. data/tools/logilab/logilab/common/test/data/reference_dir/subdir/coin +1 -0
  357. data/tools/logilab/logilab/common/test/data/reference_dir/subdir/toto.txt +53 -0
  358. data/tools/logilab/logilab/common/test/data/same_dir/NOTHING +0 -0
  359. data/tools/logilab/logilab/common/test/data/same_dir/README +1 -0
  360. data/tools/logilab/logilab/common/test/data/same_dir/subdir/coin +1 -0
  361. data/tools/logilab/logilab/common/test/data/same_dir/subdir/toto.txt +53 -0
  362. data/tools/logilab/logilab/common/test/data/spam.txt +9 -0
  363. data/tools/logilab/logilab/common/test/data/sub/doc.txt +1 -0
  364. data/tools/logilab/logilab/common/test/data/sub/momo.py +1 -0
  365. data/tools/logilab/logilab/common/test/data/subdir_differ_dir/NOTHING +0 -0
  366. data/tools/logilab/logilab/common/test/data/subdir_differ_dir/README +1 -0
  367. data/tools/logilab/logilab/common/test/data/subdir_differ_dir/subdir/coin +1 -0
  368. data/tools/logilab/logilab/common/test/data/subdir_differ_dir/subdir/toto.txt +53 -0
  369. data/tools/logilab/logilab/common/test/data/test.ini +20 -0
  370. data/tools/logilab/logilab/common/test/data/test1.msg +30 -0
  371. data/tools/logilab/logilab/common/test/data/test2.msg +42 -0
  372. data/tools/logilab/logilab/common/test/data/write_protected_file.txt +0 -0
  373. data/tools/logilab/logilab/common/test/foomod.py +17 -0
  374. data/tools/logilab/logilab/common/test/unittest_cache.py +129 -0
  375. data/tools/logilab/logilab/common/test/unittest_changelog.py +37 -0
  376. data/tools/logilab/logilab/common/test/unittest_compat.py +239 -0
  377. data/tools/logilab/logilab/common/test/unittest_configuration.py +348 -0
  378. data/tools/logilab/logilab/common/test/unittest_date.py +154 -0
  379. data/tools/logilab/logilab/common/test/unittest_decorators.py +62 -0
  380. data/tools/logilab/logilab/common/test/unittest_deprecation.py +76 -0
  381. data/tools/logilab/logilab/common/test/unittest_fileutils.py +133 -0
  382. data/tools/logilab/logilab/common/test/unittest_graph.py +50 -0
  383. data/tools/logilab/logilab/common/test/unittest_html.py +76 -0
  384. data/tools/logilab/logilab/common/test/unittest_interface.py +87 -0
  385. data/tools/logilab/logilab/common/test/unittest_modutils.py +244 -0
  386. data/tools/logilab/logilab/common/test/unittest_pytest.py +50 -0
  387. data/tools/logilab/logilab/common/test/unittest_shellutils.py +248 -0
  388. data/tools/logilab/logilab/common/test/unittest_table.py +448 -0
  389. data/tools/logilab/logilab/common/test/unittest_taskqueue.py +71 -0
  390. data/tools/logilab/logilab/common/test/unittest_testlib.py +956 -0
  391. data/tools/logilab/logilab/common/test/unittest_textutils.py +247 -0
  392. data/tools/logilab/logilab/common/test/unittest_tree.py +248 -0
  393. data/tools/logilab/logilab/common/test/unittest_umessage.py +55 -0
  394. data/tools/logilab/logilab/common/test/unittest_ureports_html.py +64 -0
  395. data/tools/logilab/logilab/common/test/unittest_ureports_text.py +105 -0
  396. data/tools/logilab/logilab/common/test/unittest_xmlutils.py +75 -0
  397. data/tools/logilab/logilab/common/test/utils.py +87 -0
  398. data/tools/logilab/logilab/common/testlib.py +1927 -0
  399. data/tools/logilab/logilab/common/textutils.py +476 -0
  400. data/tools/logilab/logilab/common/tree.py +372 -0
  401. data/tools/logilab/logilab/common/umessage.py +161 -0
  402. data/tools/logilab/logilab/common/ureports/__init__.py +174 -0
  403. data/tools/logilab/logilab/common/ureports/docbook_writer.py +139 -0
  404. data/tools/logilab/logilab/common/ureports/html_writer.py +131 -0
  405. data/tools/logilab/logilab/common/ureports/nodes.py +201 -0
  406. data/tools/logilab/logilab/common/ureports/text_writer.py +140 -0
  407. data/tools/logilab/logilab/common/vcgutils.py +216 -0
  408. data/tools/logilab/logilab/common/visitor.py +107 -0
  409. data/tools/logilab/logilab/common/xmlrpcutils.py +136 -0
  410. data/tools/logilab/logilab/common/xmlutils.py +61 -0
  411. data/tools/pychecker/COPYRIGHT +31 -0
  412. data/tools/pychecker/ChangeLog +349 -0
  413. data/tools/pychecker/CodeChecks.py +1969 -0
  414. data/tools/pychecker/CodeChecks.pyc +0 -0
  415. data/tools/pychecker/CodeChecks.pyo +0 -0
  416. data/tools/pychecker/Config.py +475 -0
  417. data/tools/pychecker/Config.pyc +0 -0
  418. data/tools/pychecker/Config.pyo +0 -0
  419. data/tools/pychecker/KNOWN_BUGS +100 -0
  420. data/tools/pychecker/MAINTAINERS +81 -0
  421. data/tools/pychecker/NEWS +406 -0
  422. data/tools/pychecker/OP.py +131 -0
  423. data/tools/pychecker/OP.pyc +0 -0
  424. data/tools/pychecker/OP.pyo +0 -0
  425. data/tools/pychecker/OptionTypes.py +117 -0
  426. data/tools/pychecker/OptionTypes.pyc +0 -0
  427. data/tools/pychecker/OptionTypes.pyo +0 -0
  428. data/tools/pychecker/README +152 -0
  429. data/tools/pychecker/Stack.py +115 -0
  430. data/tools/pychecker/Stack.pyc +0 -0
  431. data/tools/pychecker/Stack.pyo +0 -0
  432. data/tools/pychecker/TODO +101 -0
  433. data/tools/pychecker/VERSION +1 -0
  434. data/tools/pychecker/Warning.py +50 -0
  435. data/tools/pychecker/Warning.pyc +0 -0
  436. data/tools/pychecker/Warning.pyo +0 -0
  437. data/tools/pychecker/__init__.py +17 -0
  438. data/tools/pychecker/__init__.pyc +0 -0
  439. data/tools/pychecker/__init__.pyo +0 -0
  440. data/tools/pychecker/checker.py +961 -0
  441. data/tools/pychecker/checker.pyc +0 -0
  442. data/tools/pychecker/checker.pyo +0 -0
  443. data/tools/pychecker/function.py +159 -0
  444. data/tools/pychecker/function.pyc +0 -0
  445. data/tools/pychecker/function.pyo +0 -0
  446. data/tools/pychecker/msgs.py +175 -0
  447. data/tools/pychecker/msgs.pyc +0 -0
  448. data/tools/pychecker/msgs.pyo +0 -0
  449. data/tools/pychecker/options.py +275 -0
  450. data/tools/pychecker/options.pyc +0 -0
  451. data/tools/pychecker/options.pyo +0 -0
  452. data/tools/pychecker/pcmodules.py +19 -0
  453. data/tools/pychecker/pcmodules.pyc +0 -0
  454. data/tools/pychecker/pcmodules.pyo +0 -0
  455. data/tools/pychecker/printer.py +47 -0
  456. data/tools/pychecker/printer.pyc +0 -0
  457. data/tools/pychecker/printer.pyo +0 -0
  458. data/tools/pychecker/python.py +427 -0
  459. data/tools/pychecker/python.pyc +0 -0
  460. data/tools/pychecker/python.pyo +0 -0
  461. data/tools/pychecker/utils.py +102 -0
  462. data/tools/pychecker/utils.pyc +0 -0
  463. data/tools/pychecker/utils.pyo +0 -0
  464. data/tools/pychecker/warn.py +778 -0
  465. data/tools/pychecker/warn.pyc +0 -0
  466. data/tools/pychecker/warn.pyo +0 -0
  467. data/tools/pylint2/pylint/__init__.py +16 -0
  468. data/tools/pylint2/pylint/__pkginfo__.py +67 -0
  469. data/tools/pylint2/pylint/checkers/__init__.py +155 -0
  470. data/tools/pylint2/pylint/checkers/base.py +749 -0
  471. data/tools/pylint2/pylint/checkers/classes.py +527 -0
  472. data/tools/pylint2/pylint/checkers/design_analysis.py +344 -0
  473. data/tools/pylint2/pylint/checkers/exceptions.py +183 -0
  474. data/tools/pylint2/pylint/checkers/format.py +367 -0
  475. data/tools/pylint2/pylint/checkers/imports.py +379 -0
  476. data/tools/pylint2/pylint/checkers/logging.py +98 -0
  477. data/tools/pylint2/pylint/checkers/misc.py +128 -0
  478. data/tools/pylint2/pylint/checkers/newstyle.py +107 -0
  479. data/tools/pylint2/pylint/checkers/raw_metrics.py +125 -0
  480. data/tools/pylint2/pylint/checkers/similar.py +333 -0
  481. data/tools/pylint2/pylint/checkers/string_format.py +239 -0
  482. data/tools/pylint2/pylint/checkers/typecheck.py +364 -0
  483. data/tools/pylint2/pylint/checkers/utils.py +208 -0
  484. data/tools/pylint2/pylint/checkers/variables.py +498 -0
  485. data/tools/pylint2/pylint/config.py +149 -0
  486. data/tools/pylint2/pylint/epylint.py +149 -0
  487. data/tools/pylint2/pylint/gui.py +433 -0
  488. data/tools/pylint2/pylint/interfaces.py +98 -0
  489. data/tools/pylint2/pylint/lint.py +914 -0
  490. data/tools/pylint2/pylint/pyreverse/__init__.py +5 -0
  491. data/tools/pylint2/pylint/pyreverse/diadefslib.py +229 -0
  492. data/tools/pylint2/pylint/pyreverse/diagrams.py +247 -0
  493. data/tools/pylint2/pylint/pyreverse/main.py +123 -0
  494. data/tools/pylint2/pylint/pyreverse/utils.py +131 -0
  495. data/tools/pylint2/pylint/pyreverse/writer.py +196 -0
  496. data/tools/pylint2/pylint/reporters/__init__.py +67 -0
  497. data/tools/pylint2/pylint/reporters/guireporter.py +36 -0
  498. data/tools/pylint2/pylint/reporters/html.py +69 -0
  499. data/tools/pylint2/pylint/reporters/text.py +156 -0
  500. data/tools/pylint2/pylint/utils.py +518 -0
  501. data/tools/pylint2/pylint.py +16 -0
  502. data/tools/test/suite.py +35 -0
  503. metadata +566 -0
Binary file
Binary file
@@ -0,0 +1,475 @@
1
+ #!/usr/bin/env python
2
+
3
+ # Copyright (c) 2001-2004, MetaSlash Inc. All rights reserved.
4
+ # Portions Copyright (c) 2005, Google, Inc. All rights reserved.
5
+
6
+ """
7
+ Configuration information for checker.
8
+ """
9
+
10
+ import sys
11
+ import os
12
+ import getopt
13
+ import string
14
+ import re
15
+ import time
16
+
17
+ def get_warning_levels():
18
+ import types
19
+ from pychecker import msgs
20
+ WarningClass = msgs.WarningClass
21
+
22
+ result = {}
23
+ for name in vars(msgs).keys():
24
+ obj = getattr(msgs, name)
25
+ if (obj is not WarningClass and
26
+ isinstance(obj, types.ClassType) and
27
+ issubclass(obj, WarningClass)):
28
+ result[name.capitalize()] = obj
29
+ return result
30
+
31
+ _WARNING_LEVELS = get_warning_levels()
32
+
33
+ _RC_FILE = ".pycheckrc"
34
+ CHECKER_VAR = '__pychecker__'
35
+ _VERSION = '0.8.18'
36
+
37
+ _DEFAULT_BLACK_LIST = [ "Tkinter", "wxPython", "gtk", "GTK", "GDK", ]
38
+ _DEFAULT_VARIABLE_IGNORE_LIST = [ '__version__', '__warningregistry__',
39
+ '__all__', '__credits__', '__test__',
40
+ '__author__', '__email__', '__revision__',
41
+ '__id__', '__copyright__', '__license__',
42
+ '__date__',
43
+ ]
44
+ _DEFAULT_UNUSED_LIST = [ '_', 'empty', 'unused', 'dummy', ]
45
+ _DEFAULT_MISSING_ATTRS_LIST = []
46
+
47
+ # _OPTIONS = (
48
+ # (categoryName, [
49
+ # (shortArg, useValue, longArg, member, description),
50
+ # ...
51
+ # ]),
52
+ # ...
53
+ # )
54
+ _OPTIONS = (
55
+ ('Major Options', [
56
+ ('', 0, 'only', 'only', 'only warn about files passed on the command line'),
57
+ ('e', 1, 'level', None, 'the maximum error level of warnings to be displayed'),
58
+ ('#', 1, 'limit', 'limit', 'the maximum number of warnings to be displayed'),
59
+ ('F', 1, 'config', None, 'specify .pycheckrc file to use'),
60
+ ('', 0, 'quixote', None, 'support Quixote\'s PTL modules'),
61
+ ('', 1, 'evil', 'evil', 'list of evil C extensions that crash the interpreter'),
62
+ ('', 0, 'keepgoing', 'ignoreImportErrors', 'ignore import errors'),
63
+ ]),
64
+ ('Error Control', [
65
+ ('i', 0, 'import', 'importUsed', 'unused imports'),
66
+ ('k', 0, 'pkgimport', 'packageImportUsed', 'unused imports from __init__.py'),
67
+ ('M', 0, 'reimportself', 'reimportSelf', 'module imports itself'),
68
+ ('X', 0, 'reimport', 'moduleImportErrors', 'reimporting a module'),
69
+ ('x', 0, 'miximport', 'mixImport', 'module does import and from ... import'),
70
+ ('l', 0, 'local', 'localVariablesUsed', 'unused local variables, except tuples'),
71
+ ('t', 0, 'tuple', 'unusedLocalTuple', 'all unused local variables, including tuples'),
72
+ ('9', 0, 'members', 'membersUsed', 'all unused class data members'),
73
+ ('v', 0, 'var', 'allVariablesUsed', 'all unused module variables'),
74
+ ('p', 0, 'privatevar', 'privateVariableUsed', 'unused private module variables'),
75
+ ('g', 0, 'allglobals', 'reportAllGlobals', 'report each occurrence of global warnings'),
76
+ ('n', 0, 'namedargs', 'namedArgs', 'functions called with named arguments (like keywords)'),
77
+ ('a', 0, 'initattr', 'onlyCheckInitForMembers', 'Attributes (members) must be defined in __init__()'),
78
+ ('I', 0, 'initsubclass', 'initDefinedInSubclass', 'Subclass.__init__() not defined'),
79
+ ('u', 0, 'callinit', 'baseClassInitted', 'Baseclass.__init__() not called'),
80
+ ('0', 0, 'abstract', 'abstractClasses', 'Subclass needs to override methods that only throw exceptions'),
81
+ ('N', 0, 'initreturn', 'returnNoneFromInit', 'Return None from __init__()'),
82
+ ('8', 0, 'unreachable', 'unreachableCode', 'unreachable code'),
83
+ ('2', 0, 'constCond', 'constantConditions', 'a constant is used in a conditional statement'),
84
+ ('1', 0, 'constant1', 'constant1', '1 is used in a conditional statement (if 1: or while 1:)'),
85
+ ( '', 0, 'stringiter', 'stringIteration', 'check if iterating over a string'),
86
+ ( '', 0, 'stringfind', 'stringFind', 'check improper use of string.find()'),
87
+ ('A', 0, 'callattr', 'callingAttribute', 'Calling data members as functions'),
88
+ ('y', 0, 'classattr', 'classAttrExists', 'class attribute does not exist'),
89
+ ('S', 1, 'self', 'methodArgName', 'First argument to methods'),
90
+ ('', 1, 'classmethodargs', 'classmethodArgNames', 'First argument to classmethods'),
91
+ ('T', 0, 'argsused', 'argumentsUsed', 'unused method/function arguments'),
92
+ ('z', 0, 'varargsused', 'varArgumentsUsed', 'unused method/function variable arguments'),
93
+ ('G', 0, 'selfused', 'ignoreSelfUnused', 'ignore if self is unused in methods'),
94
+ ('o', 0, 'override', 'checkOverridenMethods', 'check if overridden methods have the same signature'),
95
+ ('', 0, 'special', 'checkSpecialMethods', 'check if __special__ methods exist and have the correct signature'),
96
+ ('U', 0, 'reuseattr', 'redefiningFunction', 'check if function/class/method names are reused'),
97
+ ('Y', 0, 'positive', 'unaryPositive', 'check if using unary positive (+) which is usually meaningless'),
98
+ ('j', 0, 'moddefvalue', 'modifyDefaultValue', 'check if modify (call method) on a parameter that has a default value'),
99
+ ( '', 0, 'changetypes', 'inconsistentTypes', 'check if variables are set to different types'),
100
+ ( '', 0, 'unpack', 'unpackNonSequence', 'check if unpacking a non-sequence'),
101
+ ( '', 0, 'unpacklen', 'unpackLength', 'check if unpacking sequence with the wrong length'),
102
+ ( '', 0, 'badexcept', 'badExceptions', 'check if raising or catching bad exceptions'),
103
+ ('4', 0, 'noeffect', 'noEffect', 'check if statement appears to have no effect'),
104
+ ('', 0, 'modulo1', 'modulo1', 'check if using (expr % 1), it has no effect on integers and strings'),
105
+ ('', 0, 'isliteral', 'isLiteral', "check if using (expr is const-literal), doesn't always work on integers and strings"),
106
+ ('', 0, 'constattr', 'constAttr', "check if a constant string is passed to getattr()/setattr()"),
107
+ ]),
108
+ ('Possible Errors', [
109
+ ('r', 0, 'returnvalues', 'checkReturnValues', 'check consistent return values'),
110
+ ('C', 0, 'implicitreturns', 'checkImplicitReturns', 'check if using implict and explicit return values'),
111
+ ('O', 0, 'objattrs', 'checkObjectAttrs', 'check that attributes of objects exist'),
112
+ ('7', 0, 'slots', 'slots', 'various warnings about incorrect usage of __slots__'),
113
+ ('3', 0, 'properties', 'classicProperties', 'using properties with classic classes'),
114
+ ( '', 0, 'emptyslots', 'emptySlots', 'check if __slots__ is empty'),
115
+ ('D', 0, 'intdivide', 'intDivide', 'check if using integer division'),
116
+ ('w', 0, 'shadow', 'shadows', 'check if local variable shadows a global'),
117
+ ('s', 0, 'shadowbuiltin', 'shadowBuiltins', 'check if a variable shadows a builtin'),
118
+ ]),
119
+ ('Security', [
120
+ ( '', 0, 'input', 'usesInput', 'check if input() is used'),
121
+ ('6', 0, 'exec', 'usesExec', 'check if the exec statement is used'),
122
+ ]),
123
+ ('Suppressions', [
124
+ ('q', 0, 'stdlib', 'ignoreStandardLibrary', 'ignore warnings from files under standard library'),
125
+ ('b', 1, 'blacklist', 'blacklist', 'ignore warnings from the list of modules\n\t\t\t'),
126
+ ('Z', 1, 'varlist', 'variablesToIgnore', 'ignore global variables not used if name is one of these values\n\t\t\t'),
127
+ ('E', 1, 'unusednames', 'unusedNames', 'ignore unused locals/arguments if name is one of these values\n\t\t\t'),
128
+ ('', 1, 'missingattrs', 'missingAttrs', 'ignore missing class attributes if name is one of these values\n\t\t\t'),
129
+ ( '', 0, 'deprecated', 'deprecated', 'ignore use of deprecated modules/functions'),
130
+ ]),
131
+ ('Complexity', [
132
+ ('L', 1, 'maxlines', 'maxLines', 'maximum lines in a function'),
133
+ ('B', 1, 'maxbranches', 'maxBranches', 'maximum branches in a function'),
134
+ ('R', 1, 'maxreturns', 'maxReturns', 'maximum returns in a function'),
135
+ ('J', 1, 'maxargs', 'maxArgs', 'maximum # of arguments to a function'),
136
+ ('K', 1, 'maxlocals', 'maxLocals', 'maximum # of locals in a function'),
137
+ ('5', 1, 'maxrefs', 'maxReferences', 'maximum # of identifier references (Law of Demeter)'),
138
+ ('m', 0, 'moduledoc', 'noDocModule', 'no module doc strings'),
139
+ ('c', 0, 'classdoc', 'noDocClass', 'no class doc strings'),
140
+ ('f', 0, 'funcdoc', 'noDocFunc', 'no function/method doc strings'),
141
+ ]),
142
+ ('Debug', [
143
+ ( '', 0, 'rcfile', None, 'print a .pycheckrc file generated from command line args'),
144
+ ('P', 0, 'printparse', 'printParse', 'print internal checker parse structures'),
145
+ ('d', 0, 'debug', 'debug', 'turn on debugging for checker'),
146
+ ('', 0, 'findevil', 'findEvil', 'print each class object to find one that crashes'),
147
+ ('Q', 0, 'quiet', 'quiet', 'turn off all output except warnings'),
148
+ ('V', 0, 'version', None, 'print the version of PyChecker and exit'),
149
+ ])
150
+ )
151
+
152
+ def init() :
153
+ GET_OPT_VALUE = (('', ''), (':', '='),)
154
+ shortArgs, longArgs = "", []
155
+ for _, group in _OPTIONS :
156
+ for opt in group:
157
+ optStr = GET_OPT_VALUE[opt[1]]
158
+ shortArgs = shortArgs + opt[0] + optStr[0]
159
+ longArgs.append(opt[2] + optStr[1])
160
+ longArgs.append('no-' + opt[2] + optStr[1])
161
+
162
+ options = {}
163
+ for _, group in _OPTIONS :
164
+ for opt in group:
165
+ shortArg, useValue, longArg, member, description = opt
166
+ if shortArg != '' :
167
+ options['-' + shortArg] = opt
168
+ options['--no-' + longArg] = options['--' + longArg] = opt
169
+
170
+ return shortArgs, longArgs, options
171
+
172
+ _SHORT_ARGS, _LONG_ARGS, _OPTIONS_DICT = init()
173
+
174
+ def _getRCfiles(filename) :
175
+ """Return a list of .rc filenames, on Windows use the current directory
176
+ on UNIX use the user's home directory
177
+ """
178
+
179
+ files = []
180
+ home = os.environ.get('HOME')
181
+ if home :
182
+ files.append(home + os.sep + filename)
183
+ files.append(filename)
184
+ return files
185
+
186
+
187
+ _RC_FILE_HEADER = '''#
188
+ # .pycheckrc file created by PyChecker v%s @ %s
189
+ #
190
+ # It should be placed in your home directory (value of $HOME).
191
+ # If $HOME is not set, it will look in the current directory.
192
+ #
193
+
194
+ '''
195
+
196
+ def outputRc(cfg) :
197
+ output = _RC_FILE_HEADER % (_VERSION, time.ctime(time.time()))
198
+ for name, group in _OPTIONS :
199
+ for opt in group:
200
+ shortArg, useValue, longArg, member, description = opt
201
+ if member is None :
202
+ continue
203
+ description = string.strip(description)
204
+ value = getattr(cfg, member)
205
+ optStr = '# %s\n%s = %s\n\n' % (description, member, `value`)
206
+ output = output + optStr
207
+
208
+ return output
209
+
210
+
211
+ class UsageError(Exception) :
212
+ """Exception to indicate that the application should exit due to
213
+ command line usage error."""
214
+
215
+ _SUPPRESSIONS_ERR = \
216
+ '''\nWarning, error processing defaults file: %s
217
+ \%s must be a dictionary ({}) -- ignoring suppressions\n'''
218
+
219
+ def _getSuppressions(name, dict, filename) :
220
+ suppressions = dict.get(name, {})
221
+ if type(suppressions) != type({}) :
222
+ print _SUPPRESSIONS_ERR % (filename, name)
223
+ suppressions = {}
224
+ return suppressions
225
+
226
+
227
+ class Config :
228
+ "Hold configuration information"
229
+
230
+ def __init__(self) :
231
+ "Initialize configuration with default values."
232
+
233
+ # files to process (typically from cmd line)
234
+ self.files = {}
235
+
236
+ self.debug = 0
237
+ self.quiet = 0
238
+ self.only = 0
239
+ self.level = 0
240
+ self.limit = 10
241
+
242
+ self.ignoreImportErrors = 0
243
+ self.onlyCheckInitForMembers = 0
244
+ self.printParse = 0
245
+ self.quixote = 0
246
+ self.evil = []
247
+ self.findEvil = 0
248
+
249
+ self.noDocModule = 0
250
+ self.noDocClass = 0
251
+ self.noDocFunc = 0
252
+
253
+ self.reportAllGlobals = 0
254
+ self.allVariablesUsed = 0
255
+ self.privateVariableUsed = 1
256
+ self.membersUsed = 0
257
+ self.importUsed = 1
258
+ self.reimportSelf = 1
259
+ self.moduleImportErrors = 1
260
+ self.mixImport = 1
261
+ self.packageImportUsed = 1
262
+ self.localVariablesUsed = 1
263
+ self.unusedLocalTuple = 0
264
+ self.initDefinedInSubclass = 0
265
+ self.baseClassInitted = 1
266
+ self.abstractClasses = 1
267
+ self.callingAttribute = 0
268
+ self.classAttrExists = 1
269
+ self.namedArgs = 0
270
+ self.returnNoneFromInit = 1
271
+ self.unreachableCode = 0
272
+ self.constantConditions = 1
273
+ self.constant1 = 0
274
+ self.stringIteration = 1
275
+ self.inconsistentTypes = 0
276
+ self.unpackNonSequence = 1
277
+ self.unpackLength = 1
278
+ self.badExceptions = 1
279
+ self.noEffect = 1
280
+ self.deprecated = 1
281
+ self.modulo1 = 1
282
+ self.isLiteral = 1
283
+ self.stringFind = 1
284
+
285
+ self.unusedNames = _DEFAULT_UNUSED_LIST
286
+ self.variablesToIgnore = _DEFAULT_VARIABLE_IGNORE_LIST
287
+ self.blacklist = _DEFAULT_BLACK_LIST
288
+ self.missingAttrs = _DEFAULT_MISSING_ATTRS_LIST
289
+ self.ignoreStandardLibrary = 0
290
+ self.methodArgName = 'self'
291
+ self.classmethodArgNames = ['cls', 'klass']
292
+ self.checkOverridenMethods = 1
293
+ self.checkSpecialMethods = 1
294
+
295
+ self.argumentsUsed = 1
296
+ self.varArgumentsUsed = 1
297
+ self.ignoreSelfUnused = 0
298
+ self.redefiningFunction = 1
299
+
300
+ self.maxLines = 200
301
+ self.maxBranches = 50
302
+ self.maxReturns = 10
303
+ self.maxArgs = 10
304
+ self.maxLocals = 40
305
+ self.maxReferences = 5
306
+
307
+ self.slots = 1
308
+ self.emptySlots = 1
309
+ self.classicProperties = 1
310
+ self.checkObjectAttrs = 1
311
+ self.checkReturnValues = 1
312
+ self.checkImplicitReturns = 1
313
+ self.intDivide = 1
314
+ self.shadows = 1
315
+ self.shadowBuiltins = 1
316
+ self.unaryPositive = 1
317
+ self.modifyDefaultValue = 1
318
+ self.usesExec = 0
319
+ self.usesInput = 1
320
+ self.constAttr = 1
321
+
322
+ def loadFile(self, filename) :
323
+ suppressions = {}
324
+ suppressionRegexs = {}
325
+ try :
326
+ tmpGlobal, dict = {}, {}
327
+ execfile(filename, tmpGlobal, dict)
328
+ for key, value in dict.items() :
329
+ if self.__dict__.has_key(key) :
330
+ self.__dict__[key] = value
331
+ elif key not in ('suppressions', 'suppressionRegexs') and \
332
+ key[0] != '_':
333
+ print "Warning, option (%s) doesn't exist, ignoring" % key
334
+
335
+ suppressions = _getSuppressions('suppressions', dict, filename)
336
+ regexs = _getSuppressions('suppressionRegexs', dict, filename)
337
+ for regex_str in regexs.keys() :
338
+ regex = re.compile(regex_str)
339
+ suppressionRegexs[regex] = regexs[regex_str]
340
+ except IOError :
341
+ pass # ignore if no file
342
+ except Exception, detail:
343
+ print "Warning, error loading defaults file:", filename, detail
344
+ return suppressions, suppressionRegexs
345
+
346
+ def loadFiles(self, filenames, oldSuppressions = None) :
347
+ if oldSuppressions is None :
348
+ oldSuppressions = ({}, {})
349
+ suppressions = oldSuppressions[0]
350
+ suppressionRegexs = oldSuppressions[1]
351
+ for filename in filenames:
352
+ updates = self.loadFile(filename)
353
+ suppressions.update(updates[0])
354
+ suppressionRegexs.update(updates[1])
355
+ return suppressions, suppressionRegexs
356
+
357
+ def processArgs(self, argList, otherConfigFiles = None) :
358
+ try :
359
+ args, files = getopt.getopt(argList, _SHORT_ARGS, _LONG_ARGS)
360
+ except getopt.error, detail :
361
+ raise UsageError, detail
362
+
363
+ # setup files from cmd line
364
+ for f in files:
365
+ self.files[os.path.abspath(f)] = 1
366
+
367
+ if otherConfigFiles is None:
368
+ otherConfigFiles = []
369
+ for arg, value in args :
370
+ shortArg, useValue, longArg, member, description = _OPTIONS_DICT[arg]
371
+ if member == None :
372
+ # FIXME: this whole block is a hack
373
+ if longArg == 'rcfile' :
374
+ sys.stdout.write(outputRc(self))
375
+ continue
376
+ elif longArg == 'quixote' :
377
+ import quixote
378
+ quixote.enable_ptl()
379
+ self.quixote = 1
380
+ continue
381
+ elif longArg == 'config' :
382
+ otherConfigFiles.append(value)
383
+ continue
384
+ elif longArg == 'version' :
385
+ # FIXME: it would be nice to define this in only one place
386
+ print _VERSION
387
+ sys.exit(0)
388
+ elif longArg == 'level':
389
+ normalizedValue = value.capitalize()
390
+ if not _WARNING_LEVELS.has_key(normalizedValue):
391
+ sys.stderr.write('Invalid warning level (%s). '
392
+ 'Must be one of: %s\n' %
393
+ (value, _WARNING_LEVELS.keys()))
394
+ sys.exit(1)
395
+
396
+ self.level = _WARNING_LEVELS[normalizedValue].level
397
+ continue
398
+ elif value :
399
+ newValue = value
400
+ memberType = type(getattr(self, member))
401
+ if memberType == type(0) :
402
+ newValue = int(newValue)
403
+ elif memberType == type([]) :
404
+ newValue = string.split(newValue, ',')
405
+ elif memberType == type('') and \
406
+ newValue[0] in '\'"':
407
+ try:
408
+ newValue = eval(newValue)
409
+ except:
410
+ msg = 'Invalid option parameter: %s for %s\n' % \
411
+ (`newValue`, arg)
412
+ sys.stderr.write(msg)
413
+ setattr(self, member, newValue)
414
+ elif arg[0:2] == '--' :
415
+ setattr(self, member, arg[2:5] != 'no-')
416
+ else :
417
+ # for shortArgs we only toggle
418
+ setattr(self, member, not getattr(self, member))
419
+
420
+ if self.variablesToIgnore.count(CHECKER_VAR) <= 0 :
421
+ self.variablesToIgnore.append(CHECKER_VAR)
422
+
423
+ return files
424
+
425
+ def printArg(shortArg, longArg, description, defaultValue, useValue) :
426
+ defStr = ''
427
+ shortArgStr = ' '
428
+ if shortArg:
429
+ shortArgStr = '-%s,' % shortArg
430
+
431
+ if defaultValue != None :
432
+ if not useValue :
433
+ if defaultValue :
434
+ defaultValue = 'on'
435
+ else :
436
+ defaultValue = 'off'
437
+ defStr = ' [%s]' % defaultValue
438
+ args = "%s --%s" % (shortArgStr, longArg)
439
+ print " %-18s %s%s" % (args, description, defStr)
440
+
441
+ def usage(cfg = None) :
442
+ print "Usage for: checker.py [options] PACKAGE ...\n"
443
+ print " PACKAGEs can be a python package, module or filename\n"
444
+ print "Long options can be preceded with no- to turn off (e.g., no-namedargs)\n"
445
+ print "Category"
446
+ print " Options: Change warning for ... [default value]"
447
+
448
+ if cfg is None :
449
+ cfg = Config()
450
+ for name, group in _OPTIONS :
451
+ print
452
+ print name + ":"
453
+ for opt in group:
454
+ shortArg, useValue, longArg, member, description = opt
455
+ defValue = None
456
+ if member != None :
457
+ defValue = cfg.__dict__[member]
458
+
459
+ printArg(shortArg, longArg, description, defValue, useValue)
460
+
461
+
462
+ def setupFromArgs(argList) :
463
+ "Returns (Config, [ file1, file2, ... ]) from argList"
464
+
465
+ cfg = Config()
466
+ try :
467
+ suppressions = cfg.loadFiles(_getRCfiles(_RC_FILE))
468
+ otherConfigFiles = []
469
+ files = cfg.processArgs(argList, otherConfigFiles)
470
+ if otherConfigFiles:
471
+ suppressions = cfg.loadFiles(otherConfigFiles, suppressions)
472
+ return cfg, files, suppressions
473
+ except UsageError :
474
+ usage(cfg)
475
+ raise
Binary file
Binary file
@@ -0,0 +1,100 @@
1
+
2
+ Crash when running on code that does:
3
+
4
+ from wxPython.wx import *
5
+
6
+ The problem is in wxGTK-2.2.6 and earlier versions.
7
+
8
+ Below is a patch to wxGTK 2.2.6 that fixes the problem.
9
+
10
+ This problem has been reported:
11
+ http://sourceforge.net/tracker/?func=detail&atid=109863&aid=417923&group_id=9863
12
+
13
+ -----------
14
+
15
+ *** src/gtk/app.cpp.orig Sat Apr 21 17:12:35 2001
16
+ --- src/gtk/app.cpp Sat Apr 21 17:14:46 2001
17
+ ***************
18
+ *** 582,597 ****
19
+ --- 582,600 ----
20
+
21
+ // GL: I'm annoyed ... I don't know where to put this and I don't want to
22
+ // create a module for that as it's part of the core.
23
+ #if wxUSE_THREADS
24
+ delete wxPendingEvents;
25
+ + wxPendingEvents = 0;
26
+ delete wxPendingEventsLocker;
27
+ + wxPendingEventsLocker = 0;
28
+ #endif
29
+
30
+ wxSystemSettings::Done();
31
+
32
+ delete[] wxBuffer;
33
+ + wxBuffer = 0;
34
+
35
+ wxClassInfo::CleanUpClasses();
36
+
37
+ // check for memory leaks
38
+ #if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
39
+ *** src/common/resource.cpp.orig Sat Apr 21 17:10:23 2001
40
+ --- src/common/resource.cpp Sat Apr 21 17:06:42 2001
41
+ ***************
42
+ *** 110,121 ****
43
+ --- 110,125 ----
44
+ }
45
+
46
+ void wxCleanUpResourceSystem()
47
+ {
48
+ delete wxDefaultResourceTable;
49
+ + wxDefaultResourceTable = 0;
50
+ if (wxResourceBuffer)
51
+ + {
52
+ delete[] wxResourceBuffer;
53
+ + wxResourceBuffer = 0;
54
+ + }
55
+ }
56
+
57
+ void wxLogWarning(char *msg)
58
+ {
59
+ wxMessageBox(msg, _("Warning"), wxOK);
60
+
61
+ ---------------------------------------------------------------------
62
+
63
+ exec statements are not checked. Therefore, variables and modules used in
64
+ exec statements may cause spurious warnings. To avoid the warnings,
65
+ consider rewriting your code to use eval() or getattr().
66
+
67
+ For example, consider rewriting this code:
68
+
69
+ exec 'var = object.' + member
70
+ print var
71
+
72
+ to:
73
+
74
+ var = eval('object.' + member)
75
+ print var
76
+
77
+ or:
78
+
79
+ var = getattr(object, member)
80
+ print var
81
+
82
+ ---------------------------------------------------------------------
83
+
84
+ The following code generates a spurious warning:
85
+
86
+ from XXX import *
87
+
88
+ class SameName:
89
+ def __init__(self): pass
90
+
91
+ And in the file XXX:
92
+
93
+ class SameName:
94
+ def __init__(self, c): pass
95
+
96
+ class Anyname:
97
+ def __init__(self):
98
+ self.xxx = SameName(1)
99
+
100
+ ---------------------------------------------------------------------
@@ -0,0 +1,81 @@
1
+
2
+ Neal Norwitz nnorwitz@gmail.com
3
+ Eric C. Newton ecn@metaslash.com
4
+
5
+
6
+ Other Contributors:
7
+
8
+ Barry Scott barry@scottb.demon.co.uk
9
+ Fix Base class not init spurious warning
10
+ Other misc suggestions and fixes
11
+
12
+ Shakeeb Alireza bug reports
13
+ Andy Anderson many bug reports and fixes
14
+ Erwin S. Andreasen bug reports
15
+ Anthony Baxter bug reports
16
+ Alexander Belchenko bug reports and fixes
17
+ Jeff Bellegarde bug reports and fixes
18
+ Andrew Bennetts suggestion: check for modifying def arg values
19
+ Riaan Booysen bug reports, suggestions, etc.
20
+ John Bowe bug reports, suggestions, etc.
21
+ Mike Brown bug report
22
+ Gary Capell bug reports and refactoring suggestions
23
+ Loris Caren testing, etc.
24
+ Charles Cazabon bug report
25
+ Nicolas Chauvat setup.py
26
+ Allan Crooks bug reports
27
+ Jeff Collins checker.findModule
28
+ Tom Culliton bug reports and suggestions
29
+ Andr� Dahlqvist bug reports
30
+ Walter Doerwald bug reports and fixes
31
+ Mika Eloranta bug reports
32
+ Jeff Epler bug reports
33
+ Mark Favas bug reports
34
+ Erik Max Francis bug reports and suggestions
35
+ Dan Fandrich bug reports
36
+ Alexandre Fayolle bug reports
37
+ Jeremy Fincher bug reports
38
+ Horst Gassner bug reports and suggestions
39
+ Stuart D. Gathman bug reports and suggestions
40
+ Geoff Gerrietts bug reports
41
+ Johannes Gijsbers bug reports
42
+ Hartmut Goebel patches
43
+ Joel Gould bug reports
44
+ greep bug reports
45
+ John-Mark Gurney bug reports
46
+ Thomas Heller bug reports and suggestions
47
+ Raymond Hettinger suggestions
48
+ Tim Hochberg bug reports
49
+ Eric Huss bug reports
50
+ Ben Hutchings bug reports
51
+ Jeremy Hylton bug reports and suggestions
52
+ Garth T Kidd bug reports and suggestions
53
+ Bastian Kleineidam patches
54
+ Brad Knotwell bug reports
55
+ John Machin bug reports
56
+ Jonathan Mark bug reports and suggestions
57
+ Evelyn Mitchell bug reports
58
+ Skip Montanaro bug reports and suggestions
59
+ Michele Moore many suggestions
60
+ Jon Nelson fix setup.py, add MANIFEST.in
61
+ Jason Orendorff suggestions
62
+ Ian Parker suggestions
63
+ Fernando P�rez bug reports
64
+ Kenneth Pronovici debian maintainer, bug reports, patches, setup.py
65
+ Eric S. Raymond bug reports and suggestions
66
+ Terry Reedy suggestions
67
+ Jon Ribbens bugs, bugs, bugs
68
+ Guido van Rossum bug reports and suggestions
69
+ Jim Rutledge bug reports and suggestions
70
+ Rich Salz bug reports and suggestions
71
+ John Shue patches, etc.
72
+ Stephan A. Terre bug reports
73
+ Lucio Torre suggestions
74
+ Miloslav Trmac bug reports and patches
75
+ Sheng-Te Tsao bug reports and suggestions
76
+ Kevin Turner bug report
77
+ Joe VanAndel bug reports
78
+ Greg Ward bug reports, patches, etc
79
+ Barry Warsaw bug reports
80
+ Matt Wilson bug reports and fixes
81
+ Andy Wingo bug reports and fixes