com.googler.python 1.0.0

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 (2352) hide show
  1. package/package.json +7 -0
  2. package/python3 +6 -0
  3. package/python3.4.2/bin/2to3 +5 -0
  4. package/python3.4.2/bin/2to3-3.4 +5 -0
  5. package/python3.4.2/bin/android-debian-builder +10 -0
  6. package/python3.4.2/bin/easy_install-3.4 +11 -0
  7. package/python3.4.2/bin/idle3 +5 -0
  8. package/python3.4.2/bin/idle3.4 +5 -0
  9. package/python3.4.2/bin/pip3 +11 -0
  10. package/python3.4.2/bin/pip3.4 +11 -0
  11. package/python3.4.2/bin/pydoc3 +5 -0
  12. package/python3.4.2/bin/pydoc3.4 +5 -0
  13. package/python3.4.2/bin/python3-config +111 -0
  14. package/python3.4.2/bin/python3.4 +0 -0
  15. package/python3.4.2/bin/python3.4-config +111 -0
  16. package/python3.4.2/bin/python3.4m-config +111 -0
  17. package/python3.4.2/bin/pyvenv +11 -0
  18. package/python3.4.2/bin/pyvenv-3.4 +11 -0
  19. package/python3.4.2/include/python3.4m/Python-ast.h +569 -0
  20. package/python3.4.2/include/python3.4m/Python.h +133 -0
  21. package/python3.4.2/include/python3.4m/abstract.h +1267 -0
  22. package/python3.4.2/include/python3.4m/accu.h +37 -0
  23. package/python3.4.2/include/python3.4m/asdl.h +45 -0
  24. package/python3.4.2/include/python3.4m/ast.h +22 -0
  25. package/python3.4.2/include/python3.4m/bitset.h +32 -0
  26. package/python3.4.2/include/python3.4m/bltinmodule.h +14 -0
  27. package/python3.4.2/include/python3.4m/boolobject.h +34 -0
  28. package/python3.4.2/include/python3.4m/bytearrayobject.h +62 -0
  29. package/python3.4.2/include/python3.4m/bytes_methods.h +46 -0
  30. package/python3.4.2/include/python3.4m/bytesobject.h +128 -0
  31. package/python3.4.2/include/python3.4m/cellobject.h +29 -0
  32. package/python3.4.2/include/python3.4m/ceval.h +205 -0
  33. package/python3.4.2/include/python3.4m/classobject.h +58 -0
  34. package/python3.4.2/include/python3.4m/code.h +115 -0
  35. package/python3.4.2/include/python3.4m/codecs.h +233 -0
  36. package/python3.4.2/include/python3.4m/compile.h +72 -0
  37. package/python3.4.2/include/python3.4m/complexobject.h +77 -0
  38. package/python3.4.2/include/python3.4m/datetime.h +243 -0
  39. package/python3.4.2/include/python3.4m/descrobject.h +105 -0
  40. package/python3.4.2/include/python3.4m/dictobject.h +126 -0
  41. package/python3.4.2/include/python3.4m/dtoa.h +19 -0
  42. package/python3.4.2/include/python3.4m/dynamic_annotations.h +499 -0
  43. package/python3.4.2/include/python3.4m/enumobject.h +17 -0
  44. package/python3.4.2/include/python3.4m/errcode.h +38 -0
  45. package/python3.4.2/include/python3.4m/eval.h +27 -0
  46. package/python3.4.2/include/python3.4m/fileobject.h +58 -0
  47. package/python3.4.2/include/python3.4m/fileutils.h +79 -0
  48. package/python3.4.2/include/python3.4m/floatobject.h +128 -0
  49. package/python3.4.2/include/python3.4m/frameobject.h +95 -0
  50. package/python3.4.2/include/python3.4m/funcobject.h +89 -0
  51. package/python3.4.2/include/python3.4m/genobject.h +46 -0
  52. package/python3.4.2/include/python3.4m/graminit.h +84 -0
  53. package/python3.4.2/include/python3.4m/grammar.h +93 -0
  54. package/python3.4.2/include/python3.4m/import.h +130 -0
  55. package/python3.4.2/include/python3.4m/intrcheck.h +21 -0
  56. package/python3.4.2/include/python3.4m/iterobject.h +25 -0
  57. package/python3.4.2/include/python3.4m/listobject.h +80 -0
  58. package/python3.4.2/include/python3.4m/longintrepr.h +103 -0
  59. package/python3.4.2/include/python3.4m/longobject.h +204 -0
  60. package/python3.4.2/include/python3.4m/marshal.h +28 -0
  61. package/python3.4.2/include/python3.4m/memoryobject.h +74 -0
  62. package/python3.4.2/include/python3.4m/metagrammar.h +18 -0
  63. package/python3.4.2/include/python3.4m/methodobject.h +93 -0
  64. package/python3.4.2/include/python3.4m/modsupport.h +132 -0
  65. package/python3.4.2/include/python3.4m/moduleobject.h +63 -0
  66. package/python3.4.2/include/python3.4m/namespaceobject.h +17 -0
  67. package/python3.4.2/include/python3.4m/node.h +44 -0
  68. package/python3.4.2/include/python3.4m/object.h +1015 -0
  69. package/python3.4.2/include/python3.4m/objimpl.h +361 -0
  70. package/python3.4.2/include/python3.4m/opcode.h +159 -0
  71. package/python3.4.2/include/python3.4m/osdefs.h +50 -0
  72. package/python3.4.2/include/python3.4m/parsetok.h +108 -0
  73. package/python3.4.2/include/python3.4m/patchlevel.h +35 -0
  74. package/python3.4.2/include/python3.4m/pgen.h +18 -0
  75. package/python3.4.2/include/python3.4m/pgenheaders.h +42 -0
  76. package/python3.4.2/include/python3.4m/py_curses.h +177 -0
  77. package/python3.4.2/include/python3.4m/pyarena.h +64 -0
  78. package/python3.4.2/include/python3.4m/pyatomic.h +184 -0
  79. package/python3.4.2/include/python3.4m/pycapsule.h +59 -0
  80. package/python3.4.2/include/python3.4m/pyconfig.h +1503 -0
  81. package/python3.4.2/include/python3.4m/pyctype.h +33 -0
  82. package/python3.4.2/include/python3.4m/pydebug.h +34 -0
  83. package/python3.4.2/include/python3.4m/pyerrors.h +464 -0
  84. package/python3.4.2/include/python3.4m/pyexpat.h +53 -0
  85. package/python3.4.2/include/python3.4m/pyfpe.h +176 -0
  86. package/python3.4.2/include/python3.4m/pygetopt.h +21 -0
  87. package/python3.4.2/include/python3.4m/pyhash.h +149 -0
  88. package/python3.4.2/include/python3.4m/pymacconfig.h +102 -0
  89. package/python3.4.2/include/python3.4m/pymacro.h +78 -0
  90. package/python3.4.2/include/python3.4m/pymath.h +190 -0
  91. package/python3.4.2/include/python3.4m/pymem.h +183 -0
  92. package/python3.4.2/include/python3.4m/pyport.h +883 -0
  93. package/python3.4.2/include/python3.4m/pystate.h +271 -0
  94. package/python3.4.2/include/python3.4m/pystrcmp.h +23 -0
  95. package/python3.4.2/include/python3.4m/pystrtod.h +41 -0
  96. package/python3.4.2/include/python3.4m/pythonrun.h +304 -0
  97. package/python3.4.2/include/python3.4m/pythread.h +93 -0
  98. package/python3.4.2/include/python3.4m/pytime.h +105 -0
  99. package/python3.4.2/include/python3.4m/rangeobject.h +27 -0
  100. package/python3.4.2/include/python3.4m/setobject.h +113 -0
  101. package/python3.4.2/include/python3.4m/sliceobject.h +50 -0
  102. package/python3.4.2/include/python3.4m/structmember.h +76 -0
  103. package/python3.4.2/include/python3.4m/structseq.h +49 -0
  104. package/python3.4.2/include/python3.4m/symtable.h +122 -0
  105. package/python3.4.2/include/python3.4m/sysmodule.h +43 -0
  106. package/python3.4.2/include/python3.4m/token.h +87 -0
  107. package/python3.4.2/include/python3.4m/traceback.h +72 -0
  108. package/python3.4.2/include/python3.4m/tupleobject.h +73 -0
  109. package/python3.4.2/include/python3.4m/typeslots.h +76 -0
  110. package/python3.4.2/include/python3.4m/ucnhash.h +36 -0
  111. package/python3.4.2/include/python3.4m/unicodeobject.h +2271 -0
  112. package/python3.4.2/include/python3.4m/warnings.h +54 -0
  113. package/python3.4.2/include/python3.4m/weakrefobject.h +86 -0
  114. package/python3.4.2/lib/pkgconfig/python-3.4.pc +13 -0
  115. package/python3.4.2/lib/pkgconfig/python-3.4m.pc +13 -0
  116. package/python3.4.2/lib/pkgconfig/python3.pc +13 -0
  117. package/python3.4.2/lib/python3.4/LICENSE.txt +254 -0
  118. package/python3.4.2/lib/python3.4/__future__.py +134 -0
  119. package/python3.4.2/lib/python3.4/__phello__.foo.py +1 -0
  120. package/python3.4.2/lib/python3.4/__pycache__/_bootlocale.cpython-34.pyc +0 -0
  121. package/python3.4.2/lib/python3.4/__pycache__/_collections_abc.cpython-34.pyc +0 -0
  122. package/python3.4.2/lib/python3.4/__pycache__/_sitebuiltins.cpython-34.pyc +0 -0
  123. package/python3.4.2/lib/python3.4/__pycache__/_sysconfigdata.cpython-34.pyc +0 -0
  124. package/python3.4.2/lib/python3.4/__pycache__/_weakrefset.cpython-34.pyc +0 -0
  125. package/python3.4.2/lib/python3.4/__pycache__/abc.cpython-34.pyc +0 -0
  126. package/python3.4.2/lib/python3.4/__pycache__/codecs.cpython-34.pyc +0 -0
  127. package/python3.4.2/lib/python3.4/__pycache__/genericpath.cpython-34.pyc +0 -0
  128. package/python3.4.2/lib/python3.4/__pycache__/io.cpython-34.pyc +0 -0
  129. package/python3.4.2/lib/python3.4/__pycache__/os.cpython-34.pyc +0 -0
  130. package/python3.4.2/lib/python3.4/__pycache__/posixpath.cpython-34.pyc +0 -0
  131. package/python3.4.2/lib/python3.4/__pycache__/rlcompleter.cpython-34.pyc +0 -0
  132. package/python3.4.2/lib/python3.4/__pycache__/site.cpython-34.pyc +0 -0
  133. package/python3.4.2/lib/python3.4/__pycache__/stat.cpython-34.pyc +0 -0
  134. package/python3.4.2/lib/python3.4/__pycache__/sysconfig.cpython-34.pyc +0 -0
  135. package/python3.4.2/lib/python3.4/_bootlocale.py +34 -0
  136. package/python3.4.2/lib/python3.4/_collections_abc.py +753 -0
  137. package/python3.4.2/lib/python3.4/_compat_pickle.py +137 -0
  138. package/python3.4.2/lib/python3.4/_dummy_thread.py +155 -0
  139. package/python3.4.2/lib/python3.4/_markupbase.py +395 -0
  140. package/python3.4.2/lib/python3.4/_osx_support.py +502 -0
  141. package/python3.4.2/lib/python3.4/_pyio.py +2105 -0
  142. package/python3.4.2/lib/python3.4/_sitebuiltins.py +103 -0
  143. package/python3.4.2/lib/python3.4/_strptime.py +511 -0
  144. package/python3.4.2/lib/python3.4/_sysconfigdata.py +710 -0
  145. package/python3.4.2/lib/python3.4/_threading_local.py +246 -0
  146. package/python3.4.2/lib/python3.4/_weakrefset.py +196 -0
  147. package/python3.4.2/lib/python3.4/abc.py +248 -0
  148. package/python3.4.2/lib/python3.4/aifc.py +918 -0
  149. package/python3.4.2/lib/python3.4/antigravity.py +17 -0
  150. package/python3.4.2/lib/python3.4/argparse.py +2379 -0
  151. package/python3.4.2/lib/python3.4/ast.py +315 -0
  152. package/python3.4.2/lib/python3.4/asynchat.py +333 -0
  153. package/python3.4.2/lib/python3.4/asyncio/__init__.py +48 -0
  154. package/python3.4.2/lib/python3.4/asyncio/base_events.py +1055 -0
  155. package/python3.4.2/lib/python3.4/asyncio/base_subprocess.py +197 -0
  156. package/python3.4.2/lib/python3.4/asyncio/constants.py +7 -0
  157. package/python3.4.2/lib/python3.4/asyncio/coroutines.py +195 -0
  158. package/python3.4.2/lib/python3.4/asyncio/events.py +586 -0
  159. package/python3.4.2/lib/python3.4/asyncio/futures.py +411 -0
  160. package/python3.4.2/lib/python3.4/asyncio/locks.py +469 -0
  161. package/python3.4.2/lib/python3.4/asyncio/log.py +7 -0
  162. package/python3.4.2/lib/python3.4/asyncio/proactor_events.py +499 -0
  163. package/python3.4.2/lib/python3.4/asyncio/protocols.py +129 -0
  164. package/python3.4.2/lib/python3.4/asyncio/queues.py +288 -0
  165. package/python3.4.2/lib/python3.4/asyncio/selector_events.py +996 -0
  166. package/python3.4.2/lib/python3.4/asyncio/streams.py +485 -0
  167. package/python3.4.2/lib/python3.4/asyncio/subprocess.py +228 -0
  168. package/python3.4.2/lib/python3.4/asyncio/tasks.py +658 -0
  169. package/python3.4.2/lib/python3.4/asyncio/test_utils.py +425 -0
  170. package/python3.4.2/lib/python3.4/asyncio/transports.py +298 -0
  171. package/python3.4.2/lib/python3.4/asyncio/unix_events.py +922 -0
  172. package/python3.4.2/lib/python3.4/asyncio/windows_events.py +634 -0
  173. package/python3.4.2/lib/python3.4/asyncio/windows_utils.py +207 -0
  174. package/python3.4.2/lib/python3.4/asyncore.py +666 -0
  175. package/python3.4.2/lib/python3.4/base64.py +602 -0
  176. package/python3.4.2/lib/python3.4/bdb.py +673 -0
  177. package/python3.4.2/lib/python3.4/binhex.py +471 -0
  178. package/python3.4.2/lib/python3.4/bisect.py +92 -0
  179. package/python3.4.2/lib/python3.4/bz2.py +521 -0
  180. package/python3.4.2/lib/python3.4/cProfile.py +160 -0
  181. package/python3.4.2/lib/python3.4/calendar.py +703 -0
  182. package/python3.4.2/lib/python3.4/cgi.py +1061 -0
  183. package/python3.4.2/lib/python3.4/cgitb.py +320 -0
  184. package/python3.4.2/lib/python3.4/chunk.py +167 -0
  185. package/python3.4.2/lib/python3.4/cmd.py +401 -0
  186. package/python3.4.2/lib/python3.4/code.py +302 -0
  187. package/python3.4.2/lib/python3.4/codecs.py +1110 -0
  188. package/python3.4.2/lib/python3.4/codeop.py +168 -0
  189. package/python3.4.2/lib/python3.4/collections/__init__.py +1132 -0
  190. package/python3.4.2/lib/python3.4/collections/__main__.py +38 -0
  191. package/python3.4.2/lib/python3.4/collections/abc.py +2 -0
  192. package/python3.4.2/lib/python3.4/colorsys.py +164 -0
  193. package/python3.4.2/lib/python3.4/compileall.py +241 -0
  194. package/python3.4.2/lib/python3.4/concurrent/__init__.py +1 -0
  195. package/python3.4.2/lib/python3.4/concurrent/futures/__init__.py +18 -0
  196. package/python3.4.2/lib/python3.4/concurrent/futures/_base.py +575 -0
  197. package/python3.4.2/lib/python3.4/concurrent/futures/process.py +427 -0
  198. package/python3.4.2/lib/python3.4/concurrent/futures/thread.py +132 -0
  199. package/python3.4.2/lib/python3.4/config-3.4m/Makefile +1835 -0
  200. package/python3.4.2/lib/python3.4/config-3.4m/Setup +466 -0
  201. package/python3.4.2/lib/python3.4/config-3.4m/Setup.config +13 -0
  202. package/python3.4.2/lib/python3.4/config-3.4m/Setup.local +1 -0
  203. package/python3.4.2/lib/python3.4/config-3.4m/config.c +234 -0
  204. package/python3.4.2/lib/python3.4/config-3.4m/config.c.in +67 -0
  205. package/python3.4.2/lib/python3.4/config-3.4m/install-sh +294 -0
  206. package/python3.4.2/lib/python3.4/config-3.4m/makesetup +293 -0
  207. package/python3.4.2/lib/python3.4/config-3.4m/python-config.py +68 -0
  208. package/python3.4.2/lib/python3.4/configparser.py +1254 -0
  209. package/python3.4.2/lib/python3.4/contextlib.py +340 -0
  210. package/python3.4.2/lib/python3.4/copy.py +333 -0
  211. package/python3.4.2/lib/python3.4/copyreg.py +202 -0
  212. package/python3.4.2/lib/python3.4/crypt.py +62 -0
  213. package/python3.4.2/lib/python3.4/csv.py +449 -0
  214. package/python3.4.2/lib/python3.4/ctypes/__init__.py +541 -0
  215. package/python3.4.2/lib/python3.4/ctypes/_endian.py +59 -0
  216. package/python3.4.2/lib/python3.4/ctypes/macholib/README.ctypes +7 -0
  217. package/python3.4.2/lib/python3.4/ctypes/macholib/__init__.py +9 -0
  218. package/python3.4.2/lib/python3.4/ctypes/macholib/dyld.py +158 -0
  219. package/python3.4.2/lib/python3.4/ctypes/macholib/dylib.py +63 -0
  220. package/python3.4.2/lib/python3.4/ctypes/macholib/fetch_macholib +2 -0
  221. package/python3.4.2/lib/python3.4/ctypes/macholib/fetch_macholib.bat +1 -0
  222. package/python3.4.2/lib/python3.4/ctypes/macholib/framework.py +65 -0
  223. package/python3.4.2/lib/python3.4/ctypes/test/__init__.py +14 -0
  224. package/python3.4.2/lib/python3.4/ctypes/test/__main__.py +4 -0
  225. package/python3.4.2/lib/python3.4/ctypes/test/test_anon.py +60 -0
  226. package/python3.4.2/lib/python3.4/ctypes/test/test_array_in_pointer.py +64 -0
  227. package/python3.4.2/lib/python3.4/ctypes/test/test_arrays.py +181 -0
  228. package/python3.4.2/lib/python3.4/ctypes/test/test_as_parameter.py +226 -0
  229. package/python3.4.2/lib/python3.4/ctypes/test/test_bitfields.py +263 -0
  230. package/python3.4.2/lib/python3.4/ctypes/test/test_buffers.py +64 -0
  231. package/python3.4.2/lib/python3.4/ctypes/test/test_bytes.py +65 -0
  232. package/python3.4.2/lib/python3.4/ctypes/test/test_byteswap.py +295 -0
  233. package/python3.4.2/lib/python3.4/ctypes/test/test_callbacks.py +247 -0
  234. package/python3.4.2/lib/python3.4/ctypes/test/test_cast.py +86 -0
  235. package/python3.4.2/lib/python3.4/ctypes/test/test_cfuncs.py +212 -0
  236. package/python3.4.2/lib/python3.4/ctypes/test/test_checkretval.py +36 -0
  237. package/python3.4.2/lib/python3.4/ctypes/test/test_delattr.py +21 -0
  238. package/python3.4.2/lib/python3.4/ctypes/test/test_errno.py +79 -0
  239. package/python3.4.2/lib/python3.4/ctypes/test/test_find.py +81 -0
  240. package/python3.4.2/lib/python3.4/ctypes/test/test_frombuffer.py +81 -0
  241. package/python3.4.2/lib/python3.4/ctypes/test/test_funcptr.py +127 -0
  242. package/python3.4.2/lib/python3.4/ctypes/test/test_functions.py +402 -0
  243. package/python3.4.2/lib/python3.4/ctypes/test/test_incomplete.py +42 -0
  244. package/python3.4.2/lib/python3.4/ctypes/test/test_init.py +40 -0
  245. package/python3.4.2/lib/python3.4/ctypes/test/test_internals.py +100 -0
  246. package/python3.4.2/lib/python3.4/ctypes/test/test_keeprefs.py +153 -0
  247. package/python3.4.2/lib/python3.4/ctypes/test/test_libc.py +33 -0
  248. package/python3.4.2/lib/python3.4/ctypes/test/test_loading.py +119 -0
  249. package/python3.4.2/lib/python3.4/ctypes/test/test_macholib.py +63 -0
  250. package/python3.4.2/lib/python3.4/ctypes/test/test_memfunctions.py +79 -0
  251. package/python3.4.2/lib/python3.4/ctypes/test/test_numbers.py +290 -0
  252. package/python3.4.2/lib/python3.4/ctypes/test/test_objects.py +67 -0
  253. package/python3.4.2/lib/python3.4/ctypes/test/test_parameters.py +176 -0
  254. package/python3.4.2/lib/python3.4/ctypes/test/test_pep3118.py +206 -0
  255. package/python3.4.2/lib/python3.4/ctypes/test/test_pickling.py +83 -0
  256. package/python3.4.2/lib/python3.4/ctypes/test/test_pointers.py +192 -0
  257. package/python3.4.2/lib/python3.4/ctypes/test/test_prototypes.py +219 -0
  258. package/python3.4.2/lib/python3.4/ctypes/test/test_python_api.py +89 -0
  259. package/python3.4.2/lib/python3.4/ctypes/test/test_random_things.py +74 -0
  260. package/python3.4.2/lib/python3.4/ctypes/test/test_refcounts.py +101 -0
  261. package/python3.4.2/lib/python3.4/ctypes/test/test_repr.py +29 -0
  262. package/python3.4.2/lib/python3.4/ctypes/test/test_returnfuncptrs.py +67 -0
  263. package/python3.4.2/lib/python3.4/ctypes/test/test_simplesubclasses.py +55 -0
  264. package/python3.4.2/lib/python3.4/ctypes/test/test_sizes.py +34 -0
  265. package/python3.4.2/lib/python3.4/ctypes/test/test_slicing.py +167 -0
  266. package/python3.4.2/lib/python3.4/ctypes/test/test_stringptr.py +77 -0
  267. package/python3.4.2/lib/python3.4/ctypes/test/test_strings.py +225 -0
  268. package/python3.4.2/lib/python3.4/ctypes/test/test_struct_fields.py +50 -0
  269. package/python3.4.2/lib/python3.4/ctypes/test/test_structures.py +468 -0
  270. package/python3.4.2/lib/python3.4/ctypes/test/test_unaligned_structures.py +45 -0
  271. package/python3.4.2/lib/python3.4/ctypes/test/test_unicode.py +56 -0
  272. package/python3.4.2/lib/python3.4/ctypes/test/test_values.py +95 -0
  273. package/python3.4.2/lib/python3.4/ctypes/test/test_varsize_struct.py +50 -0
  274. package/python3.4.2/lib/python3.4/ctypes/test/test_win32.py +119 -0
  275. package/python3.4.2/lib/python3.4/ctypes/test/test_wintypes.py +41 -0
  276. package/python3.4.2/lib/python3.4/ctypes/util.py +267 -0
  277. package/python3.4.2/lib/python3.4/ctypes/wintypes.py +202 -0
  278. package/python3.4.2/lib/python3.4/curses/__init__.py +101 -0
  279. package/python3.4.2/lib/python3.4/curses/ascii.py +99 -0
  280. package/python3.4.2/lib/python3.4/curses/has_key.py +192 -0
  281. package/python3.4.2/lib/python3.4/curses/panel.py +6 -0
  282. package/python3.4.2/lib/python3.4/curses/textpad.py +188 -0
  283. package/python3.4.2/lib/python3.4/datetime.py +2136 -0
  284. package/python3.4.2/lib/python3.4/dbm/__init__.py +188 -0
  285. package/python3.4.2/lib/python3.4/dbm/dumb.py +291 -0
  286. package/python3.4.2/lib/python3.4/dbm/gnu.py +3 -0
  287. package/python3.4.2/lib/python3.4/dbm/ndbm.py +3 -0
  288. package/python3.4.2/lib/python3.4/decimal.py +6414 -0
  289. package/python3.4.2/lib/python3.4/difflib.py +2039 -0
  290. package/python3.4.2/lib/python3.4/dis.py +475 -0
  291. package/python3.4.2/lib/python3.4/distutils/README +13 -0
  292. package/python3.4.2/lib/python3.4/distutils/__init__.py +17 -0
  293. package/python3.4.2/lib/python3.4/distutils/archive_util.py +245 -0
  294. package/python3.4.2/lib/python3.4/distutils/bcppcompiler.py +393 -0
  295. package/python3.4.2/lib/python3.4/distutils/ccompiler.py +1115 -0
  296. package/python3.4.2/lib/python3.4/distutils/cmd.py +435 -0
  297. package/python3.4.2/lib/python3.4/distutils/command/__init__.py +31 -0
  298. package/python3.4.2/lib/python3.4/distutils/command/bdist.py +142 -0
  299. package/python3.4.2/lib/python3.4/distutils/command/bdist_dumb.py +122 -0
  300. package/python3.4.2/lib/python3.4/distutils/command/bdist_msi.py +741 -0
  301. package/python3.4.2/lib/python3.4/distutils/command/bdist_rpm.py +582 -0
  302. package/python3.4.2/lib/python3.4/distutils/command/bdist_wininst.py +349 -0
  303. package/python3.4.2/lib/python3.4/distutils/command/build.py +148 -0
  304. package/python3.4.2/lib/python3.4/distutils/command/build_clib.py +209 -0
  305. package/python3.4.2/lib/python3.4/distutils/command/build_ext.py +735 -0
  306. package/python3.4.2/lib/python3.4/distutils/command/build_py.py +416 -0
  307. package/python3.4.2/lib/python3.4/distutils/command/build_scripts.py +160 -0
  308. package/python3.4.2/lib/python3.4/distutils/command/check.py +145 -0
  309. package/python3.4.2/lib/python3.4/distutils/command/clean.py +76 -0
  310. package/python3.4.2/lib/python3.4/distutils/command/command_template +33 -0
  311. package/python3.4.2/lib/python3.4/distutils/command/config.py +347 -0
  312. package/python3.4.2/lib/python3.4/distutils/command/install.py +650 -0
  313. package/python3.4.2/lib/python3.4/distutils/command/install_data.py +79 -0
  314. package/python3.4.2/lib/python3.4/distutils/command/install_egg_info.py +77 -0
  315. package/python3.4.2/lib/python3.4/distutils/command/install_headers.py +47 -0
  316. package/python3.4.2/lib/python3.4/distutils/command/install_lib.py +217 -0
  317. package/python3.4.2/lib/python3.4/distutils/command/install_scripts.py +60 -0
  318. package/python3.4.2/lib/python3.4/distutils/command/register.py +304 -0
  319. package/python3.4.2/lib/python3.4/distutils/command/sdist.py +467 -0
  320. package/python3.4.2/lib/python3.4/distutils/command/upload.py +202 -0
  321. package/python3.4.2/lib/python3.4/distutils/command/wininst-10.0-amd64.exe +0 -0
  322. package/python3.4.2/lib/python3.4/distutils/command/wininst-10.0.exe +0 -0
  323. package/python3.4.2/lib/python3.4/distutils/command/wininst-6.0.exe +0 -0
  324. package/python3.4.2/lib/python3.4/distutils/command/wininst-7.1.exe +0 -0
  325. package/python3.4.2/lib/python3.4/distutils/command/wininst-8.0.exe +0 -0
  326. package/python3.4.2/lib/python3.4/distutils/command/wininst-9.0-amd64.exe +0 -0
  327. package/python3.4.2/lib/python3.4/distutils/command/wininst-9.0.exe +0 -0
  328. package/python3.4.2/lib/python3.4/distutils/config.py +131 -0
  329. package/python3.4.2/lib/python3.4/distutils/core.py +237 -0
  330. package/python3.4.2/lib/python3.4/distutils/cygwinccompiler.py +405 -0
  331. package/python3.4.2/lib/python3.4/distutils/debug.py +5 -0
  332. package/python3.4.2/lib/python3.4/distutils/dep_util.py +92 -0
  333. package/python3.4.2/lib/python3.4/distutils/dir_util.py +210 -0
  334. package/python3.4.2/lib/python3.4/distutils/dist.py +1238 -0
  335. package/python3.4.2/lib/python3.4/distutils/errors.py +97 -0
  336. package/python3.4.2/lib/python3.4/distutils/extension.py +233 -0
  337. package/python3.4.2/lib/python3.4/distutils/fancy_getopt.py +457 -0
  338. package/python3.4.2/lib/python3.4/distutils/file_util.py +230 -0
  339. package/python3.4.2/lib/python3.4/distutils/filelist.py +328 -0
  340. package/python3.4.2/lib/python3.4/distutils/log.py +75 -0
  341. package/python3.4.2/lib/python3.4/distutils/msvc9compiler.py +788 -0
  342. package/python3.4.2/lib/python3.4/distutils/msvccompiler.py +640 -0
  343. package/python3.4.2/lib/python3.4/distutils/spawn.py +195 -0
  344. package/python3.4.2/lib/python3.4/distutils/sysconfig.py +562 -0
  345. package/python3.4.2/lib/python3.4/distutils/tests/Setup.sample +67 -0
  346. package/python3.4.2/lib/python3.4/distutils/tests/__init__.py +36 -0
  347. package/python3.4.2/lib/python3.4/distutils/tests/support.py +210 -0
  348. package/python3.4.2/lib/python3.4/distutils/tests/test_archive_util.py +341 -0
  349. package/python3.4.2/lib/python3.4/distutils/tests/test_bdist.py +50 -0
  350. package/python3.4.2/lib/python3.4/distutils/tests/test_bdist_dumb.py +97 -0
  351. package/python3.4.2/lib/python3.4/distutils/tests/test_bdist_msi.py +25 -0
  352. package/python3.4.2/lib/python3.4/distutils/tests/test_bdist_rpm.py +134 -0
  353. package/python3.4.2/lib/python3.4/distutils/tests/test_bdist_wininst.py +31 -0
  354. package/python3.4.2/lib/python3.4/distutils/tests/test_build.py +55 -0
  355. package/python3.4.2/lib/python3.4/distutils/tests/test_build_clib.py +143 -0
  356. package/python3.4.2/lib/python3.4/distutils/tests/test_build_ext.py +488 -0
  357. package/python3.4.2/lib/python3.4/distutils/tests/test_build_py.py +178 -0
  358. package/python3.4.2/lib/python3.4/distutils/tests/test_build_scripts.py +112 -0
  359. package/python3.4.2/lib/python3.4/distutils/tests/test_check.py +106 -0
  360. package/python3.4.2/lib/python3.4/distutils/tests/test_clean.py +51 -0
  361. package/python3.4.2/lib/python3.4/distutils/tests/test_cmd.py +126 -0
  362. package/python3.4.2/lib/python3.4/distutils/tests/test_config.py +120 -0
  363. package/python3.4.2/lib/python3.4/distutils/tests/test_config_cmd.py +89 -0
  364. package/python3.4.2/lib/python3.4/distutils/tests/test_core.py +108 -0
  365. package/python3.4.2/lib/python3.4/distutils/tests/test_cygwinccompiler.py +155 -0
  366. package/python3.4.2/lib/python3.4/distutils/tests/test_dep_util.py +81 -0
  367. package/python3.4.2/lib/python3.4/distutils/tests/test_dir_util.py +139 -0
  368. package/python3.4.2/lib/python3.4/distutils/tests/test_dist.py +454 -0
  369. package/python3.4.2/lib/python3.4/distutils/tests/test_extension.py +69 -0
  370. package/python3.4.2/lib/python3.4/distutils/tests/test_file_util.py +85 -0
  371. package/python3.4.2/lib/python3.4/distutils/tests/test_filelist.py +299 -0
  372. package/python3.4.2/lib/python3.4/distutils/tests/test_install.py +246 -0
  373. package/python3.4.2/lib/python3.4/distutils/tests/test_install_data.py +77 -0
  374. package/python3.4.2/lib/python3.4/distutils/tests/test_install_headers.py +41 -0
  375. package/python3.4.2/lib/python3.4/distutils/tests/test_install_lib.py +115 -0
  376. package/python3.4.2/lib/python3.4/distutils/tests/test_install_scripts.py +82 -0
  377. package/python3.4.2/lib/python3.4/distutils/tests/test_log.py +37 -0
  378. package/python3.4.2/lib/python3.4/distutils/tests/test_msvc9compiler.py +184 -0
  379. package/python3.4.2/lib/python3.4/distutils/tests/test_register.py +309 -0
  380. package/python3.4.2/lib/python3.4/distutils/tests/test_sdist.py +484 -0
  381. package/python3.4.2/lib/python3.4/distutils/tests/test_spawn.py +58 -0
  382. package/python3.4.2/lib/python3.4/distutils/tests/test_sysconfig.py +207 -0
  383. package/python3.4.2/lib/python3.4/distutils/tests/test_text_file.py +107 -0
  384. package/python3.4.2/lib/python3.4/distutils/tests/test_unixccompiler.py +150 -0
  385. package/python3.4.2/lib/python3.4/distutils/tests/test_upload.py +151 -0
  386. package/python3.4.2/lib/python3.4/distutils/tests/test_util.py +300 -0
  387. package/python3.4.2/lib/python3.4/distutils/tests/test_version.py +71 -0
  388. package/python3.4.2/lib/python3.4/distutils/tests/test_versionpredicate.py +13 -0
  389. package/python3.4.2/lib/python3.4/distutils/tests/xxmodule.c +396 -0
  390. package/python3.4.2/lib/python3.4/distutils/text_file.py +285 -0
  391. package/python3.4.2/lib/python3.4/distutils/unixccompiler.py +298 -0
  392. package/python3.4.2/lib/python3.4/distutils/util.py +553 -0
  393. package/python3.4.2/lib/python3.4/distutils/version.py +349 -0
  394. package/python3.4.2/lib/python3.4/distutils/versionpredicate.py +166 -0
  395. package/python3.4.2/lib/python3.4/doctest.py +2793 -0
  396. package/python3.4.2/lib/python3.4/dummy_threading.py +78 -0
  397. package/python3.4.2/lib/python3.4/email/__init__.py +64 -0
  398. package/python3.4.2/lib/python3.4/email/_encoded_words.py +221 -0
  399. package/python3.4.2/lib/python3.4/email/_header_value_parser.py +2947 -0
  400. package/python3.4.2/lib/python3.4/email/_parseaddr.py +540 -0
  401. package/python3.4.2/lib/python3.4/email/_policybase.py +358 -0
  402. package/python3.4.2/lib/python3.4/email/architecture.rst +216 -0
  403. package/python3.4.2/lib/python3.4/email/base64mime.py +119 -0
  404. package/python3.4.2/lib/python3.4/email/charset.py +409 -0
  405. package/python3.4.2/lib/python3.4/email/contentmanager.py +249 -0
  406. package/python3.4.2/lib/python3.4/email/encoders.py +69 -0
  407. package/python3.4.2/lib/python3.4/email/errors.py +107 -0
  408. package/python3.4.2/lib/python3.4/email/feedparser.py +526 -0
  409. package/python3.4.2/lib/python3.4/email/generator.py +507 -0
  410. package/python3.4.2/lib/python3.4/email/header.py +581 -0
  411. package/python3.4.2/lib/python3.4/email/headerregistry.py +583 -0
  412. package/python3.4.2/lib/python3.4/email/iterators.py +71 -0
  413. package/python3.4.2/lib/python3.4/email/message.py +1147 -0
  414. package/python3.4.2/lib/python3.4/email/mime/__init__.py +0 -0
  415. package/python3.4.2/lib/python3.4/email/mime/application.py +36 -0
  416. package/python3.4.2/lib/python3.4/email/mime/audio.py +73 -0
  417. package/python3.4.2/lib/python3.4/email/mime/base.py +26 -0
  418. package/python3.4.2/lib/python3.4/email/mime/image.py +46 -0
  419. package/python3.4.2/lib/python3.4/email/mime/message.py +34 -0
  420. package/python3.4.2/lib/python3.4/email/mime/multipart.py +47 -0
  421. package/python3.4.2/lib/python3.4/email/mime/nonmultipart.py +22 -0
  422. package/python3.4.2/lib/python3.4/email/mime/text.py +41 -0
  423. package/python3.4.2/lib/python3.4/email/parser.py +132 -0
  424. package/python3.4.2/lib/python3.4/email/policy.py +201 -0
  425. package/python3.4.2/lib/python3.4/email/quoprimime.py +299 -0
  426. package/python3.4.2/lib/python3.4/email/utils.py +399 -0
  427. package/python3.4.2/lib/python3.4/encodings/__init__.py +152 -0
  428. package/python3.4.2/lib/python3.4/encodings/__pycache__/__init__.cpython-34.pyc +0 -0
  429. package/python3.4.2/lib/python3.4/encodings/__pycache__/aliases.cpython-34.pyc +0 -0
  430. package/python3.4.2/lib/python3.4/encodings/__pycache__/ascii.cpython-34.pyc +0 -0
  431. package/python3.4.2/lib/python3.4/encodings/__pycache__/latin_1.cpython-34.pyc +0 -0
  432. package/python3.4.2/lib/python3.4/encodings/__pycache__/utf_8.cpython-34.pyc +0 -0
  433. package/python3.4.2/lib/python3.4/encodings/aliases.py +544 -0
  434. package/python3.4.2/lib/python3.4/encodings/ascii.py +50 -0
  435. package/python3.4.2/lib/python3.4/encodings/base64_codec.py +55 -0
  436. package/python3.4.2/lib/python3.4/encodings/big5.py +39 -0
  437. package/python3.4.2/lib/python3.4/encodings/big5hkscs.py +39 -0
  438. package/python3.4.2/lib/python3.4/encodings/bz2_codec.py +78 -0
  439. package/python3.4.2/lib/python3.4/encodings/charmap.py +69 -0
  440. package/python3.4.2/lib/python3.4/encodings/cp037.py +307 -0
  441. package/python3.4.2/lib/python3.4/encodings/cp1006.py +307 -0
  442. package/python3.4.2/lib/python3.4/encodings/cp1026.py +307 -0
  443. package/python3.4.2/lib/python3.4/encodings/cp1125.py +698 -0
  444. package/python3.4.2/lib/python3.4/encodings/cp1140.py +307 -0
  445. package/python3.4.2/lib/python3.4/encodings/cp1250.py +307 -0
  446. package/python3.4.2/lib/python3.4/encodings/cp1251.py +307 -0
  447. package/python3.4.2/lib/python3.4/encodings/cp1252.py +307 -0
  448. package/python3.4.2/lib/python3.4/encodings/cp1253.py +307 -0
  449. package/python3.4.2/lib/python3.4/encodings/cp1254.py +307 -0
  450. package/python3.4.2/lib/python3.4/encodings/cp1255.py +307 -0
  451. package/python3.4.2/lib/python3.4/encodings/cp1256.py +307 -0
  452. package/python3.4.2/lib/python3.4/encodings/cp1257.py +307 -0
  453. package/python3.4.2/lib/python3.4/encodings/cp1258.py +307 -0
  454. package/python3.4.2/lib/python3.4/encodings/cp273.py +307 -0
  455. package/python3.4.2/lib/python3.4/encodings/cp424.py +307 -0
  456. package/python3.4.2/lib/python3.4/encodings/cp437.py +698 -0
  457. package/python3.4.2/lib/python3.4/encodings/cp500.py +307 -0
  458. package/python3.4.2/lib/python3.4/encodings/cp65001.py +40 -0
  459. package/python3.4.2/lib/python3.4/encodings/cp720.py +309 -0
  460. package/python3.4.2/lib/python3.4/encodings/cp737.py +698 -0
  461. package/python3.4.2/lib/python3.4/encodings/cp775.py +697 -0
  462. package/python3.4.2/lib/python3.4/encodings/cp850.py +698 -0
  463. package/python3.4.2/lib/python3.4/encodings/cp852.py +698 -0
  464. package/python3.4.2/lib/python3.4/encodings/cp855.py +698 -0
  465. package/python3.4.2/lib/python3.4/encodings/cp856.py +307 -0
  466. package/python3.4.2/lib/python3.4/encodings/cp857.py +694 -0
  467. package/python3.4.2/lib/python3.4/encodings/cp858.py +698 -0
  468. package/python3.4.2/lib/python3.4/encodings/cp860.py +698 -0
  469. package/python3.4.2/lib/python3.4/encodings/cp861.py +698 -0
  470. package/python3.4.2/lib/python3.4/encodings/cp862.py +698 -0
  471. package/python3.4.2/lib/python3.4/encodings/cp863.py +698 -0
  472. package/python3.4.2/lib/python3.4/encodings/cp864.py +690 -0
  473. package/python3.4.2/lib/python3.4/encodings/cp865.py +698 -0
  474. package/python3.4.2/lib/python3.4/encodings/cp866.py +698 -0
  475. package/python3.4.2/lib/python3.4/encodings/cp869.py +689 -0
  476. package/python3.4.2/lib/python3.4/encodings/cp874.py +307 -0
  477. package/python3.4.2/lib/python3.4/encodings/cp875.py +307 -0
  478. package/python3.4.2/lib/python3.4/encodings/cp932.py +39 -0
  479. package/python3.4.2/lib/python3.4/encodings/cp949.py +39 -0
  480. package/python3.4.2/lib/python3.4/encodings/cp950.py +39 -0
  481. package/python3.4.2/lib/python3.4/encodings/euc_jis_2004.py +39 -0
  482. package/python3.4.2/lib/python3.4/encodings/euc_jisx0213.py +39 -0
  483. package/python3.4.2/lib/python3.4/encodings/euc_jp.py +39 -0
  484. package/python3.4.2/lib/python3.4/encodings/euc_kr.py +39 -0
  485. package/python3.4.2/lib/python3.4/encodings/gb18030.py +39 -0
  486. package/python3.4.2/lib/python3.4/encodings/gb2312.py +39 -0
  487. package/python3.4.2/lib/python3.4/encodings/gbk.py +39 -0
  488. package/python3.4.2/lib/python3.4/encodings/hex_codec.py +55 -0
  489. package/python3.4.2/lib/python3.4/encodings/hp_roman8.py +312 -0
  490. package/python3.4.2/lib/python3.4/encodings/hz.py +39 -0
  491. package/python3.4.2/lib/python3.4/encodings/idna.py +309 -0
  492. package/python3.4.2/lib/python3.4/encodings/iso2022_jp.py +39 -0
  493. package/python3.4.2/lib/python3.4/encodings/iso2022_jp_1.py +39 -0
  494. package/python3.4.2/lib/python3.4/encodings/iso2022_jp_2.py +39 -0
  495. package/python3.4.2/lib/python3.4/encodings/iso2022_jp_2004.py +39 -0
  496. package/python3.4.2/lib/python3.4/encodings/iso2022_jp_3.py +39 -0
  497. package/python3.4.2/lib/python3.4/encodings/iso2022_jp_ext.py +39 -0
  498. package/python3.4.2/lib/python3.4/encodings/iso2022_kr.py +39 -0
  499. package/python3.4.2/lib/python3.4/encodings/iso8859_1.py +307 -0
  500. package/python3.4.2/lib/python3.4/encodings/iso8859_10.py +307 -0
  501. package/python3.4.2/lib/python3.4/encodings/iso8859_11.py +307 -0
  502. package/python3.4.2/lib/python3.4/encodings/iso8859_13.py +307 -0
  503. package/python3.4.2/lib/python3.4/encodings/iso8859_14.py +307 -0
  504. package/python3.4.2/lib/python3.4/encodings/iso8859_15.py +307 -0
  505. package/python3.4.2/lib/python3.4/encodings/iso8859_16.py +307 -0
  506. package/python3.4.2/lib/python3.4/encodings/iso8859_2.py +307 -0
  507. package/python3.4.2/lib/python3.4/encodings/iso8859_3.py +307 -0
  508. package/python3.4.2/lib/python3.4/encodings/iso8859_4.py +307 -0
  509. package/python3.4.2/lib/python3.4/encodings/iso8859_5.py +307 -0
  510. package/python3.4.2/lib/python3.4/encodings/iso8859_6.py +307 -0
  511. package/python3.4.2/lib/python3.4/encodings/iso8859_7.py +307 -0
  512. package/python3.4.2/lib/python3.4/encodings/iso8859_8.py +307 -0
  513. package/python3.4.2/lib/python3.4/encodings/iso8859_9.py +307 -0
  514. package/python3.4.2/lib/python3.4/encodings/johab.py +39 -0
  515. package/python3.4.2/lib/python3.4/encodings/koi8_r.py +307 -0
  516. package/python3.4.2/lib/python3.4/encodings/koi8_u.py +307 -0
  517. package/python3.4.2/lib/python3.4/encodings/latin_1.py +50 -0
  518. package/python3.4.2/lib/python3.4/encodings/mac_arabic.py +698 -0
  519. package/python3.4.2/lib/python3.4/encodings/mac_centeuro.py +307 -0
  520. package/python3.4.2/lib/python3.4/encodings/mac_croatian.py +307 -0
  521. package/python3.4.2/lib/python3.4/encodings/mac_cyrillic.py +307 -0
  522. package/python3.4.2/lib/python3.4/encodings/mac_farsi.py +307 -0
  523. package/python3.4.2/lib/python3.4/encodings/mac_greek.py +307 -0
  524. package/python3.4.2/lib/python3.4/encodings/mac_iceland.py +307 -0
  525. package/python3.4.2/lib/python3.4/encodings/mac_latin2.py +312 -0
  526. package/python3.4.2/lib/python3.4/encodings/mac_roman.py +307 -0
  527. package/python3.4.2/lib/python3.4/encodings/mac_romanian.py +307 -0
  528. package/python3.4.2/lib/python3.4/encodings/mac_turkish.py +307 -0
  529. package/python3.4.2/lib/python3.4/encodings/mbcs.py +47 -0
  530. package/python3.4.2/lib/python3.4/encodings/palmos.py +308 -0
  531. package/python3.4.2/lib/python3.4/encodings/ptcp154.py +312 -0
  532. package/python3.4.2/lib/python3.4/encodings/punycode.py +237 -0
  533. package/python3.4.2/lib/python3.4/encodings/quopri_codec.py +56 -0
  534. package/python3.4.2/lib/python3.4/encodings/raw_unicode_escape.py +45 -0
  535. package/python3.4.2/lib/python3.4/encodings/rot_13.py +113 -0
  536. package/python3.4.2/lib/python3.4/encodings/shift_jis.py +39 -0
  537. package/python3.4.2/lib/python3.4/encodings/shift_jis_2004.py +39 -0
  538. package/python3.4.2/lib/python3.4/encodings/shift_jisx0213.py +39 -0
  539. package/python3.4.2/lib/python3.4/encodings/tis_620.py +307 -0
  540. package/python3.4.2/lib/python3.4/encodings/undefined.py +49 -0
  541. package/python3.4.2/lib/python3.4/encodings/unicode_escape.py +45 -0
  542. package/python3.4.2/lib/python3.4/encodings/unicode_internal.py +45 -0
  543. package/python3.4.2/lib/python3.4/encodings/utf_16.py +155 -0
  544. package/python3.4.2/lib/python3.4/encodings/utf_16_be.py +42 -0
  545. package/python3.4.2/lib/python3.4/encodings/utf_16_le.py +42 -0
  546. package/python3.4.2/lib/python3.4/encodings/utf_32.py +150 -0
  547. package/python3.4.2/lib/python3.4/encodings/utf_32_be.py +37 -0
  548. package/python3.4.2/lib/python3.4/encodings/utf_32_le.py +37 -0
  549. package/python3.4.2/lib/python3.4/encodings/utf_7.py +38 -0
  550. package/python3.4.2/lib/python3.4/encodings/utf_8.py +42 -0
  551. package/python3.4.2/lib/python3.4/encodings/utf_8_sig.py +130 -0
  552. package/python3.4.2/lib/python3.4/encodings/uu_codec.py +99 -0
  553. package/python3.4.2/lib/python3.4/encodings/zlib_codec.py +77 -0
  554. package/python3.4.2/lib/python3.4/ensurepip/__init__.py +210 -0
  555. package/python3.4.2/lib/python3.4/ensurepip/__main__.py +4 -0
  556. package/python3.4.2/lib/python3.4/ensurepip/_bundled/pip-1.5.6-py2.py3-none-any.whl +0 -0
  557. package/python3.4.2/lib/python3.4/ensurepip/_bundled/setuptools-2.1-py2.py3-none-any.whl +0 -0
  558. package/python3.4.2/lib/python3.4/ensurepip/_uninstall.py +30 -0
  559. package/python3.4.2/lib/python3.4/enum.py +525 -0
  560. package/python3.4.2/lib/python3.4/filecmp.py +305 -0
  561. package/python3.4.2/lib/python3.4/fileinput.py +429 -0
  562. package/python3.4.2/lib/python3.4/fnmatch.py +109 -0
  563. package/python3.4.2/lib/python3.4/formatter.py +448 -0
  564. package/python3.4.2/lib/python3.4/fractions.py +630 -0
  565. package/python3.4.2/lib/python3.4/ftplib.py +1088 -0
  566. package/python3.4.2/lib/python3.4/functools.py +721 -0
  567. package/python3.4.2/lib/python3.4/genericpath.py +132 -0
  568. package/python3.4.2/lib/python3.4/getopt.py +215 -0
  569. package/python3.4.2/lib/python3.4/getpass.py +186 -0
  570. package/python3.4.2/lib/python3.4/gettext.py +523 -0
  571. package/python3.4.2/lib/python3.4/glob.py +110 -0
  572. package/python3.4.2/lib/python3.4/gzip.py +674 -0
  573. package/python3.4.2/lib/python3.4/hashlib.py +217 -0
  574. package/python3.4.2/lib/python3.4/heapq.py +476 -0
  575. package/python3.4.2/lib/python3.4/hmac.py +144 -0
  576. package/python3.4.2/lib/python3.4/html/__init__.py +132 -0
  577. package/python3.4.2/lib/python3.4/html/entities.py +2506 -0
  578. package/python3.4.2/lib/python3.4/html/parser.py +550 -0
  579. package/python3.4.2/lib/python3.4/http/__init__.py +1 -0
  580. package/python3.4.2/lib/python3.4/http/client.py +1302 -0
  581. package/python3.4.2/lib/python3.4/http/cookiejar.py +2080 -0
  582. package/python3.4.2/lib/python3.4/http/cookies.py +578 -0
  583. package/python3.4.2/lib/python3.4/http/server.py +1241 -0
  584. package/python3.4.2/lib/python3.4/idlelib/AutoComplete.py +233 -0
  585. package/python3.4.2/lib/python3.4/idlelib/AutoCompleteWindow.py +415 -0
  586. package/python3.4.2/lib/python3.4/idlelib/AutoExpand.py +104 -0
  587. package/python3.4.2/lib/python3.4/idlelib/Bindings.py +94 -0
  588. package/python3.4.2/lib/python3.4/idlelib/CREDITS.txt +37 -0
  589. package/python3.4.2/lib/python3.4/idlelib/CallTipWindow.py +170 -0
  590. package/python3.4.2/lib/python3.4/idlelib/CallTips.py +175 -0
  591. package/python3.4.2/lib/python3.4/idlelib/ChangeLog +1591 -0
  592. package/python3.4.2/lib/python3.4/idlelib/ClassBrowser.py +229 -0
  593. package/python3.4.2/lib/python3.4/idlelib/CodeContext.py +176 -0
  594. package/python3.4.2/lib/python3.4/idlelib/ColorDelegator.py +254 -0
  595. package/python3.4.2/lib/python3.4/idlelib/Debugger.py +490 -0
  596. package/python3.4.2/lib/python3.4/idlelib/Delegator.py +25 -0
  597. package/python3.4.2/lib/python3.4/idlelib/EditorWindow.py +1729 -0
  598. package/python3.4.2/lib/python3.4/idlelib/FileList.py +129 -0
  599. package/python3.4.2/lib/python3.4/idlelib/FormatParagraph.py +193 -0
  600. package/python3.4.2/lib/python3.4/idlelib/GrepDialog.py +159 -0
  601. package/python3.4.2/lib/python3.4/idlelib/HISTORY.txt +296 -0
  602. package/python3.4.2/lib/python3.4/idlelib/HyperParser.py +313 -0
  603. package/python3.4.2/lib/python3.4/idlelib/IOBinding.py +555 -0
  604. package/python3.4.2/lib/python3.4/idlelib/Icons/folder.gif +0 -0
  605. package/python3.4.2/lib/python3.4/idlelib/Icons/idle.icns +0 -0
  606. package/python3.4.2/lib/python3.4/idlelib/Icons/idle.ico +0 -0
  607. package/python3.4.2/lib/python3.4/idlelib/Icons/idle_16.gif +0 -0
  608. package/python3.4.2/lib/python3.4/idlelib/Icons/idle_16.png +0 -0
  609. package/python3.4.2/lib/python3.4/idlelib/Icons/idle_32.gif +0 -0
  610. package/python3.4.2/lib/python3.4/idlelib/Icons/idle_32.png +0 -0
  611. package/python3.4.2/lib/python3.4/idlelib/Icons/idle_48.gif +0 -0
  612. package/python3.4.2/lib/python3.4/idlelib/Icons/idle_48.png +0 -0
  613. package/python3.4.2/lib/python3.4/idlelib/Icons/minusnode.gif +0 -0
  614. package/python3.4.2/lib/python3.4/idlelib/Icons/openfolder.gif +0 -0
  615. package/python3.4.2/lib/python3.4/idlelib/Icons/plusnode.gif +0 -0
  616. package/python3.4.2/lib/python3.4/idlelib/Icons/python.gif +0 -0
  617. package/python3.4.2/lib/python3.4/idlelib/Icons/tk.gif +0 -0
  618. package/python3.4.2/lib/python3.4/idlelib/IdleHistory.py +104 -0
  619. package/python3.4.2/lib/python3.4/idlelib/MultiCall.py +453 -0
  620. package/python3.4.2/lib/python3.4/idlelib/MultiStatusBar.py +45 -0
  621. package/python3.4.2/lib/python3.4/idlelib/NEWS.txt +877 -0
  622. package/python3.4.2/lib/python3.4/idlelib/ObjectBrowser.py +143 -0
  623. package/python3.4.2/lib/python3.4/idlelib/OutputWindow.py +144 -0
  624. package/python3.4.2/lib/python3.4/idlelib/ParenMatch.py +178 -0
  625. package/python3.4.2/lib/python3.4/idlelib/PathBrowser.py +106 -0
  626. package/python3.4.2/lib/python3.4/idlelib/Percolator.py +104 -0
  627. package/python3.4.2/lib/python3.4/idlelib/PyParse.py +618 -0
  628. package/python3.4.2/lib/python3.4/idlelib/PyShell.py +1619 -0
  629. package/python3.4.2/lib/python3.4/idlelib/README.txt +60 -0
  630. package/python3.4.2/lib/python3.4/idlelib/RemoteDebugger.py +389 -0
  631. package/python3.4.2/lib/python3.4/idlelib/RemoteObjectBrowser.py +36 -0
  632. package/python3.4.2/lib/python3.4/idlelib/ReplaceDialog.py +221 -0
  633. package/python3.4.2/lib/python3.4/idlelib/RstripExtension.py +33 -0
  634. package/python3.4.2/lib/python3.4/idlelib/ScriptBinding.py +207 -0
  635. package/python3.4.2/lib/python3.4/idlelib/ScrolledList.py +140 -0
  636. package/python3.4.2/lib/python3.4/idlelib/SearchDialog.py +89 -0
  637. package/python3.4.2/lib/python3.4/idlelib/SearchDialogBase.py +184 -0
  638. package/python3.4.2/lib/python3.4/idlelib/SearchEngine.py +233 -0
  639. package/python3.4.2/lib/python3.4/idlelib/StackViewer.py +152 -0
  640. package/python3.4.2/lib/python3.4/idlelib/TODO.txt +210 -0
  641. package/python3.4.2/lib/python3.4/idlelib/ToolTip.py +97 -0
  642. package/python3.4.2/lib/python3.4/idlelib/TreeWidget.py +465 -0
  643. package/python3.4.2/lib/python3.4/idlelib/UndoDelegator.py +365 -0
  644. package/python3.4.2/lib/python3.4/idlelib/WidgetRedirector.py +174 -0
  645. package/python3.4.2/lib/python3.4/idlelib/WindowList.py +90 -0
  646. package/python3.4.2/lib/python3.4/idlelib/ZoomHeight.py +51 -0
  647. package/python3.4.2/lib/python3.4/idlelib/__init__.py +1 -0
  648. package/python3.4.2/lib/python3.4/idlelib/__main__.py +9 -0
  649. package/python3.4.2/lib/python3.4/idlelib/aboutDialog.py +145 -0
  650. package/python3.4.2/lib/python3.4/idlelib/config-extensions.def +96 -0
  651. package/python3.4.2/lib/python3.4/idlelib/config-highlight.def +64 -0
  652. package/python3.4.2/lib/python3.4/idlelib/config-keys.def +214 -0
  653. package/python3.4.2/lib/python3.4/idlelib/config-main.def +79 -0
  654. package/python3.4.2/lib/python3.4/idlelib/configDialog.py +1195 -0
  655. package/python3.4.2/lib/python3.4/idlelib/configHandler.py +722 -0
  656. package/python3.4.2/lib/python3.4/idlelib/configHelpSourceEdit.py +166 -0
  657. package/python3.4.2/lib/python3.4/idlelib/configSectionNameDialog.py +98 -0
  658. package/python3.4.2/lib/python3.4/idlelib/dynOptionMenuWidget.py +57 -0
  659. package/python3.4.2/lib/python3.4/idlelib/extend.txt +83 -0
  660. package/python3.4.2/lib/python3.4/idlelib/help.txt +368 -0
  661. package/python3.4.2/lib/python3.4/idlelib/idle.bat +4 -0
  662. package/python3.4.2/lib/python3.4/idlelib/idle.py +11 -0
  663. package/python3.4.2/lib/python3.4/idlelib/idle.pyw +21 -0
  664. package/python3.4.2/lib/python3.4/idlelib/idle_test/README.txt +115 -0
  665. package/python3.4.2/lib/python3.4/idlelib/idle_test/__init__.py +9 -0
  666. package/python3.4.2/lib/python3.4/idlelib/idle_test/htest.py +369 -0
  667. package/python3.4.2/lib/python3.4/idlelib/idle_test/mock_idle.py +55 -0
  668. package/python3.4.2/lib/python3.4/idlelib/idle_test/mock_tk.py +298 -0
  669. package/python3.4.2/lib/python3.4/idlelib/idle_test/test_autocomplete.py +143 -0
  670. package/python3.4.2/lib/python3.4/idlelib/idle_test/test_autoexpand.py +141 -0
  671. package/python3.4.2/lib/python3.4/idlelib/idle_test/test_calltips.py +172 -0
  672. package/python3.4.2/lib/python3.4/idlelib/idle_test/test_config_name.py +75 -0
  673. package/python3.4.2/lib/python3.4/idlelib/idle_test/test_configdialog.py +32 -0
  674. package/python3.4.2/lib/python3.4/idlelib/idle_test/test_delegator.py +37 -0
  675. package/python3.4.2/lib/python3.4/idlelib/idle_test/test_formatparagraph.py +377 -0
  676. package/python3.4.2/lib/python3.4/idlelib/idle_test/test_grep.py +80 -0
  677. package/python3.4.2/lib/python3.4/idlelib/idle_test/test_hyperparser.py +273 -0
  678. package/python3.4.2/lib/python3.4/idlelib/idle_test/test_idlehistory.py +167 -0
  679. package/python3.4.2/lib/python3.4/idlelib/idle_test/test_parenmatch.py +109 -0
  680. package/python3.4.2/lib/python3.4/idlelib/idle_test/test_pathbrowser.py +12 -0
  681. package/python3.4.2/lib/python3.4/idlelib/idle_test/test_rstrip.py +49 -0
  682. package/python3.4.2/lib/python3.4/idlelib/idle_test/test_searchdialogbase.py +165 -0
  683. package/python3.4.2/lib/python3.4/idlelib/idle_test/test_searchengine.py +329 -0
  684. package/python3.4.2/lib/python3.4/idlelib/idle_test/test_text.py +228 -0
  685. package/python3.4.2/lib/python3.4/idlelib/idle_test/test_textview.py +97 -0
  686. package/python3.4.2/lib/python3.4/idlelib/idle_test/test_warning.py +73 -0
  687. package/python3.4.2/lib/python3.4/idlelib/idle_test/test_widgetredir.py +122 -0
  688. package/python3.4.2/lib/python3.4/idlelib/idlever.py +1 -0
  689. package/python3.4.2/lib/python3.4/idlelib/keybindingDialog.py +266 -0
  690. package/python3.4.2/lib/python3.4/idlelib/macosxSupport.py +239 -0
  691. package/python3.4.2/lib/python3.4/idlelib/rpc.py +624 -0
  692. package/python3.4.2/lib/python3.4/idlelib/run.py +404 -0
  693. package/python3.4.2/lib/python3.4/idlelib/tabbedpages.py +498 -0
  694. package/python3.4.2/lib/python3.4/idlelib/testcode.py +31 -0
  695. package/python3.4.2/lib/python3.4/idlelib/textView.py +86 -0
  696. package/python3.4.2/lib/python3.4/imaplib.py +1549 -0
  697. package/python3.4.2/lib/python3.4/imghdr.py +154 -0
  698. package/python3.4.2/lib/python3.4/imp.py +315 -0
  699. package/python3.4.2/lib/python3.4/importlib/__init__.py +156 -0
  700. package/python3.4.2/lib/python3.4/importlib/_bootstrap.py +2461 -0
  701. package/python3.4.2/lib/python3.4/importlib/abc.py +323 -0
  702. package/python3.4.2/lib/python3.4/importlib/machinery.py +21 -0
  703. package/python3.4.2/lib/python3.4/importlib/util.py +202 -0
  704. package/python3.4.2/lib/python3.4/inspect.py +2759 -0
  705. package/python3.4.2/lib/python3.4/io.py +92 -0
  706. package/python3.4.2/lib/python3.4/ipaddress.py +2183 -0
  707. package/python3.4.2/lib/python3.4/json/__init__.py +331 -0
  708. package/python3.4.2/lib/python3.4/json/decoder.py +362 -0
  709. package/python3.4.2/lib/python3.4/json/encoder.py +433 -0
  710. package/python3.4.2/lib/python3.4/json/scanner.py +73 -0
  711. package/python3.4.2/lib/python3.4/json/tool.py +39 -0
  712. package/python3.4.2/lib/python3.4/keyword.py +94 -0
  713. package/python3.4.2/lib/python3.4/lib2to3/Grammar.txt +159 -0
  714. package/python3.4.2/lib/python3.4/lib2to3/Grammar3.4.2.final.0.pickle +0 -0
  715. package/python3.4.2/lib/python3.4/lib2to3/PatternGrammar.txt +28 -0
  716. package/python3.4.2/lib/python3.4/lib2to3/PatternGrammar3.4.2.final.0.pickle +0 -0
  717. package/python3.4.2/lib/python3.4/lib2to3/__init__.py +1 -0
  718. package/python3.4.2/lib/python3.4/lib2to3/__main__.py +4 -0
  719. package/python3.4.2/lib/python3.4/lib2to3/btm_matcher.py +168 -0
  720. package/python3.4.2/lib/python3.4/lib2to3/btm_utils.py +281 -0
  721. package/python3.4.2/lib/python3.4/lib2to3/fixer_base.py +187 -0
  722. package/python3.4.2/lib/python3.4/lib2to3/fixer_util.py +455 -0
  723. package/python3.4.2/lib/python3.4/lib2to3/fixes/__init__.py +1 -0
  724. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_apply.py +59 -0
  725. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_asserts.py +34 -0
  726. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_basestring.py +14 -0
  727. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_buffer.py +22 -0
  728. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_callable.py +37 -0
  729. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_dict.py +107 -0
  730. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_except.py +93 -0
  731. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_exec.py +40 -0
  732. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_execfile.py +52 -0
  733. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_exitfunc.py +72 -0
  734. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_filter.py +76 -0
  735. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_funcattrs.py +21 -0
  736. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_future.py +22 -0
  737. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_getcwdu.py +19 -0
  738. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_has_key.py +110 -0
  739. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_idioms.py +152 -0
  740. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_import.py +99 -0
  741. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_imports.py +145 -0
  742. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_imports2.py +16 -0
  743. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_input.py +26 -0
  744. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_intern.py +31 -0
  745. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_isinstance.py +52 -0
  746. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_itertools.py +43 -0
  747. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_itertools_imports.py +57 -0
  748. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_long.py +19 -0
  749. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_map.py +91 -0
  750. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_metaclass.py +228 -0
  751. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_methodattrs.py +24 -0
  752. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_ne.py +23 -0
  753. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_next.py +103 -0
  754. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_nonzero.py +21 -0
  755. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_numliterals.py +28 -0
  756. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_operator.py +98 -0
  757. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_paren.py +44 -0
  758. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_print.py +87 -0
  759. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_raise.py +90 -0
  760. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_raw_input.py +17 -0
  761. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_reduce.py +35 -0
  762. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_reload.py +28 -0
  763. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_renames.py +70 -0
  764. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_repr.py +23 -0
  765. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_set_literal.py +53 -0
  766. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_standarderror.py +18 -0
  767. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_sys_exc.py +30 -0
  768. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_throw.py +56 -0
  769. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_tuple_params.py +175 -0
  770. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_types.py +62 -0
  771. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_unicode.py +42 -0
  772. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_urllib.py +197 -0
  773. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_ws_comma.py +39 -0
  774. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_xrange.py +73 -0
  775. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_xreadlines.py +25 -0
  776. package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_zip.py +35 -0
  777. package/python3.4.2/lib/python3.4/lib2to3/main.py +268 -0
  778. package/python3.4.2/lib/python3.4/lib2to3/patcomp.py +205 -0
  779. package/python3.4.2/lib/python3.4/lib2to3/pgen2/__init__.py +4 -0
  780. package/python3.4.2/lib/python3.4/lib2to3/pgen2/conv.py +257 -0
  781. package/python3.4.2/lib/python3.4/lib2to3/pgen2/driver.py +157 -0
  782. package/python3.4.2/lib/python3.4/lib2to3/pgen2/grammar.py +183 -0
  783. package/python3.4.2/lib/python3.4/lib2to3/pgen2/literals.py +60 -0
  784. package/python3.4.2/lib/python3.4/lib2to3/pgen2/parse.py +201 -0
  785. package/python3.4.2/lib/python3.4/lib2to3/pgen2/pgen.py +386 -0
  786. package/python3.4.2/lib/python3.4/lib2to3/pgen2/token.py +83 -0
  787. package/python3.4.2/lib/python3.4/lib2to3/pgen2/tokenize.py +502 -0
  788. package/python3.4.2/lib/python3.4/lib2to3/pygram.py +40 -0
  789. package/python3.4.2/lib/python3.4/lib2to3/pytree.py +864 -0
  790. package/python3.4.2/lib/python3.4/lib2to3/refactor.py +747 -0
  791. package/python3.4.2/lib/python3.4/lib2to3/tests/__init__.py +24 -0
  792. package/python3.4.2/lib/python3.4/lib2to3/tests/data/README +6 -0
  793. package/python3.4.2/lib/python3.4/lib2to3/tests/data/bom.py +2 -0
  794. package/python3.4.2/lib/python3.4/lib2to3/tests/data/crlf.py +3 -0
  795. package/python3.4.2/lib/python3.4/lib2to3/tests/data/different_encoding.py +6 -0
  796. package/python3.4.2/lib/python3.4/lib2to3/tests/data/false_encoding.py +2 -0
  797. package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/bad_order.py +5 -0
  798. package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/myfixes/__init__.py +0 -0
  799. package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/myfixes/fix_explicit.py +6 -0
  800. package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/myfixes/fix_first.py +6 -0
  801. package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/myfixes/fix_last.py +7 -0
  802. package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/myfixes/fix_parrot.py +13 -0
  803. package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/myfixes/fix_preorder.py +6 -0
  804. package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/no_fixer_cls.py +1 -0
  805. package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/parrot_example.py +2 -0
  806. package/python3.4.2/lib/python3.4/lib2to3/tests/data/infinite_recursion.py +2669 -0
  807. package/python3.4.2/lib/python3.4/lib2to3/tests/data/py2_test_grammar.py +974 -0
  808. package/python3.4.2/lib/python3.4/lib2to3/tests/data/py3_test_grammar.py +923 -0
  809. package/python3.4.2/lib/python3.4/lib2to3/tests/pytree_idempotency.py +92 -0
  810. package/python3.4.2/lib/python3.4/lib2to3/tests/support.py +54 -0
  811. package/python3.4.2/lib/python3.4/lib2to3/tests/test_all_fixers.py +23 -0
  812. package/python3.4.2/lib/python3.4/lib2to3/tests/test_fixers.py +4687 -0
  813. package/python3.4.2/lib/python3.4/lib2to3/tests/test_main.py +139 -0
  814. package/python3.4.2/lib/python3.4/lib2to3/tests/test_parser.py +249 -0
  815. package/python3.4.2/lib/python3.4/lib2to3/tests/test_pytree.py +477 -0
  816. package/python3.4.2/lib/python3.4/lib2to3/tests/test_refactor.py +321 -0
  817. package/python3.4.2/lib/python3.4/lib2to3/tests/test_util.py +594 -0
  818. package/python3.4.2/lib/python3.4/linecache.py +134 -0
  819. package/python3.4.2/lib/python3.4/locale.py +1559 -0
  820. package/python3.4.2/lib/python3.4/logging/__init__.py +1950 -0
  821. package/python3.4.2/lib/python3.4/logging/config.py +927 -0
  822. package/python3.4.2/lib/python3.4/logging/handlers.py +1452 -0
  823. package/python3.4.2/lib/python3.4/lzma.py +511 -0
  824. package/python3.4.2/lib/python3.4/macpath.py +205 -0
  825. package/python3.4.2/lib/python3.4/macurl2path.py +77 -0
  826. package/python3.4.2/lib/python3.4/mailbox.py +2136 -0
  827. package/python3.4.2/lib/python3.4/mailcap.py +253 -0
  828. package/python3.4.2/lib/python3.4/mimetypes.py +592 -0
  829. package/python3.4.2/lib/python3.4/modulefinder.py +642 -0
  830. package/python3.4.2/lib/python3.4/multiprocessing/__init__.py +38 -0
  831. package/python3.4.2/lib/python3.4/multiprocessing/connection.py +954 -0
  832. package/python3.4.2/lib/python3.4/multiprocessing/context.py +348 -0
  833. package/python3.4.2/lib/python3.4/multiprocessing/dummy/__init__.py +119 -0
  834. package/python3.4.2/lib/python3.4/multiprocessing/dummy/connection.py +74 -0
  835. package/python3.4.2/lib/python3.4/multiprocessing/forkserver.py +267 -0
  836. package/python3.4.2/lib/python3.4/multiprocessing/heap.py +249 -0
  837. package/python3.4.2/lib/python3.4/multiprocessing/managers.py +1131 -0
  838. package/python3.4.2/lib/python3.4/multiprocessing/pool.py +769 -0
  839. package/python3.4.2/lib/python3.4/multiprocessing/popen_fork.py +83 -0
  840. package/python3.4.2/lib/python3.4/multiprocessing/popen_forkserver.py +69 -0
  841. package/python3.4.2/lib/python3.4/multiprocessing/popen_spawn_posix.py +69 -0
  842. package/python3.4.2/lib/python3.4/multiprocessing/popen_spawn_win32.py +99 -0
  843. package/python3.4.2/lib/python3.4/multiprocessing/process.py +332 -0
  844. package/python3.4.2/lib/python3.4/multiprocessing/queues.py +367 -0
  845. package/python3.4.2/lib/python3.4/multiprocessing/reduction.py +240 -0
  846. package/python3.4.2/lib/python3.4/multiprocessing/resource_sharer.py +158 -0
  847. package/python3.4.2/lib/python3.4/multiprocessing/semaphore_tracker.py +143 -0
  848. package/python3.4.2/lib/python3.4/multiprocessing/sharedctypes.py +245 -0
  849. package/python3.4.2/lib/python3.4/multiprocessing/spawn.py +287 -0
  850. package/python3.4.2/lib/python3.4/multiprocessing/synchronize.py +418 -0
  851. package/python3.4.2/lib/python3.4/multiprocessing/util.py +367 -0
  852. package/python3.4.2/lib/python3.4/netrc.py +142 -0
  853. package/python3.4.2/lib/python3.4/nntplib.py +1134 -0
  854. package/python3.4.2/lib/python3.4/ntpath.py +625 -0
  855. package/python3.4.2/lib/python3.4/nturl2path.py +66 -0
  856. package/python3.4.2/lib/python3.4/numbers.py +394 -0
  857. package/python3.4.2/lib/python3.4/opcode.py +200 -0
  858. package/python3.4.2/lib/python3.4/operator.py +411 -0
  859. package/python3.4.2/lib/python3.4/optparse.py +1680 -0
  860. package/python3.4.2/lib/python3.4/os.py +980 -0
  861. package/python3.4.2/lib/python3.4/pathlib.py +1291 -0
  862. package/python3.4.2/lib/python3.4/pdb.py +1685 -0
  863. package/python3.4.2/lib/python3.4/pickle.py +1599 -0
  864. package/python3.4.2/lib/python3.4/pickletools.py +2818 -0
  865. package/python3.4.2/lib/python3.4/pipes.py +247 -0
  866. package/python3.4.2/lib/python3.4/pkgutil.py +629 -0
  867. package/python3.4.2/lib/python3.4/plat-linux/CDROM.py +207 -0
  868. package/python3.4.2/lib/python3.4/plat-linux/DLFCN.py +83 -0
  869. package/python3.4.2/lib/python3.4/plat-linux/IN.py +615 -0
  870. package/python3.4.2/lib/python3.4/plat-linux/TYPES.py +170 -0
  871. package/python3.4.2/lib/python3.4/plat-linux/regen +8 -0
  872. package/python3.4.2/lib/python3.4/platform.py +1476 -0
  873. package/python3.4.2/lib/python3.4/plistlib.py +1025 -0
  874. package/python3.4.2/lib/python3.4/poplib.py +461 -0
  875. package/python3.4.2/lib/python3.4/posixpath.py +457 -0
  876. package/python3.4.2/lib/python3.4/pprint.py +416 -0
  877. package/python3.4.2/lib/python3.4/profile.py +589 -0
  878. package/python3.4.2/lib/python3.4/pstats.py +691 -0
  879. package/python3.4.2/lib/python3.4/pty.py +170 -0
  880. package/python3.4.2/lib/python3.4/py_compile.py +185 -0
  881. package/python3.4.2/lib/python3.4/pyclbr.py +351 -0
  882. package/python3.4.2/lib/python3.4/pydoc.py +2622 -0
  883. package/python3.4.2/lib/python3.4/pydoc_data/__init__.py +0 -0
  884. package/python3.4.2/lib/python3.4/pydoc_data/_pydoc.css +6 -0
  885. package/python3.4.2/lib/python3.4/pydoc_data/topics.py +79 -0
  886. package/python3.4.2/lib/python3.4/queue.py +249 -0
  887. package/python3.4.2/lib/python3.4/quopri.py +242 -0
  888. package/python3.4.2/lib/python3.4/random.py +742 -0
  889. package/python3.4.2/lib/python3.4/re.py +368 -0
  890. package/python3.4.2/lib/python3.4/reprlib.py +157 -0
  891. package/python3.4.2/lib/python3.4/rlcompleter.py +165 -0
  892. package/python3.4.2/lib/python3.4/runpy.py +271 -0
  893. package/python3.4.2/lib/python3.4/sched.py +167 -0
  894. package/python3.4.2/lib/python3.4/selectors.py +525 -0
  895. package/python3.4.2/lib/python3.4/shelve.py +239 -0
  896. package/python3.4.2/lib/python3.4/shlex.py +304 -0
  897. package/python3.4.2/lib/python3.4/shutil.py +1127 -0
  898. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/EGG-INFO/PKG-INFO +55 -0
  899. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/EGG-INFO/SOURCES.txt +126 -0
  900. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/EGG-INFO/dependency_links.txt +1 -0
  901. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/EGG-INFO/entry_points.txt +4 -0
  902. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/EGG-INFO/not-zip-safe +1 -0
  903. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/EGG-INFO/requires.txt +4 -0
  904. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/EGG-INFO/top_level.txt +1 -0
  905. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/__init__.py +69 -0
  906. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/_compat.py +150 -0
  907. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/_stringdefs.py +132 -0
  908. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/bccache.py +344 -0
  909. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/compiler.py +1640 -0
  910. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/constants.py +32 -0
  911. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/debug.py +337 -0
  912. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/defaults.py +43 -0
  913. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/environment.py +1191 -0
  914. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/exceptions.py +146 -0
  915. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/ext.py +636 -0
  916. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/filters.py +987 -0
  917. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/lexer.py +733 -0
  918. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/loaders.py +471 -0
  919. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/meta.py +103 -0
  920. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/nodes.py +914 -0
  921. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/optimizer.py +68 -0
  922. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/parser.py +895 -0
  923. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/runtime.py +581 -0
  924. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/sandbox.py +368 -0
  925. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/tests.py +149 -0
  926. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/__init__.py +156 -0
  927. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/api.py +261 -0
  928. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/bytecode_cache.py +37 -0
  929. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/core_tags.py +305 -0
  930. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/debug.py +58 -0
  931. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/doctests.py +29 -0
  932. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/ext.py +459 -0
  933. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/filters.py +515 -0
  934. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/imports.py +141 -0
  935. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/inheritance.py +250 -0
  936. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/lexnparse.py +593 -0
  937. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/loader.py +226 -0
  938. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/regression.py +279 -0
  939. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/res/__init__.py +0 -0
  940. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/res/templates/broken.html +3 -0
  941. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/res/templates/foo/test.html +1 -0
  942. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/res/templates/syntaxerror.html +4 -0
  943. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/res/templates/test.html +1 -0
  944. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/security.py +166 -0
  945. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/tests.py +93 -0
  946. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/utils.py +82 -0
  947. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/utils.py +520 -0
  948. package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/visitor.py +87 -0
  949. package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/EGG-INFO/PKG-INFO +119 -0
  950. package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/EGG-INFO/SOURCES.txt +17 -0
  951. package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/EGG-INFO/dependency_links.txt +1 -0
  952. package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/EGG-INFO/not-zip-safe +1 -0
  953. package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/EGG-INFO/top_level.txt +1 -0
  954. package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/markupsafe/__init__.py +298 -0
  955. package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/markupsafe/_compat.py +26 -0
  956. package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/markupsafe/_constants.py +267 -0
  957. package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/markupsafe/_native.py +46 -0
  958. package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/markupsafe/_speedups.c +239 -0
  959. package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/markupsafe/tests.py +179 -0
  960. package/python3.4.2/lib/python3.4/site-packages/README +2 -0
  961. package/python3.4.2/lib/python3.4/site-packages/_markerlib/__init__.py +16 -0
  962. package/python3.4.2/lib/python3.4/site-packages/_markerlib/markers.py +119 -0
  963. package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/EGG-INFO/PKG-INFO +68 -0
  964. package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/EGG-INFO/SOURCES.txt +23 -0
  965. package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/EGG-INFO/dependency_links.txt +1 -0
  966. package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/EGG-INFO/entry_points.txt +3 -0
  967. package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/EGG-INFO/not-zip-safe +1 -0
  968. package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/EGG-INFO/requires.txt +1 -0
  969. package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/EGG-INFO/scripts/android-debian-builder +6 -0
  970. package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/EGG-INFO/top_level.txt +1 -0
  971. package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/__init__.py +0 -0
  972. package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/__main__.py +26 -0
  973. package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/build.py +63 -0
  974. package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/config.py +82 -0
  975. package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/data/deb.sh +106 -0
  976. package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/data/default-config +42 -0
  977. package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/data/first-time-setup.sh +94 -0
  978. package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/data/init.sh +27 -0
  979. package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/examples/jessie-armhf.cfg +26 -0
  980. package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/run_tests.py +38 -0
  981. package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/script.py +110 -0
  982. package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/util.py +177 -0
  983. package/python3.4.2/lib/python3.4/site-packages/easy-install.pth +4 -0
  984. package/python3.4.2/lib/python3.4/site-packages/easy_install.py +5 -0
  985. package/python3.4.2/lib/python3.4/site-packages/pip/__init__.py +277 -0
  986. package/python3.4.2/lib/python3.4/site-packages/pip/__main__.py +7 -0
  987. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/__init__.py +8 -0
  988. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/_markerlib/__init__.py +16 -0
  989. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/_markerlib/markers.py +119 -0
  990. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/__init__.py +7 -0
  991. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/ansi.py +50 -0
  992. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/ansitowin32.py +190 -0
  993. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/initialise.py +56 -0
  994. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/win32.py +137 -0
  995. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/winterm.py +120 -0
  996. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/__init__.py +23 -0
  997. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/__init__.py +6 -0
  998. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/misc.py +41 -0
  999. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/shutil.py +761 -0
  1000. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/sysconfig.cfg +84 -0
  1001. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/sysconfig.py +788 -0
  1002. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/tarfile.py +2607 -0
  1003. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/compat.py +1064 -0
  1004. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/database.py +1301 -0
  1005. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/index.py +488 -0
  1006. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/locators.py +1194 -0
  1007. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/manifest.py +364 -0
  1008. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/markers.py +190 -0
  1009. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/metadata.py +1026 -0
  1010. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/resources.py +317 -0
  1011. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/scripts.py +323 -0
  1012. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/t32.exe +0 -0
  1013. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/t64.exe +0 -0
  1014. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/util.py +1575 -0
  1015. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/version.py +721 -0
  1016. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/w32.exe +0 -0
  1017. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/w64.exe +0 -0
  1018. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/wheel.py +958 -0
  1019. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/__init__.py +23 -0
  1020. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/constants.py +3104 -0
  1021. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/__init__.py +0 -0
  1022. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/_base.py +12 -0
  1023. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/alphabeticalattributes.py +20 -0
  1024. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/inject_meta_charset.py +65 -0
  1025. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/lint.py +93 -0
  1026. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/optionaltags.py +205 -0
  1027. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/sanitizer.py +12 -0
  1028. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/whitespace.py +38 -0
  1029. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/html5parser.py +2713 -0
  1030. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/ihatexml.py +285 -0
  1031. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/inputstream.py +881 -0
  1032. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/sanitizer.py +271 -0
  1033. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/serializer/__init__.py +16 -0
  1034. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/serializer/htmlserializer.py +320 -0
  1035. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/tokenizer.py +1731 -0
  1036. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treeadapters/__init__.py +0 -0
  1037. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treeadapters/sax.py +44 -0
  1038. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/__init__.py +76 -0
  1039. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/_base.py +377 -0
  1040. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/dom.py +227 -0
  1041. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/etree.py +337 -0
  1042. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/etree_lxml.py +369 -0
  1043. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/__init__.py +57 -0
  1044. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/_base.py +200 -0
  1045. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/dom.py +46 -0
  1046. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/etree.py +138 -0
  1047. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/genshistream.py +69 -0
  1048. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/lxmletree.py +208 -0
  1049. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/pulldom.py +63 -0
  1050. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/trie/__init__.py +12 -0
  1051. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/trie/_base.py +37 -0
  1052. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/trie/datrie.py +44 -0
  1053. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/trie/py.py +67 -0
  1054. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/utils.py +82 -0
  1055. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/pkg_resources.py +2762 -0
  1056. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/re-vendor.py +34 -0
  1057. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/__init__.py +77 -0
  1058. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/adapters.py +388 -0
  1059. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/api.py +120 -0
  1060. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/auth.py +193 -0
  1061. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/cacert.pem +5026 -0
  1062. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/certs.py +24 -0
  1063. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/compat.py +115 -0
  1064. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/cookies.py +454 -0
  1065. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/exceptions.py +75 -0
  1066. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/hooks.py +45 -0
  1067. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/models.py +803 -0
  1068. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/__init__.py +3 -0
  1069. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/__init__.py +32 -0
  1070. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/big5freq.py +925 -0
  1071. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/big5prober.py +42 -0
  1072. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/chardetect.py +46 -0
  1073. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/chardistribution.py +231 -0
  1074. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/charsetgroupprober.py +106 -0
  1075. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/charsetprober.py +62 -0
  1076. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/codingstatemachine.py +61 -0
  1077. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/compat.py +34 -0
  1078. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/constants.py +39 -0
  1079. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/cp949prober.py +44 -0
  1080. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/escprober.py +86 -0
  1081. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/escsm.py +242 -0
  1082. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/eucjpprober.py +90 -0
  1083. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/euckrfreq.py +596 -0
  1084. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/euckrprober.py +42 -0
  1085. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/euctwfreq.py +428 -0
  1086. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/euctwprober.py +41 -0
  1087. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/gb2312freq.py +472 -0
  1088. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/gb2312prober.py +41 -0
  1089. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/hebrewprober.py +283 -0
  1090. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/jisfreq.py +569 -0
  1091. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/jpcntx.py +219 -0
  1092. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/langbulgarianmodel.py +229 -0
  1093. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/langcyrillicmodel.py +329 -0
  1094. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/langgreekmodel.py +225 -0
  1095. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/langhebrewmodel.py +201 -0
  1096. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/langhungarianmodel.py +225 -0
  1097. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/langthaimodel.py +200 -0
  1098. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/latin1prober.py +139 -0
  1099. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/mbcharsetprober.py +86 -0
  1100. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/mbcsgroupprober.py +54 -0
  1101. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/mbcssm.py +575 -0
  1102. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/sbcharsetprober.py +120 -0
  1103. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/sbcsgroupprober.py +69 -0
  1104. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/sjisprober.py +91 -0
  1105. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/universaldetector.py +170 -0
  1106. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/utf8prober.py +76 -0
  1107. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/__init__.py +58 -0
  1108. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/_collections.py +205 -0
  1109. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/connection.py +204 -0
  1110. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py +710 -0
  1111. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/contrib/__init__.py +0 -0
  1112. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/contrib/ntlmpool.py +120 -0
  1113. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.py +422 -0
  1114. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/exceptions.py +126 -0
  1115. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/fields.py +177 -0
  1116. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/filepost.py +100 -0
  1117. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/packages/__init__.py +4 -0
  1118. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.py +260 -0
  1119. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/packages/six.py +385 -0
  1120. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/__init__.py +13 -0
  1121. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.py +105 -0
  1122. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/poolmanager.py +258 -0
  1123. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/request.py +141 -0
  1124. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/response.py +308 -0
  1125. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/__init__.py +27 -0
  1126. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/connection.py +45 -0
  1127. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/request.py +68 -0
  1128. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/response.py +13 -0
  1129. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py +133 -0
  1130. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/timeout.py +234 -0
  1131. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/url.py +162 -0
  1132. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/sessions.py +637 -0
  1133. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/status_codes.py +88 -0
  1134. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/structures.py +127 -0
  1135. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/utils.py +673 -0
  1136. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/six.py +646 -0
  1137. package/python3.4.2/lib/python3.4/site-packages/pip/backwardcompat/__init__.py +138 -0
  1138. package/python3.4.2/lib/python3.4/site-packages/pip/basecommand.py +201 -0
  1139. package/python3.4.2/lib/python3.4/site-packages/pip/baseparser.py +224 -0
  1140. package/python3.4.2/lib/python3.4/site-packages/pip/cmdoptions.py +371 -0
  1141. package/python3.4.2/lib/python3.4/site-packages/pip/commands/__init__.py +88 -0
  1142. package/python3.4.2/lib/python3.4/site-packages/pip/commands/bundle.py +42 -0
  1143. package/python3.4.2/lib/python3.4/site-packages/pip/commands/completion.py +59 -0
  1144. package/python3.4.2/lib/python3.4/site-packages/pip/commands/freeze.py +114 -0
  1145. package/python3.4.2/lib/python3.4/site-packages/pip/commands/help.py +33 -0
  1146. package/python3.4.2/lib/python3.4/site-packages/pip/commands/install.py +314 -0
  1147. package/python3.4.2/lib/python3.4/site-packages/pip/commands/list.py +162 -0
  1148. package/python3.4.2/lib/python3.4/site-packages/pip/commands/search.py +132 -0
  1149. package/python3.4.2/lib/python3.4/site-packages/pip/commands/show.py +80 -0
  1150. package/python3.4.2/lib/python3.4/site-packages/pip/commands/uninstall.py +59 -0
  1151. package/python3.4.2/lib/python3.4/site-packages/pip/commands/unzip.py +7 -0
  1152. package/python3.4.2/lib/python3.4/site-packages/pip/commands/wheel.py +195 -0
  1153. package/python3.4.2/lib/python3.4/site-packages/pip/commands/zip.py +351 -0
  1154. package/python3.4.2/lib/python3.4/site-packages/pip/download.py +644 -0
  1155. package/python3.4.2/lib/python3.4/site-packages/pip/exceptions.py +46 -0
  1156. package/python3.4.2/lib/python3.4/site-packages/pip/index.py +990 -0
  1157. package/python3.4.2/lib/python3.4/site-packages/pip/locations.py +172 -0
  1158. package/python3.4.2/lib/python3.4/site-packages/pip/log.py +276 -0
  1159. package/python3.4.2/lib/python3.4/site-packages/pip/pep425tags.py +102 -0
  1160. package/python3.4.2/lib/python3.4/site-packages/pip/req.py +1931 -0
  1161. package/python3.4.2/lib/python3.4/site-packages/pip/runner.py +18 -0
  1162. package/python3.4.2/lib/python3.4/site-packages/pip/status_codes.py +6 -0
  1163. package/python3.4.2/lib/python3.4/site-packages/pip/util.py +720 -0
  1164. package/python3.4.2/lib/python3.4/site-packages/pip/vcs/__init__.py +251 -0
  1165. package/python3.4.2/lib/python3.4/site-packages/pip/vcs/bazaar.py +131 -0
  1166. package/python3.4.2/lib/python3.4/site-packages/pip/vcs/git.py +194 -0
  1167. package/python3.4.2/lib/python3.4/site-packages/pip/vcs/mercurial.py +151 -0
  1168. package/python3.4.2/lib/python3.4/site-packages/pip/vcs/subversion.py +273 -0
  1169. package/python3.4.2/lib/python3.4/site-packages/pip/wheel.py +560 -0
  1170. package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/DESCRIPTION.rst +71 -0
  1171. package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/METADATA +98 -0
  1172. package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/RECORD +373 -0
  1173. package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/WHEEL +6 -0
  1174. package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/entry_points.txt +5 -0
  1175. package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/metadata.json +1 -0
  1176. package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/top_level.txt +1 -0
  1177. package/python3.4.2/lib/python3.4/site-packages/pkg_resources.py +2719 -0
  1178. package/python3.4.2/lib/python3.4/site-packages/setuptools/__init__.py +98 -0
  1179. package/python3.4.2/lib/python3.4/site-packages/setuptools/archive_util.py +210 -0
  1180. package/python3.4.2/lib/python3.4/site-packages/setuptools/cli-32.exe +0 -0
  1181. package/python3.4.2/lib/python3.4/site-packages/setuptools/cli-64.exe +0 -0
  1182. package/python3.4.2/lib/python3.4/site-packages/setuptools/cli-arm-32.exe +0 -0
  1183. package/python3.4.2/lib/python3.4/site-packages/setuptools/cli.exe +0 -0
  1184. package/python3.4.2/lib/python3.4/site-packages/setuptools/command/__init__.py +17 -0
  1185. package/python3.4.2/lib/python3.4/site-packages/setuptools/command/alias.py +82 -0
  1186. package/python3.4.2/lib/python3.4/site-packages/setuptools/command/bdist_egg.py +553 -0
  1187. package/python3.4.2/lib/python3.4/site-packages/setuptools/command/bdist_rpm.py +82 -0
  1188. package/python3.4.2/lib/python3.4/site-packages/setuptools/command/bdist_wininst.py +82 -0
  1189. package/python3.4.2/lib/python3.4/site-packages/setuptools/command/build_ext.py +298 -0
  1190. package/python3.4.2/lib/python3.4/site-packages/setuptools/command/build_py.py +221 -0
  1191. package/python3.4.2/lib/python3.4/site-packages/setuptools/command/develop.py +167 -0
  1192. package/python3.4.2/lib/python3.4/site-packages/setuptools/command/easy_install.py +1915 -0
  1193. package/python3.4.2/lib/python3.4/site-packages/setuptools/command/egg_info.py +392 -0
  1194. package/python3.4.2/lib/python3.4/site-packages/setuptools/command/install.py +103 -0
  1195. package/python3.4.2/lib/python3.4/site-packages/setuptools/command/install_egg_info.py +125 -0
  1196. package/python3.4.2/lib/python3.4/site-packages/setuptools/command/install_lib.py +82 -0
  1197. package/python3.4.2/lib/python3.4/site-packages/setuptools/command/install_scripts.py +54 -0
  1198. package/python3.4.2/lib/python3.4/site-packages/setuptools/command/launcher manifest.xml +15 -0
  1199. package/python3.4.2/lib/python3.4/site-packages/setuptools/command/register.py +10 -0
  1200. package/python3.4.2/lib/python3.4/site-packages/setuptools/command/rotate.py +83 -0
  1201. package/python3.4.2/lib/python3.4/site-packages/setuptools/command/saveopts.py +24 -0
  1202. package/python3.4.2/lib/python3.4/site-packages/setuptools/command/sdist.py +238 -0
  1203. package/python3.4.2/lib/python3.4/site-packages/setuptools/command/setopt.py +164 -0
  1204. package/python3.4.2/lib/python3.4/site-packages/setuptools/command/test.py +198 -0
  1205. package/python3.4.2/lib/python3.4/site-packages/setuptools/command/upload_docs.py +193 -0
  1206. package/python3.4.2/lib/python3.4/site-packages/setuptools/compat.py +83 -0
  1207. package/python3.4.2/lib/python3.4/site-packages/setuptools/depends.py +246 -0
  1208. package/python3.4.2/lib/python3.4/site-packages/setuptools/dist.py +796 -0
  1209. package/python3.4.2/lib/python3.4/site-packages/setuptools/extension.py +46 -0
  1210. package/python3.4.2/lib/python3.4/site-packages/setuptools/gui-32.exe +0 -0
  1211. package/python3.4.2/lib/python3.4/site-packages/setuptools/gui-64.exe +0 -0
  1212. package/python3.4.2/lib/python3.4/site-packages/setuptools/gui-arm-32.exe +0 -0
  1213. package/python3.4.2/lib/python3.4/site-packages/setuptools/gui.exe +0 -0
  1214. package/python3.4.2/lib/python3.4/site-packages/setuptools/lib2to3_ex.py +58 -0
  1215. package/python3.4.2/lib/python3.4/site-packages/setuptools/package_index.py +1057 -0
  1216. package/python3.4.2/lib/python3.4/site-packages/setuptools/py26compat.py +19 -0
  1217. package/python3.4.2/lib/python3.4/site-packages/setuptools/py27compat.py +15 -0
  1218. package/python3.4.2/lib/python3.4/site-packages/setuptools/py31compat.py +11 -0
  1219. package/python3.4.2/lib/python3.4/site-packages/setuptools/sandbox.py +322 -0
  1220. package/python3.4.2/lib/python3.4/site-packages/setuptools/script template (dev).py +11 -0
  1221. package/python3.4.2/lib/python3.4/site-packages/setuptools/script template.py +4 -0
  1222. package/python3.4.2/lib/python3.4/site-packages/setuptools/site-patch.py +83 -0
  1223. package/python3.4.2/lib/python3.4/site-packages/setuptools/ssl_support.py +234 -0
  1224. package/python3.4.2/lib/python3.4/site-packages/setuptools/svn_utils.py +564 -0
  1225. package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/__init__.py +352 -0
  1226. package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/doctest.py +2683 -0
  1227. package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/environment.py +165 -0
  1228. package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/py26compat.py +14 -0
  1229. package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/script-with-bom.py +3 -0
  1230. package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/server.py +82 -0
  1231. package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_bdist_egg.py +69 -0
  1232. package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_build_ext.py +20 -0
  1233. package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_develop.py +122 -0
  1234. package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_dist_info.py +83 -0
  1235. package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_easy_install.py +394 -0
  1236. package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_egg_info.py +173 -0
  1237. package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_markerlib.py +68 -0
  1238. package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_packageindex.py +203 -0
  1239. package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_resources.py +620 -0
  1240. package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_sandbox.py +79 -0
  1241. package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_sdist.py +535 -0
  1242. package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_svn.py +246 -0
  1243. package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_test.py +124 -0
  1244. package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_upload_docs.py +72 -0
  1245. package/python3.4.2/lib/python3.4/site-packages/setuptools/version.py +1 -0
  1246. package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/DESCRIPTION.rst +1742 -0
  1247. package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/METADATA +1772 -0
  1248. package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/RECORD +149 -0
  1249. package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/WHEEL +6 -0
  1250. package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/dependency_links.txt +2 -0
  1251. package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/entry_points.txt +62 -0
  1252. package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/entry_points.txt.orig +62 -0
  1253. package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/pydist.json +1 -0
  1254. package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/requires.txt.orig +7 -0
  1255. package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/top_level.txt +4 -0
  1256. package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/zip-safe +1 -0
  1257. package/python3.4.2/lib/python3.4/site.py +616 -0
  1258. package/python3.4.2/lib/python3.4/smtpd.py +861 -0
  1259. package/python3.4.2/lib/python3.4/smtplib.py +999 -0
  1260. package/python3.4.2/lib/python3.4/sndhdr.py +240 -0
  1261. package/python3.4.2/lib/python3.4/socket.py +535 -0
  1262. package/python3.4.2/lib/python3.4/socketserver.py +748 -0
  1263. package/python3.4.2/lib/python3.4/sqlite3/__init__.py +23 -0
  1264. package/python3.4.2/lib/python3.4/sqlite3/dbapi2.py +89 -0
  1265. package/python3.4.2/lib/python3.4/sqlite3/dump.py +70 -0
  1266. package/python3.4.2/lib/python3.4/sqlite3/test/__init__.py +0 -0
  1267. package/python3.4.2/lib/python3.4/sqlite3/test/dbapi.py +911 -0
  1268. package/python3.4.2/lib/python3.4/sqlite3/test/dump.py +81 -0
  1269. package/python3.4.2/lib/python3.4/sqlite3/test/factory.py +253 -0
  1270. package/python3.4.2/lib/python3.4/sqlite3/test/hooks.py +258 -0
  1271. package/python3.4.2/lib/python3.4/sqlite3/test/regression.py +358 -0
  1272. package/python3.4.2/lib/python3.4/sqlite3/test/transactions.py +204 -0
  1273. package/python3.4.2/lib/python3.4/sqlite3/test/types.py +403 -0
  1274. package/python3.4.2/lib/python3.4/sqlite3/test/userfunctions.py +468 -0
  1275. package/python3.4.2/lib/python3.4/sre_compile.py +489 -0
  1276. package/python3.4.2/lib/python3.4/sre_constants.py +261 -0
  1277. package/python3.4.2/lib/python3.4/sre_parse.py +859 -0
  1278. package/python3.4.2/lib/python3.4/ssl.py +945 -0
  1279. package/python3.4.2/lib/python3.4/stat.py +155 -0
  1280. package/python3.4.2/lib/python3.4/statistics.py +595 -0
  1281. package/python3.4.2/lib/python3.4/string.py +282 -0
  1282. package/python3.4.2/lib/python3.4/stringprep.py +272 -0
  1283. package/python3.4.2/lib/python3.4/struct.py +15 -0
  1284. package/python3.4.2/lib/python3.4/subprocess.py +1690 -0
  1285. package/python3.4.2/lib/python3.4/sunau.py +525 -0
  1286. package/python3.4.2/lib/python3.4/symbol.py +111 -0
  1287. package/python3.4.2/lib/python3.4/symtable.py +240 -0
  1288. package/python3.4.2/lib/python3.4/sysconfig.py +709 -0
  1289. package/python3.4.2/lib/python3.4/tabnanny.py +332 -0
  1290. package/python3.4.2/lib/python3.4/tarfile.py +2519 -0
  1291. package/python3.4.2/lib/python3.4/telnetlib.py +672 -0
  1292. package/python3.4.2/lib/python3.4/tempfile.py +698 -0
  1293. package/python3.4.2/lib/python3.4/test/185test.db +0 -0
  1294. package/python3.4.2/lib/python3.4/test/Sine-1000Hz-300ms.aif +0 -0
  1295. package/python3.4.2/lib/python3.4/test/__init__.py +1 -0
  1296. package/python3.4.2/lib/python3.4/test/__main__.py +3 -0
  1297. package/python3.4.2/lib/python3.4/test/_test_multiprocessing.py +3841 -0
  1298. package/python3.4.2/lib/python3.4/test/audiodata/pluck-alaw.aifc +0 -0
  1299. package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm16.aiff +0 -0
  1300. package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm16.au +0 -0
  1301. package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm16.wav +0 -0
  1302. package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm24.aiff +0 -0
  1303. package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm24.au +0 -0
  1304. package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm24.wav +0 -0
  1305. package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm32.aiff +0 -0
  1306. package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm32.au +0 -0
  1307. package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm32.wav +0 -0
  1308. package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm8.aiff +0 -0
  1309. package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm8.au +0 -0
  1310. package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm8.wav +0 -0
  1311. package/python3.4.2/lib/python3.4/test/audiodata/pluck-ulaw.aifc +0 -0
  1312. package/python3.4.2/lib/python3.4/test/audiodata/pluck-ulaw.au +0 -0
  1313. package/python3.4.2/lib/python3.4/test/audiotest.au +0 -0
  1314. package/python3.4.2/lib/python3.4/test/audiotests.py +329 -0
  1315. package/python3.4.2/lib/python3.4/test/autotest.py +6 -0
  1316. package/python3.4.2/lib/python3.4/test/bad_coding.py +1 -0
  1317. package/python3.4.2/lib/python3.4/test/bad_coding2.py +2 -0
  1318. package/python3.4.2/lib/python3.4/test/badcert.pem +36 -0
  1319. package/python3.4.2/lib/python3.4/test/badkey.pem +40 -0
  1320. package/python3.4.2/lib/python3.4/test/badsyntax_3131.py +2 -0
  1321. package/python3.4.2/lib/python3.4/test/badsyntax_future10.py +3 -0
  1322. package/python3.4.2/lib/python3.4/test/badsyntax_future3.py +10 -0
  1323. package/python3.4.2/lib/python3.4/test/badsyntax_future4.py +10 -0
  1324. package/python3.4.2/lib/python3.4/test/badsyntax_future5.py +12 -0
  1325. package/python3.4.2/lib/python3.4/test/badsyntax_future6.py +10 -0
  1326. package/python3.4.2/lib/python3.4/test/badsyntax_future7.py +11 -0
  1327. package/python3.4.2/lib/python3.4/test/badsyntax_future8.py +10 -0
  1328. package/python3.4.2/lib/python3.4/test/badsyntax_future9.py +10 -0
  1329. package/python3.4.2/lib/python3.4/test/badsyntax_pep3120.py +1 -0
  1330. package/python3.4.2/lib/python3.4/test/buffer_tests.py +218 -0
  1331. package/python3.4.2/lib/python3.4/test/bytecode_helper.py +41 -0
  1332. package/python3.4.2/lib/python3.4/test/capath/4e1295a3.0 +14 -0
  1333. package/python3.4.2/lib/python3.4/test/capath/5ed36f99.0 +41 -0
  1334. package/python3.4.2/lib/python3.4/test/capath/6e88d7b8.0 +14 -0
  1335. package/python3.4.2/lib/python3.4/test/capath/99d0fa06.0 +41 -0
  1336. package/python3.4.2/lib/python3.4/test/cfgparser.1 +2 -0
  1337. package/python3.4.2/lib/python3.4/test/cfgparser.2 +537 -0
  1338. package/python3.4.2/lib/python3.4/test/cfgparser.3 +69 -0
  1339. package/python3.4.2/lib/python3.4/test/check_soundcard.vbs +13 -0
  1340. package/python3.4.2/lib/python3.4/test/cjkencodings/big5-utf8.txt +9 -0
  1341. package/python3.4.2/lib/python3.4/test/cjkencodings/big5.txt +9 -0
  1342. package/python3.4.2/lib/python3.4/test/cjkencodings/big5hkscs-utf8.txt +2 -0
  1343. package/python3.4.2/lib/python3.4/test/cjkencodings/big5hkscs.txt +2 -0
  1344. package/python3.4.2/lib/python3.4/test/cjkencodings/cp949-utf8.txt +9 -0
  1345. package/python3.4.2/lib/python3.4/test/cjkencodings/cp949.txt +9 -0
  1346. package/python3.4.2/lib/python3.4/test/cjkencodings/euc_jisx0213-utf8.txt +8 -0
  1347. package/python3.4.2/lib/python3.4/test/cjkencodings/euc_jisx0213.txt +8 -0
  1348. package/python3.4.2/lib/python3.4/test/cjkencodings/euc_jp-utf8.txt +7 -0
  1349. package/python3.4.2/lib/python3.4/test/cjkencodings/euc_jp.txt +7 -0
  1350. package/python3.4.2/lib/python3.4/test/cjkencodings/euc_kr-utf8.txt +7 -0
  1351. package/python3.4.2/lib/python3.4/test/cjkencodings/euc_kr.txt +7 -0
  1352. package/python3.4.2/lib/python3.4/test/cjkencodings/gb18030-utf8.txt +15 -0
  1353. package/python3.4.2/lib/python3.4/test/cjkencodings/gb18030.txt +15 -0
  1354. package/python3.4.2/lib/python3.4/test/cjkencodings/gb2312-utf8.txt +6 -0
  1355. package/python3.4.2/lib/python3.4/test/cjkencodings/gb2312.txt +6 -0
  1356. package/python3.4.2/lib/python3.4/test/cjkencodings/gbk-utf8.txt +14 -0
  1357. package/python3.4.2/lib/python3.4/test/cjkencodings/gbk.txt +14 -0
  1358. package/python3.4.2/lib/python3.4/test/cjkencodings/hz-utf8.txt +2 -0
  1359. package/python3.4.2/lib/python3.4/test/cjkencodings/hz.txt +2 -0
  1360. package/python3.4.2/lib/python3.4/test/cjkencodings/iso2022_jp-utf8.txt +7 -0
  1361. package/python3.4.2/lib/python3.4/test/cjkencodings/iso2022_jp.txt +7 -0
  1362. package/python3.4.2/lib/python3.4/test/cjkencodings/iso2022_kr-utf8.txt +7 -0
  1363. package/python3.4.2/lib/python3.4/test/cjkencodings/iso2022_kr.txt +7 -0
  1364. package/python3.4.2/lib/python3.4/test/cjkencodings/johab-utf8.txt +9 -0
  1365. package/python3.4.2/lib/python3.4/test/cjkencodings/johab.txt +9 -0
  1366. package/python3.4.2/lib/python3.4/test/cjkencodings/shift_jis-utf8.txt +7 -0
  1367. package/python3.4.2/lib/python3.4/test/cjkencodings/shift_jis.txt +7 -0
  1368. package/python3.4.2/lib/python3.4/test/cjkencodings/shift_jisx0213-utf8.txt +8 -0
  1369. package/python3.4.2/lib/python3.4/test/cjkencodings/shift_jisx0213.txt +8 -0
  1370. package/python3.4.2/lib/python3.4/test/cmath_testcases.txt +2370 -0
  1371. package/python3.4.2/lib/python3.4/test/coding20731.py +4 -0
  1372. package/python3.4.2/lib/python3.4/test/curses_tests.py +46 -0
  1373. package/python3.4.2/lib/python3.4/test/data/README +2 -0
  1374. package/python3.4.2/lib/python3.4/test/datetimetester.py +3786 -0
  1375. package/python3.4.2/lib/python3.4/test/decimaltestdata/abs.decTest +161 -0
  1376. package/python3.4.2/lib/python3.4/test/decimaltestdata/add.decTest +2716 -0
  1377. package/python3.4.2/lib/python3.4/test/decimaltestdata/and.decTest +338 -0
  1378. package/python3.4.2/lib/python3.4/test/decimaltestdata/base.decTest +1411 -0
  1379. package/python3.4.2/lib/python3.4/test/decimaltestdata/clamp.decTest +211 -0
  1380. package/python3.4.2/lib/python3.4/test/decimaltestdata/class.decTest +131 -0
  1381. package/python3.4.2/lib/python3.4/test/decimaltestdata/compare.decTest +758 -0
  1382. package/python3.4.2/lib/python3.4/test/decimaltestdata/comparetotal.decTest +798 -0
  1383. package/python3.4.2/lib/python3.4/test/decimaltestdata/comparetotmag.decTest +790 -0
  1384. package/python3.4.2/lib/python3.4/test/decimaltestdata/copy.decTest +86 -0
  1385. package/python3.4.2/lib/python3.4/test/decimaltestdata/copyabs.decTest +86 -0
  1386. package/python3.4.2/lib/python3.4/test/decimaltestdata/copynegate.decTest +86 -0
  1387. package/python3.4.2/lib/python3.4/test/decimaltestdata/copysign.decTest +177 -0
  1388. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddAbs.decTest +126 -0
  1389. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddAdd.decTest +1328 -0
  1390. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddAnd.decTest +347 -0
  1391. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddBase.decTest +1104 -0
  1392. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCanonical.decTest +357 -0
  1393. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddClass.decTest +76 -0
  1394. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCompare.decTest +744 -0
  1395. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCompareSig.decTest +647 -0
  1396. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCompareTotal.decTest +706 -0
  1397. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCompareTotalMag.decTest +706 -0
  1398. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCopy.decTest +88 -0
  1399. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCopyAbs.decTest +88 -0
  1400. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCopyNegate.decTest +88 -0
  1401. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCopySign.decTest +175 -0
  1402. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddDivide.decTest +863 -0
  1403. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddDivideInt.decTest +449 -0
  1404. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddEncode.decTest +495 -0
  1405. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddFMA.decTest +1698 -0
  1406. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddInvert.decTest +202 -0
  1407. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddLogB.decTest +159 -0
  1408. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddMax.decTest +322 -0
  1409. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddMaxMag.decTest +304 -0
  1410. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddMin.decTest +309 -0
  1411. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddMinMag.decTest +293 -0
  1412. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddMinus.decTest +88 -0
  1413. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddMultiply.decTest +553 -0
  1414. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddNextMinus.decTest +126 -0
  1415. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddNextPlus.decTest +124 -0
  1416. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddNextToward.decTest +374 -0
  1417. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddOr.decTest +292 -0
  1418. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddPlus.decTest +88 -0
  1419. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddQuantize.decTest +833 -0
  1420. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddReduce.decTest +182 -0
  1421. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddRemainder.decTest +600 -0
  1422. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddRemainderNear.decTest +629 -0
  1423. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddRotate.decTest +262 -0
  1424. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddSameQuantum.decTest +389 -0
  1425. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddScaleB.decTest +243 -0
  1426. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddShift.decTest +262 -0
  1427. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddSubtract.decTest +629 -0
  1428. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddToIntegral.decTest +257 -0
  1429. package/python3.4.2/lib/python3.4/test/decimaltestdata/ddXor.decTest +337 -0
  1430. package/python3.4.2/lib/python3.4/test/decimaltestdata/decDouble.decTest +65 -0
  1431. package/python3.4.2/lib/python3.4/test/decimaltestdata/decQuad.decTest +65 -0
  1432. package/python3.4.2/lib/python3.4/test/decimaltestdata/decSingle.decTest +25 -0
  1433. package/python3.4.2/lib/python3.4/test/decimaltestdata/divide.decTest +854 -0
  1434. package/python3.4.2/lib/python3.4/test/decimaltestdata/divideint.decTest +486 -0
  1435. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqAbs.decTest +126 -0
  1436. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqAdd.decTest +1215 -0
  1437. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqAnd.decTest +420 -0
  1438. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqBase.decTest +1081 -0
  1439. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCanonical.decTest +372 -0
  1440. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqClass.decTest +77 -0
  1441. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCompare.decTest +753 -0
  1442. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCompareSig.decTest +647 -0
  1443. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCompareTotal.decTest +706 -0
  1444. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCompareTotalMag.decTest +706 -0
  1445. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCopy.decTest +88 -0
  1446. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCopyAbs.decTest +88 -0
  1447. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCopyNegate.decTest +88 -0
  1448. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCopySign.decTest +175 -0
  1449. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqDivide.decTest +808 -0
  1450. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqDivideInt.decTest +453 -0
  1451. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqEncode.decTest +477 -0
  1452. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqFMA.decTest +1786 -0
  1453. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqInvert.decTest +245 -0
  1454. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqLogB.decTest +160 -0
  1455. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqMax.decTest +322 -0
  1456. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqMaxMag.decTest +304 -0
  1457. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqMin.decTest +309 -0
  1458. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqMinMag.decTest +293 -0
  1459. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqMinus.decTest +88 -0
  1460. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqMultiply.decTest +589 -0
  1461. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqNextMinus.decTest +126 -0
  1462. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqNextPlus.decTest +124 -0
  1463. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqNextToward.decTest +375 -0
  1464. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqOr.decTest +401 -0
  1465. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqPlus.decTest +88 -0
  1466. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqQuantize.decTest +836 -0
  1467. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqReduce.decTest +183 -0
  1468. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqRemainder.decTest +597 -0
  1469. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqRemainderNear.decTest +631 -0
  1470. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqRotate.decTest +298 -0
  1471. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqSameQuantum.decTest +389 -0
  1472. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqScaleB.decTest +260 -0
  1473. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqShift.decTest +298 -0
  1474. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqSubtract.decTest +635 -0
  1475. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqToIntegral.decTest +257 -0
  1476. package/python3.4.2/lib/python3.4/test/decimaltestdata/dqXor.decTest +410 -0
  1477. package/python3.4.2/lib/python3.4/test/decimaltestdata/dsBase.decTest +1062 -0
  1478. package/python3.4.2/lib/python3.4/test/decimaltestdata/dsEncode.decTest +372 -0
  1479. package/python3.4.2/lib/python3.4/test/decimaltestdata/exp.decTest +674 -0
  1480. package/python3.4.2/lib/python3.4/test/decimaltestdata/extra.decTest +2830 -0
  1481. package/python3.4.2/lib/python3.4/test/decimaltestdata/fma.decTest +3426 -0
  1482. package/python3.4.2/lib/python3.4/test/decimaltestdata/inexact.decTest +215 -0
  1483. package/python3.4.2/lib/python3.4/test/decimaltestdata/invert.decTest +176 -0
  1484. package/python3.4.2/lib/python3.4/test/decimaltestdata/ln.decTest +611 -0
  1485. package/python3.4.2/lib/python3.4/test/decimaltestdata/log10.decTest +551 -0
  1486. package/python3.4.2/lib/python3.4/test/decimaltestdata/logb.decTest +188 -0
  1487. package/python3.4.2/lib/python3.4/test/decimaltestdata/max.decTest +424 -0
  1488. package/python3.4.2/lib/python3.4/test/decimaltestdata/maxmag.decTest +404 -0
  1489. package/python3.4.2/lib/python3.4/test/decimaltestdata/min.decTest +407 -0
  1490. package/python3.4.2/lib/python3.4/test/decimaltestdata/minmag.decTest +390 -0
  1491. package/python3.4.2/lib/python3.4/test/decimaltestdata/minus.decTest +182 -0
  1492. package/python3.4.2/lib/python3.4/test/decimaltestdata/multiply.decTest +731 -0
  1493. package/python3.4.2/lib/python3.4/test/decimaltestdata/nextminus.decTest +148 -0
  1494. package/python3.4.2/lib/python3.4/test/decimaltestdata/nextplus.decTest +150 -0
  1495. package/python3.4.2/lib/python3.4/test/decimaltestdata/nexttoward.decTest +426 -0
  1496. package/python3.4.2/lib/python3.4/test/decimaltestdata/or.decTest +334 -0
  1497. package/python3.4.2/lib/python3.4/test/decimaltestdata/plus.decTest +195 -0
  1498. package/python3.4.2/lib/python3.4/test/decimaltestdata/power.decTest +1624 -0
  1499. package/python3.4.2/lib/python3.4/test/decimaltestdata/powersqrt.decTest +2970 -0
  1500. package/python3.4.2/lib/python3.4/test/decimaltestdata/quantize.decTest +948 -0
  1501. package/python3.4.2/lib/python3.4/test/decimaltestdata/randomBound32.decTest +2443 -0
  1502. package/python3.4.2/lib/python3.4/test/decimaltestdata/randoms.decTest +4030 -0
  1503. package/python3.4.2/lib/python3.4/test/decimaltestdata/reduce.decTest +234 -0
  1504. package/python3.4.2/lib/python3.4/test/decimaltestdata/remainder.decTest +640 -0
  1505. package/python3.4.2/lib/python3.4/test/decimaltestdata/remainderNear.decTest +572 -0
  1506. package/python3.4.2/lib/python3.4/test/decimaltestdata/rescale.decTest +764 -0
  1507. package/python3.4.2/lib/python3.4/test/decimaltestdata/rotate.decTest +247 -0
  1508. package/python3.4.2/lib/python3.4/test/decimaltestdata/rounding.decTest +1303 -0
  1509. package/python3.4.2/lib/python3.4/test/decimaltestdata/samequantum.decTest +389 -0
  1510. package/python3.4.2/lib/python3.4/test/decimaltestdata/scaleb.decTest +209 -0
  1511. package/python3.4.2/lib/python3.4/test/decimaltestdata/shift.decTest +250 -0
  1512. package/python3.4.2/lib/python3.4/test/decimaltestdata/squareroot.decTest +3834 -0
  1513. package/python3.4.2/lib/python3.4/test/decimaltestdata/subtract.decTest +873 -0
  1514. package/python3.4.2/lib/python3.4/test/decimaltestdata/testall.decTest +87 -0
  1515. package/python3.4.2/lib/python3.4/test/decimaltestdata/tointegral.decTest +241 -0
  1516. package/python3.4.2/lib/python3.4/test/decimaltestdata/tointegralx.decTest +255 -0
  1517. package/python3.4.2/lib/python3.4/test/decimaltestdata/xor.decTest +335 -0
  1518. package/python3.4.2/lib/python3.4/test/dh512.pem +9 -0
  1519. package/python3.4.2/lib/python3.4/test/dis_module.py +5 -0
  1520. package/python3.4.2/lib/python3.4/test/doctest_aliases.py +13 -0
  1521. package/python3.4.2/lib/python3.4/test/double_const.py +30 -0
  1522. package/python3.4.2/lib/python3.4/test/empty.vbs +1 -0
  1523. package/python3.4.2/lib/python3.4/test/encoded_modules/__init__.py +23 -0
  1524. package/python3.4.2/lib/python3.4/test/encoded_modules/module_iso_8859_1.py +5 -0
  1525. package/python3.4.2/lib/python3.4/test/encoded_modules/module_koi8_r.py +3 -0
  1526. package/python3.4.2/lib/python3.4/test/exception_hierarchy.txt +61 -0
  1527. package/python3.4.2/lib/python3.4/test/final_a.py +19 -0
  1528. package/python3.4.2/lib/python3.4/test/final_b.py +19 -0
  1529. package/python3.4.2/lib/python3.4/test/floating_points.txt +1028 -0
  1530. package/python3.4.2/lib/python3.4/test/fork_wait.py +77 -0
  1531. package/python3.4.2/lib/python3.4/test/formatfloat_testcases.txt +355 -0
  1532. package/python3.4.2/lib/python3.4/test/future_test1.py +11 -0
  1533. package/python3.4.2/lib/python3.4/test/future_test2.py +10 -0
  1534. package/python3.4.2/lib/python3.4/test/gdb_sample.py +12 -0
  1535. package/python3.4.2/lib/python3.4/test/https_svn_python_org_root.pem +41 -0
  1536. package/python3.4.2/lib/python3.4/test/ieee754.txt +185 -0
  1537. package/python3.4.2/lib/python3.4/test/imghdrdata/python.bmp +0 -0
  1538. package/python3.4.2/lib/python3.4/test/imghdrdata/python.gif +0 -0
  1539. package/python3.4.2/lib/python3.4/test/imghdrdata/python.jpg +0 -0
  1540. package/python3.4.2/lib/python3.4/test/imghdrdata/python.pbm +3 -0
  1541. package/python3.4.2/lib/python3.4/test/imghdrdata/python.pgm +0 -0
  1542. package/python3.4.2/lib/python3.4/test/imghdrdata/python.png +0 -0
  1543. package/python3.4.2/lib/python3.4/test/imghdrdata/python.ppm +0 -0
  1544. package/python3.4.2/lib/python3.4/test/imghdrdata/python.ras +0 -0
  1545. package/python3.4.2/lib/python3.4/test/imghdrdata/python.sgi +0 -0
  1546. package/python3.4.2/lib/python3.4/test/imghdrdata/python.tiff +0 -0
  1547. package/python3.4.2/lib/python3.4/test/imghdrdata/python.xbm +6 -0
  1548. package/python3.4.2/lib/python3.4/test/inspect_fodder.py +58 -0
  1549. package/python3.4.2/lib/python3.4/test/inspect_fodder2.py +111 -0
  1550. package/python3.4.2/lib/python3.4/test/keycert.passwd.pem +33 -0
  1551. package/python3.4.2/lib/python3.4/test/keycert.pem +31 -0
  1552. package/python3.4.2/lib/python3.4/test/keycert2.pem +31 -0
  1553. package/python3.4.2/lib/python3.4/test/keycert3.pem +73 -0
  1554. package/python3.4.2/lib/python3.4/test/keycert4.pem +73 -0
  1555. package/python3.4.2/lib/python3.4/test/list_tests.py +585 -0
  1556. package/python3.4.2/lib/python3.4/test/lock_tests.py +896 -0
  1557. package/python3.4.2/lib/python3.4/test/mailcap.txt +39 -0
  1558. package/python3.4.2/lib/python3.4/test/make_ssl_certs.py +176 -0
  1559. package/python3.4.2/lib/python3.4/test/mapping_tests.py +657 -0
  1560. package/python3.4.2/lib/python3.4/test/math_testcases.txt +633 -0
  1561. package/python3.4.2/lib/python3.4/test/memory_watchdog.py +28 -0
  1562. package/python3.4.2/lib/python3.4/test/mime.types +1445 -0
  1563. package/python3.4.2/lib/python3.4/test/mock_socket.py +156 -0
  1564. package/python3.4.2/lib/python3.4/test/mp_fork_bomb.py +18 -0
  1565. package/python3.4.2/lib/python3.4/test/multibytecodec_support.py +377 -0
  1566. package/python3.4.2/lib/python3.4/test/nokia.pem +31 -0
  1567. package/python3.4.2/lib/python3.4/test/nullbytecert.pem +90 -0
  1568. package/python3.4.2/lib/python3.4/test/nullcert.pem +0 -0
  1569. package/python3.4.2/lib/python3.4/test/outstanding_bugs.py +18 -0
  1570. package/python3.4.2/lib/python3.4/test/pickletester.py +2253 -0
  1571. package/python3.4.2/lib/python3.4/test/profilee.py +115 -0
  1572. package/python3.4.2/lib/python3.4/test/pstats.pck +0 -0
  1573. package/python3.4.2/lib/python3.4/test/pycacert.pem +78 -0
  1574. package/python3.4.2/lib/python3.4/test/pycakey.pem +28 -0
  1575. package/python3.4.2/lib/python3.4/test/pyclbr_input.py +33 -0
  1576. package/python3.4.2/lib/python3.4/test/pydoc_mod.py +37 -0
  1577. package/python3.4.2/lib/python3.4/test/pydocfodder.py +216 -0
  1578. package/python3.4.2/lib/python3.4/test/pystone.py +277 -0
  1579. package/python3.4.2/lib/python3.4/test/randv2_32.pck +633 -0
  1580. package/python3.4.2/lib/python3.4/test/randv2_64.pck +633 -0
  1581. package/python3.4.2/lib/python3.4/test/randv3.pck +633 -0
  1582. package/python3.4.2/lib/python3.4/test/re_tests.py +670 -0
  1583. package/python3.4.2/lib/python3.4/test/regrtest.py +1589 -0
  1584. package/python3.4.2/lib/python3.4/test/relimport.py +1 -0
  1585. package/python3.4.2/lib/python3.4/test/reperf.py +23 -0
  1586. package/python3.4.2/lib/python3.4/test/revocation.crl +11 -0
  1587. package/python3.4.2/lib/python3.4/test/sample_doctest.py +76 -0
  1588. package/python3.4.2/lib/python3.4/test/sample_doctest_no_docstrings.py +12 -0
  1589. package/python3.4.2/lib/python3.4/test/sample_doctest_no_doctests.py +15 -0
  1590. package/python3.4.2/lib/python3.4/test/script_helper.py +178 -0
  1591. package/python3.4.2/lib/python3.4/test/seq_tests.py +397 -0
  1592. package/python3.4.2/lib/python3.4/test/sgml_input.html +212 -0
  1593. package/python3.4.2/lib/python3.4/test/sha256.pem +128 -0
  1594. package/python3.4.2/lib/python3.4/test/sndhdrdata/README +12 -0
  1595. package/python3.4.2/lib/python3.4/test/sndhdrdata/sndhdr.8svx +0 -0
  1596. package/python3.4.2/lib/python3.4/test/sndhdrdata/sndhdr.aifc +0 -0
  1597. package/python3.4.2/lib/python3.4/test/sndhdrdata/sndhdr.aiff +0 -0
  1598. package/python3.4.2/lib/python3.4/test/sndhdrdata/sndhdr.au +0 -0
  1599. package/python3.4.2/lib/python3.4/test/sndhdrdata/sndhdr.hcom +0 -0
  1600. package/python3.4.2/lib/python3.4/test/sndhdrdata/sndhdr.sndt +0 -0
  1601. package/python3.4.2/lib/python3.4/test/sndhdrdata/sndhdr.voc +0 -0
  1602. package/python3.4.2/lib/python3.4/test/sndhdrdata/sndhdr.wav +0 -0
  1603. package/python3.4.2/lib/python3.4/test/sortperf.py +169 -0
  1604. package/python3.4.2/lib/python3.4/test/ssl_cert.pem +15 -0
  1605. package/python3.4.2/lib/python3.4/test/ssl_key.passwd.pem +18 -0
  1606. package/python3.4.2/lib/python3.4/test/ssl_key.pem +16 -0
  1607. package/python3.4.2/lib/python3.4/test/ssl_servers.py +205 -0
  1608. package/python3.4.2/lib/python3.4/test/ssltests.py +22 -0
  1609. package/python3.4.2/lib/python3.4/test/string_tests.py +1385 -0
  1610. package/python3.4.2/lib/python3.4/test/subprocessdata/fd_status.py +34 -0
  1611. package/python3.4.2/lib/python3.4/test/subprocessdata/input_reader.py +7 -0
  1612. package/python3.4.2/lib/python3.4/test/subprocessdata/qcat.py +7 -0
  1613. package/python3.4.2/lib/python3.4/test/subprocessdata/qgrep.py +10 -0
  1614. package/python3.4.2/lib/python3.4/test/subprocessdata/sigchild_ignore.py +15 -0
  1615. package/python3.4.2/lib/python3.4/test/support/__init__.py +2241 -0
  1616. package/python3.4.2/lib/python3.4/test/test___all__.py +117 -0
  1617. package/python3.4.2/lib/python3.4/test/test___future__.py +65 -0
  1618. package/python3.4.2/lib/python3.4/test/test__locale.py +170 -0
  1619. package/python3.4.2/lib/python3.4/test/test__opcode.py +23 -0
  1620. package/python3.4.2/lib/python3.4/test/test__osx_support.py +281 -0
  1621. package/python3.4.2/lib/python3.4/test/test_abc.py +408 -0
  1622. package/python3.4.2/lib/python3.4/test/test_abstract_numbers.py +44 -0
  1623. package/python3.4.2/lib/python3.4/test/test_aifc.py +384 -0
  1624. package/python3.4.2/lib/python3.4/test/test_argparse.py +4979 -0
  1625. package/python3.4.2/lib/python3.4/test/test_array.py +1323 -0
  1626. package/python3.4.2/lib/python3.4/test/test_ast.py +1038 -0
  1627. package/python3.4.2/lib/python3.4/test/test_asynchat.py +333 -0
  1628. package/python3.4.2/lib/python3.4/test/test_asyncio/__init__.py +10 -0
  1629. package/python3.4.2/lib/python3.4/test/test_asyncio/__main__.py +4 -0
  1630. package/python3.4.2/lib/python3.4/test/test_asyncio/echo.py +8 -0
  1631. package/python3.4.2/lib/python3.4/test/test_asyncio/echo2.py +6 -0
  1632. package/python3.4.2/lib/python3.4/test/test_asyncio/echo3.py +11 -0
  1633. package/python3.4.2/lib/python3.4/test/test_asyncio/keycert3.pem +73 -0
  1634. package/python3.4.2/lib/python3.4/test/test_asyncio/pycacert.pem +78 -0
  1635. package/python3.4.2/lib/python3.4/test/test_asyncio/ssl_cert.pem +15 -0
  1636. package/python3.4.2/lib/python3.4/test/test_asyncio/ssl_key.pem +16 -0
  1637. package/python3.4.2/lib/python3.4/test/test_asyncio/test_base_events.py +1064 -0
  1638. package/python3.4.2/lib/python3.4/test/test_asyncio/test_events.py +2240 -0
  1639. package/python3.4.2/lib/python3.4/test/test_asyncio/test_futures.py +442 -0
  1640. package/python3.4.2/lib/python3.4/test/test_asyncio/test_locks.py +858 -0
  1641. package/python3.4.2/lib/python3.4/test/test_asyncio/test_proactor_events.py +492 -0
  1642. package/python3.4.2/lib/python3.4/test/test_asyncio/test_queues.py +476 -0
  1643. package/python3.4.2/lib/python3.4/test/test_asyncio/test_selector_events.py +1737 -0
  1644. package/python3.4.2/lib/python3.4/test/test_asyncio/test_streams.py +628 -0
  1645. package/python3.4.2/lib/python3.4/test/test_asyncio/test_subprocess.py +217 -0
  1646. package/python3.4.2/lib/python3.4/test/test_asyncio/test_tasks.py +1977 -0
  1647. package/python3.4.2/lib/python3.4/test/test_asyncio/test_transports.py +90 -0
  1648. package/python3.4.2/lib/python3.4/test/test_asyncio/test_unix_events.py +1582 -0
  1649. package/python3.4.2/lib/python3.4/test/test_asyncio/test_windows_events.py +141 -0
  1650. package/python3.4.2/lib/python3.4/test/test_asyncio/test_windows_utils.py +171 -0
  1651. package/python3.4.2/lib/python3.4/test/test_asyncore.py +859 -0
  1652. package/python3.4.2/lib/python3.4/test/test_atexit.py +185 -0
  1653. package/python3.4.2/lib/python3.4/test/test_audioop.py +534 -0
  1654. package/python3.4.2/lib/python3.4/test/test_augassign.py +315 -0
  1655. package/python3.4.2/lib/python3.4/test/test_base64.py +666 -0
  1656. package/python3.4.2/lib/python3.4/test/test_bigaddrspace.py +101 -0
  1657. package/python3.4.2/lib/python3.4/test/test_bigmem.py +1257 -0
  1658. package/python3.4.2/lib/python3.4/test/test_binascii.py +270 -0
  1659. package/python3.4.2/lib/python3.4/test/test_binhex.py +56 -0
  1660. package/python3.4.2/lib/python3.4/test/test_binop.py +380 -0
  1661. package/python3.4.2/lib/python3.4/test/test_bisect.py +328 -0
  1662. package/python3.4.2/lib/python3.4/test/test_bool.py +347 -0
  1663. package/python3.4.2/lib/python3.4/test/test_buffer.py +4294 -0
  1664. package/python3.4.2/lib/python3.4/test/test_bufio.py +73 -0
  1665. package/python3.4.2/lib/python3.4/test/test_builtin.py +1637 -0
  1666. package/python3.4.2/lib/python3.4/test/test_bytes.py +1433 -0
  1667. package/python3.4.2/lib/python3.4/test/test_bz2.py +880 -0
  1668. package/python3.4.2/lib/python3.4/test/test_calendar.py +714 -0
  1669. package/python3.4.2/lib/python3.4/test/test_call.py +131 -0
  1670. package/python3.4.2/lib/python3.4/test/test_capi.py +469 -0
  1671. package/python3.4.2/lib/python3.4/test/test_cgi.py +489 -0
  1672. package/python3.4.2/lib/python3.4/test/test_cgitb.py +70 -0
  1673. package/python3.4.2/lib/python3.4/test/test_charmapcodec.py +56 -0
  1674. package/python3.4.2/lib/python3.4/test/test_class.py +552 -0
  1675. package/python3.4.2/lib/python3.4/test/test_cmath.py +536 -0
  1676. package/python3.4.2/lib/python3.4/test/test_cmd.py +243 -0
  1677. package/python3.4.2/lib/python3.4/test/test_cmd_line.py +473 -0
  1678. package/python3.4.2/lib/python3.4/test/test_cmd_line_script.py +481 -0
  1679. package/python3.4.2/lib/python3.4/test/test_code.py +170 -0
  1680. package/python3.4.2/lib/python3.4/test/test_code_module.py +86 -0
  1681. package/python3.4.2/lib/python3.4/test/test_codeccallbacks.py +880 -0
  1682. package/python3.4.2/lib/python3.4/test/test_codecencodings_cn.py +90 -0
  1683. package/python3.4.2/lib/python3.4/test/test_codecencodings_hk.py +26 -0
  1684. package/python3.4.2/lib/python3.4/test/test_codecencodings_iso2022.py +45 -0
  1685. package/python3.4.2/lib/python3.4/test/test_codecencodings_jp.py +130 -0
  1686. package/python3.4.2/lib/python3.4/test/test_codecencodings_kr.py +73 -0
  1687. package/python3.4.2/lib/python3.4/test/test_codecencodings_tw.py +26 -0
  1688. package/python3.4.2/lib/python3.4/test/test_codecmaps_cn.py +29 -0
  1689. package/python3.4.2/lib/python3.4/test/test_codecmaps_hk.py +16 -0
  1690. package/python3.4.2/lib/python3.4/test/test_codecmaps_jp.py +63 -0
  1691. package/python3.4.2/lib/python3.4/test/test_codecmaps_kr.py +40 -0
  1692. package/python3.4.2/lib/python3.4/test/test_codecmaps_tw.py +30 -0
  1693. package/python3.4.2/lib/python3.4/test/test_codecs.py +2901 -0
  1694. package/python3.4.2/lib/python3.4/test/test_codeop.py +304 -0
  1695. package/python3.4.2/lib/python3.4/test/test_collections.py +1552 -0
  1696. package/python3.4.2/lib/python3.4/test/test_colorsys.py +100 -0
  1697. package/python3.4.2/lib/python3.4/test/test_compare.py +67 -0
  1698. package/python3.4.2/lib/python3.4/test/test_compile.py +561 -0
  1699. package/python3.4.2/lib/python3.4/test/test_compileall.py +384 -0
  1700. package/python3.4.2/lib/python3.4/test/test_complex.py +638 -0
  1701. package/python3.4.2/lib/python3.4/test/test_concurrent_futures.py +685 -0
  1702. package/python3.4.2/lib/python3.4/test/test_configparser.py +1768 -0
  1703. package/python3.4.2/lib/python3.4/test/test_contains.py +93 -0
  1704. package/python3.4.2/lib/python3.4/test/test_contextlib.py +828 -0
  1705. package/python3.4.2/lib/python3.4/test/test_copy.py +759 -0
  1706. package/python3.4.2/lib/python3.4/test/test_copyreg.py +121 -0
  1707. package/python3.4.2/lib/python3.4/test/test_cprofile.py +98 -0
  1708. package/python3.4.2/lib/python3.4/test/test_crashers.py +38 -0
  1709. package/python3.4.2/lib/python3.4/test/test_crypt.py +33 -0
  1710. package/python3.4.2/lib/python3.4/test/test_csv.py +1074 -0
  1711. package/python3.4.2/lib/python3.4/test/test_ctypes.py +6 -0
  1712. package/python3.4.2/lib/python3.4/test/test_curses.py +395 -0
  1713. package/python3.4.2/lib/python3.4/test/test_datetime.py +48 -0
  1714. package/python3.4.2/lib/python3.4/test/test_dbm.py +193 -0
  1715. package/python3.4.2/lib/python3.4/test/test_dbm_dumb.py +228 -0
  1716. package/python3.4.2/lib/python3.4/test/test_dbm_gnu.py +97 -0
  1717. package/python3.4.2/lib/python3.4/test/test_dbm_ndbm.py +54 -0
  1718. package/python3.4.2/lib/python3.4/test/test_decimal.py +5504 -0
  1719. package/python3.4.2/lib/python3.4/test/test_decorators.py +309 -0
  1720. package/python3.4.2/lib/python3.4/test/test_defaultdict.py +190 -0
  1721. package/python3.4.2/lib/python3.4/test/test_deque.py +817 -0
  1722. package/python3.4.2/lib/python3.4/test/test_descr.py +5006 -0
  1723. package/python3.4.2/lib/python3.4/test/test_descrtut.py +485 -0
  1724. package/python3.4.2/lib/python3.4/test/test_devpoll.py +146 -0
  1725. package/python3.4.2/lib/python3.4/test/test_dict.py +928 -0
  1726. package/python3.4.2/lib/python3.4/test/test_dictcomps.py +88 -0
  1727. package/python3.4.2/lib/python3.4/test/test_dictviews.py +206 -0
  1728. package/python3.4.2/lib/python3.4/test/test_difflib.py +298 -0
  1729. package/python3.4.2/lib/python3.4/test/test_difflib_expect.html +526 -0
  1730. package/python3.4.2/lib/python3.4/test/test_dis.py +832 -0
  1731. package/python3.4.2/lib/python3.4/test/test_distutils.py +18 -0
  1732. package/python3.4.2/lib/python3.4/test/test_doctest.py +2921 -0
  1733. package/python3.4.2/lib/python3.4/test/test_doctest.txt +17 -0
  1734. package/python3.4.2/lib/python3.4/test/test_doctest2.py +123 -0
  1735. package/python3.4.2/lib/python3.4/test/test_doctest2.txt +14 -0
  1736. package/python3.4.2/lib/python3.4/test/test_doctest3.txt +5 -0
  1737. package/python3.4.2/lib/python3.4/test/test_doctest4.txt +11 -0
  1738. package/python3.4.2/lib/python3.4/test/test_docxmlrpc.py +219 -0
  1739. package/python3.4.2/lib/python3.4/test/test_dummy_thread.py +182 -0
  1740. package/python3.4.2/lib/python3.4/test/test_dummy_threading.py +64 -0
  1741. package/python3.4.2/lib/python3.4/test/test_dynamic.py +143 -0
  1742. package/python3.4.2/lib/python3.4/test/test_dynamicclassattribute.py +304 -0
  1743. package/python3.4.2/lib/python3.4/test/test_email/__init__.py +159 -0
  1744. package/python3.4.2/lib/python3.4/test/test_email/__main__.py +4 -0
  1745. package/python3.4.2/lib/python3.4/test/test_email/data/PyBanner048.gif +0 -0
  1746. package/python3.4.2/lib/python3.4/test/test_email/data/audiotest.au +0 -0
  1747. package/python3.4.2/lib/python3.4/test/test_email/data/msg_01.txt +19 -0
  1748. package/python3.4.2/lib/python3.4/test/test_email/data/msg_02.txt +136 -0
  1749. package/python3.4.2/lib/python3.4/test/test_email/data/msg_03.txt +16 -0
  1750. package/python3.4.2/lib/python3.4/test/test_email/data/msg_04.txt +37 -0
  1751. package/python3.4.2/lib/python3.4/test/test_email/data/msg_05.txt +28 -0
  1752. package/python3.4.2/lib/python3.4/test/test_email/data/msg_06.txt +33 -0
  1753. package/python3.4.2/lib/python3.4/test/test_email/data/msg_07.txt +83 -0
  1754. package/python3.4.2/lib/python3.4/test/test_email/data/msg_08.txt +24 -0
  1755. package/python3.4.2/lib/python3.4/test/test_email/data/msg_09.txt +24 -0
  1756. package/python3.4.2/lib/python3.4/test/test_email/data/msg_10.txt +39 -0
  1757. package/python3.4.2/lib/python3.4/test/test_email/data/msg_11.txt +7 -0
  1758. package/python3.4.2/lib/python3.4/test/test_email/data/msg_12.txt +36 -0
  1759. package/python3.4.2/lib/python3.4/test/test_email/data/msg_12a.txt +38 -0
  1760. package/python3.4.2/lib/python3.4/test/test_email/data/msg_13.txt +94 -0
  1761. package/python3.4.2/lib/python3.4/test/test_email/data/msg_14.txt +23 -0
  1762. package/python3.4.2/lib/python3.4/test/test_email/data/msg_15.txt +52 -0
  1763. package/python3.4.2/lib/python3.4/test/test_email/data/msg_16.txt +123 -0
  1764. package/python3.4.2/lib/python3.4/test/test_email/data/msg_17.txt +12 -0
  1765. package/python3.4.2/lib/python3.4/test/test_email/data/msg_18.txt +6 -0
  1766. package/python3.4.2/lib/python3.4/test/test_email/data/msg_19.txt +43 -0
  1767. package/python3.4.2/lib/python3.4/test/test_email/data/msg_20.txt +22 -0
  1768. package/python3.4.2/lib/python3.4/test/test_email/data/msg_21.txt +20 -0
  1769. package/python3.4.2/lib/python3.4/test/test_email/data/msg_22.txt +46 -0
  1770. package/python3.4.2/lib/python3.4/test/test_email/data/msg_23.txt +8 -0
  1771. package/python3.4.2/lib/python3.4/test/test_email/data/msg_24.txt +10 -0
  1772. package/python3.4.2/lib/python3.4/test/test_email/data/msg_25.txt +117 -0
  1773. package/python3.4.2/lib/python3.4/test/test_email/data/msg_26.txt +46 -0
  1774. package/python3.4.2/lib/python3.4/test/test_email/data/msg_27.txt +15 -0
  1775. package/python3.4.2/lib/python3.4/test/test_email/data/msg_28.txt +25 -0
  1776. package/python3.4.2/lib/python3.4/test/test_email/data/msg_29.txt +22 -0
  1777. package/python3.4.2/lib/python3.4/test/test_email/data/msg_30.txt +23 -0
  1778. package/python3.4.2/lib/python3.4/test/test_email/data/msg_31.txt +15 -0
  1779. package/python3.4.2/lib/python3.4/test/test_email/data/msg_32.txt +14 -0
  1780. package/python3.4.2/lib/python3.4/test/test_email/data/msg_33.txt +29 -0
  1781. package/python3.4.2/lib/python3.4/test/test_email/data/msg_34.txt +19 -0
  1782. package/python3.4.2/lib/python3.4/test/test_email/data/msg_35.txt +4 -0
  1783. package/python3.4.2/lib/python3.4/test/test_email/data/msg_36.txt +40 -0
  1784. package/python3.4.2/lib/python3.4/test/test_email/data/msg_37.txt +22 -0
  1785. package/python3.4.2/lib/python3.4/test/test_email/data/msg_38.txt +101 -0
  1786. package/python3.4.2/lib/python3.4/test/test_email/data/msg_39.txt +83 -0
  1787. package/python3.4.2/lib/python3.4/test/test_email/data/msg_40.txt +10 -0
  1788. package/python3.4.2/lib/python3.4/test/test_email/data/msg_41.txt +8 -0
  1789. package/python3.4.2/lib/python3.4/test/test_email/data/msg_42.txt +20 -0
  1790. package/python3.4.2/lib/python3.4/test/test_email/data/msg_43.txt +217 -0
  1791. package/python3.4.2/lib/python3.4/test/test_email/data/msg_44.txt +33 -0
  1792. package/python3.4.2/lib/python3.4/test/test_email/data/msg_45.txt +33 -0
  1793. package/python3.4.2/lib/python3.4/test/test_email/data/msg_46.txt +23 -0
  1794. package/python3.4.2/lib/python3.4/test/test_email/test__encoded_words.py +192 -0
  1795. package/python3.4.2/lib/python3.4/test/test_email/test__header_value_parser.py +2606 -0
  1796. package/python3.4.2/lib/python3.4/test/test_email/test_asian_codecs.py +82 -0
  1797. package/python3.4.2/lib/python3.4/test/test_email/test_contentmanager.py +796 -0
  1798. package/python3.4.2/lib/python3.4/test/test_email/test_defect_handling.py +320 -0
  1799. package/python3.4.2/lib/python3.4/test/test_email/test_email.py +5289 -0
  1800. package/python3.4.2/lib/python3.4/test/test_email/test_generator.py +199 -0
  1801. package/python3.4.2/lib/python3.4/test/test_email/test_headerregistry.py +1594 -0
  1802. package/python3.4.2/lib/python3.4/test/test_email/test_inversion.py +49 -0
  1803. package/python3.4.2/lib/python3.4/test/test_email/test_message.py +783 -0
  1804. package/python3.4.2/lib/python3.4/test/test_email/test_parser.py +36 -0
  1805. package/python3.4.2/lib/python3.4/test/test_email/test_pickleable.py +74 -0
  1806. package/python3.4.2/lib/python3.4/test/test_email/test_policy.py +332 -0
  1807. package/python3.4.2/lib/python3.4/test/test_email/test_utils.py +140 -0
  1808. package/python3.4.2/lib/python3.4/test/test_email/torture_test.py +136 -0
  1809. package/python3.4.2/lib/python3.4/test/test_ensurepip.py +345 -0
  1810. package/python3.4.2/lib/python3.4/test/test_enum.py +1592 -0
  1811. package/python3.4.2/lib/python3.4/test/test_enumerate.py +272 -0
  1812. package/python3.4.2/lib/python3.4/test/test_eof.py +31 -0
  1813. package/python3.4.2/lib/python3.4/test/test_epoll.py +259 -0
  1814. package/python3.4.2/lib/python3.4/test/test_errno.py +40 -0
  1815. package/python3.4.2/lib/python3.4/test/test_exception_variations.py +180 -0
  1816. package/python3.4.2/lib/python3.4/test/test_exceptions.py +978 -0
  1817. package/python3.4.2/lib/python3.4/test/test_extcall.py +349 -0
  1818. package/python3.4.2/lib/python3.4/test/test_faulthandler.py +623 -0
  1819. package/python3.4.2/lib/python3.4/test/test_fcntl.py +152 -0
  1820. package/python3.4.2/lib/python3.4/test/test_file.py +329 -0
  1821. package/python3.4.2/lib/python3.4/test/test_file_eintr.py +236 -0
  1822. package/python3.4.2/lib/python3.4/test/test_filecmp.py +217 -0
  1823. package/python3.4.2/lib/python3.4/test/test_fileinput.py +891 -0
  1824. package/python3.4.2/lib/python3.4/test/test_fileio.py +480 -0
  1825. package/python3.4.2/lib/python3.4/test/test_finalization.py +522 -0
  1826. package/python3.4.2/lib/python3.4/test/test_float.py +1312 -0
  1827. package/python3.4.2/lib/python3.4/test/test_flufl.py +27 -0
  1828. package/python3.4.2/lib/python3.4/test/test_fnmatch.py +89 -0
  1829. package/python3.4.2/lib/python3.4/test/test_fork1.py +111 -0
  1830. package/python3.4.2/lib/python3.4/test/test_format.py +362 -0
  1831. package/python3.4.2/lib/python3.4/test/test_fractions.py +612 -0
  1832. package/python3.4.2/lib/python3.4/test/test_frame.py +168 -0
  1833. package/python3.4.2/lib/python3.4/test/test_ftplib.py +1080 -0
  1834. package/python3.4.2/lib/python3.4/test/test_funcattrs.py +385 -0
  1835. package/python3.4.2/lib/python3.4/test/test_functools.py +1584 -0
  1836. package/python3.4.2/lib/python3.4/test/test_future.py +125 -0
  1837. package/python3.4.2/lib/python3.4/test/test_future3.py +26 -0
  1838. package/python3.4.2/lib/python3.4/test/test_future4.py +6 -0
  1839. package/python3.4.2/lib/python3.4/test/test_future5.py +21 -0
  1840. package/python3.4.2/lib/python3.4/test/test_gc.py +1013 -0
  1841. package/python3.4.2/lib/python3.4/test/test_gdb.py +870 -0
  1842. package/python3.4.2/lib/python3.4/test/test_generators.py +1940 -0
  1843. package/python3.4.2/lib/python3.4/test/test_genericpath.py +439 -0
  1844. package/python3.4.2/lib/python3.4/test/test_genexps.py +285 -0
  1845. package/python3.4.2/lib/python3.4/test/test_getargs2.py +615 -0
  1846. package/python3.4.2/lib/python3.4/test/test_getopt.py +187 -0
  1847. package/python3.4.2/lib/python3.4/test/test_getpass.py +163 -0
  1848. package/python3.4.2/lib/python3.4/test/test_gettext.py +467 -0
  1849. package/python3.4.2/lib/python3.4/test/test_glob.py +200 -0
  1850. package/python3.4.2/lib/python3.4/test/test_global.py +61 -0
  1851. package/python3.4.2/lib/python3.4/test/test_grammar.py +1024 -0
  1852. package/python3.4.2/lib/python3.4/test/test_grp.py +99 -0
  1853. package/python3.4.2/lib/python3.4/test/test_gzip.py +561 -0
  1854. package/python3.4.2/lib/python3.4/test/test_hash.py +346 -0
  1855. package/python3.4.2/lib/python3.4/test/test_hashlib.py +533 -0
  1856. package/python3.4.2/lib/python3.4/test/test_heapq.py +417 -0
  1857. package/python3.4.2/lib/python3.4/test/test_hmac.py +506 -0
  1858. package/python3.4.2/lib/python3.4/test/test_html.py +104 -0
  1859. package/python3.4.2/lib/python3.4/test/test_htmlparser.py +832 -0
  1860. package/python3.4.2/lib/python3.4/test/test_http_cookiejar.py +1714 -0
  1861. package/python3.4.2/lib/python3.4/test/test_http_cookies.py +243 -0
  1862. package/python3.4.2/lib/python3.4/test/test_httplib.py +1025 -0
  1863. package/python3.4.2/lib/python3.4/test/test_httpservers.py +770 -0
  1864. package/python3.4.2/lib/python3.4/test/test_idle.py +16 -0
  1865. package/python3.4.2/lib/python3.4/test/test_imaplib.py +504 -0
  1866. package/python3.4.2/lib/python3.4/test/test_imghdr.py +131 -0
  1867. package/python3.4.2/lib/python3.4/test/test_imp.py +485 -0
  1868. package/python3.4.2/lib/python3.4/test/test_import.py +1072 -0
  1869. package/python3.4.2/lib/python3.4/test/test_importlib/__init__.py +5 -0
  1870. package/python3.4.2/lib/python3.4/test/test_importlib/__main__.py +4 -0
  1871. package/python3.4.2/lib/python3.4/test/test_importlib/abc.py +94 -0
  1872. package/python3.4.2/lib/python3.4/test/test_importlib/builtin/__init__.py +5 -0
  1873. package/python3.4.2/lib/python3.4/test/test_importlib/builtin/__main__.py +4 -0
  1874. package/python3.4.2/lib/python3.4/test/test_importlib/builtin/test_finder.py +85 -0
  1875. package/python3.4.2/lib/python3.4/test/test_importlib/builtin/test_loader.py +106 -0
  1876. package/python3.4.2/lib/python3.4/test/test_importlib/builtin/util.py +7 -0
  1877. package/python3.4.2/lib/python3.4/test/test_importlib/extension/__init__.py +5 -0
  1878. package/python3.4.2/lib/python3.4/test/test_importlib/extension/__main__.py +4 -0
  1879. package/python3.4.2/lib/python3.4/test/test_importlib/extension/test_case_sensitivity.py +51 -0
  1880. package/python3.4.2/lib/python3.4/test/test_importlib/extension/test_finder.py +44 -0
  1881. package/python3.4.2/lib/python3.4/test/test_importlib/extension/test_loader.py +86 -0
  1882. package/python3.4.2/lib/python3.4/test/test_importlib/extension/test_path_hook.py +32 -0
  1883. package/python3.4.2/lib/python3.4/test/test_importlib/extension/util.py +19 -0
  1884. package/python3.4.2/lib/python3.4/test/test_importlib/frozen/__init__.py +5 -0
  1885. package/python3.4.2/lib/python3.4/test/test_importlib/frozen/__main__.py +4 -0
  1886. package/python3.4.2/lib/python3.4/test/test_importlib/frozen/test_finder.py +80 -0
  1887. package/python3.4.2/lib/python3.4/test/test_importlib/frozen/test_loader.py +222 -0
  1888. package/python3.4.2/lib/python3.4/test/test_importlib/import_/__init__.py +5 -0
  1889. package/python3.4.2/lib/python3.4/test/test_importlib/import_/__main__.py +4 -0
  1890. package/python3.4.2/lib/python3.4/test/test_importlib/import_/test___loader__.py +70 -0
  1891. package/python3.4.2/lib/python3.4/test/test_importlib/import_/test___package__.py +133 -0
  1892. package/python3.4.2/lib/python3.4/test/test_importlib/import_/test_api.py +94 -0
  1893. package/python3.4.2/lib/python3.4/test/test_importlib/import_/test_caching.py +92 -0
  1894. package/python3.4.2/lib/python3.4/test/test_importlib/import_/test_fromlist.py +129 -0
  1895. package/python3.4.2/lib/python3.4/test/test_importlib/import_/test_meta_path.py +119 -0
  1896. package/python3.4.2/lib/python3.4/test/test_importlib/import_/test_packages.py +110 -0
  1897. package/python3.4.2/lib/python3.4/test/test_importlib/import_/test_path.py +144 -0
  1898. package/python3.4.2/lib/python3.4/test/test_importlib/import_/test_relative_imports.py +216 -0
  1899. package/python3.4.2/lib/python3.4/test/test_importlib/import_/util.py +20 -0
  1900. package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/both_portions/foo/one.py +1 -0
  1901. package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/both_portions/foo/two.py +1 -0
  1902. package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/missing_directory.zip +0 -0
  1903. package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/module_and_namespace_package/a_test/empty +0 -0
  1904. package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/module_and_namespace_package/a_test.py +1 -0
  1905. package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/nested_portion1.zip +0 -0
  1906. package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/not_a_namespace_pkg/foo/__init__.py +0 -0
  1907. package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/not_a_namespace_pkg/foo/one.py +1 -0
  1908. package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/portion1/foo/one.py +1 -0
  1909. package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/portion2/foo/two.py +1 -0
  1910. package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/project1/parent/child/one.py +1 -0
  1911. package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/project2/parent/child/two.py +1 -0
  1912. package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/project3/parent/child/three.py +1 -0
  1913. package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/top_level_portion1.zip +0 -0
  1914. package/python3.4.2/lib/python3.4/test/test_importlib/regrtest.py +17 -0
  1915. package/python3.4.2/lib/python3.4/test/test_importlib/source/__init__.py +5 -0
  1916. package/python3.4.2/lib/python3.4/test/test_importlib/source/__main__.py +4 -0
  1917. package/python3.4.2/lib/python3.4/test/test_importlib/source/test_case_sensitivity.py +83 -0
  1918. package/python3.4.2/lib/python3.4/test/test_importlib/source/test_file_loader.py +588 -0
  1919. package/python3.4.2/lib/python3.4/test/test_importlib/source/test_finder.py +232 -0
  1920. package/python3.4.2/lib/python3.4/test/test_importlib/source/test_path_hook.py +30 -0
  1921. package/python3.4.2/lib/python3.4/test/test_importlib/source/test_source_encoding.py +165 -0
  1922. package/python3.4.2/lib/python3.4/test/test_importlib/source/util.py +96 -0
  1923. package/python3.4.2/lib/python3.4/test/test_importlib/test_abc.py +951 -0
  1924. package/python3.4.2/lib/python3.4/test/test_importlib/test_api.py +437 -0
  1925. package/python3.4.2/lib/python3.4/test/test_importlib/test_locks.py +156 -0
  1926. package/python3.4.2/lib/python3.4/test/test_importlib/test_namespace_pkgs.py +293 -0
  1927. package/python3.4.2/lib/python3.4/test/test_importlib/test_spec.py +957 -0
  1928. package/python3.4.2/lib/python3.4/test/test_importlib/test_util.py +592 -0
  1929. package/python3.4.2/lib/python3.4/test/test_importlib/test_windows.py +29 -0
  1930. package/python3.4.2/lib/python3.4/test/test_importlib/util.py +225 -0
  1931. package/python3.4.2/lib/python3.4/test/test_index.py +275 -0
  1932. package/python3.4.2/lib/python3.4/test/test_inspect.py +3103 -0
  1933. package/python3.4.2/lib/python3.4/test/test_int.py +458 -0
  1934. package/python3.4.2/lib/python3.4/test/test_int_literal.py +147 -0
  1935. package/python3.4.2/lib/python3.4/test/test_io.py +3481 -0
  1936. package/python3.4.2/lib/python3.4/test/test_ioctl.py +91 -0
  1937. package/python3.4.2/lib/python3.4/test/test_ipaddress.py +1693 -0
  1938. package/python3.4.2/lib/python3.4/test/test_isinstance.py +289 -0
  1939. package/python3.4.2/lib/python3.4/test/test_iter.py +927 -0
  1940. package/python3.4.2/lib/python3.4/test/test_iterlen.py +229 -0
  1941. package/python3.4.2/lib/python3.4/test/test_itertools.py +2142 -0
  1942. package/python3.4.2/lib/python3.4/test/test_json/__init__.py +53 -0
  1943. package/python3.4.2/lib/python3.4/test/test_json/__main__.py +4 -0
  1944. package/python3.4.2/lib/python3.4/test/test_json/test_decode.py +99 -0
  1945. package/python3.4.2/lib/python3.4/test/test_json/test_default.py +12 -0
  1946. package/python3.4.2/lib/python3.4/test/test_json/test_dump.py +49 -0
  1947. package/python3.4.2/lib/python3.4/test/test_json/test_encode_basestring_ascii.py +44 -0
  1948. package/python3.4.2/lib/python3.4/test/test_json/test_enum.py +120 -0
  1949. package/python3.4.2/lib/python3.4/test/test_json/test_fail.py +194 -0
  1950. package/python3.4.2/lib/python3.4/test/test_json/test_float.py +33 -0
  1951. package/python3.4.2/lib/python3.4/test/test_json/test_indent.py +67 -0
  1952. package/python3.4.2/lib/python3.4/test/test_json/test_pass1.py +75 -0
  1953. package/python3.4.2/lib/python3.4/test/test_json/test_pass2.py +18 -0
  1954. package/python3.4.2/lib/python3.4/test/test_json/test_pass3.py +24 -0
  1955. package/python3.4.2/lib/python3.4/test/test_json/test_recursion.py +100 -0
  1956. package/python3.4.2/lib/python3.4/test/test_json/test_scanstring.py +141 -0
  1957. package/python3.4.2/lib/python3.4/test/test_json/test_separators.py +44 -0
  1958. package/python3.4.2/lib/python3.4/test/test_json/test_speedups.py +24 -0
  1959. package/python3.4.2/lib/python3.4/test/test_json/test_tool.py +69 -0
  1960. package/python3.4.2/lib/python3.4/test/test_json/test_unicode.py +75 -0
  1961. package/python3.4.2/lib/python3.4/test/test_keyword.py +138 -0
  1962. package/python3.4.2/lib/python3.4/test/test_keywordonlyarg.py +193 -0
  1963. package/python3.4.2/lib/python3.4/test/test_kqueue.py +219 -0
  1964. package/python3.4.2/lib/python3.4/test/test_largefile.py +180 -0
  1965. package/python3.4.2/lib/python3.4/test/test_lib2to3.py +22 -0
  1966. package/python3.4.2/lib/python3.4/test/test_linecache.py +133 -0
  1967. package/python3.4.2/lib/python3.4/test/test_list.py +125 -0
  1968. package/python3.4.2/lib/python3.4/test/test_listcomps.py +148 -0
  1969. package/python3.4.2/lib/python3.4/test/test_locale.py +528 -0
  1970. package/python3.4.2/lib/python3.4/test/test_logging.py +4179 -0
  1971. package/python3.4.2/lib/python3.4/test/test_long.py +1250 -0
  1972. package/python3.4.2/lib/python3.4/test/test_longexp.py +14 -0
  1973. package/python3.4.2/lib/python3.4/test/test_lzma.py +1592 -0
  1974. package/python3.4.2/lib/python3.4/test/test_macpath.py +123 -0
  1975. package/python3.4.2/lib/python3.4/test/test_macurl2path.py +31 -0
  1976. package/python3.4.2/lib/python3.4/test/test_mailbox.py +2287 -0
  1977. package/python3.4.2/lib/python3.4/test/test_mailcap.py +221 -0
  1978. package/python3.4.2/lib/python3.4/test/test_marshal.py +451 -0
  1979. package/python3.4.2/lib/python3.4/test/test_math.py +1107 -0
  1980. package/python3.4.2/lib/python3.4/test/test_memoryio.py +784 -0
  1981. package/python3.4.2/lib/python3.4/test/test_memoryview.py +478 -0
  1982. package/python3.4.2/lib/python3.4/test/test_metaclass.py +265 -0
  1983. package/python3.4.2/lib/python3.4/test/test_mimetypes.py +111 -0
  1984. package/python3.4.2/lib/python3.4/test/test_minidom.py +1545 -0
  1985. package/python3.4.2/lib/python3.4/test/test_mmap.py +774 -0
  1986. package/python3.4.2/lib/python3.4/test/test_module.py +222 -0
  1987. package/python3.4.2/lib/python3.4/test/test_modulefinder.py +324 -0
  1988. package/python3.4.2/lib/python3.4/test/test_msilib.py +46 -0
  1989. package/python3.4.2/lib/python3.4/test/test_multibytecodec.py +263 -0
  1990. package/python3.4.2/lib/python3.4/test/test_multiprocessing_fork.py +7 -0
  1991. package/python3.4.2/lib/python3.4/test/test_multiprocessing_forkserver.py +7 -0
  1992. package/python3.4.2/lib/python3.4/test/test_multiprocessing_main_handling.py +289 -0
  1993. package/python3.4.2/lib/python3.4/test/test_multiprocessing_spawn.py +7 -0
  1994. package/python3.4.2/lib/python3.4/test/test_netrc.py +130 -0
  1995. package/python3.4.2/lib/python3.4/test/test_nis.py +43 -0
  1996. package/python3.4.2/lib/python3.4/test/test_nntplib.py +1429 -0
  1997. package/python3.4.2/lib/python3.4/test/test_normalization.py +104 -0
  1998. package/python3.4.2/lib/python3.4/test/test_ntpath.py +385 -0
  1999. package/python3.4.2/lib/python3.4/test/test_numeric_tower.py +206 -0
  2000. package/python3.4.2/lib/python3.4/test/test_opcodes.py +112 -0
  2001. package/python3.4.2/lib/python3.4/test/test_openpty.py +25 -0
  2002. package/python3.4.2/lib/python3.4/test/test_operator.py +484 -0
  2003. package/python3.4.2/lib/python3.4/test/test_optparse.py +1657 -0
  2004. package/python3.4.2/lib/python3.4/test/test_os.py +2550 -0
  2005. package/python3.4.2/lib/python3.4/test/test_ossaudiodev.py +202 -0
  2006. package/python3.4.2/lib/python3.4/test/test_osx_env.py +34 -0
  2007. package/python3.4.2/lib/python3.4/test/test_parser.py +745 -0
  2008. package/python3.4.2/lib/python3.4/test/test_pathlib.py +1884 -0
  2009. package/python3.4.2/lib/python3.4/test/test_pdb.py +1052 -0
  2010. package/python3.4.2/lib/python3.4/test/test_peepholer.py +339 -0
  2011. package/python3.4.2/lib/python3.4/test/test_pep247.py +70 -0
  2012. package/python3.4.2/lib/python3.4/test/test_pep277.py +201 -0
  2013. package/python3.4.2/lib/python3.4/test/test_pep292.py +247 -0
  2014. package/python3.4.2/lib/python3.4/test/test_pep3120.py +47 -0
  2015. package/python3.4.2/lib/python3.4/test/test_pep3131.py +35 -0
  2016. package/python3.4.2/lib/python3.4/test/test_pep3151.py +209 -0
  2017. package/python3.4.2/lib/python3.4/test/test_pep352.py +184 -0
  2018. package/python3.4.2/lib/python3.4/test/test_pep380.py +1023 -0
  2019. package/python3.4.2/lib/python3.4/test/test_pickle.py +156 -0
  2020. package/python3.4.2/lib/python3.4/test/test_pickletools.py +25 -0
  2021. package/python3.4.2/lib/python3.4/test/test_pipes.py +196 -0
  2022. package/python3.4.2/lib/python3.4/test/test_pkg.py +299 -0
  2023. package/python3.4.2/lib/python3.4/test/test_pkgimport.py +84 -0
  2024. package/python3.4.2/lib/python3.4/test/test_pkgutil.py +410 -0
  2025. package/python3.4.2/lib/python3.4/test/test_platform.py +320 -0
  2026. package/python3.4.2/lib/python3.4/test/test_plistlib.py +526 -0
  2027. package/python3.4.2/lib/python3.4/test/test_poll.py +215 -0
  2028. package/python3.4.2/lib/python3.4/test/test_popen.py +64 -0
  2029. package/python3.4.2/lib/python3.4/test/test_poplib.py +507 -0
  2030. package/python3.4.2/lib/python3.4/test/test_posix.py +1183 -0
  2031. package/python3.4.2/lib/python3.4/test/test_posixpath.py +544 -0
  2032. package/python3.4.2/lib/python3.4/test/test_pow.py +129 -0
  2033. package/python3.4.2/lib/python3.4/test/test_pprint.py +602 -0
  2034. package/python3.4.2/lib/python3.4/test/test_print.py +132 -0
  2035. package/python3.4.2/lib/python3.4/test/test_profile.py +187 -0
  2036. package/python3.4.2/lib/python3.4/test/test_property.py +254 -0
  2037. package/python3.4.2/lib/python3.4/test/test_pstats.py +45 -0
  2038. package/python3.4.2/lib/python3.4/test/test_pty.py +302 -0
  2039. package/python3.4.2/lib/python3.4/test/test_pulldom.py +347 -0
  2040. package/python3.4.2/lib/python3.4/test/test_pwd.py +114 -0
  2041. package/python3.4.2/lib/python3.4/test/test_py_compile.py +103 -0
  2042. package/python3.4.2/lib/python3.4/test/test_pyclbr.py +181 -0
  2043. package/python3.4.2/lib/python3.4/test/test_pydoc.py +1003 -0
  2044. package/python3.4.2/lib/python3.4/test/test_pyexpat.py +708 -0
  2045. package/python3.4.2/lib/python3.4/test/test_queue.py +363 -0
  2046. package/python3.4.2/lib/python3.4/test/test_quopri.py +208 -0
  2047. package/python3.4.2/lib/python3.4/test/test_raise.py +422 -0
  2048. package/python3.4.2/lib/python3.4/test/test_random.py +759 -0
  2049. package/python3.4.2/lib/python3.4/test/test_range.py +652 -0
  2050. package/python3.4.2/lib/python3.4/test/test_re.py +1451 -0
  2051. package/python3.4.2/lib/python3.4/test/test_readline.py +60 -0
  2052. package/python3.4.2/lib/python3.4/test/test_regrtest.py +275 -0
  2053. package/python3.4.2/lib/python3.4/test/test_reprlib.py +383 -0
  2054. package/python3.4.2/lib/python3.4/test/test_resource.py +166 -0
  2055. package/python3.4.2/lib/python3.4/test/test_richcmp.py +333 -0
  2056. package/python3.4.2/lib/python3.4/test/test_rlcompleter.py +73 -0
  2057. package/python3.4.2/lib/python3.4/test/test_robotparser.py +320 -0
  2058. package/python3.4.2/lib/python3.4/test/test_runpy.py +691 -0
  2059. package/python3.4.2/lib/python3.4/test/test_sax.py +1007 -0
  2060. package/python3.4.2/lib/python3.4/test/test_sched.py +199 -0
  2061. package/python3.4.2/lib/python3.4/test/test_scope.py +764 -0
  2062. package/python3.4.2/lib/python3.4/test/test_select.py +83 -0
  2063. package/python3.4.2/lib/python3.4/test/test_selectors.py +453 -0
  2064. package/python3.4.2/lib/python3.4/test/test_set.py +1839 -0
  2065. package/python3.4.2/lib/python3.4/test/test_setcomps.py +151 -0
  2066. package/python3.4.2/lib/python3.4/test/test_shelve.py +224 -0
  2067. package/python3.4.2/lib/python3.4/test/test_shlex.py +202 -0
  2068. package/python3.4.2/lib/python3.4/test/test_shutil.py +1766 -0
  2069. package/python3.4.2/lib/python3.4/test/test_signal.py +940 -0
  2070. package/python3.4.2/lib/python3.4/test/test_site.py +468 -0
  2071. package/python3.4.2/lib/python3.4/test/test_slice.py +247 -0
  2072. package/python3.4.2/lib/python3.4/test/test_smtpd.py +557 -0
  2073. package/python3.4.2/lib/python3.4/test/test_smtplib.py +950 -0
  2074. package/python3.4.2/lib/python3.4/test/test_smtpnet.py +86 -0
  2075. package/python3.4.2/lib/python3.4/test/test_sndhdr.py +23 -0
  2076. package/python3.4.2/lib/python3.4/test/test_socket.py +5163 -0
  2077. package/python3.4.2/lib/python3.4/test/test_socketserver.py +314 -0
  2078. package/python3.4.2/lib/python3.4/test/test_sort.py +285 -0
  2079. package/python3.4.2/lib/python3.4/test/test_source_encoding.py +145 -0
  2080. package/python3.4.2/lib/python3.4/test/test_spwd.py +60 -0
  2081. package/python3.4.2/lib/python3.4/test/test_sqlite.py +24 -0
  2082. package/python3.4.2/lib/python3.4/test/test_ssl.py +2908 -0
  2083. package/python3.4.2/lib/python3.4/test/test_startfile.py +37 -0
  2084. package/python3.4.2/lib/python3.4/test/test_stat.py +202 -0
  2085. package/python3.4.2/lib/python3.4/test/test_statistics.py +1574 -0
  2086. package/python3.4.2/lib/python3.4/test/test_strftime.py +204 -0
  2087. package/python3.4.2/lib/python3.4/test/test_string.py +174 -0
  2088. package/python3.4.2/lib/python3.4/test/test_stringprep.py +96 -0
  2089. package/python3.4.2/lib/python3.4/test/test_strlit.py +206 -0
  2090. package/python3.4.2/lib/python3.4/test/test_strptime.py +577 -0
  2091. package/python3.4.2/lib/python3.4/test/test_strtod.py +436 -0
  2092. package/python3.4.2/lib/python3.4/test/test_struct.py +667 -0
  2093. package/python3.4.2/lib/python3.4/test/test_structmembers.py +147 -0
  2094. package/python3.4.2/lib/python3.4/test/test_structseq.py +130 -0
  2095. package/python3.4.2/lib/python3.4/test/test_subprocess.py +2474 -0
  2096. package/python3.4.2/lib/python3.4/test/test_sunau.py +122 -0
  2097. package/python3.4.2/lib/python3.4/test/test_sundry.py +59 -0
  2098. package/python3.4.2/lib/python3.4/test/test_super.py +181 -0
  2099. package/python3.4.2/lib/python3.4/test/test_support.py +315 -0
  2100. package/python3.4.2/lib/python3.4/test/test_symtable.py +176 -0
  2101. package/python3.4.2/lib/python3.4/test/test_syntax.py +593 -0
  2102. package/python3.4.2/lib/python3.4/test/test_sys.py +1000 -0
  2103. package/python3.4.2/lib/python3.4/test/test_sys_setprofile.py +386 -0
  2104. package/python3.4.2/lib/python3.4/test/test_sys_settrace.py +834 -0
  2105. package/python3.4.2/lib/python3.4/test/test_sysconfig.py +423 -0
  2106. package/python3.4.2/lib/python3.4/test/test_syslog.py +43 -0
  2107. package/python3.4.2/lib/python3.4/test/test_tarfile.py +2180 -0
  2108. package/python3.4.2/lib/python3.4/test/test_tcl.py +642 -0
  2109. package/python3.4.2/lib/python3.4/test/test_telnetlib.py +401 -0
  2110. package/python3.4.2/lib/python3.4/test/test_tempfile.py +1248 -0
  2111. package/python3.4.2/lib/python3.4/test/test_textwrap.py +929 -0
  2112. package/python3.4.2/lib/python3.4/test/test_thread.py +260 -0
  2113. package/python3.4.2/lib/python3.4/test/test_threaded_import.py +244 -0
  2114. package/python3.4.2/lib/python3.4/test/test_threadedtempfile.py +78 -0
  2115. package/python3.4.2/lib/python3.4/test/test_threading.py +1021 -0
  2116. package/python3.4.2/lib/python3.4/test/test_threading_local.py +225 -0
  2117. package/python3.4.2/lib/python3.4/test/test_threadsignals.py +227 -0
  2118. package/python3.4.2/lib/python3.4/test/test_time.py +763 -0
  2119. package/python3.4.2/lib/python3.4/test/test_timeit.py +306 -0
  2120. package/python3.4.2/lib/python3.4/test/test_timeout.py +303 -0
  2121. package/python3.4.2/lib/python3.4/test/test_tk.py +18 -0
  2122. package/python3.4.2/lib/python3.4/test/test_tokenize.py +1233 -0
  2123. package/python3.4.2/lib/python3.4/test/test_trace.py +415 -0
  2124. package/python3.4.2/lib/python3.4/test/test_traceback.py +451 -0
  2125. package/python3.4.2/lib/python3.4/test/test_tracemalloc.py +826 -0
  2126. package/python3.4.2/lib/python3.4/test/test_ttk_guionly.py +37 -0
  2127. package/python3.4.2/lib/python3.4/test/test_ttk_textonly.py +17 -0
  2128. package/python3.4.2/lib/python3.4/test/test_tuple.py +208 -0
  2129. package/python3.4.2/lib/python3.4/test/test_typechecks.py +76 -0
  2130. package/python3.4.2/lib/python3.4/test/test_types.py +1178 -0
  2131. package/python3.4.2/lib/python3.4/test/test_ucn.py +240 -0
  2132. package/python3.4.2/lib/python3.4/test/test_unary.py +58 -0
  2133. package/python3.4.2/lib/python3.4/test/test_unicode.py +2596 -0
  2134. package/python3.4.2/lib/python3.4/test/test_unicode_file.py +144 -0
  2135. package/python3.4.2/lib/python3.4/test/test_unicodedata.py +323 -0
  2136. package/python3.4.2/lib/python3.4/test/test_unittest.py +16 -0
  2137. package/python3.4.2/lib/python3.4/test/test_univnewlines.py +123 -0
  2138. package/python3.4.2/lib/python3.4/test/test_unpack.py +130 -0
  2139. package/python3.4.2/lib/python3.4/test/test_unpack_ex.py +174 -0
  2140. package/python3.4.2/lib/python3.4/test/test_urllib.py +1486 -0
  2141. package/python3.4.2/lib/python3.4/test/test_urllib2.py +1646 -0
  2142. package/python3.4.2/lib/python3.4/test/test_urllib2_localnet.py +690 -0
  2143. package/python3.4.2/lib/python3.4/test/test_urllib2net.py +342 -0
  2144. package/python3.4.2/lib/python3.4/test/test_urllib_response.py +59 -0
  2145. package/python3.4.2/lib/python3.4/test/test_urllibnet.py +212 -0
  2146. package/python3.4.2/lib/python3.4/test/test_urlparse.py +879 -0
  2147. package/python3.4.2/lib/python3.4/test/test_userdict.py +199 -0
  2148. package/python3.4.2/lib/python3.4/test/test_userlist.py +65 -0
  2149. package/python3.4.2/lib/python3.4/test/test_userstring.py +47 -0
  2150. package/python3.4.2/lib/python3.4/test/test_uu.py +239 -0
  2151. package/python3.4.2/lib/python3.4/test/test_uuid.py +498 -0
  2152. package/python3.4.2/lib/python3.4/test/test_venv.py +406 -0
  2153. package/python3.4.2/lib/python3.4/test/test_wait3.py +38 -0
  2154. package/python3.4.2/lib/python3.4/test/test_wait4.py +38 -0
  2155. package/python3.4.2/lib/python3.4/test/test_warnings.py +873 -0
  2156. package/python3.4.2/lib/python3.4/test/test_wave.py +107 -0
  2157. package/python3.4.2/lib/python3.4/test/test_weakref.py +1801 -0
  2158. package/python3.4.2/lib/python3.4/test/test_weakset.py +450 -0
  2159. package/python3.4.2/lib/python3.4/test/test_webbrowser.py +192 -0
  2160. package/python3.4.2/lib/python3.4/test/test_winreg.py +485 -0
  2161. package/python3.4.2/lib/python3.4/test/test_winsound.py +253 -0
  2162. package/python3.4.2/lib/python3.4/test/test_with.py +750 -0
  2163. package/python3.4.2/lib/python3.4/test/test_wsgiref.py +640 -0
  2164. package/python3.4.2/lib/python3.4/test/test_xdrlib.py +58 -0
  2165. package/python3.4.2/lib/python3.4/test/test_xml_dom_minicompat.py +101 -0
  2166. package/python3.4.2/lib/python3.4/test/test_xml_etree.py +2587 -0
  2167. package/python3.4.2/lib/python3.4/test/test_xml_etree_c.py +94 -0
  2168. package/python3.4.2/lib/python3.4/test/test_xmlrpc.py +1114 -0
  2169. package/python3.4.2/lib/python3.4/test/test_xmlrpc_net.py +33 -0
  2170. package/python3.4.2/lib/python3.4/test/test_zipfile.py +1783 -0
  2171. package/python3.4.2/lib/python3.4/test/test_zipfile64.py +118 -0
  2172. package/python3.4.2/lib/python3.4/test/test_zipimport.py +507 -0
  2173. package/python3.4.2/lib/python3.4/test/test_zipimport_support.py +246 -0
  2174. package/python3.4.2/lib/python3.4/test/test_zlib.py +725 -0
  2175. package/python3.4.2/lib/python3.4/test/testcodec.py +48 -0
  2176. package/python3.4.2/lib/python3.4/test/testtar.tar +0 -0
  2177. package/python3.4.2/lib/python3.4/test/tf_inherit_check.py +25 -0
  2178. package/python3.4.2/lib/python3.4/test/threaded_import_hangers.py +45 -0
  2179. package/python3.4.2/lib/python3.4/test/time_hashlib.py +87 -0
  2180. package/python3.4.2/lib/python3.4/test/tokenize_tests-latin1-coding-cookie-and-utf8-bom-sig.txt +13 -0
  2181. package/python3.4.2/lib/python3.4/test/tokenize_tests-no-coding-cookie-and-utf8-bom-sig-only.txt +11 -0
  2182. package/python3.4.2/lib/python3.4/test/tokenize_tests-utf8-coding-cookie-and-no-utf8-bom-sig.txt +13 -0
  2183. package/python3.4.2/lib/python3.4/test/tokenize_tests-utf8-coding-cookie-and-utf8-bom-sig.txt +12 -0
  2184. package/python3.4.2/lib/python3.4/test/tokenize_tests.txt +189 -0
  2185. package/python3.4.2/lib/python3.4/test/tracedmodules/__init__.py +4 -0
  2186. package/python3.4.2/lib/python3.4/test/tracedmodules/testmod.py +9 -0
  2187. package/python3.4.2/lib/python3.4/test/warning_tests.py +9 -0
  2188. package/python3.4.2/lib/python3.4/test/win_console_handler.py +49 -0
  2189. package/python3.4.2/lib/python3.4/test/xmltestdata/simple-ns.xml +7 -0
  2190. package/python3.4.2/lib/python3.4/test/xmltestdata/simple.xml +6 -0
  2191. package/python3.4.2/lib/python3.4/test/xmltestdata/test.xml +115 -0
  2192. package/python3.4.2/lib/python3.4/test/xmltestdata/test.xml.out +115 -0
  2193. package/python3.4.2/lib/python3.4/test/xmltests.py +21 -0
  2194. package/python3.4.2/lib/python3.4/test/zip_cp437_header.zip +0 -0
  2195. package/python3.4.2/lib/python3.4/test/zipdir.zip +0 -0
  2196. package/python3.4.2/lib/python3.4/textwrap.py +470 -0
  2197. package/python3.4.2/lib/python3.4/this.py +28 -0
  2198. package/python3.4.2/lib/python3.4/threading.py +1359 -0
  2199. package/python3.4.2/lib/python3.4/timeit.py +322 -0
  2200. package/python3.4.2/lib/python3.4/tkinter/__init__.py +3898 -0
  2201. package/python3.4.2/lib/python3.4/tkinter/__main__.py +7 -0
  2202. package/python3.4.2/lib/python3.4/tkinter/_fix.py +78 -0
  2203. package/python3.4.2/lib/python3.4/tkinter/colorchooser.py +72 -0
  2204. package/python3.4.2/lib/python3.4/tkinter/commondialog.py +60 -0
  2205. package/python3.4.2/lib/python3.4/tkinter/constants.py +110 -0
  2206. package/python3.4.2/lib/python3.4/tkinter/dialog.py +49 -0
  2207. package/python3.4.2/lib/python3.4/tkinter/dnd.py +321 -0
  2208. package/python3.4.2/lib/python3.4/tkinter/filedialog.py +479 -0
  2209. package/python3.4.2/lib/python3.4/tkinter/font.py +234 -0
  2210. package/python3.4.2/lib/python3.4/tkinter/messagebox.py +134 -0
  2211. package/python3.4.2/lib/python3.4/tkinter/scrolledtext.py +54 -0
  2212. package/python3.4.2/lib/python3.4/tkinter/simpledialog.py +423 -0
  2213. package/python3.4.2/lib/python3.4/tkinter/test/README +14 -0
  2214. package/python3.4.2/lib/python3.4/tkinter/test/__init__.py +0 -0
  2215. package/python3.4.2/lib/python3.4/tkinter/test/runtktests.py +71 -0
  2216. package/python3.4.2/lib/python3.4/tkinter/test/support.py +104 -0
  2217. package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/__init__.py +0 -0
  2218. package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/test_font.py +27 -0
  2219. package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/test_geometry_managers.py +900 -0
  2220. package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/test_images.py +327 -0
  2221. package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/test_loadtk.py +46 -0
  2222. package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/test_misc.py +42 -0
  2223. package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/test_text.py +47 -0
  2224. package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/test_variables.py +186 -0
  2225. package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/test_widgets.py +1193 -0
  2226. package/python3.4.2/lib/python3.4/tkinter/test/test_ttk/__init__.py +0 -0
  2227. package/python3.4.2/lib/python3.4/tkinter/test/test_ttk/test_extensions.py +291 -0
  2228. package/python3.4.2/lib/python3.4/tkinter/test/test_ttk/test_functions.py +462 -0
  2229. package/python3.4.2/lib/python3.4/tkinter/test/test_ttk/test_style.py +92 -0
  2230. package/python3.4.2/lib/python3.4/tkinter/test/test_ttk/test_widgets.py +1598 -0
  2231. package/python3.4.2/lib/python3.4/tkinter/test/widget_tests.py +521 -0
  2232. package/python3.4.2/lib/python3.4/tkinter/tix.py +1944 -0
  2233. package/python3.4.2/lib/python3.4/tkinter/ttk.py +1616 -0
  2234. package/python3.4.2/lib/python3.4/token.py +140 -0
  2235. package/python3.4.2/lib/python3.4/tokenize.py +691 -0
  2236. package/python3.4.2/lib/python3.4/trace.py +858 -0
  2237. package/python3.4.2/lib/python3.4/traceback.py +313 -0
  2238. package/python3.4.2/lib/python3.4/tracemalloc.py +487 -0
  2239. package/python3.4.2/lib/python3.4/tty.py +36 -0
  2240. package/python3.4.2/lib/python3.4/turtle.py +4140 -0
  2241. package/python3.4.2/lib/python3.4/turtledemo/__init__.py +14 -0
  2242. package/python3.4.2/lib/python3.4/turtledemo/__main__.py +380 -0
  2243. package/python3.4.2/lib/python3.4/turtledemo/bytedesign.py +162 -0
  2244. package/python3.4.2/lib/python3.4/turtledemo/chaos.py +59 -0
  2245. package/python3.4.2/lib/python3.4/turtledemo/clock.py +132 -0
  2246. package/python3.4.2/lib/python3.4/turtledemo/colormixer.py +58 -0
  2247. package/python3.4.2/lib/python3.4/turtledemo/forest.py +108 -0
  2248. package/python3.4.2/lib/python3.4/turtledemo/fractalcurves.py +138 -0
  2249. package/python3.4.2/lib/python3.4/turtledemo/lindenmayer.py +119 -0
  2250. package/python3.4.2/lib/python3.4/turtledemo/minimal_hanoi.py +79 -0
  2251. package/python3.4.2/lib/python3.4/turtledemo/nim.py +226 -0
  2252. package/python3.4.2/lib/python3.4/turtledemo/paint.py +54 -0
  2253. package/python3.4.2/lib/python3.4/turtledemo/peace.py +61 -0
  2254. package/python3.4.2/lib/python3.4/turtledemo/penrose.py +181 -0
  2255. package/python3.4.2/lib/python3.4/turtledemo/planet_and_moon.py +112 -0
  2256. package/python3.4.2/lib/python3.4/turtledemo/round_dance.py +86 -0
  2257. package/python3.4.2/lib/python3.4/turtledemo/tree.py +63 -0
  2258. package/python3.4.2/lib/python3.4/turtledemo/turtle.cfg +10 -0
  2259. package/python3.4.2/lib/python3.4/turtledemo/two_canvases.py +54 -0
  2260. package/python3.4.2/lib/python3.4/turtledemo/wikipedia.py +65 -0
  2261. package/python3.4.2/lib/python3.4/turtledemo/yinyang.py +49 -0
  2262. package/python3.4.2/lib/python3.4/types.py +158 -0
  2263. package/python3.4.2/lib/python3.4/unittest/__init__.py +69 -0
  2264. package/python3.4.2/lib/python3.4/unittest/__main__.py +18 -0
  2265. package/python3.4.2/lib/python3.4/unittest/case.py +1400 -0
  2266. package/python3.4.2/lib/python3.4/unittest/loader.py +379 -0
  2267. package/python3.4.2/lib/python3.4/unittest/main.py +248 -0
  2268. package/python3.4.2/lib/python3.4/unittest/mock.py +2330 -0
  2269. package/python3.4.2/lib/python3.4/unittest/result.py +212 -0
  2270. package/python3.4.2/lib/python3.4/unittest/runner.py +213 -0
  2271. package/python3.4.2/lib/python3.4/unittest/signals.py +71 -0
  2272. package/python3.4.2/lib/python3.4/unittest/suite.py +324 -0
  2273. package/python3.4.2/lib/python3.4/unittest/test/__init__.py +22 -0
  2274. package/python3.4.2/lib/python3.4/unittest/test/__main__.py +18 -0
  2275. package/python3.4.2/lib/python3.4/unittest/test/_test_warnings.py +73 -0
  2276. package/python3.4.2/lib/python3.4/unittest/test/dummy.py +1 -0
  2277. package/python3.4.2/lib/python3.4/unittest/test/support.py +142 -0
  2278. package/python3.4.2/lib/python3.4/unittest/test/test_assertions.py +398 -0
  2279. package/python3.4.2/lib/python3.4/unittest/test/test_break.py +288 -0
  2280. package/python3.4.2/lib/python3.4/unittest/test/test_case.py +1574 -0
  2281. package/python3.4.2/lib/python3.4/unittest/test/test_discovery.py +527 -0
  2282. package/python3.4.2/lib/python3.4/unittest/test/test_functiontestcase.py +148 -0
  2283. package/python3.4.2/lib/python3.4/unittest/test/test_loader.py +1312 -0
  2284. package/python3.4.2/lib/python3.4/unittest/test/test_program.py +396 -0
  2285. package/python3.4.2/lib/python3.4/unittest/test/test_result.py +660 -0
  2286. package/python3.4.2/lib/python3.4/unittest/test/test_runner.py +346 -0
  2287. package/python3.4.2/lib/python3.4/unittest/test/test_setups.py +506 -0
  2288. package/python3.4.2/lib/python3.4/unittest/test/test_skipping.py +227 -0
  2289. package/python3.4.2/lib/python3.4/unittest/test/test_suite.py +447 -0
  2290. package/python3.4.2/lib/python3.4/unittest/test/testmock/__init__.py +17 -0
  2291. package/python3.4.2/lib/python3.4/unittest/test/testmock/__main__.py +18 -0
  2292. package/python3.4.2/lib/python3.4/unittest/test/testmock/support.py +23 -0
  2293. package/python3.4.2/lib/python3.4/unittest/test/testmock/testcallable.py +151 -0
  2294. package/python3.4.2/lib/python3.4/unittest/test/testmock/testhelpers.py +908 -0
  2295. package/python3.4.2/lib/python3.4/unittest/test/testmock/testmagicmethods.py +428 -0
  2296. package/python3.4.2/lib/python3.4/unittest/test/testmock/testmock.py +1412 -0
  2297. package/python3.4.2/lib/python3.4/unittest/test/testmock/testpatch.py +1801 -0
  2298. package/python3.4.2/lib/python3.4/unittest/test/testmock/testsentinel.py +28 -0
  2299. package/python3.4.2/lib/python3.4/unittest/test/testmock/testwith.py +259 -0
  2300. package/python3.4.2/lib/python3.4/unittest/util.py +177 -0
  2301. package/python3.4.2/lib/python3.4/urllib/__init__.py +0 -0
  2302. package/python3.4.2/lib/python3.4/urllib/error.py +76 -0
  2303. package/python3.4.2/lib/python3.4/urllib/parse.py +973 -0
  2304. package/python3.4.2/lib/python3.4/urllib/request.py +2559 -0
  2305. package/python3.4.2/lib/python3.4/urllib/response.py +76 -0
  2306. package/python3.4.2/lib/python3.4/urllib/robotparser.py +212 -0
  2307. package/python3.4.2/lib/python3.4/uu.py +199 -0
  2308. package/python3.4.2/lib/python3.4/uuid.py +591 -0
  2309. package/python3.4.2/lib/python3.4/venv/__init__.py +449 -0
  2310. package/python3.4.2/lib/python3.4/venv/__main__.py +10 -0
  2311. package/python3.4.2/lib/python3.4/venv/scripts/posix/activate +76 -0
  2312. package/python3.4.2/lib/python3.4/venv/scripts/posix/activate.csh +37 -0
  2313. package/python3.4.2/lib/python3.4/venv/scripts/posix/activate.fish +74 -0
  2314. package/python3.4.2/lib/python3.4/warnings.py +407 -0
  2315. package/python3.4.2/lib/python3.4/wave.py +503 -0
  2316. package/python3.4.2/lib/python3.4/weakref.py +577 -0
  2317. package/python3.4.2/lib/python3.4/webbrowser.py +651 -0
  2318. package/python3.4.2/lib/python3.4/wsgiref/__init__.py +23 -0
  2319. package/python3.4.2/lib/python3.4/wsgiref/handlers.py +547 -0
  2320. package/python3.4.2/lib/python3.4/wsgiref/headers.py +184 -0
  2321. package/python3.4.2/lib/python3.4/wsgiref/simple_server.py +165 -0
  2322. package/python3.4.2/lib/python3.4/wsgiref/util.py +165 -0
  2323. package/python3.4.2/lib/python3.4/wsgiref/validate.py +443 -0
  2324. package/python3.4.2/lib/python3.4/xdrlib.py +224 -0
  2325. package/python3.4.2/lib/python3.4/xml/__init__.py +20 -0
  2326. package/python3.4.2/lib/python3.4/xml/dom/NodeFilter.py +27 -0
  2327. package/python3.4.2/lib/python3.4/xml/dom/__init__.py +140 -0
  2328. package/python3.4.2/lib/python3.4/xml/dom/domreg.py +97 -0
  2329. package/python3.4.2/lib/python3.4/xml/dom/expatbuilder.py +965 -0
  2330. package/python3.4.2/lib/python3.4/xml/dom/minicompat.py +109 -0
  2331. package/python3.4.2/lib/python3.4/xml/dom/minidom.py +1983 -0
  2332. package/python3.4.2/lib/python3.4/xml/dom/pulldom.py +342 -0
  2333. package/python3.4.2/lib/python3.4/xml/dom/xmlbuilder.py +386 -0
  2334. package/python3.4.2/lib/python3.4/xml/etree/ElementInclude.py +143 -0
  2335. package/python3.4.2/lib/python3.4/xml/etree/ElementPath.py +308 -0
  2336. package/python3.4.2/lib/python3.4/xml/etree/ElementTree.py +1667 -0
  2337. package/python3.4.2/lib/python3.4/xml/etree/__init__.py +33 -0
  2338. package/python3.4.2/lib/python3.4/xml/etree/cElementTree.py +3 -0
  2339. package/python3.4.2/lib/python3.4/xml/parsers/__init__.py +8 -0
  2340. package/python3.4.2/lib/python3.4/xml/parsers/expat.py +8 -0
  2341. package/python3.4.2/lib/python3.4/xml/sax/__init__.py +105 -0
  2342. package/python3.4.2/lib/python3.4/xml/sax/_exceptions.py +131 -0
  2343. package/python3.4.2/lib/python3.4/xml/sax/expatreader.py +417 -0
  2344. package/python3.4.2/lib/python3.4/xml/sax/handler.py +342 -0
  2345. package/python3.4.2/lib/python3.4/xml/sax/saxutils.py +365 -0
  2346. package/python3.4.2/lib/python3.4/xml/sax/xmlreader.py +378 -0
  2347. package/python3.4.2/lib/python3.4/xmlrpc/__init__.py +1 -0
  2348. package/python3.4.2/lib/python3.4/xmlrpc/client.py +1479 -0
  2349. package/python3.4.2/lib/python3.4/xmlrpc/server.py +986 -0
  2350. package/python3.4.2/lib/python3.4/zipfile.py +1788 -0
  2351. package/python3.4.2/share/man/man1/python3.1 +460 -0
  2352. package/python3.4.2/share/man/man1/python3.4.1 +460 -0
@@ -0,0 +1,4179 @@
1
+ # Copyright 2001-2013 by Vinay Sajip. All Rights Reserved.
2
+ #
3
+ # Permission to use, copy, modify, and distribute this software and its
4
+ # documentation for any purpose and without fee is hereby granted,
5
+ # provided that the above copyright notice appear in all copies and that
6
+ # both that copyright notice and this permission notice appear in
7
+ # supporting documentation, and that the name of Vinay Sajip
8
+ # not be used in advertising or publicity pertaining to distribution
9
+ # of the software without specific, written prior permission.
10
+ # VINAY SAJIP DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
11
+ # ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
12
+ # VINAY SAJIP BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
13
+ # ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
14
+ # IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
15
+ # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16
+
17
+ """Test harness for the logging module. Run all tests.
18
+
19
+ Copyright (C) 2001-2013 Vinay Sajip. All Rights Reserved.
20
+ """
21
+
22
+ import logging
23
+ import logging.handlers
24
+ import logging.config
25
+
26
+ import codecs
27
+ import configparser
28
+ import datetime
29
+ import pickle
30
+ import io
31
+ import gc
32
+ import json
33
+ import os
34
+ import queue
35
+ import random
36
+ import re
37
+ import select
38
+ import socket
39
+ import struct
40
+ import sys
41
+ import tempfile
42
+ from test.script_helper import assert_python_ok
43
+ from test.support import (captured_stdout, run_with_locale, run_unittest,
44
+ patch, requires_zlib, TestHandler, Matcher)
45
+ import textwrap
46
+ import time
47
+ import unittest
48
+ import warnings
49
+ import weakref
50
+ try:
51
+ import threading
52
+ # The following imports are needed only for tests which
53
+ # require threading
54
+ import asynchat
55
+ import asyncore
56
+ import errno
57
+ from http.server import HTTPServer, BaseHTTPRequestHandler
58
+ import smtpd
59
+ from urllib.parse import urlparse, parse_qs
60
+ from socketserver import (ThreadingUDPServer, DatagramRequestHandler,
61
+ ThreadingTCPServer, StreamRequestHandler,
62
+ ThreadingUnixStreamServer,
63
+ ThreadingUnixDatagramServer)
64
+ except ImportError:
65
+ threading = None
66
+ try:
67
+ import win32evtlog
68
+ except ImportError:
69
+ win32evtlog = None
70
+ try:
71
+ import win32evtlogutil
72
+ except ImportError:
73
+ win32evtlogutil = None
74
+ win32evtlog = None
75
+ try:
76
+ import zlib
77
+ except ImportError:
78
+ pass
79
+
80
+ class BaseTest(unittest.TestCase):
81
+
82
+ """Base class for logging tests."""
83
+
84
+ log_format = "%(name)s -> %(levelname)s: %(message)s"
85
+ expected_log_pat = r"^([\w.]+) -> (\w+): (\d+)$"
86
+ message_num = 0
87
+
88
+ def setUp(self):
89
+ """Setup the default logging stream to an internal StringIO instance,
90
+ so that we can examine log output as we want."""
91
+ logger_dict = logging.getLogger().manager.loggerDict
92
+ logging._acquireLock()
93
+ try:
94
+ self.saved_handlers = logging._handlers.copy()
95
+ self.saved_handler_list = logging._handlerList[:]
96
+ self.saved_loggers = saved_loggers = logger_dict.copy()
97
+ self.saved_name_to_level = logging._nameToLevel.copy()
98
+ self.saved_level_to_name = logging._levelToName.copy()
99
+ self.logger_states = logger_states = {}
100
+ for name in saved_loggers:
101
+ logger_states[name] = getattr(saved_loggers[name],
102
+ 'disabled', None)
103
+ finally:
104
+ logging._releaseLock()
105
+
106
+ # Set two unused loggers
107
+ self.logger1 = logging.getLogger("\xab\xd7\xbb")
108
+ self.logger2 = logging.getLogger("\u013f\u00d6\u0047")
109
+
110
+ self.root_logger = logging.getLogger("")
111
+ self.original_logging_level = self.root_logger.getEffectiveLevel()
112
+
113
+ self.stream = io.StringIO()
114
+ self.root_logger.setLevel(logging.DEBUG)
115
+ self.root_hdlr = logging.StreamHandler(self.stream)
116
+ self.root_formatter = logging.Formatter(self.log_format)
117
+ self.root_hdlr.setFormatter(self.root_formatter)
118
+ if self.logger1.hasHandlers():
119
+ hlist = self.logger1.handlers + self.root_logger.handlers
120
+ raise AssertionError('Unexpected handlers: %s' % hlist)
121
+ if self.logger2.hasHandlers():
122
+ hlist = self.logger2.handlers + self.root_logger.handlers
123
+ raise AssertionError('Unexpected handlers: %s' % hlist)
124
+ self.root_logger.addHandler(self.root_hdlr)
125
+ self.assertTrue(self.logger1.hasHandlers())
126
+ self.assertTrue(self.logger2.hasHandlers())
127
+
128
+ def tearDown(self):
129
+ """Remove our logging stream, and restore the original logging
130
+ level."""
131
+ self.stream.close()
132
+ self.root_logger.removeHandler(self.root_hdlr)
133
+ while self.root_logger.handlers:
134
+ h = self.root_logger.handlers[0]
135
+ self.root_logger.removeHandler(h)
136
+ h.close()
137
+ self.root_logger.setLevel(self.original_logging_level)
138
+ logging._acquireLock()
139
+ try:
140
+ logging._levelToName.clear()
141
+ logging._levelToName.update(self.saved_level_to_name)
142
+ logging._nameToLevel.clear()
143
+ logging._nameToLevel.update(self.saved_name_to_level)
144
+ logging._handlers.clear()
145
+ logging._handlers.update(self.saved_handlers)
146
+ logging._handlerList[:] = self.saved_handler_list
147
+ loggerDict = logging.getLogger().manager.loggerDict
148
+ loggerDict.clear()
149
+ loggerDict.update(self.saved_loggers)
150
+ logger_states = self.logger_states
151
+ for name in self.logger_states:
152
+ if logger_states[name] is not None:
153
+ self.saved_loggers[name].disabled = logger_states[name]
154
+ finally:
155
+ logging._releaseLock()
156
+
157
+ def assert_log_lines(self, expected_values, stream=None, pat=None):
158
+ """Match the collected log lines against the regular expression
159
+ self.expected_log_pat, and compare the extracted group values to
160
+ the expected_values list of tuples."""
161
+ stream = stream or self.stream
162
+ pat = re.compile(pat or self.expected_log_pat)
163
+ actual_lines = stream.getvalue().splitlines()
164
+ self.assertEqual(len(actual_lines), len(expected_values))
165
+ for actual, expected in zip(actual_lines, expected_values):
166
+ match = pat.search(actual)
167
+ if not match:
168
+ self.fail("Log line does not match expected pattern:\n" +
169
+ actual)
170
+ self.assertEqual(tuple(match.groups()), expected)
171
+ s = stream.read()
172
+ if s:
173
+ self.fail("Remaining output at end of log stream:\n" + s)
174
+
175
+ def next_message(self):
176
+ """Generate a message consisting solely of an auto-incrementing
177
+ integer."""
178
+ self.message_num += 1
179
+ return "%d" % self.message_num
180
+
181
+
182
+ class BuiltinLevelsTest(BaseTest):
183
+ """Test builtin levels and their inheritance."""
184
+
185
+ def test_flat(self):
186
+ #Logging levels in a flat logger namespace.
187
+ m = self.next_message
188
+
189
+ ERR = logging.getLogger("ERR")
190
+ ERR.setLevel(logging.ERROR)
191
+ INF = logging.LoggerAdapter(logging.getLogger("INF"), {})
192
+ INF.setLevel(logging.INFO)
193
+ DEB = logging.getLogger("DEB")
194
+ DEB.setLevel(logging.DEBUG)
195
+
196
+ # These should log.
197
+ ERR.log(logging.CRITICAL, m())
198
+ ERR.error(m())
199
+
200
+ INF.log(logging.CRITICAL, m())
201
+ INF.error(m())
202
+ INF.warning(m())
203
+ INF.info(m())
204
+
205
+ DEB.log(logging.CRITICAL, m())
206
+ DEB.error(m())
207
+ DEB.warning(m())
208
+ DEB.info(m())
209
+ DEB.debug(m())
210
+
211
+ # These should not log.
212
+ ERR.warning(m())
213
+ ERR.info(m())
214
+ ERR.debug(m())
215
+
216
+ INF.debug(m())
217
+
218
+ self.assert_log_lines([
219
+ ('ERR', 'CRITICAL', '1'),
220
+ ('ERR', 'ERROR', '2'),
221
+ ('INF', 'CRITICAL', '3'),
222
+ ('INF', 'ERROR', '4'),
223
+ ('INF', 'WARNING', '5'),
224
+ ('INF', 'INFO', '6'),
225
+ ('DEB', 'CRITICAL', '7'),
226
+ ('DEB', 'ERROR', '8'),
227
+ ('DEB', 'WARNING', '9'),
228
+ ('DEB', 'INFO', '10'),
229
+ ('DEB', 'DEBUG', '11'),
230
+ ])
231
+
232
+ def test_nested_explicit(self):
233
+ # Logging levels in a nested namespace, all explicitly set.
234
+ m = self.next_message
235
+
236
+ INF = logging.getLogger("INF")
237
+ INF.setLevel(logging.INFO)
238
+ INF_ERR = logging.getLogger("INF.ERR")
239
+ INF_ERR.setLevel(logging.ERROR)
240
+
241
+ # These should log.
242
+ INF_ERR.log(logging.CRITICAL, m())
243
+ INF_ERR.error(m())
244
+
245
+ # These should not log.
246
+ INF_ERR.warning(m())
247
+ INF_ERR.info(m())
248
+ INF_ERR.debug(m())
249
+
250
+ self.assert_log_lines([
251
+ ('INF.ERR', 'CRITICAL', '1'),
252
+ ('INF.ERR', 'ERROR', '2'),
253
+ ])
254
+
255
+ def test_nested_inherited(self):
256
+ #Logging levels in a nested namespace, inherited from parent loggers.
257
+ m = self.next_message
258
+
259
+ INF = logging.getLogger("INF")
260
+ INF.setLevel(logging.INFO)
261
+ INF_ERR = logging.getLogger("INF.ERR")
262
+ INF_ERR.setLevel(logging.ERROR)
263
+ INF_UNDEF = logging.getLogger("INF.UNDEF")
264
+ INF_ERR_UNDEF = logging.getLogger("INF.ERR.UNDEF")
265
+ UNDEF = logging.getLogger("UNDEF")
266
+
267
+ # These should log.
268
+ INF_UNDEF.log(logging.CRITICAL, m())
269
+ INF_UNDEF.error(m())
270
+ INF_UNDEF.warning(m())
271
+ INF_UNDEF.info(m())
272
+ INF_ERR_UNDEF.log(logging.CRITICAL, m())
273
+ INF_ERR_UNDEF.error(m())
274
+
275
+ # These should not log.
276
+ INF_UNDEF.debug(m())
277
+ INF_ERR_UNDEF.warning(m())
278
+ INF_ERR_UNDEF.info(m())
279
+ INF_ERR_UNDEF.debug(m())
280
+
281
+ self.assert_log_lines([
282
+ ('INF.UNDEF', 'CRITICAL', '1'),
283
+ ('INF.UNDEF', 'ERROR', '2'),
284
+ ('INF.UNDEF', 'WARNING', '3'),
285
+ ('INF.UNDEF', 'INFO', '4'),
286
+ ('INF.ERR.UNDEF', 'CRITICAL', '5'),
287
+ ('INF.ERR.UNDEF', 'ERROR', '6'),
288
+ ])
289
+
290
+ def test_nested_with_virtual_parent(self):
291
+ # Logging levels when some parent does not exist yet.
292
+ m = self.next_message
293
+
294
+ INF = logging.getLogger("INF")
295
+ GRANDCHILD = logging.getLogger("INF.BADPARENT.UNDEF")
296
+ CHILD = logging.getLogger("INF.BADPARENT")
297
+ INF.setLevel(logging.INFO)
298
+
299
+ # These should log.
300
+ GRANDCHILD.log(logging.FATAL, m())
301
+ GRANDCHILD.info(m())
302
+ CHILD.log(logging.FATAL, m())
303
+ CHILD.info(m())
304
+
305
+ # These should not log.
306
+ GRANDCHILD.debug(m())
307
+ CHILD.debug(m())
308
+
309
+ self.assert_log_lines([
310
+ ('INF.BADPARENT.UNDEF', 'CRITICAL', '1'),
311
+ ('INF.BADPARENT.UNDEF', 'INFO', '2'),
312
+ ('INF.BADPARENT', 'CRITICAL', '3'),
313
+ ('INF.BADPARENT', 'INFO', '4'),
314
+ ])
315
+
316
+ def test_regression_22386(self):
317
+ """See issue #22386 for more information."""
318
+ self.assertEqual(logging.getLevelName('INFO'), logging.INFO)
319
+ self.assertEqual(logging.getLevelName(logging.INFO), 'INFO')
320
+
321
+ class BasicFilterTest(BaseTest):
322
+
323
+ """Test the bundled Filter class."""
324
+
325
+ def test_filter(self):
326
+ # Only messages satisfying the specified criteria pass through the
327
+ # filter.
328
+ filter_ = logging.Filter("spam.eggs")
329
+ handler = self.root_logger.handlers[0]
330
+ try:
331
+ handler.addFilter(filter_)
332
+ spam = logging.getLogger("spam")
333
+ spam_eggs = logging.getLogger("spam.eggs")
334
+ spam_eggs_fish = logging.getLogger("spam.eggs.fish")
335
+ spam_bakedbeans = logging.getLogger("spam.bakedbeans")
336
+
337
+ spam.info(self.next_message())
338
+ spam_eggs.info(self.next_message()) # Good.
339
+ spam_eggs_fish.info(self.next_message()) # Good.
340
+ spam_bakedbeans.info(self.next_message())
341
+
342
+ self.assert_log_lines([
343
+ ('spam.eggs', 'INFO', '2'),
344
+ ('spam.eggs.fish', 'INFO', '3'),
345
+ ])
346
+ finally:
347
+ handler.removeFilter(filter_)
348
+
349
+ def test_callable_filter(self):
350
+ # Only messages satisfying the specified criteria pass through the
351
+ # filter.
352
+
353
+ def filterfunc(record):
354
+ parts = record.name.split('.')
355
+ prefix = '.'.join(parts[:2])
356
+ return prefix == 'spam.eggs'
357
+
358
+ handler = self.root_logger.handlers[0]
359
+ try:
360
+ handler.addFilter(filterfunc)
361
+ spam = logging.getLogger("spam")
362
+ spam_eggs = logging.getLogger("spam.eggs")
363
+ spam_eggs_fish = logging.getLogger("spam.eggs.fish")
364
+ spam_bakedbeans = logging.getLogger("spam.bakedbeans")
365
+
366
+ spam.info(self.next_message())
367
+ spam_eggs.info(self.next_message()) # Good.
368
+ spam_eggs_fish.info(self.next_message()) # Good.
369
+ spam_bakedbeans.info(self.next_message())
370
+
371
+ self.assert_log_lines([
372
+ ('spam.eggs', 'INFO', '2'),
373
+ ('spam.eggs.fish', 'INFO', '3'),
374
+ ])
375
+ finally:
376
+ handler.removeFilter(filterfunc)
377
+
378
+ def test_empty_filter(self):
379
+ f = logging.Filter()
380
+ r = logging.makeLogRecord({'name': 'spam.eggs'})
381
+ self.assertTrue(f.filter(r))
382
+
383
+ #
384
+ # First, we define our levels. There can be as many as you want - the only
385
+ # limitations are that they should be integers, the lowest should be > 0 and
386
+ # larger values mean less information being logged. If you need specific
387
+ # level values which do not fit into these limitations, you can use a
388
+ # mapping dictionary to convert between your application levels and the
389
+ # logging system.
390
+ #
391
+ SILENT = 120
392
+ TACITURN = 119
393
+ TERSE = 118
394
+ EFFUSIVE = 117
395
+ SOCIABLE = 116
396
+ VERBOSE = 115
397
+ TALKATIVE = 114
398
+ GARRULOUS = 113
399
+ CHATTERBOX = 112
400
+ BORING = 111
401
+
402
+ LEVEL_RANGE = range(BORING, SILENT + 1)
403
+
404
+ #
405
+ # Next, we define names for our levels. You don't need to do this - in which
406
+ # case the system will use "Level n" to denote the text for the level.
407
+ #
408
+ my_logging_levels = {
409
+ SILENT : 'Silent',
410
+ TACITURN : 'Taciturn',
411
+ TERSE : 'Terse',
412
+ EFFUSIVE : 'Effusive',
413
+ SOCIABLE : 'Sociable',
414
+ VERBOSE : 'Verbose',
415
+ TALKATIVE : 'Talkative',
416
+ GARRULOUS : 'Garrulous',
417
+ CHATTERBOX : 'Chatterbox',
418
+ BORING : 'Boring',
419
+ }
420
+
421
+ class GarrulousFilter(logging.Filter):
422
+
423
+ """A filter which blocks garrulous messages."""
424
+
425
+ def filter(self, record):
426
+ return record.levelno != GARRULOUS
427
+
428
+ class VerySpecificFilter(logging.Filter):
429
+
430
+ """A filter which blocks sociable and taciturn messages."""
431
+
432
+ def filter(self, record):
433
+ return record.levelno not in [SOCIABLE, TACITURN]
434
+
435
+
436
+ class CustomLevelsAndFiltersTest(BaseTest):
437
+
438
+ """Test various filtering possibilities with custom logging levels."""
439
+
440
+ # Skip the logger name group.
441
+ expected_log_pat = r"^[\w.]+ -> (\w+): (\d+)$"
442
+
443
+ def setUp(self):
444
+ BaseTest.setUp(self)
445
+ for k, v in my_logging_levels.items():
446
+ logging.addLevelName(k, v)
447
+
448
+ def log_at_all_levels(self, logger):
449
+ for lvl in LEVEL_RANGE:
450
+ logger.log(lvl, self.next_message())
451
+
452
+ def test_logger_filter(self):
453
+ # Filter at logger level.
454
+ self.root_logger.setLevel(VERBOSE)
455
+ # Levels >= 'Verbose' are good.
456
+ self.log_at_all_levels(self.root_logger)
457
+ self.assert_log_lines([
458
+ ('Verbose', '5'),
459
+ ('Sociable', '6'),
460
+ ('Effusive', '7'),
461
+ ('Terse', '8'),
462
+ ('Taciturn', '9'),
463
+ ('Silent', '10'),
464
+ ])
465
+
466
+ def test_handler_filter(self):
467
+ # Filter at handler level.
468
+ self.root_logger.handlers[0].setLevel(SOCIABLE)
469
+ try:
470
+ # Levels >= 'Sociable' are good.
471
+ self.log_at_all_levels(self.root_logger)
472
+ self.assert_log_lines([
473
+ ('Sociable', '6'),
474
+ ('Effusive', '7'),
475
+ ('Terse', '8'),
476
+ ('Taciturn', '9'),
477
+ ('Silent', '10'),
478
+ ])
479
+ finally:
480
+ self.root_logger.handlers[0].setLevel(logging.NOTSET)
481
+
482
+ def test_specific_filters(self):
483
+ # Set a specific filter object on the handler, and then add another
484
+ # filter object on the logger itself.
485
+ handler = self.root_logger.handlers[0]
486
+ specific_filter = None
487
+ garr = GarrulousFilter()
488
+ handler.addFilter(garr)
489
+ try:
490
+ self.log_at_all_levels(self.root_logger)
491
+ first_lines = [
492
+ # Notice how 'Garrulous' is missing
493
+ ('Boring', '1'),
494
+ ('Chatterbox', '2'),
495
+ ('Talkative', '4'),
496
+ ('Verbose', '5'),
497
+ ('Sociable', '6'),
498
+ ('Effusive', '7'),
499
+ ('Terse', '8'),
500
+ ('Taciturn', '9'),
501
+ ('Silent', '10'),
502
+ ]
503
+ self.assert_log_lines(first_lines)
504
+
505
+ specific_filter = VerySpecificFilter()
506
+ self.root_logger.addFilter(specific_filter)
507
+ self.log_at_all_levels(self.root_logger)
508
+ self.assert_log_lines(first_lines + [
509
+ # Not only 'Garrulous' is still missing, but also 'Sociable'
510
+ # and 'Taciturn'
511
+ ('Boring', '11'),
512
+ ('Chatterbox', '12'),
513
+ ('Talkative', '14'),
514
+ ('Verbose', '15'),
515
+ ('Effusive', '17'),
516
+ ('Terse', '18'),
517
+ ('Silent', '20'),
518
+ ])
519
+ finally:
520
+ if specific_filter:
521
+ self.root_logger.removeFilter(specific_filter)
522
+ handler.removeFilter(garr)
523
+
524
+
525
+ class HandlerTest(BaseTest):
526
+ def test_name(self):
527
+ h = logging.Handler()
528
+ h.name = 'generic'
529
+ self.assertEqual(h.name, 'generic')
530
+ h.name = 'anothergeneric'
531
+ self.assertEqual(h.name, 'anothergeneric')
532
+ self.assertRaises(NotImplementedError, h.emit, None)
533
+
534
+ def test_builtin_handlers(self):
535
+ # We can't actually *use* too many handlers in the tests,
536
+ # but we can try instantiating them with various options
537
+ if sys.platform in ('linux', 'darwin'):
538
+ for existing in (True, False):
539
+ fd, fn = tempfile.mkstemp()
540
+ os.close(fd)
541
+ if not existing:
542
+ os.unlink(fn)
543
+ h = logging.handlers.WatchedFileHandler(fn, delay=True)
544
+ if existing:
545
+ dev, ino = h.dev, h.ino
546
+ self.assertEqual(dev, -1)
547
+ self.assertEqual(ino, -1)
548
+ r = logging.makeLogRecord({'msg': 'Test'})
549
+ h.handle(r)
550
+ # Now remove the file.
551
+ os.unlink(fn)
552
+ self.assertFalse(os.path.exists(fn))
553
+ # The next call should recreate the file.
554
+ h.handle(r)
555
+ self.assertTrue(os.path.exists(fn))
556
+ else:
557
+ self.assertEqual(h.dev, -1)
558
+ self.assertEqual(h.ino, -1)
559
+ h.close()
560
+ if existing:
561
+ os.unlink(fn)
562
+ if sys.platform == 'darwin':
563
+ sockname = '/var/run/syslog'
564
+ else:
565
+ sockname = '/dev/log'
566
+ try:
567
+ h = logging.handlers.SysLogHandler(sockname)
568
+ self.assertEqual(h.facility, h.LOG_USER)
569
+ self.assertTrue(h.unixsocket)
570
+ h.close()
571
+ except OSError: # syslogd might not be available
572
+ pass
573
+ for method in ('GET', 'POST', 'PUT'):
574
+ if method == 'PUT':
575
+ self.assertRaises(ValueError, logging.handlers.HTTPHandler,
576
+ 'localhost', '/log', method)
577
+ else:
578
+ h = logging.handlers.HTTPHandler('localhost', '/log', method)
579
+ h.close()
580
+ h = logging.handlers.BufferingHandler(0)
581
+ r = logging.makeLogRecord({})
582
+ self.assertTrue(h.shouldFlush(r))
583
+ h.close()
584
+ h = logging.handlers.BufferingHandler(1)
585
+ self.assertFalse(h.shouldFlush(r))
586
+ h.close()
587
+
588
+ @unittest.skipIf(os.name == 'nt', 'WatchedFileHandler not appropriate for Windows.')
589
+ @unittest.skipUnless(threading, 'Threading required for this test.')
590
+ def test_race(self):
591
+ # Issue #14632 refers.
592
+ def remove_loop(fname, tries):
593
+ for _ in range(tries):
594
+ try:
595
+ os.unlink(fname)
596
+ self.deletion_time = time.time()
597
+ except OSError:
598
+ pass
599
+ time.sleep(0.004 * random.randint(0, 4))
600
+
601
+ del_count = 500
602
+ log_count = 500
603
+
604
+ self.handle_time = None
605
+ self.deletion_time = None
606
+
607
+ for delay in (False, True):
608
+ fd, fn = tempfile.mkstemp('.log', 'test_logging-3-')
609
+ os.close(fd)
610
+ remover = threading.Thread(target=remove_loop, args=(fn, del_count))
611
+ remover.daemon = True
612
+ remover.start()
613
+ h = logging.handlers.WatchedFileHandler(fn, delay=delay)
614
+ f = logging.Formatter('%(asctime)s: %(levelname)s: %(message)s')
615
+ h.setFormatter(f)
616
+ try:
617
+ for _ in range(log_count):
618
+ time.sleep(0.005)
619
+ r = logging.makeLogRecord({'msg': 'testing' })
620
+ try:
621
+ self.handle_time = time.time()
622
+ h.handle(r)
623
+ except Exception:
624
+ print('Deleted at %s, '
625
+ 'opened at %s' % (self.deletion_time,
626
+ self.handle_time))
627
+ raise
628
+ finally:
629
+ remover.join()
630
+ h.close()
631
+ if os.path.exists(fn):
632
+ os.unlink(fn)
633
+
634
+
635
+ class BadStream(object):
636
+ def write(self, data):
637
+ raise RuntimeError('deliberate mistake')
638
+
639
+ class TestStreamHandler(logging.StreamHandler):
640
+ def handleError(self, record):
641
+ self.error_record = record
642
+
643
+ class StreamHandlerTest(BaseTest):
644
+ def test_error_handling(self):
645
+ h = TestStreamHandler(BadStream())
646
+ r = logging.makeLogRecord({})
647
+ old_raise = logging.raiseExceptions
648
+ old_stderr = sys.stderr
649
+ try:
650
+ h.handle(r)
651
+ self.assertIs(h.error_record, r)
652
+ h = logging.StreamHandler(BadStream())
653
+ sys.stderr = sio = io.StringIO()
654
+ h.handle(r)
655
+ self.assertIn('\nRuntimeError: deliberate mistake\n',
656
+ sio.getvalue())
657
+ logging.raiseExceptions = False
658
+ sys.stderr = sio = io.StringIO()
659
+ h.handle(r)
660
+ self.assertEqual('', sio.getvalue())
661
+ finally:
662
+ logging.raiseExceptions = old_raise
663
+ sys.stderr = old_stderr
664
+
665
+ # -- The following section could be moved into a server_helper.py module
666
+ # -- if it proves to be of wider utility than just test_logging
667
+
668
+ if threading:
669
+ class TestSMTPServer(smtpd.SMTPServer):
670
+ """
671
+ This class implements a test SMTP server.
672
+
673
+ :param addr: A (host, port) tuple which the server listens on.
674
+ You can specify a port value of zero: the server's
675
+ *port* attribute will hold the actual port number
676
+ used, which can be used in client connections.
677
+ :param handler: A callable which will be called to process
678
+ incoming messages. The handler will be passed
679
+ the client address tuple, who the message is from,
680
+ a list of recipients and the message data.
681
+ :param poll_interval: The interval, in seconds, used in the underlying
682
+ :func:`select` or :func:`poll` call by
683
+ :func:`asyncore.loop`.
684
+ :param sockmap: A dictionary which will be used to hold
685
+ :class:`asyncore.dispatcher` instances used by
686
+ :func:`asyncore.loop`. This avoids changing the
687
+ :mod:`asyncore` module's global state.
688
+ """
689
+
690
+ def __init__(self, addr, handler, poll_interval, sockmap):
691
+ smtpd.SMTPServer.__init__(self, addr, None, map=sockmap)
692
+ self.port = self.socket.getsockname()[1]
693
+ self._handler = handler
694
+ self._thread = None
695
+ self.poll_interval = poll_interval
696
+
697
+ def process_message(self, peer, mailfrom, rcpttos, data):
698
+ """
699
+ Delegates to the handler passed in to the server's constructor.
700
+
701
+ Typically, this will be a test case method.
702
+ :param peer: The client (host, port) tuple.
703
+ :param mailfrom: The address of the sender.
704
+ :param rcpttos: The addresses of the recipients.
705
+ :param data: The message.
706
+ """
707
+ self._handler(peer, mailfrom, rcpttos, data)
708
+
709
+ def start(self):
710
+ """
711
+ Start the server running on a separate daemon thread.
712
+ """
713
+ self._thread = t = threading.Thread(target=self.serve_forever,
714
+ args=(self.poll_interval,))
715
+ t.setDaemon(True)
716
+ t.start()
717
+
718
+ def serve_forever(self, poll_interval):
719
+ """
720
+ Run the :mod:`asyncore` loop until normal termination
721
+ conditions arise.
722
+ :param poll_interval: The interval, in seconds, used in the underlying
723
+ :func:`select` or :func:`poll` call by
724
+ :func:`asyncore.loop`.
725
+ """
726
+ try:
727
+ asyncore.loop(poll_interval, map=self._map)
728
+ except OSError:
729
+ # On FreeBSD 8, closing the server repeatably
730
+ # raises this error. We swallow it if the
731
+ # server has been closed.
732
+ if self.connected or self.accepting:
733
+ raise
734
+
735
+ def stop(self, timeout=None):
736
+ """
737
+ Stop the thread by closing the server instance.
738
+ Wait for the server thread to terminate.
739
+
740
+ :param timeout: How long to wait for the server thread
741
+ to terminate.
742
+ """
743
+ self.close()
744
+ self._thread.join(timeout)
745
+ self._thread = None
746
+
747
+ class ControlMixin(object):
748
+ """
749
+ This mixin is used to start a server on a separate thread, and
750
+ shut it down programmatically. Request handling is simplified - instead
751
+ of needing to derive a suitable RequestHandler subclass, you just
752
+ provide a callable which will be passed each received request to be
753
+ processed.
754
+
755
+ :param handler: A handler callable which will be called with a
756
+ single parameter - the request - in order to
757
+ process the request. This handler is called on the
758
+ server thread, effectively meaning that requests are
759
+ processed serially. While not quite Web scale ;-),
760
+ this should be fine for testing applications.
761
+ :param poll_interval: The polling interval in seconds.
762
+ """
763
+ def __init__(self, handler, poll_interval):
764
+ self._thread = None
765
+ self.poll_interval = poll_interval
766
+ self._handler = handler
767
+ self.ready = threading.Event()
768
+
769
+ def start(self):
770
+ """
771
+ Create a daemon thread to run the server, and start it.
772
+ """
773
+ self._thread = t = threading.Thread(target=self.serve_forever,
774
+ args=(self.poll_interval,))
775
+ t.setDaemon(True)
776
+ t.start()
777
+
778
+ def serve_forever(self, poll_interval):
779
+ """
780
+ Run the server. Set the ready flag before entering the
781
+ service loop.
782
+ """
783
+ self.ready.set()
784
+ super(ControlMixin, self).serve_forever(poll_interval)
785
+
786
+ def stop(self, timeout=None):
787
+ """
788
+ Tell the server thread to stop, and wait for it to do so.
789
+
790
+ :param timeout: How long to wait for the server thread
791
+ to terminate.
792
+ """
793
+ self.shutdown()
794
+ if self._thread is not None:
795
+ self._thread.join(timeout)
796
+ self._thread = None
797
+ self.server_close()
798
+ self.ready.clear()
799
+
800
+ class TestHTTPServer(ControlMixin, HTTPServer):
801
+ """
802
+ An HTTP server which is controllable using :class:`ControlMixin`.
803
+
804
+ :param addr: A tuple with the IP address and port to listen on.
805
+ :param handler: A handler callable which will be called with a
806
+ single parameter - the request - in order to
807
+ process the request.
808
+ :param poll_interval: The polling interval in seconds.
809
+ :param log: Pass ``True`` to enable log messages.
810
+ """
811
+ def __init__(self, addr, handler, poll_interval=0.5,
812
+ log=False, sslctx=None):
813
+ class DelegatingHTTPRequestHandler(BaseHTTPRequestHandler):
814
+ def __getattr__(self, name, default=None):
815
+ if name.startswith('do_'):
816
+ return self.process_request
817
+ raise AttributeError(name)
818
+
819
+ def process_request(self):
820
+ self.server._handler(self)
821
+
822
+ def log_message(self, format, *args):
823
+ if log:
824
+ super(DelegatingHTTPRequestHandler,
825
+ self).log_message(format, *args)
826
+ HTTPServer.__init__(self, addr, DelegatingHTTPRequestHandler)
827
+ ControlMixin.__init__(self, handler, poll_interval)
828
+ self.sslctx = sslctx
829
+
830
+ def get_request(self):
831
+ try:
832
+ sock, addr = self.socket.accept()
833
+ if self.sslctx:
834
+ sock = self.sslctx.wrap_socket(sock, server_side=True)
835
+ except OSError as e:
836
+ # socket errors are silenced by the caller, print them here
837
+ sys.stderr.write("Got an error:\n%s\n" % e)
838
+ raise
839
+ return sock, addr
840
+
841
+ class TestTCPServer(ControlMixin, ThreadingTCPServer):
842
+ """
843
+ A TCP server which is controllable using :class:`ControlMixin`.
844
+
845
+ :param addr: A tuple with the IP address and port to listen on.
846
+ :param handler: A handler callable which will be called with a single
847
+ parameter - the request - in order to process the request.
848
+ :param poll_interval: The polling interval in seconds.
849
+ :bind_and_activate: If True (the default), binds the server and starts it
850
+ listening. If False, you need to call
851
+ :meth:`server_bind` and :meth:`server_activate` at
852
+ some later time before calling :meth:`start`, so that
853
+ the server will set up the socket and listen on it.
854
+ """
855
+
856
+ allow_reuse_address = True
857
+
858
+ def __init__(self, addr, handler, poll_interval=0.5,
859
+ bind_and_activate=True):
860
+ class DelegatingTCPRequestHandler(StreamRequestHandler):
861
+
862
+ def handle(self):
863
+ self.server._handler(self)
864
+ ThreadingTCPServer.__init__(self, addr, DelegatingTCPRequestHandler,
865
+ bind_and_activate)
866
+ ControlMixin.__init__(self, handler, poll_interval)
867
+
868
+ def server_bind(self):
869
+ super(TestTCPServer, self).server_bind()
870
+ self.port = self.socket.getsockname()[1]
871
+
872
+ class TestUDPServer(ControlMixin, ThreadingUDPServer):
873
+ """
874
+ A UDP server which is controllable using :class:`ControlMixin`.
875
+
876
+ :param addr: A tuple with the IP address and port to listen on.
877
+ :param handler: A handler callable which will be called with a
878
+ single parameter - the request - in order to
879
+ process the request.
880
+ :param poll_interval: The polling interval for shutdown requests,
881
+ in seconds.
882
+ :bind_and_activate: If True (the default), binds the server and
883
+ starts it listening. If False, you need to
884
+ call :meth:`server_bind` and
885
+ :meth:`server_activate` at some later time
886
+ before calling :meth:`start`, so that the server will
887
+ set up the socket and listen on it.
888
+ """
889
+ def __init__(self, addr, handler, poll_interval=0.5,
890
+ bind_and_activate=True):
891
+ class DelegatingUDPRequestHandler(DatagramRequestHandler):
892
+
893
+ def handle(self):
894
+ self.server._handler(self)
895
+
896
+ def finish(self):
897
+ data = self.wfile.getvalue()
898
+ if data:
899
+ try:
900
+ super(DelegatingUDPRequestHandler, self).finish()
901
+ except OSError:
902
+ if not self.server._closed:
903
+ raise
904
+
905
+ ThreadingUDPServer.__init__(self, addr,
906
+ DelegatingUDPRequestHandler,
907
+ bind_and_activate)
908
+ ControlMixin.__init__(self, handler, poll_interval)
909
+ self._closed = False
910
+
911
+ def server_bind(self):
912
+ super(TestUDPServer, self).server_bind()
913
+ self.port = self.socket.getsockname()[1]
914
+
915
+ def server_close(self):
916
+ super(TestUDPServer, self).server_close()
917
+ self._closed = True
918
+
919
+ if hasattr(socket, "AF_UNIX"):
920
+ class TestUnixStreamServer(TestTCPServer):
921
+ address_family = socket.AF_UNIX
922
+
923
+ class TestUnixDatagramServer(TestUDPServer):
924
+ address_family = socket.AF_UNIX
925
+
926
+ # - end of server_helper section
927
+
928
+ @unittest.skipUnless(threading, 'Threading required for this test.')
929
+ class SMTPHandlerTest(BaseTest):
930
+ TIMEOUT = 8.0
931
+ def test_basic(self):
932
+ sockmap = {}
933
+ server = TestSMTPServer(('localhost', 0), self.process_message, 0.001,
934
+ sockmap)
935
+ server.start()
936
+ addr = ('localhost', server.port)
937
+ h = logging.handlers.SMTPHandler(addr, 'me', 'you', 'Log',
938
+ timeout=self.TIMEOUT)
939
+ self.assertEqual(h.toaddrs, ['you'])
940
+ self.messages = []
941
+ r = logging.makeLogRecord({'msg': 'Hello'})
942
+ self.handled = threading.Event()
943
+ h.handle(r)
944
+ self.handled.wait(self.TIMEOUT) # 14314: don't wait forever
945
+ server.stop()
946
+ self.assertTrue(self.handled.is_set())
947
+ self.assertEqual(len(self.messages), 1)
948
+ peer, mailfrom, rcpttos, data = self.messages[0]
949
+ self.assertEqual(mailfrom, 'me')
950
+ self.assertEqual(rcpttos, ['you'])
951
+ self.assertIn('\nSubject: Log\n', data)
952
+ self.assertTrue(data.endswith('\n\nHello'))
953
+ h.close()
954
+
955
+ def process_message(self, *args):
956
+ self.messages.append(args)
957
+ self.handled.set()
958
+
959
+ class MemoryHandlerTest(BaseTest):
960
+
961
+ """Tests for the MemoryHandler."""
962
+
963
+ # Do not bother with a logger name group.
964
+ expected_log_pat = r"^[\w.]+ -> (\w+): (\d+)$"
965
+
966
+ def setUp(self):
967
+ BaseTest.setUp(self)
968
+ self.mem_hdlr = logging.handlers.MemoryHandler(10, logging.WARNING,
969
+ self.root_hdlr)
970
+ self.mem_logger = logging.getLogger('mem')
971
+ self.mem_logger.propagate = 0
972
+ self.mem_logger.addHandler(self.mem_hdlr)
973
+
974
+ def tearDown(self):
975
+ self.mem_hdlr.close()
976
+ BaseTest.tearDown(self)
977
+
978
+ def test_flush(self):
979
+ # The memory handler flushes to its target handler based on specific
980
+ # criteria (message count and message level).
981
+ self.mem_logger.debug(self.next_message())
982
+ self.assert_log_lines([])
983
+ self.mem_logger.info(self.next_message())
984
+ self.assert_log_lines([])
985
+ # This will flush because the level is >= logging.WARNING
986
+ self.mem_logger.warning(self.next_message())
987
+ lines = [
988
+ ('DEBUG', '1'),
989
+ ('INFO', '2'),
990
+ ('WARNING', '3'),
991
+ ]
992
+ self.assert_log_lines(lines)
993
+ for n in (4, 14):
994
+ for i in range(9):
995
+ self.mem_logger.debug(self.next_message())
996
+ self.assert_log_lines(lines)
997
+ # This will flush because it's the 10th message since the last
998
+ # flush.
999
+ self.mem_logger.debug(self.next_message())
1000
+ lines = lines + [('DEBUG', str(i)) for i in range(n, n + 10)]
1001
+ self.assert_log_lines(lines)
1002
+
1003
+ self.mem_logger.debug(self.next_message())
1004
+ self.assert_log_lines(lines)
1005
+
1006
+
1007
+ class ExceptionFormatter(logging.Formatter):
1008
+ """A special exception formatter."""
1009
+ def formatException(self, ei):
1010
+ return "Got a [%s]" % ei[0].__name__
1011
+
1012
+
1013
+ class ConfigFileTest(BaseTest):
1014
+
1015
+ """Reading logging config from a .ini-style config file."""
1016
+
1017
+ expected_log_pat = r"^(\w+) \+\+ (\w+)$"
1018
+
1019
+ # config0 is a standard configuration.
1020
+ config0 = """
1021
+ [loggers]
1022
+ keys=root
1023
+
1024
+ [handlers]
1025
+ keys=hand1
1026
+
1027
+ [formatters]
1028
+ keys=form1
1029
+
1030
+ [logger_root]
1031
+ level=WARNING
1032
+ handlers=hand1
1033
+
1034
+ [handler_hand1]
1035
+ class=StreamHandler
1036
+ level=NOTSET
1037
+ formatter=form1
1038
+ args=(sys.stdout,)
1039
+
1040
+ [formatter_form1]
1041
+ format=%(levelname)s ++ %(message)s
1042
+ datefmt=
1043
+ """
1044
+
1045
+ # config1 adds a little to the standard configuration.
1046
+ config1 = """
1047
+ [loggers]
1048
+ keys=root,parser
1049
+
1050
+ [handlers]
1051
+ keys=hand1
1052
+
1053
+ [formatters]
1054
+ keys=form1
1055
+
1056
+ [logger_root]
1057
+ level=WARNING
1058
+ handlers=
1059
+
1060
+ [logger_parser]
1061
+ level=DEBUG
1062
+ handlers=hand1
1063
+ propagate=1
1064
+ qualname=compiler.parser
1065
+
1066
+ [handler_hand1]
1067
+ class=StreamHandler
1068
+ level=NOTSET
1069
+ formatter=form1
1070
+ args=(sys.stdout,)
1071
+
1072
+ [formatter_form1]
1073
+ format=%(levelname)s ++ %(message)s
1074
+ datefmt=
1075
+ """
1076
+
1077
+ # config1a moves the handler to the root.
1078
+ config1a = """
1079
+ [loggers]
1080
+ keys=root,parser
1081
+
1082
+ [handlers]
1083
+ keys=hand1
1084
+
1085
+ [formatters]
1086
+ keys=form1
1087
+
1088
+ [logger_root]
1089
+ level=WARNING
1090
+ handlers=hand1
1091
+
1092
+ [logger_parser]
1093
+ level=DEBUG
1094
+ handlers=
1095
+ propagate=1
1096
+ qualname=compiler.parser
1097
+
1098
+ [handler_hand1]
1099
+ class=StreamHandler
1100
+ level=NOTSET
1101
+ formatter=form1
1102
+ args=(sys.stdout,)
1103
+
1104
+ [formatter_form1]
1105
+ format=%(levelname)s ++ %(message)s
1106
+ datefmt=
1107
+ """
1108
+
1109
+ # config2 has a subtle configuration error that should be reported
1110
+ config2 = config1.replace("sys.stdout", "sys.stbout")
1111
+
1112
+ # config3 has a less subtle configuration error
1113
+ config3 = config1.replace("formatter=form1", "formatter=misspelled_name")
1114
+
1115
+ # config4 specifies a custom formatter class to be loaded
1116
+ config4 = """
1117
+ [loggers]
1118
+ keys=root
1119
+
1120
+ [handlers]
1121
+ keys=hand1
1122
+
1123
+ [formatters]
1124
+ keys=form1
1125
+
1126
+ [logger_root]
1127
+ level=NOTSET
1128
+ handlers=hand1
1129
+
1130
+ [handler_hand1]
1131
+ class=StreamHandler
1132
+ level=NOTSET
1133
+ formatter=form1
1134
+ args=(sys.stdout,)
1135
+
1136
+ [formatter_form1]
1137
+ class=""" + __name__ + """.ExceptionFormatter
1138
+ format=%(levelname)s:%(name)s:%(message)s
1139
+ datefmt=
1140
+ """
1141
+
1142
+ # config5 specifies a custom handler class to be loaded
1143
+ config5 = config1.replace('class=StreamHandler', 'class=logging.StreamHandler')
1144
+
1145
+ # config6 uses ', ' delimiters in the handlers and formatters sections
1146
+ config6 = """
1147
+ [loggers]
1148
+ keys=root,parser
1149
+
1150
+ [handlers]
1151
+ keys=hand1, hand2
1152
+
1153
+ [formatters]
1154
+ keys=form1, form2
1155
+
1156
+ [logger_root]
1157
+ level=WARNING
1158
+ handlers=
1159
+
1160
+ [logger_parser]
1161
+ level=DEBUG
1162
+ handlers=hand1
1163
+ propagate=1
1164
+ qualname=compiler.parser
1165
+
1166
+ [handler_hand1]
1167
+ class=StreamHandler
1168
+ level=NOTSET
1169
+ formatter=form1
1170
+ args=(sys.stdout,)
1171
+
1172
+ [handler_hand2]
1173
+ class=StreamHandler
1174
+ level=NOTSET
1175
+ formatter=form1
1176
+ args=(sys.stderr,)
1177
+
1178
+ [formatter_form1]
1179
+ format=%(levelname)s ++ %(message)s
1180
+ datefmt=
1181
+
1182
+ [formatter_form2]
1183
+ format=%(message)s
1184
+ datefmt=
1185
+ """
1186
+
1187
+ # config7 adds a compiler logger.
1188
+ config7 = """
1189
+ [loggers]
1190
+ keys=root,parser,compiler
1191
+
1192
+ [handlers]
1193
+ keys=hand1
1194
+
1195
+ [formatters]
1196
+ keys=form1
1197
+
1198
+ [logger_root]
1199
+ level=WARNING
1200
+ handlers=hand1
1201
+
1202
+ [logger_compiler]
1203
+ level=DEBUG
1204
+ handlers=
1205
+ propagate=1
1206
+ qualname=compiler
1207
+
1208
+ [logger_parser]
1209
+ level=DEBUG
1210
+ handlers=
1211
+ propagate=1
1212
+ qualname=compiler.parser
1213
+
1214
+ [handler_hand1]
1215
+ class=StreamHandler
1216
+ level=NOTSET
1217
+ formatter=form1
1218
+ args=(sys.stdout,)
1219
+
1220
+ [formatter_form1]
1221
+ format=%(levelname)s ++ %(message)s
1222
+ datefmt=
1223
+ """
1224
+
1225
+ disable_test = """
1226
+ [loggers]
1227
+ keys=root
1228
+
1229
+ [handlers]
1230
+ keys=screen
1231
+
1232
+ [formatters]
1233
+ keys=
1234
+
1235
+ [logger_root]
1236
+ level=DEBUG
1237
+ handlers=screen
1238
+
1239
+ [handler_screen]
1240
+ level=DEBUG
1241
+ class=StreamHandler
1242
+ args=(sys.stdout,)
1243
+ formatter=
1244
+ """
1245
+
1246
+ def apply_config(self, conf, **kwargs):
1247
+ file = io.StringIO(textwrap.dedent(conf))
1248
+ logging.config.fileConfig(file, **kwargs)
1249
+
1250
+ def test_config0_ok(self):
1251
+ # A simple config file which overrides the default settings.
1252
+ with captured_stdout() as output:
1253
+ self.apply_config(self.config0)
1254
+ logger = logging.getLogger()
1255
+ # Won't output anything
1256
+ logger.info(self.next_message())
1257
+ # Outputs a message
1258
+ logger.error(self.next_message())
1259
+ self.assert_log_lines([
1260
+ ('ERROR', '2'),
1261
+ ], stream=output)
1262
+ # Original logger output is empty.
1263
+ self.assert_log_lines([])
1264
+
1265
+ def test_config0_using_cp_ok(self):
1266
+ # A simple config file which overrides the default settings.
1267
+ with captured_stdout() as output:
1268
+ file = io.StringIO(textwrap.dedent(self.config0))
1269
+ cp = configparser.ConfigParser()
1270
+ cp.read_file(file)
1271
+ logging.config.fileConfig(cp)
1272
+ logger = logging.getLogger()
1273
+ # Won't output anything
1274
+ logger.info(self.next_message())
1275
+ # Outputs a message
1276
+ logger.error(self.next_message())
1277
+ self.assert_log_lines([
1278
+ ('ERROR', '2'),
1279
+ ], stream=output)
1280
+ # Original logger output is empty.
1281
+ self.assert_log_lines([])
1282
+
1283
+ def test_config1_ok(self, config=config1):
1284
+ # A config file defining a sub-parser as well.
1285
+ with captured_stdout() as output:
1286
+ self.apply_config(config)
1287
+ logger = logging.getLogger("compiler.parser")
1288
+ # Both will output a message
1289
+ logger.info(self.next_message())
1290
+ logger.error(self.next_message())
1291
+ self.assert_log_lines([
1292
+ ('INFO', '1'),
1293
+ ('ERROR', '2'),
1294
+ ], stream=output)
1295
+ # Original logger output is empty.
1296
+ self.assert_log_lines([])
1297
+
1298
+ def test_config2_failure(self):
1299
+ # A simple config file which overrides the default settings.
1300
+ self.assertRaises(Exception, self.apply_config, self.config2)
1301
+
1302
+ def test_config3_failure(self):
1303
+ # A simple config file which overrides the default settings.
1304
+ self.assertRaises(Exception, self.apply_config, self.config3)
1305
+
1306
+ def test_config4_ok(self):
1307
+ # A config file specifying a custom formatter class.
1308
+ with captured_stdout() as output:
1309
+ self.apply_config(self.config4)
1310
+ logger = logging.getLogger()
1311
+ try:
1312
+ raise RuntimeError()
1313
+ except RuntimeError:
1314
+ logging.exception("just testing")
1315
+ sys.stdout.seek(0)
1316
+ self.assertEqual(output.getvalue(),
1317
+ "ERROR:root:just testing\nGot a [RuntimeError]\n")
1318
+ # Original logger output is empty
1319
+ self.assert_log_lines([])
1320
+
1321
+ def test_config5_ok(self):
1322
+ self.test_config1_ok(config=self.config5)
1323
+
1324
+ def test_config6_ok(self):
1325
+ self.test_config1_ok(config=self.config6)
1326
+
1327
+ def test_config7_ok(self):
1328
+ with captured_stdout() as output:
1329
+ self.apply_config(self.config1a)
1330
+ logger = logging.getLogger("compiler.parser")
1331
+ # See issue #11424. compiler-hyphenated sorts
1332
+ # between compiler and compiler.xyz and this
1333
+ # was preventing compiler.xyz from being included
1334
+ # in the child loggers of compiler because of an
1335
+ # overzealous loop termination condition.
1336
+ hyphenated = logging.getLogger('compiler-hyphenated')
1337
+ # All will output a message
1338
+ logger.info(self.next_message())
1339
+ logger.error(self.next_message())
1340
+ hyphenated.critical(self.next_message())
1341
+ self.assert_log_lines([
1342
+ ('INFO', '1'),
1343
+ ('ERROR', '2'),
1344
+ ('CRITICAL', '3'),
1345
+ ], stream=output)
1346
+ # Original logger output is empty.
1347
+ self.assert_log_lines([])
1348
+ with captured_stdout() as output:
1349
+ self.apply_config(self.config7)
1350
+ logger = logging.getLogger("compiler.parser")
1351
+ self.assertFalse(logger.disabled)
1352
+ # Both will output a message
1353
+ logger.info(self.next_message())
1354
+ logger.error(self.next_message())
1355
+ logger = logging.getLogger("compiler.lexer")
1356
+ # Both will output a message
1357
+ logger.info(self.next_message())
1358
+ logger.error(self.next_message())
1359
+ # Will not appear
1360
+ hyphenated.critical(self.next_message())
1361
+ self.assert_log_lines([
1362
+ ('INFO', '4'),
1363
+ ('ERROR', '5'),
1364
+ ('INFO', '6'),
1365
+ ('ERROR', '7'),
1366
+ ], stream=output)
1367
+ # Original logger output is empty.
1368
+ self.assert_log_lines([])
1369
+
1370
+ def test_logger_disabling(self):
1371
+ self.apply_config(self.disable_test)
1372
+ logger = logging.getLogger('some_pristine_logger')
1373
+ self.assertFalse(logger.disabled)
1374
+ self.apply_config(self.disable_test)
1375
+ self.assertTrue(logger.disabled)
1376
+ self.apply_config(self.disable_test, disable_existing_loggers=False)
1377
+ self.assertFalse(logger.disabled)
1378
+
1379
+
1380
+ @unittest.skipUnless(threading, 'Threading required for this test.')
1381
+ class SocketHandlerTest(BaseTest):
1382
+
1383
+ """Test for SocketHandler objects."""
1384
+
1385
+ if threading:
1386
+ server_class = TestTCPServer
1387
+ address = ('localhost', 0)
1388
+
1389
+ def setUp(self):
1390
+ """Set up a TCP server to receive log messages, and a SocketHandler
1391
+ pointing to that server's address and port."""
1392
+ BaseTest.setUp(self)
1393
+ self.server = server = self.server_class(self.address,
1394
+ self.handle_socket, 0.01)
1395
+ server.start()
1396
+ server.ready.wait()
1397
+ hcls = logging.handlers.SocketHandler
1398
+ if isinstance(server.server_address, tuple):
1399
+ self.sock_hdlr = hcls('localhost', server.port)
1400
+ else:
1401
+ self.sock_hdlr = hcls(server.server_address, None)
1402
+ self.log_output = ''
1403
+ self.root_logger.removeHandler(self.root_logger.handlers[0])
1404
+ self.root_logger.addHandler(self.sock_hdlr)
1405
+ self.handled = threading.Semaphore(0)
1406
+
1407
+ def tearDown(self):
1408
+ """Shutdown the TCP server."""
1409
+ try:
1410
+ self.server.stop(2.0)
1411
+ self.root_logger.removeHandler(self.sock_hdlr)
1412
+ self.sock_hdlr.close()
1413
+ finally:
1414
+ BaseTest.tearDown(self)
1415
+
1416
+ def handle_socket(self, request):
1417
+ conn = request.connection
1418
+ while True:
1419
+ chunk = conn.recv(4)
1420
+ if len(chunk) < 4:
1421
+ break
1422
+ slen = struct.unpack(">L", chunk)[0]
1423
+ chunk = conn.recv(slen)
1424
+ while len(chunk) < slen:
1425
+ chunk = chunk + conn.recv(slen - len(chunk))
1426
+ obj = pickle.loads(chunk)
1427
+ record = logging.makeLogRecord(obj)
1428
+ self.log_output += record.msg + '\n'
1429
+ self.handled.release()
1430
+
1431
+ def test_output(self):
1432
+ # The log message sent to the SocketHandler is properly received.
1433
+ logger = logging.getLogger("tcp")
1434
+ logger.error("spam")
1435
+ self.handled.acquire()
1436
+ logger.debug("eggs")
1437
+ self.handled.acquire()
1438
+ self.assertEqual(self.log_output, "spam\neggs\n")
1439
+
1440
+ def test_noserver(self):
1441
+ # Avoid timing-related failures due to SocketHandler's own hard-wired
1442
+ # one-second timeout on socket.create_connection() (issue #16264).
1443
+ self.sock_hdlr.retryStart = 2.5
1444
+ # Kill the server
1445
+ self.server.stop(2.0)
1446
+ # The logging call should try to connect, which should fail
1447
+ try:
1448
+ raise RuntimeError('Deliberate mistake')
1449
+ except RuntimeError:
1450
+ self.root_logger.exception('Never sent')
1451
+ self.root_logger.error('Never sent, either')
1452
+ now = time.time()
1453
+ self.assertGreater(self.sock_hdlr.retryTime, now)
1454
+ time.sleep(self.sock_hdlr.retryTime - now + 0.001)
1455
+ self.root_logger.error('Nor this')
1456
+
1457
+ def _get_temp_domain_socket():
1458
+ fd, fn = tempfile.mkstemp(prefix='test_logging_', suffix='.sock')
1459
+ os.close(fd)
1460
+ # just need a name - file can't be present, or we'll get an
1461
+ # 'address already in use' error.
1462
+ os.remove(fn)
1463
+ return fn
1464
+
1465
+ @unittest.skipUnless(hasattr(socket, "AF_UNIX"), "Unix sockets required")
1466
+ @unittest.skipUnless(threading, 'Threading required for this test.')
1467
+ class UnixSocketHandlerTest(SocketHandlerTest):
1468
+
1469
+ """Test for SocketHandler with unix sockets."""
1470
+
1471
+ if threading and hasattr(socket, "AF_UNIX"):
1472
+ server_class = TestUnixStreamServer
1473
+
1474
+ def setUp(self):
1475
+ # override the definition in the base class
1476
+ self.address = _get_temp_domain_socket()
1477
+ SocketHandlerTest.setUp(self)
1478
+
1479
+ def tearDown(self):
1480
+ SocketHandlerTest.tearDown(self)
1481
+ os.remove(self.address)
1482
+
1483
+ @unittest.skipUnless(threading, 'Threading required for this test.')
1484
+ class DatagramHandlerTest(BaseTest):
1485
+
1486
+ """Test for DatagramHandler."""
1487
+
1488
+ if threading:
1489
+ server_class = TestUDPServer
1490
+ address = ('localhost', 0)
1491
+
1492
+ def setUp(self):
1493
+ """Set up a UDP server to receive log messages, and a DatagramHandler
1494
+ pointing to that server's address and port."""
1495
+ BaseTest.setUp(self)
1496
+ self.server = server = self.server_class(self.address,
1497
+ self.handle_datagram, 0.01)
1498
+ server.start()
1499
+ server.ready.wait()
1500
+ hcls = logging.handlers.DatagramHandler
1501
+ if isinstance(server.server_address, tuple):
1502
+ self.sock_hdlr = hcls('localhost', server.port)
1503
+ else:
1504
+ self.sock_hdlr = hcls(server.server_address, None)
1505
+ self.log_output = ''
1506
+ self.root_logger.removeHandler(self.root_logger.handlers[0])
1507
+ self.root_logger.addHandler(self.sock_hdlr)
1508
+ self.handled = threading.Event()
1509
+
1510
+ def tearDown(self):
1511
+ """Shutdown the UDP server."""
1512
+ try:
1513
+ self.server.stop(2.0)
1514
+ self.root_logger.removeHandler(self.sock_hdlr)
1515
+ self.sock_hdlr.close()
1516
+ finally:
1517
+ BaseTest.tearDown(self)
1518
+
1519
+ def handle_datagram(self, request):
1520
+ slen = struct.pack('>L', 0) # length of prefix
1521
+ packet = request.packet[len(slen):]
1522
+ obj = pickle.loads(packet)
1523
+ record = logging.makeLogRecord(obj)
1524
+ self.log_output += record.msg + '\n'
1525
+ self.handled.set()
1526
+
1527
+ def test_output(self):
1528
+ # The log message sent to the DatagramHandler is properly received.
1529
+ logger = logging.getLogger("udp")
1530
+ logger.error("spam")
1531
+ self.handled.wait()
1532
+ self.handled.clear()
1533
+ logger.error("eggs")
1534
+ self.handled.wait()
1535
+ self.assertEqual(self.log_output, "spam\neggs\n")
1536
+
1537
+ @unittest.skipUnless(hasattr(socket, "AF_UNIX"), "Unix sockets required")
1538
+ @unittest.skipUnless(threading, 'Threading required for this test.')
1539
+ class UnixDatagramHandlerTest(DatagramHandlerTest):
1540
+
1541
+ """Test for DatagramHandler using Unix sockets."""
1542
+
1543
+ if threading and hasattr(socket, "AF_UNIX"):
1544
+ server_class = TestUnixDatagramServer
1545
+
1546
+ def setUp(self):
1547
+ # override the definition in the base class
1548
+ self.address = _get_temp_domain_socket()
1549
+ DatagramHandlerTest.setUp(self)
1550
+
1551
+ def tearDown(self):
1552
+ DatagramHandlerTest.tearDown(self)
1553
+ os.remove(self.address)
1554
+
1555
+ @unittest.skipUnless(threading, 'Threading required for this test.')
1556
+ class SysLogHandlerTest(BaseTest):
1557
+
1558
+ """Test for SysLogHandler using UDP."""
1559
+
1560
+ if threading:
1561
+ server_class = TestUDPServer
1562
+ address = ('localhost', 0)
1563
+
1564
+ def setUp(self):
1565
+ """Set up a UDP server to receive log messages, and a SysLogHandler
1566
+ pointing to that server's address and port."""
1567
+ BaseTest.setUp(self)
1568
+ self.server = server = self.server_class(self.address,
1569
+ self.handle_datagram, 0.01)
1570
+ server.start()
1571
+ server.ready.wait()
1572
+ hcls = logging.handlers.SysLogHandler
1573
+ if isinstance(server.server_address, tuple):
1574
+ self.sl_hdlr = hcls(('localhost', server.port))
1575
+ else:
1576
+ self.sl_hdlr = hcls(server.server_address)
1577
+ self.log_output = ''
1578
+ self.root_logger.removeHandler(self.root_logger.handlers[0])
1579
+ self.root_logger.addHandler(self.sl_hdlr)
1580
+ self.handled = threading.Event()
1581
+
1582
+ def tearDown(self):
1583
+ """Shutdown the UDP server."""
1584
+ try:
1585
+ self.server.stop(2.0)
1586
+ self.root_logger.removeHandler(self.sl_hdlr)
1587
+ self.sl_hdlr.close()
1588
+ finally:
1589
+ BaseTest.tearDown(self)
1590
+
1591
+ def handle_datagram(self, request):
1592
+ self.log_output = request.packet
1593
+ self.handled.set()
1594
+
1595
+ def test_output(self):
1596
+ # The log message sent to the SysLogHandler is properly received.
1597
+ logger = logging.getLogger("slh")
1598
+ logger.error("sp\xe4m")
1599
+ self.handled.wait()
1600
+ self.assertEqual(self.log_output, b'<11>sp\xc3\xa4m\x00')
1601
+ self.handled.clear()
1602
+ self.sl_hdlr.append_nul = False
1603
+ logger.error("sp\xe4m")
1604
+ self.handled.wait()
1605
+ self.assertEqual(self.log_output, b'<11>sp\xc3\xa4m')
1606
+ self.handled.clear()
1607
+ self.sl_hdlr.ident = "h\xe4m-"
1608
+ logger.error("sp\xe4m")
1609
+ self.handled.wait()
1610
+ self.assertEqual(self.log_output, b'<11>h\xc3\xa4m-sp\xc3\xa4m')
1611
+
1612
+ @unittest.skipUnless(hasattr(socket, "AF_UNIX"), "Unix sockets required")
1613
+ @unittest.skipUnless(threading, 'Threading required for this test.')
1614
+ class UnixSysLogHandlerTest(SysLogHandlerTest):
1615
+
1616
+ """Test for SysLogHandler with Unix sockets."""
1617
+
1618
+ if threading and hasattr(socket, "AF_UNIX"):
1619
+ server_class = TestUnixDatagramServer
1620
+
1621
+ def setUp(self):
1622
+ # override the definition in the base class
1623
+ self.address = _get_temp_domain_socket()
1624
+ SysLogHandlerTest.setUp(self)
1625
+
1626
+ def tearDown(self):
1627
+ SysLogHandlerTest.tearDown(self)
1628
+ os.remove(self.address)
1629
+
1630
+ @unittest.skipUnless(threading, 'Threading required for this test.')
1631
+ class HTTPHandlerTest(BaseTest):
1632
+ """Test for HTTPHandler."""
1633
+
1634
+ PEMFILE = """-----BEGIN RSA PRIVATE KEY-----
1635
+ MIICXQIBAAKBgQDGT4xS5r91rbLJQK2nUDenBhBG6qFk+bVOjuAGC/LSHlAoBnvG
1636
+ zQG3agOG+e7c5z2XT8m2ktORLqG3E4mYmbxgyhDrzP6ei2Anc+pszmnxPoK3Puh5
1637
+ aXV+XKt0bU0C1m2+ACmGGJ0t3P408art82nOxBw8ZHgIg9Dtp6xIUCyOqwIDAQAB
1638
+ AoGBAJFTnFboaKh5eUrIzjmNrKsG44jEyy+vWvHN/FgSC4l103HxhmWiuL5Lv3f7
1639
+ 0tMp1tX7D6xvHwIG9VWvyKb/Cq9rJsDibmDVIOslnOWeQhG+XwJyitR0pq/KlJIB
1640
+ 5LjORcBw795oKWOAi6RcOb1ON59tysEFYhAGQO9k6VL621gRAkEA/Gb+YXULLpbs
1641
+ piXN3q4zcHzeaVANo69tUZ6TjaQqMeTxE4tOYM0G0ZoSeHEdaP59AOZGKXXNGSQy
1642
+ 2z/MddcYGQJBAMkjLSYIpOLJY11ja8OwwswFG2hEzHe0cS9bzo++R/jc1bHA5R0Y
1643
+ i6vA5iPi+wopPFvpytdBol7UuEBe5xZrxWMCQQCWxELRHiP2yWpEeLJ3gGDzoXMN
1644
+ PydWjhRju7Bx3AzkTtf+D6lawz1+eGTuEss5i0JKBkMEwvwnN2s1ce+EuF4JAkBb
1645
+ E96h1lAzkVW5OAfYOPY8RCPA90ZO/hoyg7PpSxR0ECuDrgERR8gXIeYUYfejBkEa
1646
+ rab4CfRoVJKKM28Yq/xZAkBvuq670JRCwOgfUTdww7WpdOQBYPkzQccsKNCslQW8
1647
+ /DyW6y06oQusSENUvynT6dr3LJxt/NgZPhZX2+k1eYDV
1648
+ -----END RSA PRIVATE KEY-----
1649
+ -----BEGIN CERTIFICATE-----
1650
+ MIICGzCCAYSgAwIBAgIJAIq84a2Q/OvlMA0GCSqGSIb3DQEBBQUAMBQxEjAQBgNV
1651
+ BAMTCWxvY2FsaG9zdDAeFw0xMTA1MjExMDIzMzNaFw03NTAzMjEwMzU1MTdaMBQx
1652
+ EjAQBgNVBAMTCWxvY2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
1653
+ xk+MUua/da2yyUCtp1A3pwYQRuqhZPm1To7gBgvy0h5QKAZ7xs0Bt2oDhvnu3Oc9
1654
+ l0/JtpLTkS6htxOJmJm8YMoQ68z+notgJ3PqbM5p8T6Ctz7oeWl1flyrdG1NAtZt
1655
+ vgAphhidLdz+NPGq7fNpzsQcPGR4CIPQ7aesSFAsjqsCAwEAAaN1MHMwHQYDVR0O
1656
+ BBYEFLWaUPO6N7efGiuoS9i3DVYcUwn0MEQGA1UdIwQ9MDuAFLWaUPO6N7efGiuo
1657
+ S9i3DVYcUwn0oRikFjAUMRIwEAYDVQQDEwlsb2NhbGhvc3SCCQCKvOGtkPzr5TAM
1658
+ BgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAMK5whPjLNQK1Ivvk88oqJqq
1659
+ 4f889OwikGP0eUhOBhbFlsZs+jq5YZC2UzHz+evzKBlgAP1u4lP/cB85CnjvWqM+
1660
+ 1c/lywFHQ6HOdDeQ1L72tSYMrNOG4XNmLn0h7rx6GoTU7dcFRfseahBCq8mv0IDt
1661
+ IRbTpvlHWPjsSvHz0ZOH
1662
+ -----END CERTIFICATE-----"""
1663
+
1664
+ def setUp(self):
1665
+ """Set up an HTTP server to receive log messages, and a HTTPHandler
1666
+ pointing to that server's address and port."""
1667
+ BaseTest.setUp(self)
1668
+ self.handled = threading.Event()
1669
+
1670
+ def handle_request(self, request):
1671
+ self.command = request.command
1672
+ self.log_data = urlparse(request.path)
1673
+ if self.command == 'POST':
1674
+ try:
1675
+ rlen = int(request.headers['Content-Length'])
1676
+ self.post_data = request.rfile.read(rlen)
1677
+ except:
1678
+ self.post_data = None
1679
+ request.send_response(200)
1680
+ request.end_headers()
1681
+ self.handled.set()
1682
+
1683
+ def test_output(self):
1684
+ # The log message sent to the HTTPHandler is properly received.
1685
+ logger = logging.getLogger("http")
1686
+ root_logger = self.root_logger
1687
+ root_logger.removeHandler(self.root_logger.handlers[0])
1688
+ for secure in (False, True):
1689
+ addr = ('localhost', 0)
1690
+ if secure:
1691
+ try:
1692
+ import ssl
1693
+ fd, fn = tempfile.mkstemp()
1694
+ os.close(fd)
1695
+ with open(fn, 'w') as f:
1696
+ f.write(self.PEMFILE)
1697
+ sslctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
1698
+ sslctx.load_cert_chain(fn)
1699
+ os.unlink(fn)
1700
+ except ImportError:
1701
+ sslctx = None
1702
+ else:
1703
+ sslctx = None
1704
+ self.server = server = TestHTTPServer(addr, self.handle_request,
1705
+ 0.01, sslctx=sslctx)
1706
+ server.start()
1707
+ server.ready.wait()
1708
+ host = 'localhost:%d' % server.server_port
1709
+ secure_client = secure and sslctx
1710
+ self.h_hdlr = logging.handlers.HTTPHandler(host, '/frob',
1711
+ secure=secure_client)
1712
+ self.log_data = None
1713
+ root_logger.addHandler(self.h_hdlr)
1714
+
1715
+ for method in ('GET', 'POST'):
1716
+ self.h_hdlr.method = method
1717
+ self.handled.clear()
1718
+ msg = "sp\xe4m"
1719
+ logger.error(msg)
1720
+ self.handled.wait()
1721
+ self.assertEqual(self.log_data.path, '/frob')
1722
+ self.assertEqual(self.command, method)
1723
+ if method == 'GET':
1724
+ d = parse_qs(self.log_data.query)
1725
+ else:
1726
+ d = parse_qs(self.post_data.decode('utf-8'))
1727
+ self.assertEqual(d['name'], ['http'])
1728
+ self.assertEqual(d['funcName'], ['test_output'])
1729
+ self.assertEqual(d['msg'], [msg])
1730
+
1731
+ self.server.stop(2.0)
1732
+ self.root_logger.removeHandler(self.h_hdlr)
1733
+ self.h_hdlr.close()
1734
+
1735
+ class MemoryTest(BaseTest):
1736
+
1737
+ """Test memory persistence of logger objects."""
1738
+
1739
+ def setUp(self):
1740
+ """Create a dict to remember potentially destroyed objects."""
1741
+ BaseTest.setUp(self)
1742
+ self._survivors = {}
1743
+
1744
+ def _watch_for_survival(self, *args):
1745
+ """Watch the given objects for survival, by creating weakrefs to
1746
+ them."""
1747
+ for obj in args:
1748
+ key = id(obj), repr(obj)
1749
+ self._survivors[key] = weakref.ref(obj)
1750
+
1751
+ def _assertTruesurvival(self):
1752
+ """Assert that all objects watched for survival have survived."""
1753
+ # Trigger cycle breaking.
1754
+ gc.collect()
1755
+ dead = []
1756
+ for (id_, repr_), ref in self._survivors.items():
1757
+ if ref() is None:
1758
+ dead.append(repr_)
1759
+ if dead:
1760
+ self.fail("%d objects should have survived "
1761
+ "but have been destroyed: %s" % (len(dead), ", ".join(dead)))
1762
+
1763
+ def test_persistent_loggers(self):
1764
+ # Logger objects are persistent and retain their configuration, even
1765
+ # if visible references are destroyed.
1766
+ self.root_logger.setLevel(logging.INFO)
1767
+ foo = logging.getLogger("foo")
1768
+ self._watch_for_survival(foo)
1769
+ foo.setLevel(logging.DEBUG)
1770
+ self.root_logger.debug(self.next_message())
1771
+ foo.debug(self.next_message())
1772
+ self.assert_log_lines([
1773
+ ('foo', 'DEBUG', '2'),
1774
+ ])
1775
+ del foo
1776
+ # foo has survived.
1777
+ self._assertTruesurvival()
1778
+ # foo has retained its settings.
1779
+ bar = logging.getLogger("foo")
1780
+ bar.debug(self.next_message())
1781
+ self.assert_log_lines([
1782
+ ('foo', 'DEBUG', '2'),
1783
+ ('foo', 'DEBUG', '3'),
1784
+ ])
1785
+
1786
+
1787
+ class EncodingTest(BaseTest):
1788
+ def test_encoding_plain_file(self):
1789
+ # In Python 2.x, a plain file object is treated as having no encoding.
1790
+ log = logging.getLogger("test")
1791
+ fd, fn = tempfile.mkstemp(".log", "test_logging-1-")
1792
+ os.close(fd)
1793
+ # the non-ascii data we write to the log.
1794
+ data = "foo\x80"
1795
+ try:
1796
+ handler = logging.FileHandler(fn, encoding="utf-8")
1797
+ log.addHandler(handler)
1798
+ try:
1799
+ # write non-ascii data to the log.
1800
+ log.warning(data)
1801
+ finally:
1802
+ log.removeHandler(handler)
1803
+ handler.close()
1804
+ # check we wrote exactly those bytes, ignoring trailing \n etc
1805
+ f = open(fn, encoding="utf-8")
1806
+ try:
1807
+ self.assertEqual(f.read().rstrip(), data)
1808
+ finally:
1809
+ f.close()
1810
+ finally:
1811
+ if os.path.isfile(fn):
1812
+ os.remove(fn)
1813
+
1814
+ def test_encoding_cyrillic_unicode(self):
1815
+ log = logging.getLogger("test")
1816
+ #Get a message in Unicode: Do svidanya in Cyrillic (meaning goodbye)
1817
+ message = '\u0434\u043e \u0441\u0432\u0438\u0434\u0430\u043d\u0438\u044f'
1818
+ #Ensure it's written in a Cyrillic encoding
1819
+ writer_class = codecs.getwriter('cp1251')
1820
+ writer_class.encoding = 'cp1251'
1821
+ stream = io.BytesIO()
1822
+ writer = writer_class(stream, 'strict')
1823
+ handler = logging.StreamHandler(writer)
1824
+ log.addHandler(handler)
1825
+ try:
1826
+ log.warning(message)
1827
+ finally:
1828
+ log.removeHandler(handler)
1829
+ handler.close()
1830
+ # check we wrote exactly those bytes, ignoring trailing \n etc
1831
+ s = stream.getvalue()
1832
+ #Compare against what the data should be when encoded in CP-1251
1833
+ self.assertEqual(s, b'\xe4\xee \xf1\xe2\xe8\xe4\xe0\xed\xe8\xff\n')
1834
+
1835
+
1836
+ class WarningsTest(BaseTest):
1837
+
1838
+ def test_warnings(self):
1839
+ with warnings.catch_warnings():
1840
+ logging.captureWarnings(True)
1841
+ self.addCleanup(logging.captureWarnings, False)
1842
+ warnings.filterwarnings("always", category=UserWarning)
1843
+ stream = io.StringIO()
1844
+ h = logging.StreamHandler(stream)
1845
+ logger = logging.getLogger("py.warnings")
1846
+ logger.addHandler(h)
1847
+ warnings.warn("I'm warning you...")
1848
+ logger.removeHandler(h)
1849
+ s = stream.getvalue()
1850
+ h.close()
1851
+ self.assertGreater(s.find("UserWarning: I'm warning you...\n"), 0)
1852
+
1853
+ #See if an explicit file uses the original implementation
1854
+ a_file = io.StringIO()
1855
+ warnings.showwarning("Explicit", UserWarning, "dummy.py", 42,
1856
+ a_file, "Dummy line")
1857
+ s = a_file.getvalue()
1858
+ a_file.close()
1859
+ self.assertEqual(s,
1860
+ "dummy.py:42: UserWarning: Explicit\n Dummy line\n")
1861
+
1862
+ def test_warnings_no_handlers(self):
1863
+ with warnings.catch_warnings():
1864
+ logging.captureWarnings(True)
1865
+ self.addCleanup(logging.captureWarnings, False)
1866
+
1867
+ # confirm our assumption: no loggers are set
1868
+ logger = logging.getLogger("py.warnings")
1869
+ self.assertEqual(logger.handlers, [])
1870
+
1871
+ warnings.showwarning("Explicit", UserWarning, "dummy.py", 42)
1872
+ self.assertEqual(len(logger.handlers), 1)
1873
+ self.assertIsInstance(logger.handlers[0], logging.NullHandler)
1874
+
1875
+
1876
+ def formatFunc(format, datefmt=None):
1877
+ return logging.Formatter(format, datefmt)
1878
+
1879
+ def handlerFunc():
1880
+ return logging.StreamHandler()
1881
+
1882
+ class CustomHandler(logging.StreamHandler):
1883
+ pass
1884
+
1885
+ class ConfigDictTest(BaseTest):
1886
+
1887
+ """Reading logging config from a dictionary."""
1888
+
1889
+ expected_log_pat = r"^(\w+) \+\+ (\w+)$"
1890
+
1891
+ # config0 is a standard configuration.
1892
+ config0 = {
1893
+ 'version': 1,
1894
+ 'formatters': {
1895
+ 'form1' : {
1896
+ 'format' : '%(levelname)s ++ %(message)s',
1897
+ },
1898
+ },
1899
+ 'handlers' : {
1900
+ 'hand1' : {
1901
+ 'class' : 'logging.StreamHandler',
1902
+ 'formatter' : 'form1',
1903
+ 'level' : 'NOTSET',
1904
+ 'stream' : 'ext://sys.stdout',
1905
+ },
1906
+ },
1907
+ 'root' : {
1908
+ 'level' : 'WARNING',
1909
+ 'handlers' : ['hand1'],
1910
+ },
1911
+ }
1912
+
1913
+ # config1 adds a little to the standard configuration.
1914
+ config1 = {
1915
+ 'version': 1,
1916
+ 'formatters': {
1917
+ 'form1' : {
1918
+ 'format' : '%(levelname)s ++ %(message)s',
1919
+ },
1920
+ },
1921
+ 'handlers' : {
1922
+ 'hand1' : {
1923
+ 'class' : 'logging.StreamHandler',
1924
+ 'formatter' : 'form1',
1925
+ 'level' : 'NOTSET',
1926
+ 'stream' : 'ext://sys.stdout',
1927
+ },
1928
+ },
1929
+ 'loggers' : {
1930
+ 'compiler.parser' : {
1931
+ 'level' : 'DEBUG',
1932
+ 'handlers' : ['hand1'],
1933
+ },
1934
+ },
1935
+ 'root' : {
1936
+ 'level' : 'WARNING',
1937
+ },
1938
+ }
1939
+
1940
+ # config1a moves the handler to the root. Used with config8a
1941
+ config1a = {
1942
+ 'version': 1,
1943
+ 'formatters': {
1944
+ 'form1' : {
1945
+ 'format' : '%(levelname)s ++ %(message)s',
1946
+ },
1947
+ },
1948
+ 'handlers' : {
1949
+ 'hand1' : {
1950
+ 'class' : 'logging.StreamHandler',
1951
+ 'formatter' : 'form1',
1952
+ 'level' : 'NOTSET',
1953
+ 'stream' : 'ext://sys.stdout',
1954
+ },
1955
+ },
1956
+ 'loggers' : {
1957
+ 'compiler.parser' : {
1958
+ 'level' : 'DEBUG',
1959
+ },
1960
+ },
1961
+ 'root' : {
1962
+ 'level' : 'WARNING',
1963
+ 'handlers' : ['hand1'],
1964
+ },
1965
+ }
1966
+
1967
+ # config2 has a subtle configuration error that should be reported
1968
+ config2 = {
1969
+ 'version': 1,
1970
+ 'formatters': {
1971
+ 'form1' : {
1972
+ 'format' : '%(levelname)s ++ %(message)s',
1973
+ },
1974
+ },
1975
+ 'handlers' : {
1976
+ 'hand1' : {
1977
+ 'class' : 'logging.StreamHandler',
1978
+ 'formatter' : 'form1',
1979
+ 'level' : 'NOTSET',
1980
+ 'stream' : 'ext://sys.stdbout',
1981
+ },
1982
+ },
1983
+ 'loggers' : {
1984
+ 'compiler.parser' : {
1985
+ 'level' : 'DEBUG',
1986
+ 'handlers' : ['hand1'],
1987
+ },
1988
+ },
1989
+ 'root' : {
1990
+ 'level' : 'WARNING',
1991
+ },
1992
+ }
1993
+
1994
+ #As config1 but with a misspelt level on a handler
1995
+ config2a = {
1996
+ 'version': 1,
1997
+ 'formatters': {
1998
+ 'form1' : {
1999
+ 'format' : '%(levelname)s ++ %(message)s',
2000
+ },
2001
+ },
2002
+ 'handlers' : {
2003
+ 'hand1' : {
2004
+ 'class' : 'logging.StreamHandler',
2005
+ 'formatter' : 'form1',
2006
+ 'level' : 'NTOSET',
2007
+ 'stream' : 'ext://sys.stdout',
2008
+ },
2009
+ },
2010
+ 'loggers' : {
2011
+ 'compiler.parser' : {
2012
+ 'level' : 'DEBUG',
2013
+ 'handlers' : ['hand1'],
2014
+ },
2015
+ },
2016
+ 'root' : {
2017
+ 'level' : 'WARNING',
2018
+ },
2019
+ }
2020
+
2021
+
2022
+ #As config1 but with a misspelt level on a logger
2023
+ config2b = {
2024
+ 'version': 1,
2025
+ 'formatters': {
2026
+ 'form1' : {
2027
+ 'format' : '%(levelname)s ++ %(message)s',
2028
+ },
2029
+ },
2030
+ 'handlers' : {
2031
+ 'hand1' : {
2032
+ 'class' : 'logging.StreamHandler',
2033
+ 'formatter' : 'form1',
2034
+ 'level' : 'NOTSET',
2035
+ 'stream' : 'ext://sys.stdout',
2036
+ },
2037
+ },
2038
+ 'loggers' : {
2039
+ 'compiler.parser' : {
2040
+ 'level' : 'DEBUG',
2041
+ 'handlers' : ['hand1'],
2042
+ },
2043
+ },
2044
+ 'root' : {
2045
+ 'level' : 'WRANING',
2046
+ },
2047
+ }
2048
+
2049
+ # config3 has a less subtle configuration error
2050
+ config3 = {
2051
+ 'version': 1,
2052
+ 'formatters': {
2053
+ 'form1' : {
2054
+ 'format' : '%(levelname)s ++ %(message)s',
2055
+ },
2056
+ },
2057
+ 'handlers' : {
2058
+ 'hand1' : {
2059
+ 'class' : 'logging.StreamHandler',
2060
+ 'formatter' : 'misspelled_name',
2061
+ 'level' : 'NOTSET',
2062
+ 'stream' : 'ext://sys.stdout',
2063
+ },
2064
+ },
2065
+ 'loggers' : {
2066
+ 'compiler.parser' : {
2067
+ 'level' : 'DEBUG',
2068
+ 'handlers' : ['hand1'],
2069
+ },
2070
+ },
2071
+ 'root' : {
2072
+ 'level' : 'WARNING',
2073
+ },
2074
+ }
2075
+
2076
+ # config4 specifies a custom formatter class to be loaded
2077
+ config4 = {
2078
+ 'version': 1,
2079
+ 'formatters': {
2080
+ 'form1' : {
2081
+ '()' : __name__ + '.ExceptionFormatter',
2082
+ 'format' : '%(levelname)s:%(name)s:%(message)s',
2083
+ },
2084
+ },
2085
+ 'handlers' : {
2086
+ 'hand1' : {
2087
+ 'class' : 'logging.StreamHandler',
2088
+ 'formatter' : 'form1',
2089
+ 'level' : 'NOTSET',
2090
+ 'stream' : 'ext://sys.stdout',
2091
+ },
2092
+ },
2093
+ 'root' : {
2094
+ 'level' : 'NOTSET',
2095
+ 'handlers' : ['hand1'],
2096
+ },
2097
+ }
2098
+
2099
+ # As config4 but using an actual callable rather than a string
2100
+ config4a = {
2101
+ 'version': 1,
2102
+ 'formatters': {
2103
+ 'form1' : {
2104
+ '()' : ExceptionFormatter,
2105
+ 'format' : '%(levelname)s:%(name)s:%(message)s',
2106
+ },
2107
+ 'form2' : {
2108
+ '()' : __name__ + '.formatFunc',
2109
+ 'format' : '%(levelname)s:%(name)s:%(message)s',
2110
+ },
2111
+ 'form3' : {
2112
+ '()' : formatFunc,
2113
+ 'format' : '%(levelname)s:%(name)s:%(message)s',
2114
+ },
2115
+ },
2116
+ 'handlers' : {
2117
+ 'hand1' : {
2118
+ 'class' : 'logging.StreamHandler',
2119
+ 'formatter' : 'form1',
2120
+ 'level' : 'NOTSET',
2121
+ 'stream' : 'ext://sys.stdout',
2122
+ },
2123
+ 'hand2' : {
2124
+ '()' : handlerFunc,
2125
+ },
2126
+ },
2127
+ 'root' : {
2128
+ 'level' : 'NOTSET',
2129
+ 'handlers' : ['hand1'],
2130
+ },
2131
+ }
2132
+
2133
+ # config5 specifies a custom handler class to be loaded
2134
+ config5 = {
2135
+ 'version': 1,
2136
+ 'formatters': {
2137
+ 'form1' : {
2138
+ 'format' : '%(levelname)s ++ %(message)s',
2139
+ },
2140
+ },
2141
+ 'handlers' : {
2142
+ 'hand1' : {
2143
+ 'class' : __name__ + '.CustomHandler',
2144
+ 'formatter' : 'form1',
2145
+ 'level' : 'NOTSET',
2146
+ 'stream' : 'ext://sys.stdout',
2147
+ },
2148
+ },
2149
+ 'loggers' : {
2150
+ 'compiler.parser' : {
2151
+ 'level' : 'DEBUG',
2152
+ 'handlers' : ['hand1'],
2153
+ },
2154
+ },
2155
+ 'root' : {
2156
+ 'level' : 'WARNING',
2157
+ },
2158
+ }
2159
+
2160
+ # config6 specifies a custom handler class to be loaded
2161
+ # but has bad arguments
2162
+ config6 = {
2163
+ 'version': 1,
2164
+ 'formatters': {
2165
+ 'form1' : {
2166
+ 'format' : '%(levelname)s ++ %(message)s',
2167
+ },
2168
+ },
2169
+ 'handlers' : {
2170
+ 'hand1' : {
2171
+ 'class' : __name__ + '.CustomHandler',
2172
+ 'formatter' : 'form1',
2173
+ 'level' : 'NOTSET',
2174
+ 'stream' : 'ext://sys.stdout',
2175
+ '9' : 'invalid parameter name',
2176
+ },
2177
+ },
2178
+ 'loggers' : {
2179
+ 'compiler.parser' : {
2180
+ 'level' : 'DEBUG',
2181
+ 'handlers' : ['hand1'],
2182
+ },
2183
+ },
2184
+ 'root' : {
2185
+ 'level' : 'WARNING',
2186
+ },
2187
+ }
2188
+
2189
+ #config 7 does not define compiler.parser but defines compiler.lexer
2190
+ #so compiler.parser should be disabled after applying it
2191
+ config7 = {
2192
+ 'version': 1,
2193
+ 'formatters': {
2194
+ 'form1' : {
2195
+ 'format' : '%(levelname)s ++ %(message)s',
2196
+ },
2197
+ },
2198
+ 'handlers' : {
2199
+ 'hand1' : {
2200
+ 'class' : 'logging.StreamHandler',
2201
+ 'formatter' : 'form1',
2202
+ 'level' : 'NOTSET',
2203
+ 'stream' : 'ext://sys.stdout',
2204
+ },
2205
+ },
2206
+ 'loggers' : {
2207
+ 'compiler.lexer' : {
2208
+ 'level' : 'DEBUG',
2209
+ 'handlers' : ['hand1'],
2210
+ },
2211
+ },
2212
+ 'root' : {
2213
+ 'level' : 'WARNING',
2214
+ },
2215
+ }
2216
+
2217
+ # config8 defines both compiler and compiler.lexer
2218
+ # so compiler.parser should not be disabled (since
2219
+ # compiler is defined)
2220
+ config8 = {
2221
+ 'version': 1,
2222
+ 'disable_existing_loggers' : False,
2223
+ 'formatters': {
2224
+ 'form1' : {
2225
+ 'format' : '%(levelname)s ++ %(message)s',
2226
+ },
2227
+ },
2228
+ 'handlers' : {
2229
+ 'hand1' : {
2230
+ 'class' : 'logging.StreamHandler',
2231
+ 'formatter' : 'form1',
2232
+ 'level' : 'NOTSET',
2233
+ 'stream' : 'ext://sys.stdout',
2234
+ },
2235
+ },
2236
+ 'loggers' : {
2237
+ 'compiler' : {
2238
+ 'level' : 'DEBUG',
2239
+ 'handlers' : ['hand1'],
2240
+ },
2241
+ 'compiler.lexer' : {
2242
+ },
2243
+ },
2244
+ 'root' : {
2245
+ 'level' : 'WARNING',
2246
+ },
2247
+ }
2248
+
2249
+ # config8a disables existing loggers
2250
+ config8a = {
2251
+ 'version': 1,
2252
+ 'disable_existing_loggers' : True,
2253
+ 'formatters': {
2254
+ 'form1' : {
2255
+ 'format' : '%(levelname)s ++ %(message)s',
2256
+ },
2257
+ },
2258
+ 'handlers' : {
2259
+ 'hand1' : {
2260
+ 'class' : 'logging.StreamHandler',
2261
+ 'formatter' : 'form1',
2262
+ 'level' : 'NOTSET',
2263
+ 'stream' : 'ext://sys.stdout',
2264
+ },
2265
+ },
2266
+ 'loggers' : {
2267
+ 'compiler' : {
2268
+ 'level' : 'DEBUG',
2269
+ 'handlers' : ['hand1'],
2270
+ },
2271
+ 'compiler.lexer' : {
2272
+ },
2273
+ },
2274
+ 'root' : {
2275
+ 'level' : 'WARNING',
2276
+ },
2277
+ }
2278
+
2279
+ config9 = {
2280
+ 'version': 1,
2281
+ 'formatters': {
2282
+ 'form1' : {
2283
+ 'format' : '%(levelname)s ++ %(message)s',
2284
+ },
2285
+ },
2286
+ 'handlers' : {
2287
+ 'hand1' : {
2288
+ 'class' : 'logging.StreamHandler',
2289
+ 'formatter' : 'form1',
2290
+ 'level' : 'WARNING',
2291
+ 'stream' : 'ext://sys.stdout',
2292
+ },
2293
+ },
2294
+ 'loggers' : {
2295
+ 'compiler.parser' : {
2296
+ 'level' : 'WARNING',
2297
+ 'handlers' : ['hand1'],
2298
+ },
2299
+ },
2300
+ 'root' : {
2301
+ 'level' : 'NOTSET',
2302
+ },
2303
+ }
2304
+
2305
+ config9a = {
2306
+ 'version': 1,
2307
+ 'incremental' : True,
2308
+ 'handlers' : {
2309
+ 'hand1' : {
2310
+ 'level' : 'WARNING',
2311
+ },
2312
+ },
2313
+ 'loggers' : {
2314
+ 'compiler.parser' : {
2315
+ 'level' : 'INFO',
2316
+ },
2317
+ },
2318
+ }
2319
+
2320
+ config9b = {
2321
+ 'version': 1,
2322
+ 'incremental' : True,
2323
+ 'handlers' : {
2324
+ 'hand1' : {
2325
+ 'level' : 'INFO',
2326
+ },
2327
+ },
2328
+ 'loggers' : {
2329
+ 'compiler.parser' : {
2330
+ 'level' : 'INFO',
2331
+ },
2332
+ },
2333
+ }
2334
+
2335
+ #As config1 but with a filter added
2336
+ config10 = {
2337
+ 'version': 1,
2338
+ 'formatters': {
2339
+ 'form1' : {
2340
+ 'format' : '%(levelname)s ++ %(message)s',
2341
+ },
2342
+ },
2343
+ 'filters' : {
2344
+ 'filt1' : {
2345
+ 'name' : 'compiler.parser',
2346
+ },
2347
+ },
2348
+ 'handlers' : {
2349
+ 'hand1' : {
2350
+ 'class' : 'logging.StreamHandler',
2351
+ 'formatter' : 'form1',
2352
+ 'level' : 'NOTSET',
2353
+ 'stream' : 'ext://sys.stdout',
2354
+ 'filters' : ['filt1'],
2355
+ },
2356
+ },
2357
+ 'loggers' : {
2358
+ 'compiler.parser' : {
2359
+ 'level' : 'DEBUG',
2360
+ 'filters' : ['filt1'],
2361
+ },
2362
+ },
2363
+ 'root' : {
2364
+ 'level' : 'WARNING',
2365
+ 'handlers' : ['hand1'],
2366
+ },
2367
+ }
2368
+
2369
+ #As config1 but using cfg:// references
2370
+ config11 = {
2371
+ 'version': 1,
2372
+ 'true_formatters': {
2373
+ 'form1' : {
2374
+ 'format' : '%(levelname)s ++ %(message)s',
2375
+ },
2376
+ },
2377
+ 'handler_configs': {
2378
+ 'hand1' : {
2379
+ 'class' : 'logging.StreamHandler',
2380
+ 'formatter' : 'form1',
2381
+ 'level' : 'NOTSET',
2382
+ 'stream' : 'ext://sys.stdout',
2383
+ },
2384
+ },
2385
+ 'formatters' : 'cfg://true_formatters',
2386
+ 'handlers' : {
2387
+ 'hand1' : 'cfg://handler_configs[hand1]',
2388
+ },
2389
+ 'loggers' : {
2390
+ 'compiler.parser' : {
2391
+ 'level' : 'DEBUG',
2392
+ 'handlers' : ['hand1'],
2393
+ },
2394
+ },
2395
+ 'root' : {
2396
+ 'level' : 'WARNING',
2397
+ },
2398
+ }
2399
+
2400
+ #As config11 but missing the version key
2401
+ config12 = {
2402
+ 'true_formatters': {
2403
+ 'form1' : {
2404
+ 'format' : '%(levelname)s ++ %(message)s',
2405
+ },
2406
+ },
2407
+ 'handler_configs': {
2408
+ 'hand1' : {
2409
+ 'class' : 'logging.StreamHandler',
2410
+ 'formatter' : 'form1',
2411
+ 'level' : 'NOTSET',
2412
+ 'stream' : 'ext://sys.stdout',
2413
+ },
2414
+ },
2415
+ 'formatters' : 'cfg://true_formatters',
2416
+ 'handlers' : {
2417
+ 'hand1' : 'cfg://handler_configs[hand1]',
2418
+ },
2419
+ 'loggers' : {
2420
+ 'compiler.parser' : {
2421
+ 'level' : 'DEBUG',
2422
+ 'handlers' : ['hand1'],
2423
+ },
2424
+ },
2425
+ 'root' : {
2426
+ 'level' : 'WARNING',
2427
+ },
2428
+ }
2429
+
2430
+ #As config11 but using an unsupported version
2431
+ config13 = {
2432
+ 'version': 2,
2433
+ 'true_formatters': {
2434
+ 'form1' : {
2435
+ 'format' : '%(levelname)s ++ %(message)s',
2436
+ },
2437
+ },
2438
+ 'handler_configs': {
2439
+ 'hand1' : {
2440
+ 'class' : 'logging.StreamHandler',
2441
+ 'formatter' : 'form1',
2442
+ 'level' : 'NOTSET',
2443
+ 'stream' : 'ext://sys.stdout',
2444
+ },
2445
+ },
2446
+ 'formatters' : 'cfg://true_formatters',
2447
+ 'handlers' : {
2448
+ 'hand1' : 'cfg://handler_configs[hand1]',
2449
+ },
2450
+ 'loggers' : {
2451
+ 'compiler.parser' : {
2452
+ 'level' : 'DEBUG',
2453
+ 'handlers' : ['hand1'],
2454
+ },
2455
+ },
2456
+ 'root' : {
2457
+ 'level' : 'WARNING',
2458
+ },
2459
+ }
2460
+
2461
+ # As config0, but with properties
2462
+ config14 = {
2463
+ 'version': 1,
2464
+ 'formatters': {
2465
+ 'form1' : {
2466
+ 'format' : '%(levelname)s ++ %(message)s',
2467
+ },
2468
+ },
2469
+ 'handlers' : {
2470
+ 'hand1' : {
2471
+ 'class' : 'logging.StreamHandler',
2472
+ 'formatter' : 'form1',
2473
+ 'level' : 'NOTSET',
2474
+ 'stream' : 'ext://sys.stdout',
2475
+ '.': {
2476
+ 'foo': 'bar',
2477
+ 'terminator': '!\n',
2478
+ }
2479
+ },
2480
+ },
2481
+ 'root' : {
2482
+ 'level' : 'WARNING',
2483
+ 'handlers' : ['hand1'],
2484
+ },
2485
+ }
2486
+
2487
+ out_of_order = {
2488
+ "version": 1,
2489
+ "formatters": {
2490
+ "mySimpleFormatter": {
2491
+ "format": "%(asctime)s (%(name)s) %(levelname)s: %(message)s",
2492
+ "style": "$"
2493
+ }
2494
+ },
2495
+ "handlers": {
2496
+ "fileGlobal": {
2497
+ "class": "logging.StreamHandler",
2498
+ "level": "DEBUG",
2499
+ "formatter": "mySimpleFormatter"
2500
+ },
2501
+ "bufferGlobal": {
2502
+ "class": "logging.handlers.MemoryHandler",
2503
+ "capacity": 5,
2504
+ "formatter": "mySimpleFormatter",
2505
+ "target": "fileGlobal",
2506
+ "level": "DEBUG"
2507
+ }
2508
+ },
2509
+ "loggers": {
2510
+ "mymodule": {
2511
+ "level": "DEBUG",
2512
+ "handlers": ["bufferGlobal"],
2513
+ "propagate": "true"
2514
+ }
2515
+ }
2516
+ }
2517
+
2518
+ def apply_config(self, conf):
2519
+ logging.config.dictConfig(conf)
2520
+
2521
+ def test_config0_ok(self):
2522
+ # A simple config which overrides the default settings.
2523
+ with captured_stdout() as output:
2524
+ self.apply_config(self.config0)
2525
+ logger = logging.getLogger()
2526
+ # Won't output anything
2527
+ logger.info(self.next_message())
2528
+ # Outputs a message
2529
+ logger.error(self.next_message())
2530
+ self.assert_log_lines([
2531
+ ('ERROR', '2'),
2532
+ ], stream=output)
2533
+ # Original logger output is empty.
2534
+ self.assert_log_lines([])
2535
+
2536
+ def test_config1_ok(self, config=config1):
2537
+ # A config defining a sub-parser as well.
2538
+ with captured_stdout() as output:
2539
+ self.apply_config(config)
2540
+ logger = logging.getLogger("compiler.parser")
2541
+ # Both will output a message
2542
+ logger.info(self.next_message())
2543
+ logger.error(self.next_message())
2544
+ self.assert_log_lines([
2545
+ ('INFO', '1'),
2546
+ ('ERROR', '2'),
2547
+ ], stream=output)
2548
+ # Original logger output is empty.
2549
+ self.assert_log_lines([])
2550
+
2551
+ def test_config2_failure(self):
2552
+ # A simple config which overrides the default settings.
2553
+ self.assertRaises(Exception, self.apply_config, self.config2)
2554
+
2555
+ def test_config2a_failure(self):
2556
+ # A simple config which overrides the default settings.
2557
+ self.assertRaises(Exception, self.apply_config, self.config2a)
2558
+
2559
+ def test_config2b_failure(self):
2560
+ # A simple config which overrides the default settings.
2561
+ self.assertRaises(Exception, self.apply_config, self.config2b)
2562
+
2563
+ def test_config3_failure(self):
2564
+ # A simple config which overrides the default settings.
2565
+ self.assertRaises(Exception, self.apply_config, self.config3)
2566
+
2567
+ def test_config4_ok(self):
2568
+ # A config specifying a custom formatter class.
2569
+ with captured_stdout() as output:
2570
+ self.apply_config(self.config4)
2571
+ #logger = logging.getLogger()
2572
+ try:
2573
+ raise RuntimeError()
2574
+ except RuntimeError:
2575
+ logging.exception("just testing")
2576
+ sys.stdout.seek(0)
2577
+ self.assertEqual(output.getvalue(),
2578
+ "ERROR:root:just testing\nGot a [RuntimeError]\n")
2579
+ # Original logger output is empty
2580
+ self.assert_log_lines([])
2581
+
2582
+ def test_config4a_ok(self):
2583
+ # A config specifying a custom formatter class.
2584
+ with captured_stdout() as output:
2585
+ self.apply_config(self.config4a)
2586
+ #logger = logging.getLogger()
2587
+ try:
2588
+ raise RuntimeError()
2589
+ except RuntimeError:
2590
+ logging.exception("just testing")
2591
+ sys.stdout.seek(0)
2592
+ self.assertEqual(output.getvalue(),
2593
+ "ERROR:root:just testing\nGot a [RuntimeError]\n")
2594
+ # Original logger output is empty
2595
+ self.assert_log_lines([])
2596
+
2597
+ def test_config5_ok(self):
2598
+ self.test_config1_ok(config=self.config5)
2599
+
2600
+ def test_config6_failure(self):
2601
+ self.assertRaises(Exception, self.apply_config, self.config6)
2602
+
2603
+ def test_config7_ok(self):
2604
+ with captured_stdout() as output:
2605
+ self.apply_config(self.config1)
2606
+ logger = logging.getLogger("compiler.parser")
2607
+ # Both will output a message
2608
+ logger.info(self.next_message())
2609
+ logger.error(self.next_message())
2610
+ self.assert_log_lines([
2611
+ ('INFO', '1'),
2612
+ ('ERROR', '2'),
2613
+ ], stream=output)
2614
+ # Original logger output is empty.
2615
+ self.assert_log_lines([])
2616
+ with captured_stdout() as output:
2617
+ self.apply_config(self.config7)
2618
+ logger = logging.getLogger("compiler.parser")
2619
+ self.assertTrue(logger.disabled)
2620
+ logger = logging.getLogger("compiler.lexer")
2621
+ # Both will output a message
2622
+ logger.info(self.next_message())
2623
+ logger.error(self.next_message())
2624
+ self.assert_log_lines([
2625
+ ('INFO', '3'),
2626
+ ('ERROR', '4'),
2627
+ ], stream=output)
2628
+ # Original logger output is empty.
2629
+ self.assert_log_lines([])
2630
+
2631
+ #Same as test_config_7_ok but don't disable old loggers.
2632
+ def test_config_8_ok(self):
2633
+ with captured_stdout() as output:
2634
+ self.apply_config(self.config1)
2635
+ logger = logging.getLogger("compiler.parser")
2636
+ # All will output a message
2637
+ logger.info(self.next_message())
2638
+ logger.error(self.next_message())
2639
+ self.assert_log_lines([
2640
+ ('INFO', '1'),
2641
+ ('ERROR', '2'),
2642
+ ], stream=output)
2643
+ # Original logger output is empty.
2644
+ self.assert_log_lines([])
2645
+ with captured_stdout() as output:
2646
+ self.apply_config(self.config8)
2647
+ logger = logging.getLogger("compiler.parser")
2648
+ self.assertFalse(logger.disabled)
2649
+ # Both will output a message
2650
+ logger.info(self.next_message())
2651
+ logger.error(self.next_message())
2652
+ logger = logging.getLogger("compiler.lexer")
2653
+ # Both will output a message
2654
+ logger.info(self.next_message())
2655
+ logger.error(self.next_message())
2656
+ self.assert_log_lines([
2657
+ ('INFO', '3'),
2658
+ ('ERROR', '4'),
2659
+ ('INFO', '5'),
2660
+ ('ERROR', '6'),
2661
+ ], stream=output)
2662
+ # Original logger output is empty.
2663
+ self.assert_log_lines([])
2664
+
2665
+ def test_config_8a_ok(self):
2666
+ with captured_stdout() as output:
2667
+ self.apply_config(self.config1a)
2668
+ logger = logging.getLogger("compiler.parser")
2669
+ # See issue #11424. compiler-hyphenated sorts
2670
+ # between compiler and compiler.xyz and this
2671
+ # was preventing compiler.xyz from being included
2672
+ # in the child loggers of compiler because of an
2673
+ # overzealous loop termination condition.
2674
+ hyphenated = logging.getLogger('compiler-hyphenated')
2675
+ # All will output a message
2676
+ logger.info(self.next_message())
2677
+ logger.error(self.next_message())
2678
+ hyphenated.critical(self.next_message())
2679
+ self.assert_log_lines([
2680
+ ('INFO', '1'),
2681
+ ('ERROR', '2'),
2682
+ ('CRITICAL', '3'),
2683
+ ], stream=output)
2684
+ # Original logger output is empty.
2685
+ self.assert_log_lines([])
2686
+ with captured_stdout() as output:
2687
+ self.apply_config(self.config8a)
2688
+ logger = logging.getLogger("compiler.parser")
2689
+ self.assertFalse(logger.disabled)
2690
+ # Both will output a message
2691
+ logger.info(self.next_message())
2692
+ logger.error(self.next_message())
2693
+ logger = logging.getLogger("compiler.lexer")
2694
+ # Both will output a message
2695
+ logger.info(self.next_message())
2696
+ logger.error(self.next_message())
2697
+ # Will not appear
2698
+ hyphenated.critical(self.next_message())
2699
+ self.assert_log_lines([
2700
+ ('INFO', '4'),
2701
+ ('ERROR', '5'),
2702
+ ('INFO', '6'),
2703
+ ('ERROR', '7'),
2704
+ ], stream=output)
2705
+ # Original logger output is empty.
2706
+ self.assert_log_lines([])
2707
+
2708
+ def test_config_9_ok(self):
2709
+ with captured_stdout() as output:
2710
+ self.apply_config(self.config9)
2711
+ logger = logging.getLogger("compiler.parser")
2712
+ #Nothing will be output since both handler and logger are set to WARNING
2713
+ logger.info(self.next_message())
2714
+ self.assert_log_lines([], stream=output)
2715
+ self.apply_config(self.config9a)
2716
+ #Nothing will be output since both handler is still set to WARNING
2717
+ logger.info(self.next_message())
2718
+ self.assert_log_lines([], stream=output)
2719
+ self.apply_config(self.config9b)
2720
+ #Message should now be output
2721
+ logger.info(self.next_message())
2722
+ self.assert_log_lines([
2723
+ ('INFO', '3'),
2724
+ ], stream=output)
2725
+
2726
+ def test_config_10_ok(self):
2727
+ with captured_stdout() as output:
2728
+ self.apply_config(self.config10)
2729
+ logger = logging.getLogger("compiler.parser")
2730
+ logger.warning(self.next_message())
2731
+ logger = logging.getLogger('compiler')
2732
+ #Not output, because filtered
2733
+ logger.warning(self.next_message())
2734
+ logger = logging.getLogger('compiler.lexer')
2735
+ #Not output, because filtered
2736
+ logger.warning(self.next_message())
2737
+ logger = logging.getLogger("compiler.parser.codegen")
2738
+ #Output, as not filtered
2739
+ logger.error(self.next_message())
2740
+ self.assert_log_lines([
2741
+ ('WARNING', '1'),
2742
+ ('ERROR', '4'),
2743
+ ], stream=output)
2744
+
2745
+ def test_config11_ok(self):
2746
+ self.test_config1_ok(self.config11)
2747
+
2748
+ def test_config12_failure(self):
2749
+ self.assertRaises(Exception, self.apply_config, self.config12)
2750
+
2751
+ def test_config13_failure(self):
2752
+ self.assertRaises(Exception, self.apply_config, self.config13)
2753
+
2754
+ def test_config14_ok(self):
2755
+ with captured_stdout() as output:
2756
+ self.apply_config(self.config14)
2757
+ h = logging._handlers['hand1']
2758
+ self.assertEqual(h.foo, 'bar')
2759
+ self.assertEqual(h.terminator, '!\n')
2760
+ logging.warning('Exclamation')
2761
+ self.assertTrue(output.getvalue().endswith('Exclamation!\n'))
2762
+
2763
+ @unittest.skipUnless(threading, 'listen() needs threading to work')
2764
+ def setup_via_listener(self, text, verify=None):
2765
+ text = text.encode("utf-8")
2766
+ # Ask for a randomly assigned port (by using port 0)
2767
+ t = logging.config.listen(0, verify)
2768
+ t.start()
2769
+ t.ready.wait()
2770
+ # Now get the port allocated
2771
+ port = t.port
2772
+ t.ready.clear()
2773
+ try:
2774
+ sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
2775
+ sock.settimeout(2.0)
2776
+ sock.connect(('localhost', port))
2777
+
2778
+ slen = struct.pack('>L', len(text))
2779
+ s = slen + text
2780
+ sentsofar = 0
2781
+ left = len(s)
2782
+ while left > 0:
2783
+ sent = sock.send(s[sentsofar:])
2784
+ sentsofar += sent
2785
+ left -= sent
2786
+ sock.close()
2787
+ finally:
2788
+ t.ready.wait(2.0)
2789
+ logging.config.stopListening()
2790
+ t.join(2.0)
2791
+
2792
+ @unittest.skipUnless(threading, 'Threading required for this test.')
2793
+ def test_listen_config_10_ok(self):
2794
+ with captured_stdout() as output:
2795
+ self.setup_via_listener(json.dumps(self.config10))
2796
+ logger = logging.getLogger("compiler.parser")
2797
+ logger.warning(self.next_message())
2798
+ logger = logging.getLogger('compiler')
2799
+ #Not output, because filtered
2800
+ logger.warning(self.next_message())
2801
+ logger = logging.getLogger('compiler.lexer')
2802
+ #Not output, because filtered
2803
+ logger.warning(self.next_message())
2804
+ logger = logging.getLogger("compiler.parser.codegen")
2805
+ #Output, as not filtered
2806
+ logger.error(self.next_message())
2807
+ self.assert_log_lines([
2808
+ ('WARNING', '1'),
2809
+ ('ERROR', '4'),
2810
+ ], stream=output)
2811
+
2812
+ @unittest.skipUnless(threading, 'Threading required for this test.')
2813
+ def test_listen_config_1_ok(self):
2814
+ with captured_stdout() as output:
2815
+ self.setup_via_listener(textwrap.dedent(ConfigFileTest.config1))
2816
+ logger = logging.getLogger("compiler.parser")
2817
+ # Both will output a message
2818
+ logger.info(self.next_message())
2819
+ logger.error(self.next_message())
2820
+ self.assert_log_lines([
2821
+ ('INFO', '1'),
2822
+ ('ERROR', '2'),
2823
+ ], stream=output)
2824
+ # Original logger output is empty.
2825
+ self.assert_log_lines([])
2826
+
2827
+ @unittest.skipUnless(threading, 'Threading required for this test.')
2828
+ def test_listen_verify(self):
2829
+
2830
+ def verify_fail(stuff):
2831
+ return None
2832
+
2833
+ def verify_reverse(stuff):
2834
+ return stuff[::-1]
2835
+
2836
+ logger = logging.getLogger("compiler.parser")
2837
+ to_send = textwrap.dedent(ConfigFileTest.config1)
2838
+ # First, specify a verification function that will fail.
2839
+ # We expect to see no output, since our configuration
2840
+ # never took effect.
2841
+ with captured_stdout() as output:
2842
+ self.setup_via_listener(to_send, verify_fail)
2843
+ # Both will output a message
2844
+ logger.info(self.next_message())
2845
+ logger.error(self.next_message())
2846
+ self.assert_log_lines([], stream=output)
2847
+ # Original logger output has the stuff we logged.
2848
+ self.assert_log_lines([
2849
+ ('INFO', '1'),
2850
+ ('ERROR', '2'),
2851
+ ], pat=r"^[\w.]+ -> (\w+): (\d+)$")
2852
+
2853
+ # Now, perform no verification. Our configuration
2854
+ # should take effect.
2855
+
2856
+ with captured_stdout() as output:
2857
+ self.setup_via_listener(to_send) # no verify callable specified
2858
+ logger = logging.getLogger("compiler.parser")
2859
+ # Both will output a message
2860
+ logger.info(self.next_message())
2861
+ logger.error(self.next_message())
2862
+ self.assert_log_lines([
2863
+ ('INFO', '3'),
2864
+ ('ERROR', '4'),
2865
+ ], stream=output)
2866
+ # Original logger output still has the stuff we logged before.
2867
+ self.assert_log_lines([
2868
+ ('INFO', '1'),
2869
+ ('ERROR', '2'),
2870
+ ], pat=r"^[\w.]+ -> (\w+): (\d+)$")
2871
+
2872
+ # Now, perform verification which transforms the bytes.
2873
+
2874
+ with captured_stdout() as output:
2875
+ self.setup_via_listener(to_send[::-1], verify_reverse)
2876
+ logger = logging.getLogger("compiler.parser")
2877
+ # Both will output a message
2878
+ logger.info(self.next_message())
2879
+ logger.error(self.next_message())
2880
+ self.assert_log_lines([
2881
+ ('INFO', '5'),
2882
+ ('ERROR', '6'),
2883
+ ], stream=output)
2884
+ # Original logger output still has the stuff we logged before.
2885
+ self.assert_log_lines([
2886
+ ('INFO', '1'),
2887
+ ('ERROR', '2'),
2888
+ ], pat=r"^[\w.]+ -> (\w+): (\d+)$")
2889
+
2890
+ def test_out_of_order(self):
2891
+ self.apply_config(self.out_of_order)
2892
+ handler = logging.getLogger('mymodule').handlers[0]
2893
+ self.assertIsInstance(handler.target, logging.Handler)
2894
+ self.assertIsInstance(handler.formatter._style,
2895
+ logging.StringTemplateStyle)
2896
+
2897
+ def test_baseconfig(self):
2898
+ d = {
2899
+ 'atuple': (1, 2, 3),
2900
+ 'alist': ['a', 'b', 'c'],
2901
+ 'adict': {'d': 'e', 'f': 3 },
2902
+ 'nest1': ('g', ('h', 'i'), 'j'),
2903
+ 'nest2': ['k', ['l', 'm'], 'n'],
2904
+ 'nest3': ['o', 'cfg://alist', 'p'],
2905
+ }
2906
+ bc = logging.config.BaseConfigurator(d)
2907
+ self.assertEqual(bc.convert('cfg://atuple[1]'), 2)
2908
+ self.assertEqual(bc.convert('cfg://alist[1]'), 'b')
2909
+ self.assertEqual(bc.convert('cfg://nest1[1][0]'), 'h')
2910
+ self.assertEqual(bc.convert('cfg://nest2[1][1]'), 'm')
2911
+ self.assertEqual(bc.convert('cfg://adict.d'), 'e')
2912
+ self.assertEqual(bc.convert('cfg://adict[f]'), 3)
2913
+ v = bc.convert('cfg://nest3')
2914
+ self.assertEqual(v.pop(1), ['a', 'b', 'c'])
2915
+ self.assertRaises(KeyError, bc.convert, 'cfg://nosuch')
2916
+ self.assertRaises(ValueError, bc.convert, 'cfg://!')
2917
+ self.assertRaises(KeyError, bc.convert, 'cfg://adict[2]')
2918
+
2919
+ class ManagerTest(BaseTest):
2920
+ def test_manager_loggerclass(self):
2921
+ logged = []
2922
+
2923
+ class MyLogger(logging.Logger):
2924
+ def _log(self, level, msg, args, exc_info=None, extra=None):
2925
+ logged.append(msg)
2926
+
2927
+ man = logging.Manager(None)
2928
+ self.assertRaises(TypeError, man.setLoggerClass, int)
2929
+ man.setLoggerClass(MyLogger)
2930
+ logger = man.getLogger('test')
2931
+ logger.warning('should appear in logged')
2932
+ logging.warning('should not appear in logged')
2933
+
2934
+ self.assertEqual(logged, ['should appear in logged'])
2935
+
2936
+ def test_set_log_record_factory(self):
2937
+ man = logging.Manager(None)
2938
+ expected = object()
2939
+ man.setLogRecordFactory(expected)
2940
+ self.assertEqual(man.logRecordFactory, expected)
2941
+
2942
+ class ChildLoggerTest(BaseTest):
2943
+ def test_child_loggers(self):
2944
+ r = logging.getLogger()
2945
+ l1 = logging.getLogger('abc')
2946
+ l2 = logging.getLogger('def.ghi')
2947
+ c1 = r.getChild('xyz')
2948
+ c2 = r.getChild('uvw.xyz')
2949
+ self.assertIs(c1, logging.getLogger('xyz'))
2950
+ self.assertIs(c2, logging.getLogger('uvw.xyz'))
2951
+ c1 = l1.getChild('def')
2952
+ c2 = c1.getChild('ghi')
2953
+ c3 = l1.getChild('def.ghi')
2954
+ self.assertIs(c1, logging.getLogger('abc.def'))
2955
+ self.assertIs(c2, logging.getLogger('abc.def.ghi'))
2956
+ self.assertIs(c2, c3)
2957
+
2958
+
2959
+ class DerivedLogRecord(logging.LogRecord):
2960
+ pass
2961
+
2962
+ class LogRecordFactoryTest(BaseTest):
2963
+
2964
+ def setUp(self):
2965
+ class CheckingFilter(logging.Filter):
2966
+ def __init__(self, cls):
2967
+ self.cls = cls
2968
+
2969
+ def filter(self, record):
2970
+ t = type(record)
2971
+ if t is not self.cls:
2972
+ msg = 'Unexpected LogRecord type %s, expected %s' % (t,
2973
+ self.cls)
2974
+ raise TypeError(msg)
2975
+ return True
2976
+
2977
+ BaseTest.setUp(self)
2978
+ self.filter = CheckingFilter(DerivedLogRecord)
2979
+ self.root_logger.addFilter(self.filter)
2980
+ self.orig_factory = logging.getLogRecordFactory()
2981
+
2982
+ def tearDown(self):
2983
+ self.root_logger.removeFilter(self.filter)
2984
+ BaseTest.tearDown(self)
2985
+ logging.setLogRecordFactory(self.orig_factory)
2986
+
2987
+ def test_logrecord_class(self):
2988
+ self.assertRaises(TypeError, self.root_logger.warning,
2989
+ self.next_message())
2990
+ logging.setLogRecordFactory(DerivedLogRecord)
2991
+ self.root_logger.error(self.next_message())
2992
+ self.assert_log_lines([
2993
+ ('root', 'ERROR', '2'),
2994
+ ])
2995
+
2996
+
2997
+ class QueueHandlerTest(BaseTest):
2998
+ # Do not bother with a logger name group.
2999
+ expected_log_pat = r"^[\w.]+ -> (\w+): (\d+)$"
3000
+
3001
+ def setUp(self):
3002
+ BaseTest.setUp(self)
3003
+ self.queue = queue.Queue(-1)
3004
+ self.que_hdlr = logging.handlers.QueueHandler(self.queue)
3005
+ self.que_logger = logging.getLogger('que')
3006
+ self.que_logger.propagate = False
3007
+ self.que_logger.setLevel(logging.WARNING)
3008
+ self.que_logger.addHandler(self.que_hdlr)
3009
+
3010
+ def tearDown(self):
3011
+ self.que_hdlr.close()
3012
+ BaseTest.tearDown(self)
3013
+
3014
+ def test_queue_handler(self):
3015
+ self.que_logger.debug(self.next_message())
3016
+ self.assertRaises(queue.Empty, self.queue.get_nowait)
3017
+ self.que_logger.info(self.next_message())
3018
+ self.assertRaises(queue.Empty, self.queue.get_nowait)
3019
+ msg = self.next_message()
3020
+ self.que_logger.warning(msg)
3021
+ data = self.queue.get_nowait()
3022
+ self.assertTrue(isinstance(data, logging.LogRecord))
3023
+ self.assertEqual(data.name, self.que_logger.name)
3024
+ self.assertEqual((data.msg, data.args), (msg, None))
3025
+
3026
+ @unittest.skipUnless(hasattr(logging.handlers, 'QueueListener'),
3027
+ 'logging.handlers.QueueListener required for this test')
3028
+ def test_queue_listener(self):
3029
+ handler = TestHandler(Matcher())
3030
+ listener = logging.handlers.QueueListener(self.queue, handler)
3031
+ listener.start()
3032
+ try:
3033
+ self.que_logger.warning(self.next_message())
3034
+ self.que_logger.error(self.next_message())
3035
+ self.que_logger.critical(self.next_message())
3036
+ finally:
3037
+ listener.stop()
3038
+ self.assertTrue(handler.matches(levelno=logging.WARNING, message='1'))
3039
+ self.assertTrue(handler.matches(levelno=logging.ERROR, message='2'))
3040
+ self.assertTrue(handler.matches(levelno=logging.CRITICAL, message='3'))
3041
+
3042
+ ZERO = datetime.timedelta(0)
3043
+
3044
+ class UTC(datetime.tzinfo):
3045
+ def utcoffset(self, dt):
3046
+ return ZERO
3047
+
3048
+ dst = utcoffset
3049
+
3050
+ def tzname(self, dt):
3051
+ return 'UTC'
3052
+
3053
+ utc = UTC()
3054
+
3055
+ class FormatterTest(unittest.TestCase):
3056
+ def setUp(self):
3057
+ self.common = {
3058
+ 'name': 'formatter.test',
3059
+ 'level': logging.DEBUG,
3060
+ 'pathname': os.path.join('path', 'to', 'dummy.ext'),
3061
+ 'lineno': 42,
3062
+ 'exc_info': None,
3063
+ 'func': None,
3064
+ 'msg': 'Message with %d %s',
3065
+ 'args': (2, 'placeholders'),
3066
+ }
3067
+ self.variants = {
3068
+ }
3069
+
3070
+ def get_record(self, name=None):
3071
+ result = dict(self.common)
3072
+ if name is not None:
3073
+ result.update(self.variants[name])
3074
+ return logging.makeLogRecord(result)
3075
+
3076
+ def test_percent(self):
3077
+ # Test %-formatting
3078
+ r = self.get_record()
3079
+ f = logging.Formatter('${%(message)s}')
3080
+ self.assertEqual(f.format(r), '${Message with 2 placeholders}')
3081
+ f = logging.Formatter('%(random)s')
3082
+ self.assertRaises(KeyError, f.format, r)
3083
+ self.assertFalse(f.usesTime())
3084
+ f = logging.Formatter('%(asctime)s')
3085
+ self.assertTrue(f.usesTime())
3086
+ f = logging.Formatter('%(asctime)-15s')
3087
+ self.assertTrue(f.usesTime())
3088
+ f = logging.Formatter('asctime')
3089
+ self.assertFalse(f.usesTime())
3090
+
3091
+ def test_braces(self):
3092
+ # Test {}-formatting
3093
+ r = self.get_record()
3094
+ f = logging.Formatter('$%{message}%$', style='{')
3095
+ self.assertEqual(f.format(r), '$%Message with 2 placeholders%$')
3096
+ f = logging.Formatter('{random}', style='{')
3097
+ self.assertRaises(KeyError, f.format, r)
3098
+ self.assertFalse(f.usesTime())
3099
+ f = logging.Formatter('{asctime}', style='{')
3100
+ self.assertTrue(f.usesTime())
3101
+ f = logging.Formatter('{asctime!s:15}', style='{')
3102
+ self.assertTrue(f.usesTime())
3103
+ f = logging.Formatter('{asctime:15}', style='{')
3104
+ self.assertTrue(f.usesTime())
3105
+ f = logging.Formatter('asctime', style='{')
3106
+ self.assertFalse(f.usesTime())
3107
+
3108
+ def test_dollars(self):
3109
+ # Test $-formatting
3110
+ r = self.get_record()
3111
+ f = logging.Formatter('$message', style='$')
3112
+ self.assertEqual(f.format(r), 'Message with 2 placeholders')
3113
+ f = logging.Formatter('$$%${message}%$$', style='$')
3114
+ self.assertEqual(f.format(r), '$%Message with 2 placeholders%$')
3115
+ f = logging.Formatter('${random}', style='$')
3116
+ self.assertRaises(KeyError, f.format, r)
3117
+ self.assertFalse(f.usesTime())
3118
+ f = logging.Formatter('${asctime}', style='$')
3119
+ self.assertTrue(f.usesTime())
3120
+ f = logging.Formatter('${asctime', style='$')
3121
+ self.assertFalse(f.usesTime())
3122
+ f = logging.Formatter('$asctime', style='$')
3123
+ self.assertTrue(f.usesTime())
3124
+ f = logging.Formatter('asctime', style='$')
3125
+ self.assertFalse(f.usesTime())
3126
+
3127
+ def test_invalid_style(self):
3128
+ self.assertRaises(ValueError, logging.Formatter, None, None, 'x')
3129
+
3130
+ def test_time(self):
3131
+ r = self.get_record()
3132
+ dt = datetime.datetime(1993, 4, 21, 8, 3, 0, 0, utc)
3133
+ # We use None to indicate we want the local timezone
3134
+ # We're essentially converting a UTC time to local time
3135
+ r.created = time.mktime(dt.astimezone(None).timetuple())
3136
+ r.msecs = 123
3137
+ f = logging.Formatter('%(asctime)s %(message)s')
3138
+ f.converter = time.gmtime
3139
+ self.assertEqual(f.formatTime(r), '1993-04-21 08:03:00,123')
3140
+ self.assertEqual(f.formatTime(r, '%Y:%d'), '1993:21')
3141
+ f.format(r)
3142
+ self.assertEqual(r.asctime, '1993-04-21 08:03:00,123')
3143
+
3144
+ class TestBufferingFormatter(logging.BufferingFormatter):
3145
+ def formatHeader(self, records):
3146
+ return '[(%d)' % len(records)
3147
+
3148
+ def formatFooter(self, records):
3149
+ return '(%d)]' % len(records)
3150
+
3151
+ class BufferingFormatterTest(unittest.TestCase):
3152
+ def setUp(self):
3153
+ self.records = [
3154
+ logging.makeLogRecord({'msg': 'one'}),
3155
+ logging.makeLogRecord({'msg': 'two'}),
3156
+ ]
3157
+
3158
+ def test_default(self):
3159
+ f = logging.BufferingFormatter()
3160
+ self.assertEqual('', f.format([]))
3161
+ self.assertEqual('onetwo', f.format(self.records))
3162
+
3163
+ def test_custom(self):
3164
+ f = TestBufferingFormatter()
3165
+ self.assertEqual('[(2)onetwo(2)]', f.format(self.records))
3166
+ lf = logging.Formatter('<%(message)s>')
3167
+ f = TestBufferingFormatter(lf)
3168
+ self.assertEqual('[(2)<one><two>(2)]', f.format(self.records))
3169
+
3170
+ class ExceptionTest(BaseTest):
3171
+ def test_formatting(self):
3172
+ r = self.root_logger
3173
+ h = RecordingHandler()
3174
+ r.addHandler(h)
3175
+ try:
3176
+ raise RuntimeError('deliberate mistake')
3177
+ except:
3178
+ logging.exception('failed', stack_info=True)
3179
+ r.removeHandler(h)
3180
+ h.close()
3181
+ r = h.records[0]
3182
+ self.assertTrue(r.exc_text.startswith('Traceback (most recent '
3183
+ 'call last):\n'))
3184
+ self.assertTrue(r.exc_text.endswith('\nRuntimeError: '
3185
+ 'deliberate mistake'))
3186
+ self.assertTrue(r.stack_info.startswith('Stack (most recent '
3187
+ 'call last):\n'))
3188
+ self.assertTrue(r.stack_info.endswith('logging.exception(\'failed\', '
3189
+ 'stack_info=True)'))
3190
+
3191
+
3192
+ class LastResortTest(BaseTest):
3193
+ def test_last_resort(self):
3194
+ # Test the last resort handler
3195
+ root = self.root_logger
3196
+ root.removeHandler(self.root_hdlr)
3197
+ old_stderr = sys.stderr
3198
+ old_lastresort = logging.lastResort
3199
+ old_raise_exceptions = logging.raiseExceptions
3200
+ try:
3201
+ sys.stderr = sio = io.StringIO()
3202
+ root.debug('This should not appear')
3203
+ self.assertEqual(sio.getvalue(), '')
3204
+ root.warning('This is your final chance!')
3205
+ self.assertEqual(sio.getvalue(), 'This is your final chance!\n')
3206
+ #No handlers and no last resort, so 'No handlers' message
3207
+ logging.lastResort = None
3208
+ sys.stderr = sio = io.StringIO()
3209
+ root.warning('This is your final chance!')
3210
+ self.assertEqual(sio.getvalue(), 'No handlers could be found for logger "root"\n')
3211
+ # 'No handlers' message only printed once
3212
+ sys.stderr = sio = io.StringIO()
3213
+ root.warning('This is your final chance!')
3214
+ self.assertEqual(sio.getvalue(), '')
3215
+ root.manager.emittedNoHandlerWarning = False
3216
+ #If raiseExceptions is False, no message is printed
3217
+ logging.raiseExceptions = False
3218
+ sys.stderr = sio = io.StringIO()
3219
+ root.warning('This is your final chance!')
3220
+ self.assertEqual(sio.getvalue(), '')
3221
+ finally:
3222
+ sys.stderr = old_stderr
3223
+ root.addHandler(self.root_hdlr)
3224
+ logging.lastResort = old_lastresort
3225
+ logging.raiseExceptions = old_raise_exceptions
3226
+
3227
+
3228
+ class FakeHandler:
3229
+
3230
+ def __init__(self, identifier, called):
3231
+ for method in ('acquire', 'flush', 'close', 'release'):
3232
+ setattr(self, method, self.record_call(identifier, method, called))
3233
+
3234
+ def record_call(self, identifier, method_name, called):
3235
+ def inner():
3236
+ called.append('{} - {}'.format(identifier, method_name))
3237
+ return inner
3238
+
3239
+
3240
+ class RecordingHandler(logging.NullHandler):
3241
+
3242
+ def __init__(self, *args, **kwargs):
3243
+ super(RecordingHandler, self).__init__(*args, **kwargs)
3244
+ self.records = []
3245
+
3246
+ def handle(self, record):
3247
+ """Keep track of all the emitted records."""
3248
+ self.records.append(record)
3249
+
3250
+
3251
+ class ShutdownTest(BaseTest):
3252
+
3253
+ """Test suite for the shutdown method."""
3254
+
3255
+ def setUp(self):
3256
+ super(ShutdownTest, self).setUp()
3257
+ self.called = []
3258
+
3259
+ raise_exceptions = logging.raiseExceptions
3260
+ self.addCleanup(setattr, logging, 'raiseExceptions', raise_exceptions)
3261
+
3262
+ def raise_error(self, error):
3263
+ def inner():
3264
+ raise error()
3265
+ return inner
3266
+
3267
+ def test_no_failure(self):
3268
+ # create some fake handlers
3269
+ handler0 = FakeHandler(0, self.called)
3270
+ handler1 = FakeHandler(1, self.called)
3271
+ handler2 = FakeHandler(2, self.called)
3272
+
3273
+ # create live weakref to those handlers
3274
+ handlers = map(logging.weakref.ref, [handler0, handler1, handler2])
3275
+
3276
+ logging.shutdown(handlerList=list(handlers))
3277
+
3278
+ expected = ['2 - acquire', '2 - flush', '2 - close', '2 - release',
3279
+ '1 - acquire', '1 - flush', '1 - close', '1 - release',
3280
+ '0 - acquire', '0 - flush', '0 - close', '0 - release']
3281
+ self.assertEqual(expected, self.called)
3282
+
3283
+ def _test_with_failure_in_method(self, method, error):
3284
+ handler = FakeHandler(0, self.called)
3285
+ setattr(handler, method, self.raise_error(error))
3286
+ handlers = [logging.weakref.ref(handler)]
3287
+
3288
+ logging.shutdown(handlerList=list(handlers))
3289
+
3290
+ self.assertEqual('0 - release', self.called[-1])
3291
+
3292
+ def test_with_ioerror_in_acquire(self):
3293
+ self._test_with_failure_in_method('acquire', OSError)
3294
+
3295
+ def test_with_ioerror_in_flush(self):
3296
+ self._test_with_failure_in_method('flush', OSError)
3297
+
3298
+ def test_with_ioerror_in_close(self):
3299
+ self._test_with_failure_in_method('close', OSError)
3300
+
3301
+ def test_with_valueerror_in_acquire(self):
3302
+ self._test_with_failure_in_method('acquire', ValueError)
3303
+
3304
+ def test_with_valueerror_in_flush(self):
3305
+ self._test_with_failure_in_method('flush', ValueError)
3306
+
3307
+ def test_with_valueerror_in_close(self):
3308
+ self._test_with_failure_in_method('close', ValueError)
3309
+
3310
+ def test_with_other_error_in_acquire_without_raise(self):
3311
+ logging.raiseExceptions = False
3312
+ self._test_with_failure_in_method('acquire', IndexError)
3313
+
3314
+ def test_with_other_error_in_flush_without_raise(self):
3315
+ logging.raiseExceptions = False
3316
+ self._test_with_failure_in_method('flush', IndexError)
3317
+
3318
+ def test_with_other_error_in_close_without_raise(self):
3319
+ logging.raiseExceptions = False
3320
+ self._test_with_failure_in_method('close', IndexError)
3321
+
3322
+ def test_with_other_error_in_acquire_with_raise(self):
3323
+ logging.raiseExceptions = True
3324
+ self.assertRaises(IndexError, self._test_with_failure_in_method,
3325
+ 'acquire', IndexError)
3326
+
3327
+ def test_with_other_error_in_flush_with_raise(self):
3328
+ logging.raiseExceptions = True
3329
+ self.assertRaises(IndexError, self._test_with_failure_in_method,
3330
+ 'flush', IndexError)
3331
+
3332
+ def test_with_other_error_in_close_with_raise(self):
3333
+ logging.raiseExceptions = True
3334
+ self.assertRaises(IndexError, self._test_with_failure_in_method,
3335
+ 'close', IndexError)
3336
+
3337
+
3338
+ class ModuleLevelMiscTest(BaseTest):
3339
+
3340
+ """Test suite for some module level methods."""
3341
+
3342
+ def test_disable(self):
3343
+ old_disable = logging.root.manager.disable
3344
+ # confirm our assumptions are correct
3345
+ self.assertEqual(old_disable, 0)
3346
+ self.addCleanup(logging.disable, old_disable)
3347
+
3348
+ logging.disable(83)
3349
+ self.assertEqual(logging.root.manager.disable, 83)
3350
+
3351
+ def _test_log(self, method, level=None):
3352
+ called = []
3353
+ patch(self, logging, 'basicConfig',
3354
+ lambda *a, **kw: called.append((a, kw)))
3355
+
3356
+ recording = RecordingHandler()
3357
+ logging.root.addHandler(recording)
3358
+
3359
+ log_method = getattr(logging, method)
3360
+ if level is not None:
3361
+ log_method(level, "test me: %r", recording)
3362
+ else:
3363
+ log_method("test me: %r", recording)
3364
+
3365
+ self.assertEqual(len(recording.records), 1)
3366
+ record = recording.records[0]
3367
+ self.assertEqual(record.getMessage(), "test me: %r" % recording)
3368
+
3369
+ expected_level = level if level is not None else getattr(logging, method.upper())
3370
+ self.assertEqual(record.levelno, expected_level)
3371
+
3372
+ # basicConfig was not called!
3373
+ self.assertEqual(called, [])
3374
+
3375
+ def test_log(self):
3376
+ self._test_log('log', logging.ERROR)
3377
+
3378
+ def test_debug(self):
3379
+ self._test_log('debug')
3380
+
3381
+ def test_info(self):
3382
+ self._test_log('info')
3383
+
3384
+ def test_warning(self):
3385
+ self._test_log('warning')
3386
+
3387
+ def test_error(self):
3388
+ self._test_log('error')
3389
+
3390
+ def test_critical(self):
3391
+ self._test_log('critical')
3392
+
3393
+ def test_set_logger_class(self):
3394
+ self.assertRaises(TypeError, logging.setLoggerClass, object)
3395
+
3396
+ class MyLogger(logging.Logger):
3397
+ pass
3398
+
3399
+ logging.setLoggerClass(MyLogger)
3400
+ self.assertEqual(logging.getLoggerClass(), MyLogger)
3401
+
3402
+ logging.setLoggerClass(logging.Logger)
3403
+ self.assertEqual(logging.getLoggerClass(), logging.Logger)
3404
+
3405
+ def test_logging_at_shutdown(self):
3406
+ # Issue #20037
3407
+ code = """if 1:
3408
+ import logging
3409
+
3410
+ class A:
3411
+ def __del__(self):
3412
+ try:
3413
+ raise ValueError("some error")
3414
+ except Exception:
3415
+ logging.exception("exception in __del__")
3416
+
3417
+ a = A()"""
3418
+ rc, out, err = assert_python_ok("-c", code)
3419
+ err = err.decode()
3420
+ self.assertIn("exception in __del__", err)
3421
+ self.assertIn("ValueError: some error", err)
3422
+
3423
+
3424
+ class LogRecordTest(BaseTest):
3425
+ def test_str_rep(self):
3426
+ r = logging.makeLogRecord({})
3427
+ s = str(r)
3428
+ self.assertTrue(s.startswith('<LogRecord: '))
3429
+ self.assertTrue(s.endswith('>'))
3430
+
3431
+ def test_dict_arg(self):
3432
+ h = RecordingHandler()
3433
+ r = logging.getLogger()
3434
+ r.addHandler(h)
3435
+ d = {'less' : 'more' }
3436
+ logging.warning('less is %(less)s', d)
3437
+ self.assertIs(h.records[0].args, d)
3438
+ self.assertEqual(h.records[0].message, 'less is more')
3439
+ r.removeHandler(h)
3440
+ h.close()
3441
+
3442
+ def test_multiprocessing(self):
3443
+ r = logging.makeLogRecord({})
3444
+ self.assertEqual(r.processName, 'MainProcess')
3445
+ try:
3446
+ import multiprocessing as mp
3447
+ r = logging.makeLogRecord({})
3448
+ self.assertEqual(r.processName, mp.current_process().name)
3449
+ except ImportError:
3450
+ pass
3451
+
3452
+ def test_optional(self):
3453
+ r = logging.makeLogRecord({})
3454
+ NOT_NONE = self.assertIsNotNone
3455
+ if threading:
3456
+ NOT_NONE(r.thread)
3457
+ NOT_NONE(r.threadName)
3458
+ NOT_NONE(r.process)
3459
+ NOT_NONE(r.processName)
3460
+ log_threads = logging.logThreads
3461
+ log_processes = logging.logProcesses
3462
+ log_multiprocessing = logging.logMultiprocessing
3463
+ try:
3464
+ logging.logThreads = False
3465
+ logging.logProcesses = False
3466
+ logging.logMultiprocessing = False
3467
+ r = logging.makeLogRecord({})
3468
+ NONE = self.assertIsNone
3469
+ NONE(r.thread)
3470
+ NONE(r.threadName)
3471
+ NONE(r.process)
3472
+ NONE(r.processName)
3473
+ finally:
3474
+ logging.logThreads = log_threads
3475
+ logging.logProcesses = log_processes
3476
+ logging.logMultiprocessing = log_multiprocessing
3477
+
3478
+ class BasicConfigTest(unittest.TestCase):
3479
+
3480
+ """Test suite for logging.basicConfig."""
3481
+
3482
+ def setUp(self):
3483
+ super(BasicConfigTest, self).setUp()
3484
+ self.handlers = logging.root.handlers
3485
+ self.saved_handlers = logging._handlers.copy()
3486
+ self.saved_handler_list = logging._handlerList[:]
3487
+ self.original_logging_level = logging.root.level
3488
+ self.addCleanup(self.cleanup)
3489
+ logging.root.handlers = []
3490
+
3491
+ def tearDown(self):
3492
+ for h in logging.root.handlers[:]:
3493
+ logging.root.removeHandler(h)
3494
+ h.close()
3495
+ super(BasicConfigTest, self).tearDown()
3496
+
3497
+ def cleanup(self):
3498
+ setattr(logging.root, 'handlers', self.handlers)
3499
+ logging._handlers.clear()
3500
+ logging._handlers.update(self.saved_handlers)
3501
+ logging._handlerList[:] = self.saved_handler_list
3502
+ logging.root.level = self.original_logging_level
3503
+
3504
+ def test_no_kwargs(self):
3505
+ logging.basicConfig()
3506
+
3507
+ # handler defaults to a StreamHandler to sys.stderr
3508
+ self.assertEqual(len(logging.root.handlers), 1)
3509
+ handler = logging.root.handlers[0]
3510
+ self.assertIsInstance(handler, logging.StreamHandler)
3511
+ self.assertEqual(handler.stream, sys.stderr)
3512
+
3513
+ formatter = handler.formatter
3514
+ # format defaults to logging.BASIC_FORMAT
3515
+ self.assertEqual(formatter._style._fmt, logging.BASIC_FORMAT)
3516
+ # datefmt defaults to None
3517
+ self.assertIsNone(formatter.datefmt)
3518
+ # style defaults to %
3519
+ self.assertIsInstance(formatter._style, logging.PercentStyle)
3520
+
3521
+ # level is not explicitly set
3522
+ self.assertEqual(logging.root.level, self.original_logging_level)
3523
+
3524
+ def test_strformatstyle(self):
3525
+ with captured_stdout() as output:
3526
+ logging.basicConfig(stream=sys.stdout, style="{")
3527
+ logging.error("Log an error")
3528
+ sys.stdout.seek(0)
3529
+ self.assertEqual(output.getvalue().strip(),
3530
+ "ERROR:root:Log an error")
3531
+
3532
+ def test_stringtemplatestyle(self):
3533
+ with captured_stdout() as output:
3534
+ logging.basicConfig(stream=sys.stdout, style="$")
3535
+ logging.error("Log an error")
3536
+ sys.stdout.seek(0)
3537
+ self.assertEqual(output.getvalue().strip(),
3538
+ "ERROR:root:Log an error")
3539
+
3540
+ def test_filename(self):
3541
+
3542
+ def cleanup(h1, h2, fn):
3543
+ h1.close()
3544
+ h2.close()
3545
+ os.remove(fn)
3546
+
3547
+ logging.basicConfig(filename='test.log')
3548
+
3549
+ self.assertEqual(len(logging.root.handlers), 1)
3550
+ handler = logging.root.handlers[0]
3551
+ self.assertIsInstance(handler, logging.FileHandler)
3552
+
3553
+ expected = logging.FileHandler('test.log', 'a')
3554
+ self.assertEqual(handler.stream.mode, expected.stream.mode)
3555
+ self.assertEqual(handler.stream.name, expected.stream.name)
3556
+ self.addCleanup(cleanup, handler, expected, 'test.log')
3557
+
3558
+ def test_filemode(self):
3559
+
3560
+ def cleanup(h1, h2, fn):
3561
+ h1.close()
3562
+ h2.close()
3563
+ os.remove(fn)
3564
+
3565
+ logging.basicConfig(filename='test.log', filemode='wb')
3566
+
3567
+ handler = logging.root.handlers[0]
3568
+ expected = logging.FileHandler('test.log', 'wb')
3569
+ self.assertEqual(handler.stream.mode, expected.stream.mode)
3570
+ self.addCleanup(cleanup, handler, expected, 'test.log')
3571
+
3572
+ def test_stream(self):
3573
+ stream = io.StringIO()
3574
+ self.addCleanup(stream.close)
3575
+ logging.basicConfig(stream=stream)
3576
+
3577
+ self.assertEqual(len(logging.root.handlers), 1)
3578
+ handler = logging.root.handlers[0]
3579
+ self.assertIsInstance(handler, logging.StreamHandler)
3580
+ self.assertEqual(handler.stream, stream)
3581
+
3582
+ def test_format(self):
3583
+ logging.basicConfig(format='foo')
3584
+
3585
+ formatter = logging.root.handlers[0].formatter
3586
+ self.assertEqual(formatter._style._fmt, 'foo')
3587
+
3588
+ def test_datefmt(self):
3589
+ logging.basicConfig(datefmt='bar')
3590
+
3591
+ formatter = logging.root.handlers[0].formatter
3592
+ self.assertEqual(formatter.datefmt, 'bar')
3593
+
3594
+ def test_style(self):
3595
+ logging.basicConfig(style='$')
3596
+
3597
+ formatter = logging.root.handlers[0].formatter
3598
+ self.assertIsInstance(formatter._style, logging.StringTemplateStyle)
3599
+
3600
+ def test_level(self):
3601
+ old_level = logging.root.level
3602
+ self.addCleanup(logging.root.setLevel, old_level)
3603
+
3604
+ logging.basicConfig(level=57)
3605
+ self.assertEqual(logging.root.level, 57)
3606
+ # Test that second call has no effect
3607
+ logging.basicConfig(level=58)
3608
+ self.assertEqual(logging.root.level, 57)
3609
+
3610
+ def test_incompatible(self):
3611
+ assertRaises = self.assertRaises
3612
+ handlers = [logging.StreamHandler()]
3613
+ stream = sys.stderr
3614
+ assertRaises(ValueError, logging.basicConfig, filename='test.log',
3615
+ stream=stream)
3616
+ assertRaises(ValueError, logging.basicConfig, filename='test.log',
3617
+ handlers=handlers)
3618
+ assertRaises(ValueError, logging.basicConfig, stream=stream,
3619
+ handlers=handlers)
3620
+
3621
+ def test_handlers(self):
3622
+ handlers = [
3623
+ logging.StreamHandler(),
3624
+ logging.StreamHandler(sys.stdout),
3625
+ logging.StreamHandler(),
3626
+ ]
3627
+ f = logging.Formatter()
3628
+ handlers[2].setFormatter(f)
3629
+ logging.basicConfig(handlers=handlers)
3630
+ self.assertIs(handlers[0], logging.root.handlers[0])
3631
+ self.assertIs(handlers[1], logging.root.handlers[1])
3632
+ self.assertIs(handlers[2], logging.root.handlers[2])
3633
+ self.assertIsNotNone(handlers[0].formatter)
3634
+ self.assertIsNotNone(handlers[1].formatter)
3635
+ self.assertIs(handlers[2].formatter, f)
3636
+ self.assertIs(handlers[0].formatter, handlers[1].formatter)
3637
+
3638
+ def _test_log(self, method, level=None):
3639
+ # logging.root has no handlers so basicConfig should be called
3640
+ called = []
3641
+
3642
+ old_basic_config = logging.basicConfig
3643
+ def my_basic_config(*a, **kw):
3644
+ old_basic_config()
3645
+ old_level = logging.root.level
3646
+ logging.root.setLevel(100) # avoid having messages in stderr
3647
+ self.addCleanup(logging.root.setLevel, old_level)
3648
+ called.append((a, kw))
3649
+
3650
+ patch(self, logging, 'basicConfig', my_basic_config)
3651
+
3652
+ log_method = getattr(logging, method)
3653
+ if level is not None:
3654
+ log_method(level, "test me")
3655
+ else:
3656
+ log_method("test me")
3657
+
3658
+ # basicConfig was called with no arguments
3659
+ self.assertEqual(called, [((), {})])
3660
+
3661
+ def test_log(self):
3662
+ self._test_log('log', logging.WARNING)
3663
+
3664
+ def test_debug(self):
3665
+ self._test_log('debug')
3666
+
3667
+ def test_info(self):
3668
+ self._test_log('info')
3669
+
3670
+ def test_warning(self):
3671
+ self._test_log('warning')
3672
+
3673
+ def test_error(self):
3674
+ self._test_log('error')
3675
+
3676
+ def test_critical(self):
3677
+ self._test_log('critical')
3678
+
3679
+
3680
+ class LoggerAdapterTest(unittest.TestCase):
3681
+
3682
+ def setUp(self):
3683
+ super(LoggerAdapterTest, self).setUp()
3684
+ old_handler_list = logging._handlerList[:]
3685
+
3686
+ self.recording = RecordingHandler()
3687
+ self.logger = logging.root
3688
+ self.logger.addHandler(self.recording)
3689
+ self.addCleanup(self.logger.removeHandler, self.recording)
3690
+ self.addCleanup(self.recording.close)
3691
+
3692
+ def cleanup():
3693
+ logging._handlerList[:] = old_handler_list
3694
+
3695
+ self.addCleanup(cleanup)
3696
+ self.addCleanup(logging.shutdown)
3697
+ self.adapter = logging.LoggerAdapter(logger=self.logger, extra=None)
3698
+
3699
+ def test_exception(self):
3700
+ msg = 'testing exception: %r'
3701
+ exc = None
3702
+ try:
3703
+ 1 / 0
3704
+ except ZeroDivisionError as e:
3705
+ exc = e
3706
+ self.adapter.exception(msg, self.recording)
3707
+
3708
+ self.assertEqual(len(self.recording.records), 1)
3709
+ record = self.recording.records[0]
3710
+ self.assertEqual(record.levelno, logging.ERROR)
3711
+ self.assertEqual(record.msg, msg)
3712
+ self.assertEqual(record.args, (self.recording,))
3713
+ self.assertEqual(record.exc_info,
3714
+ (exc.__class__, exc, exc.__traceback__))
3715
+
3716
+ def test_critical(self):
3717
+ msg = 'critical test! %r'
3718
+ self.adapter.critical(msg, self.recording)
3719
+
3720
+ self.assertEqual(len(self.recording.records), 1)
3721
+ record = self.recording.records[0]
3722
+ self.assertEqual(record.levelno, logging.CRITICAL)
3723
+ self.assertEqual(record.msg, msg)
3724
+ self.assertEqual(record.args, (self.recording,))
3725
+
3726
+ def test_is_enabled_for(self):
3727
+ old_disable = self.adapter.logger.manager.disable
3728
+ self.adapter.logger.manager.disable = 33
3729
+ self.addCleanup(setattr, self.adapter.logger.manager, 'disable',
3730
+ old_disable)
3731
+ self.assertFalse(self.adapter.isEnabledFor(32))
3732
+
3733
+ def test_has_handlers(self):
3734
+ self.assertTrue(self.adapter.hasHandlers())
3735
+
3736
+ for handler in self.logger.handlers:
3737
+ self.logger.removeHandler(handler)
3738
+
3739
+ self.assertFalse(self.logger.hasHandlers())
3740
+ self.assertFalse(self.adapter.hasHandlers())
3741
+
3742
+
3743
+ class LoggerTest(BaseTest):
3744
+
3745
+ def setUp(self):
3746
+ super(LoggerTest, self).setUp()
3747
+ self.recording = RecordingHandler()
3748
+ self.logger = logging.Logger(name='blah')
3749
+ self.logger.addHandler(self.recording)
3750
+ self.addCleanup(self.logger.removeHandler, self.recording)
3751
+ self.addCleanup(self.recording.close)
3752
+ self.addCleanup(logging.shutdown)
3753
+
3754
+ def test_set_invalid_level(self):
3755
+ self.assertRaises(TypeError, self.logger.setLevel, object())
3756
+
3757
+ def test_exception(self):
3758
+ msg = 'testing exception: %r'
3759
+ exc = None
3760
+ try:
3761
+ 1 / 0
3762
+ except ZeroDivisionError as e:
3763
+ exc = e
3764
+ self.logger.exception(msg, self.recording)
3765
+
3766
+ self.assertEqual(len(self.recording.records), 1)
3767
+ record = self.recording.records[0]
3768
+ self.assertEqual(record.levelno, logging.ERROR)
3769
+ self.assertEqual(record.msg, msg)
3770
+ self.assertEqual(record.args, (self.recording,))
3771
+ self.assertEqual(record.exc_info,
3772
+ (exc.__class__, exc, exc.__traceback__))
3773
+
3774
+ def test_log_invalid_level_with_raise(self):
3775
+ old_raise = logging.raiseExceptions
3776
+ self.addCleanup(setattr, logging, 'raiseExecptions', old_raise)
3777
+
3778
+ logging.raiseExceptions = True
3779
+ self.assertRaises(TypeError, self.logger.log, '10', 'test message')
3780
+
3781
+ def test_log_invalid_level_no_raise(self):
3782
+ old_raise = logging.raiseExceptions
3783
+ self.addCleanup(setattr, logging, 'raiseExecptions', old_raise)
3784
+
3785
+ logging.raiseExceptions = False
3786
+ self.logger.log('10', 'test message') # no exception happens
3787
+
3788
+ def test_find_caller_with_stack_info(self):
3789
+ called = []
3790
+ patch(self, logging.traceback, 'print_stack',
3791
+ lambda f, file: called.append(file.getvalue()))
3792
+
3793
+ self.logger.findCaller(stack_info=True)
3794
+
3795
+ self.assertEqual(len(called), 1)
3796
+ self.assertEqual('Stack (most recent call last):\n', called[0])
3797
+
3798
+ def test_make_record_with_extra_overwrite(self):
3799
+ name = 'my record'
3800
+ level = 13
3801
+ fn = lno = msg = args = exc_info = func = sinfo = None
3802
+ rv = logging._logRecordFactory(name, level, fn, lno, msg, args,
3803
+ exc_info, func, sinfo)
3804
+
3805
+ for key in ('message', 'asctime') + tuple(rv.__dict__.keys()):
3806
+ extra = {key: 'some value'}
3807
+ self.assertRaises(KeyError, self.logger.makeRecord, name, level,
3808
+ fn, lno, msg, args, exc_info,
3809
+ extra=extra, sinfo=sinfo)
3810
+
3811
+ def test_make_record_with_extra_no_overwrite(self):
3812
+ name = 'my record'
3813
+ level = 13
3814
+ fn = lno = msg = args = exc_info = func = sinfo = None
3815
+ extra = {'valid_key': 'some value'}
3816
+ result = self.logger.makeRecord(name, level, fn, lno, msg, args,
3817
+ exc_info, extra=extra, sinfo=sinfo)
3818
+ self.assertIn('valid_key', result.__dict__)
3819
+
3820
+ def test_has_handlers(self):
3821
+ self.assertTrue(self.logger.hasHandlers())
3822
+
3823
+ for handler in self.logger.handlers:
3824
+ self.logger.removeHandler(handler)
3825
+ self.assertFalse(self.logger.hasHandlers())
3826
+
3827
+ def test_has_handlers_no_propagate(self):
3828
+ child_logger = logging.getLogger('blah.child')
3829
+ child_logger.propagate = False
3830
+ self.assertFalse(child_logger.hasHandlers())
3831
+
3832
+ def test_is_enabled_for(self):
3833
+ old_disable = self.logger.manager.disable
3834
+ self.logger.manager.disable = 23
3835
+ self.addCleanup(setattr, self.logger.manager, 'disable', old_disable)
3836
+ self.assertFalse(self.logger.isEnabledFor(22))
3837
+
3838
+ def test_root_logger_aliases(self):
3839
+ root = logging.getLogger()
3840
+ self.assertIs(root, logging.root)
3841
+ self.assertIs(root, logging.getLogger(None))
3842
+ self.assertIs(root, logging.getLogger(''))
3843
+ self.assertIs(root, logging.getLogger('foo').root)
3844
+ self.assertIs(root, logging.getLogger('foo.bar').root)
3845
+ self.assertIs(root, logging.getLogger('foo').parent)
3846
+
3847
+ self.assertIsNot(root, logging.getLogger('\0'))
3848
+ self.assertIsNot(root, logging.getLogger('foo.bar').parent)
3849
+
3850
+ def test_invalid_names(self):
3851
+ self.assertRaises(TypeError, logging.getLogger, any)
3852
+ self.assertRaises(TypeError, logging.getLogger, b'foo')
3853
+
3854
+
3855
+ class BaseFileTest(BaseTest):
3856
+ "Base class for handler tests that write log files"
3857
+
3858
+ def setUp(self):
3859
+ BaseTest.setUp(self)
3860
+ fd, self.fn = tempfile.mkstemp(".log", "test_logging-2-")
3861
+ os.close(fd)
3862
+ self.rmfiles = []
3863
+
3864
+ def tearDown(self):
3865
+ for fn in self.rmfiles:
3866
+ os.unlink(fn)
3867
+ if os.path.exists(self.fn):
3868
+ os.unlink(self.fn)
3869
+ BaseTest.tearDown(self)
3870
+
3871
+ def assertLogFile(self, filename):
3872
+ "Assert a log file is there and register it for deletion"
3873
+ self.assertTrue(os.path.exists(filename),
3874
+ msg="Log file %r does not exist" % filename)
3875
+ self.rmfiles.append(filename)
3876
+
3877
+
3878
+ class FileHandlerTest(BaseFileTest):
3879
+ def test_delay(self):
3880
+ os.unlink(self.fn)
3881
+ fh = logging.FileHandler(self.fn, delay=True)
3882
+ self.assertIsNone(fh.stream)
3883
+ self.assertFalse(os.path.exists(self.fn))
3884
+ fh.handle(logging.makeLogRecord({}))
3885
+ self.assertIsNotNone(fh.stream)
3886
+ self.assertTrue(os.path.exists(self.fn))
3887
+ fh.close()
3888
+
3889
+ class RotatingFileHandlerTest(BaseFileTest):
3890
+ def next_rec(self):
3891
+ return logging.LogRecord('n', logging.DEBUG, 'p', 1,
3892
+ self.next_message(), None, None, None)
3893
+
3894
+ def test_should_not_rollover(self):
3895
+ # If maxbytes is zero rollover never occurs
3896
+ rh = logging.handlers.RotatingFileHandler(self.fn, maxBytes=0)
3897
+ self.assertFalse(rh.shouldRollover(None))
3898
+ rh.close()
3899
+
3900
+ def test_should_rollover(self):
3901
+ rh = logging.handlers.RotatingFileHandler(self.fn, maxBytes=1)
3902
+ self.assertTrue(rh.shouldRollover(self.next_rec()))
3903
+ rh.close()
3904
+
3905
+ def test_file_created(self):
3906
+ # checks that the file is created and assumes it was created
3907
+ # by us
3908
+ rh = logging.handlers.RotatingFileHandler(self.fn)
3909
+ rh.emit(self.next_rec())
3910
+ self.assertLogFile(self.fn)
3911
+ rh.close()
3912
+
3913
+ def test_rollover_filenames(self):
3914
+ def namer(name):
3915
+ return name + ".test"
3916
+ rh = logging.handlers.RotatingFileHandler(
3917
+ self.fn, backupCount=2, maxBytes=1)
3918
+ rh.namer = namer
3919
+ rh.emit(self.next_rec())
3920
+ self.assertLogFile(self.fn)
3921
+ rh.emit(self.next_rec())
3922
+ self.assertLogFile(namer(self.fn + ".1"))
3923
+ rh.emit(self.next_rec())
3924
+ self.assertLogFile(namer(self.fn + ".2"))
3925
+ self.assertFalse(os.path.exists(namer(self.fn + ".3")))
3926
+ rh.close()
3927
+
3928
+ @requires_zlib
3929
+ def test_rotator(self):
3930
+ def namer(name):
3931
+ return name + ".gz"
3932
+
3933
+ def rotator(source, dest):
3934
+ with open(source, "rb") as sf:
3935
+ data = sf.read()
3936
+ compressed = zlib.compress(data, 9)
3937
+ with open(dest, "wb") as df:
3938
+ df.write(compressed)
3939
+ os.remove(source)
3940
+
3941
+ rh = logging.handlers.RotatingFileHandler(
3942
+ self.fn, backupCount=2, maxBytes=1)
3943
+ rh.rotator = rotator
3944
+ rh.namer = namer
3945
+ m1 = self.next_rec()
3946
+ rh.emit(m1)
3947
+ self.assertLogFile(self.fn)
3948
+ m2 = self.next_rec()
3949
+ rh.emit(m2)
3950
+ fn = namer(self.fn + ".1")
3951
+ self.assertLogFile(fn)
3952
+ newline = os.linesep
3953
+ with open(fn, "rb") as f:
3954
+ compressed = f.read()
3955
+ data = zlib.decompress(compressed)
3956
+ self.assertEqual(data.decode("ascii"), m1.msg + newline)
3957
+ rh.emit(self.next_rec())
3958
+ fn = namer(self.fn + ".2")
3959
+ self.assertLogFile(fn)
3960
+ with open(fn, "rb") as f:
3961
+ compressed = f.read()
3962
+ data = zlib.decompress(compressed)
3963
+ self.assertEqual(data.decode("ascii"), m1.msg + newline)
3964
+ rh.emit(self.next_rec())
3965
+ fn = namer(self.fn + ".2")
3966
+ with open(fn, "rb") as f:
3967
+ compressed = f.read()
3968
+ data = zlib.decompress(compressed)
3969
+ self.assertEqual(data.decode("ascii"), m2.msg + newline)
3970
+ self.assertFalse(os.path.exists(namer(self.fn + ".3")))
3971
+ rh.close()
3972
+
3973
+ class TimedRotatingFileHandlerTest(BaseFileTest):
3974
+ # other test methods added below
3975
+ def test_rollover(self):
3976
+ fh = logging.handlers.TimedRotatingFileHandler(self.fn, 'S',
3977
+ backupCount=1)
3978
+ fmt = logging.Formatter('%(asctime)s %(message)s')
3979
+ fh.setFormatter(fmt)
3980
+ r1 = logging.makeLogRecord({'msg': 'testing - initial'})
3981
+ fh.emit(r1)
3982
+ self.assertLogFile(self.fn)
3983
+ time.sleep(1.1) # a little over a second ...
3984
+ r2 = logging.makeLogRecord({'msg': 'testing - after delay'})
3985
+ fh.emit(r2)
3986
+ fh.close()
3987
+ # At this point, we should have a recent rotated file which we
3988
+ # can test for the existence of. However, in practice, on some
3989
+ # machines which run really slowly, we don't know how far back
3990
+ # in time to go to look for the log file. So, we go back a fair
3991
+ # bit, and stop as soon as we see a rotated file. In theory this
3992
+ # could of course still fail, but the chances are lower.
3993
+ found = False
3994
+ now = datetime.datetime.now()
3995
+ GO_BACK = 5 * 60 # seconds
3996
+ for secs in range(GO_BACK):
3997
+ prev = now - datetime.timedelta(seconds=secs)
3998
+ fn = self.fn + prev.strftime(".%Y-%m-%d_%H-%M-%S")
3999
+ found = os.path.exists(fn)
4000
+ if found:
4001
+ self.rmfiles.append(fn)
4002
+ break
4003
+ msg = 'No rotated files found, went back %d seconds' % GO_BACK
4004
+ if not found:
4005
+ #print additional diagnostics
4006
+ dn, fn = os.path.split(self.fn)
4007
+ files = [f for f in os.listdir(dn) if f.startswith(fn)]
4008
+ print('Test time: %s' % now.strftime("%Y-%m-%d %H-%M-%S"), file=sys.stderr)
4009
+ print('The only matching files are: %s' % files, file=sys.stderr)
4010
+ for f in files:
4011
+ print('Contents of %s:' % f)
4012
+ path = os.path.join(dn, f)
4013
+ with open(path, 'r') as tf:
4014
+ print(tf.read())
4015
+ self.assertTrue(found, msg=msg)
4016
+
4017
+ def test_invalid(self):
4018
+ assertRaises = self.assertRaises
4019
+ assertRaises(ValueError, logging.handlers.TimedRotatingFileHandler,
4020
+ self.fn, 'X', delay=True)
4021
+ assertRaises(ValueError, logging.handlers.TimedRotatingFileHandler,
4022
+ self.fn, 'W', delay=True)
4023
+ assertRaises(ValueError, logging.handlers.TimedRotatingFileHandler,
4024
+ self.fn, 'W7', delay=True)
4025
+
4026
+ def test_compute_rollover_daily_attime(self):
4027
+ currentTime = 0
4028
+ atTime = datetime.time(12, 0, 0)
4029
+ rh = logging.handlers.TimedRotatingFileHandler(
4030
+ self.fn, when='MIDNIGHT', interval=1, backupCount=0, utc=True,
4031
+ atTime=atTime)
4032
+ try:
4033
+ actual = rh.computeRollover(currentTime)
4034
+ self.assertEqual(actual, currentTime + 12 * 60 * 60)
4035
+
4036
+ actual = rh.computeRollover(currentTime + 13 * 60 * 60)
4037
+ self.assertEqual(actual, currentTime + 36 * 60 * 60)
4038
+ finally:
4039
+ rh.close()
4040
+
4041
+ #@unittest.skipIf(True, 'Temporarily skipped while failures investigated.')
4042
+ def test_compute_rollover_weekly_attime(self):
4043
+ currentTime = int(time.time())
4044
+ today = currentTime - currentTime % 86400
4045
+
4046
+ atTime = datetime.time(12, 0, 0)
4047
+
4048
+ wday = time.gmtime(today).tm_wday
4049
+ for day in range(7):
4050
+ rh = logging.handlers.TimedRotatingFileHandler(
4051
+ self.fn, when='W%d' % day, interval=1, backupCount=0, utc=True,
4052
+ atTime=atTime)
4053
+ try:
4054
+ if wday > day:
4055
+ # The rollover day has already passed this week, so we
4056
+ # go over into next week
4057
+ expected = (7 - wday + day)
4058
+ else:
4059
+ expected = (day - wday)
4060
+ # At this point expected is in days from now, convert to seconds
4061
+ expected *= 24 * 60 * 60
4062
+ # Add in the rollover time
4063
+ expected += 12 * 60 * 60
4064
+ # Add in adjustment for today
4065
+ expected += today
4066
+ actual = rh.computeRollover(today)
4067
+ if actual != expected:
4068
+ print('failed in timezone: %d' % time.timezone)
4069
+ print('local vars: %s' % locals())
4070
+ self.assertEqual(actual, expected)
4071
+ if day == wday:
4072
+ # goes into following week
4073
+ expected += 7 * 24 * 60 * 60
4074
+ actual = rh.computeRollover(today + 13 * 60 * 60)
4075
+ if actual != expected:
4076
+ print('failed in timezone: %d' % time.timezone)
4077
+ print('local vars: %s' % locals())
4078
+ self.assertEqual(actual, expected)
4079
+ finally:
4080
+ rh.close()
4081
+
4082
+
4083
+ def secs(**kw):
4084
+ return datetime.timedelta(**kw) // datetime.timedelta(seconds=1)
4085
+
4086
+ for when, exp in (('S', 1),
4087
+ ('M', 60),
4088
+ ('H', 60 * 60),
4089
+ ('D', 60 * 60 * 24),
4090
+ ('MIDNIGHT', 60 * 60 * 24),
4091
+ # current time (epoch start) is a Thursday, W0 means Monday
4092
+ ('W0', secs(days=4, hours=24)),
4093
+ ):
4094
+ def test_compute_rollover(self, when=when, exp=exp):
4095
+ rh = logging.handlers.TimedRotatingFileHandler(
4096
+ self.fn, when=when, interval=1, backupCount=0, utc=True)
4097
+ currentTime = 0.0
4098
+ actual = rh.computeRollover(currentTime)
4099
+ if exp != actual:
4100
+ # Failures occur on some systems for MIDNIGHT and W0.
4101
+ # Print detailed calculation for MIDNIGHT so we can try to see
4102
+ # what's going on
4103
+ if when == 'MIDNIGHT':
4104
+ try:
4105
+ if rh.utc:
4106
+ t = time.gmtime(currentTime)
4107
+ else:
4108
+ t = time.localtime(currentTime)
4109
+ currentHour = t[3]
4110
+ currentMinute = t[4]
4111
+ currentSecond = t[5]
4112
+ # r is the number of seconds left between now and midnight
4113
+ r = logging.handlers._MIDNIGHT - ((currentHour * 60 +
4114
+ currentMinute) * 60 +
4115
+ currentSecond)
4116
+ result = currentTime + r
4117
+ print('t: %s (%s)' % (t, rh.utc), file=sys.stderr)
4118
+ print('currentHour: %s' % currentHour, file=sys.stderr)
4119
+ print('currentMinute: %s' % currentMinute, file=sys.stderr)
4120
+ print('currentSecond: %s' % currentSecond, file=sys.stderr)
4121
+ print('r: %s' % r, file=sys.stderr)
4122
+ print('result: %s' % result, file=sys.stderr)
4123
+ except Exception:
4124
+ print('exception in diagnostic code: %s' % sys.exc_info()[1], file=sys.stderr)
4125
+ self.assertEqual(exp, actual)
4126
+ rh.close()
4127
+ setattr(TimedRotatingFileHandlerTest, "test_compute_rollover_%s" % when, test_compute_rollover)
4128
+
4129
+
4130
+ @unittest.skipUnless(win32evtlog, 'win32evtlog/win32evtlogutil required for this test.')
4131
+ class NTEventLogHandlerTest(BaseTest):
4132
+ def test_basic(self):
4133
+ logtype = 'Application'
4134
+ elh = win32evtlog.OpenEventLog(None, logtype)
4135
+ num_recs = win32evtlog.GetNumberOfEventLogRecords(elh)
4136
+ h = logging.handlers.NTEventLogHandler('test_logging')
4137
+ r = logging.makeLogRecord({'msg': 'Test Log Message'})
4138
+ h.handle(r)
4139
+ h.close()
4140
+ # Now see if the event is recorded
4141
+ self.assertLess(num_recs, win32evtlog.GetNumberOfEventLogRecords(elh))
4142
+ flags = win32evtlog.EVENTLOG_BACKWARDS_READ | \
4143
+ win32evtlog.EVENTLOG_SEQUENTIAL_READ
4144
+ found = False
4145
+ GO_BACK = 100
4146
+ events = win32evtlog.ReadEventLog(elh, flags, GO_BACK)
4147
+ for e in events:
4148
+ if e.SourceName != 'test_logging':
4149
+ continue
4150
+ msg = win32evtlogutil.SafeFormatMessage(e, logtype)
4151
+ if msg != 'Test Log Message\r\n':
4152
+ continue
4153
+ found = True
4154
+ break
4155
+ msg = 'Record not found in event log, went back %d records' % GO_BACK
4156
+ self.assertTrue(found, msg=msg)
4157
+
4158
+ # Set the locale to the platform-dependent default. I have no idea
4159
+ # why the test does this, but in any case we save the current locale
4160
+ # first and restore it at the end.
4161
+ @run_with_locale('LC_ALL', '')
4162
+ def test_main():
4163
+ run_unittest(BuiltinLevelsTest, BasicFilterTest,
4164
+ CustomLevelsAndFiltersTest, HandlerTest, MemoryHandlerTest,
4165
+ ConfigFileTest, SocketHandlerTest, DatagramHandlerTest,
4166
+ MemoryTest, EncodingTest, WarningsTest, ConfigDictTest,
4167
+ ManagerTest, FormatterTest, BufferingFormatterTest,
4168
+ StreamHandlerTest, LogRecordFactoryTest, ChildLoggerTest,
4169
+ QueueHandlerTest, ShutdownTest, ModuleLevelMiscTest,
4170
+ BasicConfigTest, LoggerAdapterTest, LoggerTest,
4171
+ SMTPHandlerTest, FileHandlerTest, RotatingFileHandlerTest,
4172
+ LastResortTest, LogRecordTest, ExceptionTest,
4173
+ SysLogHandlerTest, HTTPHandlerTest, NTEventLogHandlerTest,
4174
+ TimedRotatingFileHandlerTest, UnixSocketHandlerTest,
4175
+ UnixDatagramHandlerTest, UnixSysLogHandlerTest
4176
+ )
4177
+
4178
+ if __name__ == "__main__":
4179
+ test_main()