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,3481 @@
1
+ """Unit tests for the io module."""
2
+
3
+ # Tests of io are scattered over the test suite:
4
+ # * test_bufio - tests file buffering
5
+ # * test_memoryio - tests BytesIO and StringIO
6
+ # * test_fileio - tests FileIO
7
+ # * test_file - tests the file interface
8
+ # * test_io - tests everything else in the io module
9
+ # * test_univnewlines - tests universal newline support
10
+ # * test_largefile - tests operations on a file greater than 2**32 bytes
11
+ # (only enabled with -ulargefile)
12
+
13
+ ################################################################################
14
+ # ATTENTION TEST WRITERS!!!
15
+ ################################################################################
16
+ # When writing tests for io, it's important to test both the C and Python
17
+ # implementations. This is usually done by writing a base test that refers to
18
+ # the type it is testing as a attribute. Then it provides custom subclasses to
19
+ # test both implementations. This file has lots of examples.
20
+ ################################################################################
21
+
22
+ import abc
23
+ import array
24
+ import errno
25
+ import locale
26
+ import os
27
+ import pickle
28
+ import random
29
+ import signal
30
+ import sys
31
+ import time
32
+ import unittest
33
+ import warnings
34
+ import weakref
35
+ from collections import deque, UserList
36
+ from itertools import cycle, count
37
+ from test import support
38
+ from test.script_helper import assert_python_ok
39
+
40
+ import codecs
41
+ import io # C implementation of io
42
+ import _pyio as pyio # Python implementation of io
43
+ try:
44
+ import threading
45
+ except ImportError:
46
+ threading = None
47
+ try:
48
+ import fcntl
49
+ except ImportError:
50
+ fcntl = None
51
+
52
+ def _default_chunk_size():
53
+ """Get the default TextIOWrapper chunk size"""
54
+ with open(__file__, "r", encoding="latin-1") as f:
55
+ return f._CHUNK_SIZE
56
+
57
+
58
+ class MockRawIOWithoutRead:
59
+ """A RawIO implementation without read(), so as to exercise the default
60
+ RawIO.read() which calls readinto()."""
61
+
62
+ def __init__(self, read_stack=()):
63
+ self._read_stack = list(read_stack)
64
+ self._write_stack = []
65
+ self._reads = 0
66
+ self._extraneous_reads = 0
67
+
68
+ def write(self, b):
69
+ self._write_stack.append(bytes(b))
70
+ return len(b)
71
+
72
+ def writable(self):
73
+ return True
74
+
75
+ def fileno(self):
76
+ return 42
77
+
78
+ def readable(self):
79
+ return True
80
+
81
+ def seekable(self):
82
+ return True
83
+
84
+ def seek(self, pos, whence):
85
+ return 0 # wrong but we gotta return something
86
+
87
+ def tell(self):
88
+ return 0 # same comment as above
89
+
90
+ def readinto(self, buf):
91
+ self._reads += 1
92
+ max_len = len(buf)
93
+ try:
94
+ data = self._read_stack[0]
95
+ except IndexError:
96
+ self._extraneous_reads += 1
97
+ return 0
98
+ if data is None:
99
+ del self._read_stack[0]
100
+ return None
101
+ n = len(data)
102
+ if len(data) <= max_len:
103
+ del self._read_stack[0]
104
+ buf[:n] = data
105
+ return n
106
+ else:
107
+ buf[:] = data[:max_len]
108
+ self._read_stack[0] = data[max_len:]
109
+ return max_len
110
+
111
+ def truncate(self, pos=None):
112
+ return pos
113
+
114
+ class CMockRawIOWithoutRead(MockRawIOWithoutRead, io.RawIOBase):
115
+ pass
116
+
117
+ class PyMockRawIOWithoutRead(MockRawIOWithoutRead, pyio.RawIOBase):
118
+ pass
119
+
120
+
121
+ class MockRawIO(MockRawIOWithoutRead):
122
+
123
+ def read(self, n=None):
124
+ self._reads += 1
125
+ try:
126
+ return self._read_stack.pop(0)
127
+ except:
128
+ self._extraneous_reads += 1
129
+ return b""
130
+
131
+ class CMockRawIO(MockRawIO, io.RawIOBase):
132
+ pass
133
+
134
+ class PyMockRawIO(MockRawIO, pyio.RawIOBase):
135
+ pass
136
+
137
+
138
+ class MisbehavedRawIO(MockRawIO):
139
+ def write(self, b):
140
+ return super().write(b) * 2
141
+
142
+ def read(self, n=None):
143
+ return super().read(n) * 2
144
+
145
+ def seek(self, pos, whence):
146
+ return -123
147
+
148
+ def tell(self):
149
+ return -456
150
+
151
+ def readinto(self, buf):
152
+ super().readinto(buf)
153
+ return len(buf) * 5
154
+
155
+ class CMisbehavedRawIO(MisbehavedRawIO, io.RawIOBase):
156
+ pass
157
+
158
+ class PyMisbehavedRawIO(MisbehavedRawIO, pyio.RawIOBase):
159
+ pass
160
+
161
+
162
+ class CloseFailureIO(MockRawIO):
163
+ closed = 0
164
+
165
+ def close(self):
166
+ if not self.closed:
167
+ self.closed = 1
168
+ raise OSError
169
+
170
+ class CCloseFailureIO(CloseFailureIO, io.RawIOBase):
171
+ pass
172
+
173
+ class PyCloseFailureIO(CloseFailureIO, pyio.RawIOBase):
174
+ pass
175
+
176
+
177
+ class MockFileIO:
178
+
179
+ def __init__(self, data):
180
+ self.read_history = []
181
+ super().__init__(data)
182
+
183
+ def read(self, n=None):
184
+ res = super().read(n)
185
+ self.read_history.append(None if res is None else len(res))
186
+ return res
187
+
188
+ def readinto(self, b):
189
+ res = super().readinto(b)
190
+ self.read_history.append(res)
191
+ return res
192
+
193
+ class CMockFileIO(MockFileIO, io.BytesIO):
194
+ pass
195
+
196
+ class PyMockFileIO(MockFileIO, pyio.BytesIO):
197
+ pass
198
+
199
+
200
+ class MockUnseekableIO:
201
+ def seekable(self):
202
+ return False
203
+
204
+ def seek(self, *args):
205
+ raise self.UnsupportedOperation("not seekable")
206
+
207
+ def tell(self, *args):
208
+ raise self.UnsupportedOperation("not seekable")
209
+
210
+ class CMockUnseekableIO(MockUnseekableIO, io.BytesIO):
211
+ UnsupportedOperation = io.UnsupportedOperation
212
+
213
+ class PyMockUnseekableIO(MockUnseekableIO, pyio.BytesIO):
214
+ UnsupportedOperation = pyio.UnsupportedOperation
215
+
216
+
217
+ class MockNonBlockWriterIO:
218
+
219
+ def __init__(self):
220
+ self._write_stack = []
221
+ self._blocker_char = None
222
+
223
+ def pop_written(self):
224
+ s = b"".join(self._write_stack)
225
+ self._write_stack[:] = []
226
+ return s
227
+
228
+ def block_on(self, char):
229
+ """Block when a given char is encountered."""
230
+ self._blocker_char = char
231
+
232
+ def readable(self):
233
+ return True
234
+
235
+ def seekable(self):
236
+ return True
237
+
238
+ def writable(self):
239
+ return True
240
+
241
+ def write(self, b):
242
+ b = bytes(b)
243
+ n = -1
244
+ if self._blocker_char:
245
+ try:
246
+ n = b.index(self._blocker_char)
247
+ except ValueError:
248
+ pass
249
+ else:
250
+ if n > 0:
251
+ # write data up to the first blocker
252
+ self._write_stack.append(b[:n])
253
+ return n
254
+ else:
255
+ # cancel blocker and indicate would block
256
+ self._blocker_char = None
257
+ return None
258
+ self._write_stack.append(b)
259
+ return len(b)
260
+
261
+ class CMockNonBlockWriterIO(MockNonBlockWriterIO, io.RawIOBase):
262
+ BlockingIOError = io.BlockingIOError
263
+
264
+ class PyMockNonBlockWriterIO(MockNonBlockWriterIO, pyio.RawIOBase):
265
+ BlockingIOError = pyio.BlockingIOError
266
+
267
+
268
+ class IOTest(unittest.TestCase):
269
+
270
+ def setUp(self):
271
+ support.unlink(support.TESTFN)
272
+
273
+ def tearDown(self):
274
+ support.unlink(support.TESTFN)
275
+
276
+ def write_ops(self, f):
277
+ self.assertEqual(f.write(b"blah."), 5)
278
+ f.truncate(0)
279
+ self.assertEqual(f.tell(), 5)
280
+ f.seek(0)
281
+
282
+ self.assertEqual(f.write(b"blah."), 5)
283
+ self.assertEqual(f.seek(0), 0)
284
+ self.assertEqual(f.write(b"Hello."), 6)
285
+ self.assertEqual(f.tell(), 6)
286
+ self.assertEqual(f.seek(-1, 1), 5)
287
+ self.assertEqual(f.tell(), 5)
288
+ self.assertEqual(f.write(bytearray(b" world\n\n\n")), 9)
289
+ self.assertEqual(f.seek(0), 0)
290
+ self.assertEqual(f.write(b"h"), 1)
291
+ self.assertEqual(f.seek(-1, 2), 13)
292
+ self.assertEqual(f.tell(), 13)
293
+
294
+ self.assertEqual(f.truncate(12), 12)
295
+ self.assertEqual(f.tell(), 13)
296
+ self.assertRaises(TypeError, f.seek, 0.0)
297
+
298
+ def read_ops(self, f, buffered=False):
299
+ data = f.read(5)
300
+ self.assertEqual(data, b"hello")
301
+ data = bytearray(data)
302
+ self.assertEqual(f.readinto(data), 5)
303
+ self.assertEqual(data, b" worl")
304
+ self.assertEqual(f.readinto(data), 2)
305
+ self.assertEqual(len(data), 5)
306
+ self.assertEqual(data[:2], b"d\n")
307
+ self.assertEqual(f.seek(0), 0)
308
+ self.assertEqual(f.read(20), b"hello world\n")
309
+ self.assertEqual(f.read(1), b"")
310
+ self.assertEqual(f.readinto(bytearray(b"x")), 0)
311
+ self.assertEqual(f.seek(-6, 2), 6)
312
+ self.assertEqual(f.read(5), b"world")
313
+ self.assertEqual(f.read(0), b"")
314
+ self.assertEqual(f.readinto(bytearray()), 0)
315
+ self.assertEqual(f.seek(-6, 1), 5)
316
+ self.assertEqual(f.read(5), b" worl")
317
+ self.assertEqual(f.tell(), 10)
318
+ self.assertRaises(TypeError, f.seek, 0.0)
319
+ if buffered:
320
+ f.seek(0)
321
+ self.assertEqual(f.read(), b"hello world\n")
322
+ f.seek(6)
323
+ self.assertEqual(f.read(), b"world\n")
324
+ self.assertEqual(f.read(), b"")
325
+
326
+ LARGE = 2**31
327
+
328
+ def large_file_ops(self, f):
329
+ assert f.readable()
330
+ assert f.writable()
331
+ self.assertEqual(f.seek(self.LARGE), self.LARGE)
332
+ self.assertEqual(f.tell(), self.LARGE)
333
+ self.assertEqual(f.write(b"xxx"), 3)
334
+ self.assertEqual(f.tell(), self.LARGE + 3)
335
+ self.assertEqual(f.seek(-1, 1), self.LARGE + 2)
336
+ self.assertEqual(f.truncate(), self.LARGE + 2)
337
+ self.assertEqual(f.tell(), self.LARGE + 2)
338
+ self.assertEqual(f.seek(0, 2), self.LARGE + 2)
339
+ self.assertEqual(f.truncate(self.LARGE + 1), self.LARGE + 1)
340
+ self.assertEqual(f.tell(), self.LARGE + 2)
341
+ self.assertEqual(f.seek(0, 2), self.LARGE + 1)
342
+ self.assertEqual(f.seek(-1, 2), self.LARGE)
343
+ self.assertEqual(f.read(2), b"x")
344
+
345
+ def test_invalid_operations(self):
346
+ # Try writing on a file opened in read mode and vice-versa.
347
+ exc = self.UnsupportedOperation
348
+ for mode in ("w", "wb"):
349
+ with self.open(support.TESTFN, mode) as fp:
350
+ self.assertRaises(exc, fp.read)
351
+ self.assertRaises(exc, fp.readline)
352
+ with self.open(support.TESTFN, "wb", buffering=0) as fp:
353
+ self.assertRaises(exc, fp.read)
354
+ self.assertRaises(exc, fp.readline)
355
+ with self.open(support.TESTFN, "rb", buffering=0) as fp:
356
+ self.assertRaises(exc, fp.write, b"blah")
357
+ self.assertRaises(exc, fp.writelines, [b"blah\n"])
358
+ with self.open(support.TESTFN, "rb") as fp:
359
+ self.assertRaises(exc, fp.write, b"blah")
360
+ self.assertRaises(exc, fp.writelines, [b"blah\n"])
361
+ with self.open(support.TESTFN, "r") as fp:
362
+ self.assertRaises(exc, fp.write, "blah")
363
+ self.assertRaises(exc, fp.writelines, ["blah\n"])
364
+ # Non-zero seeking from current or end pos
365
+ self.assertRaises(exc, fp.seek, 1, self.SEEK_CUR)
366
+ self.assertRaises(exc, fp.seek, -1, self.SEEK_END)
367
+
368
+ def test_open_handles_NUL_chars(self):
369
+ fn_with_NUL = 'foo\0bar'
370
+ self.assertRaises(TypeError, self.open, fn_with_NUL, 'w')
371
+ self.assertRaises(TypeError, self.open, bytes(fn_with_NUL, 'ascii'), 'w')
372
+
373
+ def test_raw_file_io(self):
374
+ with self.open(support.TESTFN, "wb", buffering=0) as f:
375
+ self.assertEqual(f.readable(), False)
376
+ self.assertEqual(f.writable(), True)
377
+ self.assertEqual(f.seekable(), True)
378
+ self.write_ops(f)
379
+ with self.open(support.TESTFN, "rb", buffering=0) as f:
380
+ self.assertEqual(f.readable(), True)
381
+ self.assertEqual(f.writable(), False)
382
+ self.assertEqual(f.seekable(), True)
383
+ self.read_ops(f)
384
+
385
+ def test_buffered_file_io(self):
386
+ with self.open(support.TESTFN, "wb") as f:
387
+ self.assertEqual(f.readable(), False)
388
+ self.assertEqual(f.writable(), True)
389
+ self.assertEqual(f.seekable(), True)
390
+ self.write_ops(f)
391
+ with self.open(support.TESTFN, "rb") as f:
392
+ self.assertEqual(f.readable(), True)
393
+ self.assertEqual(f.writable(), False)
394
+ self.assertEqual(f.seekable(), True)
395
+ self.read_ops(f, True)
396
+
397
+ def test_readline(self):
398
+ with self.open(support.TESTFN, "wb") as f:
399
+ f.write(b"abc\ndef\nxyzzy\nfoo\x00bar\nanother line")
400
+ with self.open(support.TESTFN, "rb") as f:
401
+ self.assertEqual(f.readline(), b"abc\n")
402
+ self.assertEqual(f.readline(10), b"def\n")
403
+ self.assertEqual(f.readline(2), b"xy")
404
+ self.assertEqual(f.readline(4), b"zzy\n")
405
+ self.assertEqual(f.readline(), b"foo\x00bar\n")
406
+ self.assertEqual(f.readline(None), b"another line")
407
+ self.assertRaises(TypeError, f.readline, 5.3)
408
+ with self.open(support.TESTFN, "r") as f:
409
+ self.assertRaises(TypeError, f.readline, 5.3)
410
+
411
+ def test_raw_bytes_io(self):
412
+ f = self.BytesIO()
413
+ self.write_ops(f)
414
+ data = f.getvalue()
415
+ self.assertEqual(data, b"hello world\n")
416
+ f = self.BytesIO(data)
417
+ self.read_ops(f, True)
418
+
419
+ def test_large_file_ops(self):
420
+ # On Windows and Mac OSX this test comsumes large resources; It takes
421
+ # a long time to build the >2GB file and takes >2GB of disk space
422
+ # therefore the resource must be enabled to run this test.
423
+ if sys.platform[:3] == 'win' or sys.platform == 'darwin':
424
+ support.requires(
425
+ 'largefile',
426
+ 'test requires %s bytes and a long time to run' % self.LARGE)
427
+ with self.open(support.TESTFN, "w+b", 0) as f:
428
+ self.large_file_ops(f)
429
+ with self.open(support.TESTFN, "w+b") as f:
430
+ self.large_file_ops(f)
431
+
432
+ def test_with_open(self):
433
+ for bufsize in (0, 1, 100):
434
+ f = None
435
+ with self.open(support.TESTFN, "wb", bufsize) as f:
436
+ f.write(b"xxx")
437
+ self.assertEqual(f.closed, True)
438
+ f = None
439
+ try:
440
+ with self.open(support.TESTFN, "wb", bufsize) as f:
441
+ 1/0
442
+ except ZeroDivisionError:
443
+ self.assertEqual(f.closed, True)
444
+ else:
445
+ self.fail("1/0 didn't raise an exception")
446
+
447
+ # issue 5008
448
+ def test_append_mode_tell(self):
449
+ with self.open(support.TESTFN, "wb") as f:
450
+ f.write(b"xxx")
451
+ with self.open(support.TESTFN, "ab", buffering=0) as f:
452
+ self.assertEqual(f.tell(), 3)
453
+ with self.open(support.TESTFN, "ab") as f:
454
+ self.assertEqual(f.tell(), 3)
455
+ with self.open(support.TESTFN, "a") as f:
456
+ self.assertTrue(f.tell() > 0)
457
+
458
+ def test_destructor(self):
459
+ record = []
460
+ class MyFileIO(self.FileIO):
461
+ def __del__(self):
462
+ record.append(1)
463
+ try:
464
+ f = super().__del__
465
+ except AttributeError:
466
+ pass
467
+ else:
468
+ f()
469
+ def close(self):
470
+ record.append(2)
471
+ super().close()
472
+ def flush(self):
473
+ record.append(3)
474
+ super().flush()
475
+ with support.check_warnings(('', ResourceWarning)):
476
+ f = MyFileIO(support.TESTFN, "wb")
477
+ f.write(b"xxx")
478
+ del f
479
+ support.gc_collect()
480
+ self.assertEqual(record, [1, 2, 3])
481
+ with self.open(support.TESTFN, "rb") as f:
482
+ self.assertEqual(f.read(), b"xxx")
483
+
484
+ def _check_base_destructor(self, base):
485
+ record = []
486
+ class MyIO(base):
487
+ def __init__(self):
488
+ # This exercises the availability of attributes on object
489
+ # destruction.
490
+ # (in the C version, close() is called by the tp_dealloc
491
+ # function, not by __del__)
492
+ self.on_del = 1
493
+ self.on_close = 2
494
+ self.on_flush = 3
495
+ def __del__(self):
496
+ record.append(self.on_del)
497
+ try:
498
+ f = super().__del__
499
+ except AttributeError:
500
+ pass
501
+ else:
502
+ f()
503
+ def close(self):
504
+ record.append(self.on_close)
505
+ super().close()
506
+ def flush(self):
507
+ record.append(self.on_flush)
508
+ super().flush()
509
+ f = MyIO()
510
+ del f
511
+ support.gc_collect()
512
+ self.assertEqual(record, [1, 2, 3])
513
+
514
+ def test_IOBase_destructor(self):
515
+ self._check_base_destructor(self.IOBase)
516
+
517
+ def test_RawIOBase_destructor(self):
518
+ self._check_base_destructor(self.RawIOBase)
519
+
520
+ def test_BufferedIOBase_destructor(self):
521
+ self._check_base_destructor(self.BufferedIOBase)
522
+
523
+ def test_TextIOBase_destructor(self):
524
+ self._check_base_destructor(self.TextIOBase)
525
+
526
+ def test_close_flushes(self):
527
+ with self.open(support.TESTFN, "wb") as f:
528
+ f.write(b"xxx")
529
+ with self.open(support.TESTFN, "rb") as f:
530
+ self.assertEqual(f.read(), b"xxx")
531
+
532
+ def test_array_writes(self):
533
+ a = array.array('i', range(10))
534
+ n = len(a.tobytes())
535
+ with self.open(support.TESTFN, "wb", 0) as f:
536
+ self.assertEqual(f.write(a), n)
537
+ with self.open(support.TESTFN, "wb") as f:
538
+ self.assertEqual(f.write(a), n)
539
+
540
+ def test_closefd(self):
541
+ self.assertRaises(ValueError, self.open, support.TESTFN, 'w',
542
+ closefd=False)
543
+
544
+ def test_read_closed(self):
545
+ with self.open(support.TESTFN, "w") as f:
546
+ f.write("egg\n")
547
+ with self.open(support.TESTFN, "r") as f:
548
+ file = self.open(f.fileno(), "r", closefd=False)
549
+ self.assertEqual(file.read(), "egg\n")
550
+ file.seek(0)
551
+ file.close()
552
+ self.assertRaises(ValueError, file.read)
553
+
554
+ def test_no_closefd_with_filename(self):
555
+ # can't use closefd in combination with a file name
556
+ self.assertRaises(ValueError, self.open, support.TESTFN, "r", closefd=False)
557
+
558
+ def test_closefd_attr(self):
559
+ with self.open(support.TESTFN, "wb") as f:
560
+ f.write(b"egg\n")
561
+ with self.open(support.TESTFN, "r") as f:
562
+ self.assertEqual(f.buffer.raw.closefd, True)
563
+ file = self.open(f.fileno(), "r", closefd=False)
564
+ self.assertEqual(file.buffer.raw.closefd, False)
565
+
566
+ def test_garbage_collection(self):
567
+ # FileIO objects are collected, and collecting them flushes
568
+ # all data to disk.
569
+ with support.check_warnings(('', ResourceWarning)):
570
+ f = self.FileIO(support.TESTFN, "wb")
571
+ f.write(b"abcxxx")
572
+ f.f = f
573
+ wr = weakref.ref(f)
574
+ del f
575
+ support.gc_collect()
576
+ self.assertTrue(wr() is None, wr)
577
+ with self.open(support.TESTFN, "rb") as f:
578
+ self.assertEqual(f.read(), b"abcxxx")
579
+
580
+ def test_unbounded_file(self):
581
+ # Issue #1174606: reading from an unbounded stream such as /dev/zero.
582
+ zero = "/dev/zero"
583
+ if not os.path.exists(zero):
584
+ self.skipTest("{0} does not exist".format(zero))
585
+ if sys.maxsize > 0x7FFFFFFF:
586
+ self.skipTest("test can only run in a 32-bit address space")
587
+ if support.real_max_memuse < support._2G:
588
+ self.skipTest("test requires at least 2GB of memory")
589
+ with self.open(zero, "rb", buffering=0) as f:
590
+ self.assertRaises(OverflowError, f.read)
591
+ with self.open(zero, "rb") as f:
592
+ self.assertRaises(OverflowError, f.read)
593
+ with self.open(zero, "r") as f:
594
+ self.assertRaises(OverflowError, f.read)
595
+
596
+ def test_flush_error_on_close(self):
597
+ f = self.open(support.TESTFN, "wb", buffering=0)
598
+ def bad_flush():
599
+ raise OSError()
600
+ f.flush = bad_flush
601
+ self.assertRaises(OSError, f.close) # exception not swallowed
602
+ self.assertTrue(f.closed)
603
+
604
+ def test_multi_close(self):
605
+ f = self.open(support.TESTFN, "wb", buffering=0)
606
+ f.close()
607
+ f.close()
608
+ f.close()
609
+ self.assertRaises(ValueError, f.flush)
610
+
611
+ def test_RawIOBase_read(self):
612
+ # Exercise the default RawIOBase.read() implementation (which calls
613
+ # readinto() internally).
614
+ rawio = self.MockRawIOWithoutRead((b"abc", b"d", None, b"efg", None))
615
+ self.assertEqual(rawio.read(2), b"ab")
616
+ self.assertEqual(rawio.read(2), b"c")
617
+ self.assertEqual(rawio.read(2), b"d")
618
+ self.assertEqual(rawio.read(2), None)
619
+ self.assertEqual(rawio.read(2), b"ef")
620
+ self.assertEqual(rawio.read(2), b"g")
621
+ self.assertEqual(rawio.read(2), None)
622
+ self.assertEqual(rawio.read(2), b"")
623
+
624
+ def test_types_have_dict(self):
625
+ test = (
626
+ self.IOBase(),
627
+ self.RawIOBase(),
628
+ self.TextIOBase(),
629
+ self.StringIO(),
630
+ self.BytesIO()
631
+ )
632
+ for obj in test:
633
+ self.assertTrue(hasattr(obj, "__dict__"))
634
+
635
+ def test_opener(self):
636
+ with self.open(support.TESTFN, "w") as f:
637
+ f.write("egg\n")
638
+ fd = os.open(support.TESTFN, os.O_RDONLY)
639
+ def opener(path, flags):
640
+ return fd
641
+ with self.open("non-existent", "r", opener=opener) as f:
642
+ self.assertEqual(f.read(), "egg\n")
643
+
644
+ def test_fileio_closefd(self):
645
+ # Issue #4841
646
+ with self.open(__file__, 'rb') as f1, \
647
+ self.open(__file__, 'rb') as f2:
648
+ fileio = self.FileIO(f1.fileno(), closefd=False)
649
+ # .__init__() must not close f1
650
+ fileio.__init__(f2.fileno(), closefd=False)
651
+ f1.readline()
652
+ # .close() must not close f2
653
+ fileio.close()
654
+ f2.readline()
655
+
656
+ def test_nonbuffered_textio(self):
657
+ with warnings.catch_warnings(record=True) as recorded:
658
+ with self.assertRaises(ValueError):
659
+ self.open(support.TESTFN, 'w', buffering=0)
660
+ support.gc_collect()
661
+ self.assertEqual(recorded, [])
662
+
663
+ def test_invalid_newline(self):
664
+ with warnings.catch_warnings(record=True) as recorded:
665
+ with self.assertRaises(ValueError):
666
+ self.open(support.TESTFN, 'w', newline='invalid')
667
+ support.gc_collect()
668
+ self.assertEqual(recorded, [])
669
+
670
+
671
+ class CIOTest(IOTest):
672
+
673
+ def test_IOBase_finalize(self):
674
+ # Issue #12149: segmentation fault on _PyIOBase_finalize when both a
675
+ # class which inherits IOBase and an object of this class are caught
676
+ # in a reference cycle and close() is already in the method cache.
677
+ class MyIO(self.IOBase):
678
+ def close(self):
679
+ pass
680
+
681
+ # create an instance to populate the method cache
682
+ MyIO()
683
+ obj = MyIO()
684
+ obj.obj = obj
685
+ wr = weakref.ref(obj)
686
+ del MyIO
687
+ del obj
688
+ support.gc_collect()
689
+ self.assertTrue(wr() is None, wr)
690
+
691
+ class PyIOTest(IOTest):
692
+ pass
693
+
694
+
695
+ class CommonBufferedTests:
696
+ # Tests common to BufferedReader, BufferedWriter and BufferedRandom
697
+
698
+ def test_detach(self):
699
+ raw = self.MockRawIO()
700
+ buf = self.tp(raw)
701
+ self.assertIs(buf.detach(), raw)
702
+ self.assertRaises(ValueError, buf.detach)
703
+
704
+ def test_fileno(self):
705
+ rawio = self.MockRawIO()
706
+ bufio = self.tp(rawio)
707
+
708
+ self.assertEqual(42, bufio.fileno())
709
+
710
+ @unittest.skip('test having existential crisis')
711
+ def test_no_fileno(self):
712
+ # XXX will we always have fileno() function? If so, kill
713
+ # this test. Else, write it.
714
+ pass
715
+
716
+ def test_invalid_args(self):
717
+ rawio = self.MockRawIO()
718
+ bufio = self.tp(rawio)
719
+ # Invalid whence
720
+ self.assertRaises(ValueError, bufio.seek, 0, -1)
721
+ self.assertRaises(ValueError, bufio.seek, 0, 9)
722
+
723
+ def test_override_destructor(self):
724
+ tp = self.tp
725
+ record = []
726
+ class MyBufferedIO(tp):
727
+ def __del__(self):
728
+ record.append(1)
729
+ try:
730
+ f = super().__del__
731
+ except AttributeError:
732
+ pass
733
+ else:
734
+ f()
735
+ def close(self):
736
+ record.append(2)
737
+ super().close()
738
+ def flush(self):
739
+ record.append(3)
740
+ super().flush()
741
+ rawio = self.MockRawIO()
742
+ bufio = MyBufferedIO(rawio)
743
+ writable = bufio.writable()
744
+ del bufio
745
+ support.gc_collect()
746
+ if writable:
747
+ self.assertEqual(record, [1, 2, 3])
748
+ else:
749
+ self.assertEqual(record, [1, 2])
750
+
751
+ def test_context_manager(self):
752
+ # Test usability as a context manager
753
+ rawio = self.MockRawIO()
754
+ bufio = self.tp(rawio)
755
+ def _with():
756
+ with bufio:
757
+ pass
758
+ _with()
759
+ # bufio should now be closed, and using it a second time should raise
760
+ # a ValueError.
761
+ self.assertRaises(ValueError, _with)
762
+
763
+ def test_error_through_destructor(self):
764
+ # Test that the exception state is not modified by a destructor,
765
+ # even if close() fails.
766
+ rawio = self.CloseFailureIO()
767
+ def f():
768
+ self.tp(rawio).xyzzy
769
+ with support.captured_output("stderr") as s:
770
+ self.assertRaises(AttributeError, f)
771
+ s = s.getvalue().strip()
772
+ if s:
773
+ # The destructor *may* have printed an unraisable error, check it
774
+ self.assertEqual(len(s.splitlines()), 1)
775
+ self.assertTrue(s.startswith("Exception OSError: "), s)
776
+ self.assertTrue(s.endswith(" ignored"), s)
777
+
778
+ def test_repr(self):
779
+ raw = self.MockRawIO()
780
+ b = self.tp(raw)
781
+ clsname = "%s.%s" % (self.tp.__module__, self.tp.__name__)
782
+ self.assertEqual(repr(b), "<%s>" % clsname)
783
+ raw.name = "dummy"
784
+ self.assertEqual(repr(b), "<%s name='dummy'>" % clsname)
785
+ raw.name = b"dummy"
786
+ self.assertEqual(repr(b), "<%s name=b'dummy'>" % clsname)
787
+
788
+ def test_flush_error_on_close(self):
789
+ raw = self.MockRawIO()
790
+ def bad_flush():
791
+ raise OSError()
792
+ raw.flush = bad_flush
793
+ b = self.tp(raw)
794
+ self.assertRaises(OSError, b.close) # exception not swallowed
795
+ self.assertTrue(b.closed)
796
+
797
+ def test_close_error_on_close(self):
798
+ raw = self.MockRawIO()
799
+ def bad_flush():
800
+ raise OSError('flush')
801
+ def bad_close():
802
+ raise OSError('close')
803
+ raw.close = bad_close
804
+ b = self.tp(raw)
805
+ b.flush = bad_flush
806
+ with self.assertRaises(OSError) as err: # exception not swallowed
807
+ b.close()
808
+ self.assertEqual(err.exception.args, ('close',))
809
+ self.assertIsInstance(err.exception.__context__, OSError)
810
+ self.assertEqual(err.exception.__context__.args, ('flush',))
811
+ self.assertFalse(b.closed)
812
+
813
+ def test_nonnormalized_close_error_on_close(self):
814
+ # Issue #21677
815
+ raw = self.MockRawIO()
816
+ def bad_flush():
817
+ raise non_existing_flush
818
+ def bad_close():
819
+ raise non_existing_close
820
+ raw.close = bad_close
821
+ b = self.tp(raw)
822
+ b.flush = bad_flush
823
+ with self.assertRaises(NameError) as err: # exception not swallowed
824
+ b.close()
825
+ self.assertIn('non_existing_close', str(err.exception))
826
+ self.assertIsInstance(err.exception.__context__, NameError)
827
+ self.assertIn('non_existing_flush', str(err.exception.__context__))
828
+ self.assertFalse(b.closed)
829
+
830
+ def test_multi_close(self):
831
+ raw = self.MockRawIO()
832
+ b = self.tp(raw)
833
+ b.close()
834
+ b.close()
835
+ b.close()
836
+ self.assertRaises(ValueError, b.flush)
837
+
838
+ def test_unseekable(self):
839
+ bufio = self.tp(self.MockUnseekableIO(b"A" * 10))
840
+ self.assertRaises(self.UnsupportedOperation, bufio.tell)
841
+ self.assertRaises(self.UnsupportedOperation, bufio.seek, 0)
842
+
843
+ def test_readonly_attributes(self):
844
+ raw = self.MockRawIO()
845
+ buf = self.tp(raw)
846
+ x = self.MockRawIO()
847
+ with self.assertRaises(AttributeError):
848
+ buf.raw = x
849
+
850
+
851
+ class SizeofTest:
852
+
853
+ @support.cpython_only
854
+ def test_sizeof(self):
855
+ bufsize1 = 4096
856
+ bufsize2 = 8192
857
+ rawio = self.MockRawIO()
858
+ bufio = self.tp(rawio, buffer_size=bufsize1)
859
+ size = sys.getsizeof(bufio) - bufsize1
860
+ rawio = self.MockRawIO()
861
+ bufio = self.tp(rawio, buffer_size=bufsize2)
862
+ self.assertEqual(sys.getsizeof(bufio), size + bufsize2)
863
+
864
+ @support.cpython_only
865
+ def test_buffer_freeing(self) :
866
+ bufsize = 4096
867
+ rawio = self.MockRawIO()
868
+ bufio = self.tp(rawio, buffer_size=bufsize)
869
+ size = sys.getsizeof(bufio) - bufsize
870
+ bufio.close()
871
+ self.assertEqual(sys.getsizeof(bufio), size)
872
+
873
+ class BufferedReaderTest(unittest.TestCase, CommonBufferedTests):
874
+ read_mode = "rb"
875
+
876
+ def test_constructor(self):
877
+ rawio = self.MockRawIO([b"abc"])
878
+ bufio = self.tp(rawio)
879
+ bufio.__init__(rawio)
880
+ bufio.__init__(rawio, buffer_size=1024)
881
+ bufio.__init__(rawio, buffer_size=16)
882
+ self.assertEqual(b"abc", bufio.read())
883
+ self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=0)
884
+ self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=-16)
885
+ self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=-1)
886
+ rawio = self.MockRawIO([b"abc"])
887
+ bufio.__init__(rawio)
888
+ self.assertEqual(b"abc", bufio.read())
889
+
890
+ def test_uninitialized(self):
891
+ bufio = self.tp.__new__(self.tp)
892
+ del bufio
893
+ bufio = self.tp.__new__(self.tp)
894
+ self.assertRaisesRegex((ValueError, AttributeError),
895
+ 'uninitialized|has no attribute',
896
+ bufio.read, 0)
897
+ bufio.__init__(self.MockRawIO())
898
+ self.assertEqual(bufio.read(0), b'')
899
+
900
+ def test_read(self):
901
+ for arg in (None, 7):
902
+ rawio = self.MockRawIO((b"abc", b"d", b"efg"))
903
+ bufio = self.tp(rawio)
904
+ self.assertEqual(b"abcdefg", bufio.read(arg))
905
+ # Invalid args
906
+ self.assertRaises(ValueError, bufio.read, -2)
907
+
908
+ def test_read1(self):
909
+ rawio = self.MockRawIO((b"abc", b"d", b"efg"))
910
+ bufio = self.tp(rawio)
911
+ self.assertEqual(b"a", bufio.read(1))
912
+ self.assertEqual(b"b", bufio.read1(1))
913
+ self.assertEqual(rawio._reads, 1)
914
+ self.assertEqual(b"c", bufio.read1(100))
915
+ self.assertEqual(rawio._reads, 1)
916
+ self.assertEqual(b"d", bufio.read1(100))
917
+ self.assertEqual(rawio._reads, 2)
918
+ self.assertEqual(b"efg", bufio.read1(100))
919
+ self.assertEqual(rawio._reads, 3)
920
+ self.assertEqual(b"", bufio.read1(100))
921
+ self.assertEqual(rawio._reads, 4)
922
+ # Invalid args
923
+ self.assertRaises(ValueError, bufio.read1, -1)
924
+
925
+ def test_readinto(self):
926
+ rawio = self.MockRawIO((b"abc", b"d", b"efg"))
927
+ bufio = self.tp(rawio)
928
+ b = bytearray(2)
929
+ self.assertEqual(bufio.readinto(b), 2)
930
+ self.assertEqual(b, b"ab")
931
+ self.assertEqual(bufio.readinto(b), 2)
932
+ self.assertEqual(b, b"cd")
933
+ self.assertEqual(bufio.readinto(b), 2)
934
+ self.assertEqual(b, b"ef")
935
+ self.assertEqual(bufio.readinto(b), 1)
936
+ self.assertEqual(b, b"gf")
937
+ self.assertEqual(bufio.readinto(b), 0)
938
+ self.assertEqual(b, b"gf")
939
+ rawio = self.MockRawIO((b"abc", None))
940
+ bufio = self.tp(rawio)
941
+ self.assertEqual(bufio.readinto(b), 2)
942
+ self.assertEqual(b, b"ab")
943
+ self.assertEqual(bufio.readinto(b), 1)
944
+ self.assertEqual(b, b"cb")
945
+
946
+ def test_readlines(self):
947
+ def bufio():
948
+ rawio = self.MockRawIO((b"abc\n", b"d\n", b"ef"))
949
+ return self.tp(rawio)
950
+ self.assertEqual(bufio().readlines(), [b"abc\n", b"d\n", b"ef"])
951
+ self.assertEqual(bufio().readlines(5), [b"abc\n", b"d\n"])
952
+ self.assertEqual(bufio().readlines(None), [b"abc\n", b"d\n", b"ef"])
953
+
954
+ def test_buffering(self):
955
+ data = b"abcdefghi"
956
+ dlen = len(data)
957
+
958
+ tests = [
959
+ [ 100, [ 3, 1, 4, 8 ], [ dlen, 0 ] ],
960
+ [ 100, [ 3, 3, 3], [ dlen ] ],
961
+ [ 4, [ 1, 2, 4, 2 ], [ 4, 4, 1 ] ],
962
+ ]
963
+
964
+ for bufsize, buf_read_sizes, raw_read_sizes in tests:
965
+ rawio = self.MockFileIO(data)
966
+ bufio = self.tp(rawio, buffer_size=bufsize)
967
+ pos = 0
968
+ for nbytes in buf_read_sizes:
969
+ self.assertEqual(bufio.read(nbytes), data[pos:pos+nbytes])
970
+ pos += nbytes
971
+ # this is mildly implementation-dependent
972
+ self.assertEqual(rawio.read_history, raw_read_sizes)
973
+
974
+ def test_read_non_blocking(self):
975
+ # Inject some None's in there to simulate EWOULDBLOCK
976
+ rawio = self.MockRawIO((b"abc", b"d", None, b"efg", None, None, None))
977
+ bufio = self.tp(rawio)
978
+ self.assertEqual(b"abcd", bufio.read(6))
979
+ self.assertEqual(b"e", bufio.read(1))
980
+ self.assertEqual(b"fg", bufio.read())
981
+ self.assertEqual(b"", bufio.peek(1))
982
+ self.assertIsNone(bufio.read())
983
+ self.assertEqual(b"", bufio.read())
984
+
985
+ rawio = self.MockRawIO((b"a", None, None))
986
+ self.assertEqual(b"a", rawio.readall())
987
+ self.assertIsNone(rawio.readall())
988
+
989
+ def test_read_past_eof(self):
990
+ rawio = self.MockRawIO((b"abc", b"d", b"efg"))
991
+ bufio = self.tp(rawio)
992
+
993
+ self.assertEqual(b"abcdefg", bufio.read(9000))
994
+
995
+ def test_read_all(self):
996
+ rawio = self.MockRawIO((b"abc", b"d", b"efg"))
997
+ bufio = self.tp(rawio)
998
+
999
+ self.assertEqual(b"abcdefg", bufio.read())
1000
+
1001
+ @unittest.skipUnless(threading, 'Threading required for this test.')
1002
+ @support.requires_resource('cpu')
1003
+ def test_threads(self):
1004
+ try:
1005
+ # Write out many bytes with exactly the same number of 0's,
1006
+ # 1's... 255's. This will help us check that concurrent reading
1007
+ # doesn't duplicate or forget contents.
1008
+ N = 1000
1009
+ l = list(range(256)) * N
1010
+ random.shuffle(l)
1011
+ s = bytes(bytearray(l))
1012
+ with self.open(support.TESTFN, "wb") as f:
1013
+ f.write(s)
1014
+ with self.open(support.TESTFN, self.read_mode, buffering=0) as raw:
1015
+ bufio = self.tp(raw, 8)
1016
+ errors = []
1017
+ results = []
1018
+ def f():
1019
+ try:
1020
+ # Intra-buffer read then buffer-flushing read
1021
+ for n in cycle([1, 19]):
1022
+ s = bufio.read(n)
1023
+ if not s:
1024
+ break
1025
+ # list.append() is atomic
1026
+ results.append(s)
1027
+ except Exception as e:
1028
+ errors.append(e)
1029
+ raise
1030
+ threads = [threading.Thread(target=f) for x in range(20)]
1031
+ for t in threads:
1032
+ t.start()
1033
+ time.sleep(0.02) # yield
1034
+ for t in threads:
1035
+ t.join()
1036
+ self.assertFalse(errors,
1037
+ "the following exceptions were caught: %r" % errors)
1038
+ s = b''.join(results)
1039
+ for i in range(256):
1040
+ c = bytes(bytearray([i]))
1041
+ self.assertEqual(s.count(c), N)
1042
+ finally:
1043
+ support.unlink(support.TESTFN)
1044
+
1045
+ def test_unseekable(self):
1046
+ bufio = self.tp(self.MockUnseekableIO(b"A" * 10))
1047
+ self.assertRaises(self.UnsupportedOperation, bufio.tell)
1048
+ self.assertRaises(self.UnsupportedOperation, bufio.seek, 0)
1049
+ bufio.read(1)
1050
+ self.assertRaises(self.UnsupportedOperation, bufio.seek, 0)
1051
+ self.assertRaises(self.UnsupportedOperation, bufio.tell)
1052
+
1053
+ def test_misbehaved_io(self):
1054
+ rawio = self.MisbehavedRawIO((b"abc", b"d", b"efg"))
1055
+ bufio = self.tp(rawio)
1056
+ self.assertRaises(OSError, bufio.seek, 0)
1057
+ self.assertRaises(OSError, bufio.tell)
1058
+
1059
+ def test_no_extraneous_read(self):
1060
+ # Issue #9550; when the raw IO object has satisfied the read request,
1061
+ # we should not issue any additional reads, otherwise it may block
1062
+ # (e.g. socket).
1063
+ bufsize = 16
1064
+ for n in (2, bufsize - 1, bufsize, bufsize + 1, bufsize * 2):
1065
+ rawio = self.MockRawIO([b"x" * n])
1066
+ bufio = self.tp(rawio, bufsize)
1067
+ self.assertEqual(bufio.read(n), b"x" * n)
1068
+ # Simple case: one raw read is enough to satisfy the request.
1069
+ self.assertEqual(rawio._extraneous_reads, 0,
1070
+ "failed for {}: {} != 0".format(n, rawio._extraneous_reads))
1071
+ # A more complex case where two raw reads are needed to satisfy
1072
+ # the request.
1073
+ rawio = self.MockRawIO([b"x" * (n - 1), b"x"])
1074
+ bufio = self.tp(rawio, bufsize)
1075
+ self.assertEqual(bufio.read(n), b"x" * n)
1076
+ self.assertEqual(rawio._extraneous_reads, 0,
1077
+ "failed for {}: {} != 0".format(n, rawio._extraneous_reads))
1078
+
1079
+
1080
+ class CBufferedReaderTest(BufferedReaderTest, SizeofTest):
1081
+ tp = io.BufferedReader
1082
+
1083
+ def test_constructor(self):
1084
+ BufferedReaderTest.test_constructor(self)
1085
+ # The allocation can succeed on 32-bit builds, e.g. with more
1086
+ # than 2GB RAM and a 64-bit kernel.
1087
+ if sys.maxsize > 0x7FFFFFFF:
1088
+ rawio = self.MockRawIO()
1089
+ bufio = self.tp(rawio)
1090
+ self.assertRaises((OverflowError, MemoryError, ValueError),
1091
+ bufio.__init__, rawio, sys.maxsize)
1092
+
1093
+ def test_initialization(self):
1094
+ rawio = self.MockRawIO([b"abc"])
1095
+ bufio = self.tp(rawio)
1096
+ self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=0)
1097
+ self.assertRaises(ValueError, bufio.read)
1098
+ self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=-16)
1099
+ self.assertRaises(ValueError, bufio.read)
1100
+ self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=-1)
1101
+ self.assertRaises(ValueError, bufio.read)
1102
+
1103
+ def test_misbehaved_io_read(self):
1104
+ rawio = self.MisbehavedRawIO((b"abc", b"d", b"efg"))
1105
+ bufio = self.tp(rawio)
1106
+ # _pyio.BufferedReader seems to implement reading different, so that
1107
+ # checking this is not so easy.
1108
+ self.assertRaises(OSError, bufio.read, 10)
1109
+
1110
+ def test_garbage_collection(self):
1111
+ # C BufferedReader objects are collected.
1112
+ # The Python version has __del__, so it ends into gc.garbage instead
1113
+ with support.check_warnings(('', ResourceWarning)):
1114
+ rawio = self.FileIO(support.TESTFN, "w+b")
1115
+ f = self.tp(rawio)
1116
+ f.f = f
1117
+ wr = weakref.ref(f)
1118
+ del f
1119
+ support.gc_collect()
1120
+ self.assertTrue(wr() is None, wr)
1121
+
1122
+ def test_args_error(self):
1123
+ # Issue #17275
1124
+ with self.assertRaisesRegex(TypeError, "BufferedReader"):
1125
+ self.tp(io.BytesIO(), 1024, 1024, 1024)
1126
+
1127
+
1128
+ class PyBufferedReaderTest(BufferedReaderTest):
1129
+ tp = pyio.BufferedReader
1130
+
1131
+
1132
+ class BufferedWriterTest(unittest.TestCase, CommonBufferedTests):
1133
+ write_mode = "wb"
1134
+
1135
+ def test_constructor(self):
1136
+ rawio = self.MockRawIO()
1137
+ bufio = self.tp(rawio)
1138
+ bufio.__init__(rawio)
1139
+ bufio.__init__(rawio, buffer_size=1024)
1140
+ bufio.__init__(rawio, buffer_size=16)
1141
+ self.assertEqual(3, bufio.write(b"abc"))
1142
+ bufio.flush()
1143
+ self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=0)
1144
+ self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=-16)
1145
+ self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=-1)
1146
+ bufio.__init__(rawio)
1147
+ self.assertEqual(3, bufio.write(b"ghi"))
1148
+ bufio.flush()
1149
+ self.assertEqual(b"".join(rawio._write_stack), b"abcghi")
1150
+
1151
+ def test_uninitialized(self):
1152
+ bufio = self.tp.__new__(self.tp)
1153
+ del bufio
1154
+ bufio = self.tp.__new__(self.tp)
1155
+ self.assertRaisesRegex((ValueError, AttributeError),
1156
+ 'uninitialized|has no attribute',
1157
+ bufio.write, b'')
1158
+ bufio.__init__(self.MockRawIO())
1159
+ self.assertEqual(bufio.write(b''), 0)
1160
+
1161
+ def test_detach_flush(self):
1162
+ raw = self.MockRawIO()
1163
+ buf = self.tp(raw)
1164
+ buf.write(b"howdy!")
1165
+ self.assertFalse(raw._write_stack)
1166
+ buf.detach()
1167
+ self.assertEqual(raw._write_stack, [b"howdy!"])
1168
+
1169
+ def test_write(self):
1170
+ # Write to the buffered IO but don't overflow the buffer.
1171
+ writer = self.MockRawIO()
1172
+ bufio = self.tp(writer, 8)
1173
+ bufio.write(b"abc")
1174
+ self.assertFalse(writer._write_stack)
1175
+
1176
+ def test_write_overflow(self):
1177
+ writer = self.MockRawIO()
1178
+ bufio = self.tp(writer, 8)
1179
+ contents = b"abcdefghijklmnop"
1180
+ for n in range(0, len(contents), 3):
1181
+ bufio.write(contents[n:n+3])
1182
+ flushed = b"".join(writer._write_stack)
1183
+ # At least (total - 8) bytes were implicitly flushed, perhaps more
1184
+ # depending on the implementation.
1185
+ self.assertTrue(flushed.startswith(contents[:-8]), flushed)
1186
+
1187
+ def check_writes(self, intermediate_func):
1188
+ # Lots of writes, test the flushed output is as expected.
1189
+ contents = bytes(range(256)) * 1000
1190
+ n = 0
1191
+ writer = self.MockRawIO()
1192
+ bufio = self.tp(writer, 13)
1193
+ # Generator of write sizes: repeat each N 15 times then proceed to N+1
1194
+ def gen_sizes():
1195
+ for size in count(1):
1196
+ for i in range(15):
1197
+ yield size
1198
+ sizes = gen_sizes()
1199
+ while n < len(contents):
1200
+ size = min(next(sizes), len(contents) - n)
1201
+ self.assertEqual(bufio.write(contents[n:n+size]), size)
1202
+ intermediate_func(bufio)
1203
+ n += size
1204
+ bufio.flush()
1205
+ self.assertEqual(contents, b"".join(writer._write_stack))
1206
+
1207
+ def test_writes(self):
1208
+ self.check_writes(lambda bufio: None)
1209
+
1210
+ def test_writes_and_flushes(self):
1211
+ self.check_writes(lambda bufio: bufio.flush())
1212
+
1213
+ def test_writes_and_seeks(self):
1214
+ def _seekabs(bufio):
1215
+ pos = bufio.tell()
1216
+ bufio.seek(pos + 1, 0)
1217
+ bufio.seek(pos - 1, 0)
1218
+ bufio.seek(pos, 0)
1219
+ self.check_writes(_seekabs)
1220
+ def _seekrel(bufio):
1221
+ pos = bufio.seek(0, 1)
1222
+ bufio.seek(+1, 1)
1223
+ bufio.seek(-1, 1)
1224
+ bufio.seek(pos, 0)
1225
+ self.check_writes(_seekrel)
1226
+
1227
+ def test_writes_and_truncates(self):
1228
+ self.check_writes(lambda bufio: bufio.truncate(bufio.tell()))
1229
+
1230
+ def test_write_non_blocking(self):
1231
+ raw = self.MockNonBlockWriterIO()
1232
+ bufio = self.tp(raw, 8)
1233
+
1234
+ self.assertEqual(bufio.write(b"abcd"), 4)
1235
+ self.assertEqual(bufio.write(b"efghi"), 5)
1236
+ # 1 byte will be written, the rest will be buffered
1237
+ raw.block_on(b"k")
1238
+ self.assertEqual(bufio.write(b"jklmn"), 5)
1239
+
1240
+ # 8 bytes will be written, 8 will be buffered and the rest will be lost
1241
+ raw.block_on(b"0")
1242
+ try:
1243
+ bufio.write(b"opqrwxyz0123456789")
1244
+ except self.BlockingIOError as e:
1245
+ written = e.characters_written
1246
+ else:
1247
+ self.fail("BlockingIOError should have been raised")
1248
+ self.assertEqual(written, 16)
1249
+ self.assertEqual(raw.pop_written(),
1250
+ b"abcdefghijklmnopqrwxyz")
1251
+
1252
+ self.assertEqual(bufio.write(b"ABCDEFGHI"), 9)
1253
+ s = raw.pop_written()
1254
+ # Previously buffered bytes were flushed
1255
+ self.assertTrue(s.startswith(b"01234567A"), s)
1256
+
1257
+ def test_write_and_rewind(self):
1258
+ raw = io.BytesIO()
1259
+ bufio = self.tp(raw, 4)
1260
+ self.assertEqual(bufio.write(b"abcdef"), 6)
1261
+ self.assertEqual(bufio.tell(), 6)
1262
+ bufio.seek(0, 0)
1263
+ self.assertEqual(bufio.write(b"XY"), 2)
1264
+ bufio.seek(6, 0)
1265
+ self.assertEqual(raw.getvalue(), b"XYcdef")
1266
+ self.assertEqual(bufio.write(b"123456"), 6)
1267
+ bufio.flush()
1268
+ self.assertEqual(raw.getvalue(), b"XYcdef123456")
1269
+
1270
+ def test_flush(self):
1271
+ writer = self.MockRawIO()
1272
+ bufio = self.tp(writer, 8)
1273
+ bufio.write(b"abc")
1274
+ bufio.flush()
1275
+ self.assertEqual(b"abc", writer._write_stack[0])
1276
+
1277
+ def test_writelines(self):
1278
+ l = [b'ab', b'cd', b'ef']
1279
+ writer = self.MockRawIO()
1280
+ bufio = self.tp(writer, 8)
1281
+ bufio.writelines(l)
1282
+ bufio.flush()
1283
+ self.assertEqual(b''.join(writer._write_stack), b'abcdef')
1284
+
1285
+ def test_writelines_userlist(self):
1286
+ l = UserList([b'ab', b'cd', b'ef'])
1287
+ writer = self.MockRawIO()
1288
+ bufio = self.tp(writer, 8)
1289
+ bufio.writelines(l)
1290
+ bufio.flush()
1291
+ self.assertEqual(b''.join(writer._write_stack), b'abcdef')
1292
+
1293
+ def test_writelines_error(self):
1294
+ writer = self.MockRawIO()
1295
+ bufio = self.tp(writer, 8)
1296
+ self.assertRaises(TypeError, bufio.writelines, [1, 2, 3])
1297
+ self.assertRaises(TypeError, bufio.writelines, None)
1298
+ self.assertRaises(TypeError, bufio.writelines, 'abc')
1299
+
1300
+ def test_destructor(self):
1301
+ writer = self.MockRawIO()
1302
+ bufio = self.tp(writer, 8)
1303
+ bufio.write(b"abc")
1304
+ del bufio
1305
+ support.gc_collect()
1306
+ self.assertEqual(b"abc", writer._write_stack[0])
1307
+
1308
+ def test_truncate(self):
1309
+ # Truncate implicitly flushes the buffer.
1310
+ with self.open(support.TESTFN, self.write_mode, buffering=0) as raw:
1311
+ bufio = self.tp(raw, 8)
1312
+ bufio.write(b"abcdef")
1313
+ self.assertEqual(bufio.truncate(3), 3)
1314
+ self.assertEqual(bufio.tell(), 6)
1315
+ with self.open(support.TESTFN, "rb", buffering=0) as f:
1316
+ self.assertEqual(f.read(), b"abc")
1317
+
1318
+ @unittest.skipUnless(threading, 'Threading required for this test.')
1319
+ @support.requires_resource('cpu')
1320
+ def test_threads(self):
1321
+ try:
1322
+ # Write out many bytes from many threads and test they were
1323
+ # all flushed.
1324
+ N = 1000
1325
+ contents = bytes(range(256)) * N
1326
+ sizes = cycle([1, 19])
1327
+ n = 0
1328
+ queue = deque()
1329
+ while n < len(contents):
1330
+ size = next(sizes)
1331
+ queue.append(contents[n:n+size])
1332
+ n += size
1333
+ del contents
1334
+ # We use a real file object because it allows us to
1335
+ # exercise situations where the GIL is released before
1336
+ # writing the buffer to the raw streams. This is in addition
1337
+ # to concurrency issues due to switching threads in the middle
1338
+ # of Python code.
1339
+ with self.open(support.TESTFN, self.write_mode, buffering=0) as raw:
1340
+ bufio = self.tp(raw, 8)
1341
+ errors = []
1342
+ def f():
1343
+ try:
1344
+ while True:
1345
+ try:
1346
+ s = queue.popleft()
1347
+ except IndexError:
1348
+ return
1349
+ bufio.write(s)
1350
+ except Exception as e:
1351
+ errors.append(e)
1352
+ raise
1353
+ threads = [threading.Thread(target=f) for x in range(20)]
1354
+ for t in threads:
1355
+ t.start()
1356
+ time.sleep(0.02) # yield
1357
+ for t in threads:
1358
+ t.join()
1359
+ self.assertFalse(errors,
1360
+ "the following exceptions were caught: %r" % errors)
1361
+ bufio.close()
1362
+ with self.open(support.TESTFN, "rb") as f:
1363
+ s = f.read()
1364
+ for i in range(256):
1365
+ self.assertEqual(s.count(bytes([i])), N)
1366
+ finally:
1367
+ support.unlink(support.TESTFN)
1368
+
1369
+ def test_misbehaved_io(self):
1370
+ rawio = self.MisbehavedRawIO()
1371
+ bufio = self.tp(rawio, 5)
1372
+ self.assertRaises(OSError, bufio.seek, 0)
1373
+ self.assertRaises(OSError, bufio.tell)
1374
+ self.assertRaises(OSError, bufio.write, b"abcdef")
1375
+
1376
+ def test_max_buffer_size_removal(self):
1377
+ with self.assertRaises(TypeError):
1378
+ self.tp(self.MockRawIO(), 8, 12)
1379
+
1380
+ def test_write_error_on_close(self):
1381
+ raw = self.MockRawIO()
1382
+ def bad_write(b):
1383
+ raise OSError()
1384
+ raw.write = bad_write
1385
+ b = self.tp(raw)
1386
+ b.write(b'spam')
1387
+ self.assertRaises(OSError, b.close) # exception not swallowed
1388
+ self.assertTrue(b.closed)
1389
+
1390
+
1391
+ class CBufferedWriterTest(BufferedWriterTest, SizeofTest):
1392
+ tp = io.BufferedWriter
1393
+
1394
+ def test_constructor(self):
1395
+ BufferedWriterTest.test_constructor(self)
1396
+ # The allocation can succeed on 32-bit builds, e.g. with more
1397
+ # than 2GB RAM and a 64-bit kernel.
1398
+ if sys.maxsize > 0x7FFFFFFF:
1399
+ rawio = self.MockRawIO()
1400
+ bufio = self.tp(rawio)
1401
+ self.assertRaises((OverflowError, MemoryError, ValueError),
1402
+ bufio.__init__, rawio, sys.maxsize)
1403
+
1404
+ def test_initialization(self):
1405
+ rawio = self.MockRawIO()
1406
+ bufio = self.tp(rawio)
1407
+ self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=0)
1408
+ self.assertRaises(ValueError, bufio.write, b"def")
1409
+ self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=-16)
1410
+ self.assertRaises(ValueError, bufio.write, b"def")
1411
+ self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=-1)
1412
+ self.assertRaises(ValueError, bufio.write, b"def")
1413
+
1414
+ def test_garbage_collection(self):
1415
+ # C BufferedWriter objects are collected, and collecting them flushes
1416
+ # all data to disk.
1417
+ # The Python version has __del__, so it ends into gc.garbage instead
1418
+ with support.check_warnings(('', ResourceWarning)):
1419
+ rawio = self.FileIO(support.TESTFN, "w+b")
1420
+ f = self.tp(rawio)
1421
+ f.write(b"123xxx")
1422
+ f.x = f
1423
+ wr = weakref.ref(f)
1424
+ del f
1425
+ support.gc_collect()
1426
+ self.assertTrue(wr() is None, wr)
1427
+ with self.open(support.TESTFN, "rb") as f:
1428
+ self.assertEqual(f.read(), b"123xxx")
1429
+
1430
+ def test_args_error(self):
1431
+ # Issue #17275
1432
+ with self.assertRaisesRegex(TypeError, "BufferedWriter"):
1433
+ self.tp(io.BytesIO(), 1024, 1024, 1024)
1434
+
1435
+
1436
+ class PyBufferedWriterTest(BufferedWriterTest):
1437
+ tp = pyio.BufferedWriter
1438
+
1439
+ class BufferedRWPairTest(unittest.TestCase):
1440
+
1441
+ def test_constructor(self):
1442
+ pair = self.tp(self.MockRawIO(), self.MockRawIO())
1443
+ self.assertFalse(pair.closed)
1444
+
1445
+ def test_uninitialized(self):
1446
+ pair = self.tp.__new__(self.tp)
1447
+ del pair
1448
+ pair = self.tp.__new__(self.tp)
1449
+ self.assertRaisesRegex((ValueError, AttributeError),
1450
+ 'uninitialized|has no attribute',
1451
+ pair.read, 0)
1452
+ self.assertRaisesRegex((ValueError, AttributeError),
1453
+ 'uninitialized|has no attribute',
1454
+ pair.write, b'')
1455
+ pair.__init__(self.MockRawIO(), self.MockRawIO())
1456
+ self.assertEqual(pair.read(0), b'')
1457
+ self.assertEqual(pair.write(b''), 0)
1458
+
1459
+ def test_detach(self):
1460
+ pair = self.tp(self.MockRawIO(), self.MockRawIO())
1461
+ self.assertRaises(self.UnsupportedOperation, pair.detach)
1462
+
1463
+ def test_constructor_max_buffer_size_removal(self):
1464
+ with self.assertRaises(TypeError):
1465
+ self.tp(self.MockRawIO(), self.MockRawIO(), 8, 12)
1466
+
1467
+ def test_constructor_with_not_readable(self):
1468
+ class NotReadable(MockRawIO):
1469
+ def readable(self):
1470
+ return False
1471
+
1472
+ self.assertRaises(OSError, self.tp, NotReadable(), self.MockRawIO())
1473
+
1474
+ def test_constructor_with_not_writeable(self):
1475
+ class NotWriteable(MockRawIO):
1476
+ def writable(self):
1477
+ return False
1478
+
1479
+ self.assertRaises(OSError, self.tp, self.MockRawIO(), NotWriteable())
1480
+
1481
+ def test_read(self):
1482
+ pair = self.tp(self.BytesIO(b"abcdef"), self.MockRawIO())
1483
+
1484
+ self.assertEqual(pair.read(3), b"abc")
1485
+ self.assertEqual(pair.read(1), b"d")
1486
+ self.assertEqual(pair.read(), b"ef")
1487
+ pair = self.tp(self.BytesIO(b"abc"), self.MockRawIO())
1488
+ self.assertEqual(pair.read(None), b"abc")
1489
+
1490
+ def test_readlines(self):
1491
+ pair = lambda: self.tp(self.BytesIO(b"abc\ndef\nh"), self.MockRawIO())
1492
+ self.assertEqual(pair().readlines(), [b"abc\n", b"def\n", b"h"])
1493
+ self.assertEqual(pair().readlines(), [b"abc\n", b"def\n", b"h"])
1494
+ self.assertEqual(pair().readlines(5), [b"abc\n", b"def\n"])
1495
+
1496
+ def test_read1(self):
1497
+ # .read1() is delegated to the underlying reader object, so this test
1498
+ # can be shallow.
1499
+ pair = self.tp(self.BytesIO(b"abcdef"), self.MockRawIO())
1500
+
1501
+ self.assertEqual(pair.read1(3), b"abc")
1502
+
1503
+ def test_readinto(self):
1504
+ pair = self.tp(self.BytesIO(b"abcdef"), self.MockRawIO())
1505
+
1506
+ data = bytearray(5)
1507
+ self.assertEqual(pair.readinto(data), 5)
1508
+ self.assertEqual(data, b"abcde")
1509
+
1510
+ def test_write(self):
1511
+ w = self.MockRawIO()
1512
+ pair = self.tp(self.MockRawIO(), w)
1513
+
1514
+ pair.write(b"abc")
1515
+ pair.flush()
1516
+ pair.write(b"def")
1517
+ pair.flush()
1518
+ self.assertEqual(w._write_stack, [b"abc", b"def"])
1519
+
1520
+ def test_peek(self):
1521
+ pair = self.tp(self.BytesIO(b"abcdef"), self.MockRawIO())
1522
+
1523
+ self.assertTrue(pair.peek(3).startswith(b"abc"))
1524
+ self.assertEqual(pair.read(3), b"abc")
1525
+
1526
+ def test_readable(self):
1527
+ pair = self.tp(self.MockRawIO(), self.MockRawIO())
1528
+ self.assertTrue(pair.readable())
1529
+
1530
+ def test_writeable(self):
1531
+ pair = self.tp(self.MockRawIO(), self.MockRawIO())
1532
+ self.assertTrue(pair.writable())
1533
+
1534
+ def test_seekable(self):
1535
+ # BufferedRWPairs are never seekable, even if their readers and writers
1536
+ # are.
1537
+ pair = self.tp(self.MockRawIO(), self.MockRawIO())
1538
+ self.assertFalse(pair.seekable())
1539
+
1540
+ # .flush() is delegated to the underlying writer object and has been
1541
+ # tested in the test_write method.
1542
+
1543
+ def test_close_and_closed(self):
1544
+ pair = self.tp(self.MockRawIO(), self.MockRawIO())
1545
+ self.assertFalse(pair.closed)
1546
+ pair.close()
1547
+ self.assertTrue(pair.closed)
1548
+
1549
+ def test_isatty(self):
1550
+ class SelectableIsAtty(MockRawIO):
1551
+ def __init__(self, isatty):
1552
+ MockRawIO.__init__(self)
1553
+ self._isatty = isatty
1554
+
1555
+ def isatty(self):
1556
+ return self._isatty
1557
+
1558
+ pair = self.tp(SelectableIsAtty(False), SelectableIsAtty(False))
1559
+ self.assertFalse(pair.isatty())
1560
+
1561
+ pair = self.tp(SelectableIsAtty(True), SelectableIsAtty(False))
1562
+ self.assertTrue(pair.isatty())
1563
+
1564
+ pair = self.tp(SelectableIsAtty(False), SelectableIsAtty(True))
1565
+ self.assertTrue(pair.isatty())
1566
+
1567
+ pair = self.tp(SelectableIsAtty(True), SelectableIsAtty(True))
1568
+ self.assertTrue(pair.isatty())
1569
+
1570
+ class CBufferedRWPairTest(BufferedRWPairTest):
1571
+ tp = io.BufferedRWPair
1572
+
1573
+ class PyBufferedRWPairTest(BufferedRWPairTest):
1574
+ tp = pyio.BufferedRWPair
1575
+
1576
+
1577
+ class BufferedRandomTest(BufferedReaderTest, BufferedWriterTest):
1578
+ read_mode = "rb+"
1579
+ write_mode = "wb+"
1580
+
1581
+ def test_constructor(self):
1582
+ BufferedReaderTest.test_constructor(self)
1583
+ BufferedWriterTest.test_constructor(self)
1584
+
1585
+ def test_uninitialized(self):
1586
+ BufferedReaderTest.test_uninitialized(self)
1587
+ BufferedWriterTest.test_uninitialized(self)
1588
+
1589
+ def test_read_and_write(self):
1590
+ raw = self.MockRawIO((b"asdf", b"ghjk"))
1591
+ rw = self.tp(raw, 8)
1592
+
1593
+ self.assertEqual(b"as", rw.read(2))
1594
+ rw.write(b"ddd")
1595
+ rw.write(b"eee")
1596
+ self.assertFalse(raw._write_stack) # Buffer writes
1597
+ self.assertEqual(b"ghjk", rw.read())
1598
+ self.assertEqual(b"dddeee", raw._write_stack[0])
1599
+
1600
+ def test_seek_and_tell(self):
1601
+ raw = self.BytesIO(b"asdfghjkl")
1602
+ rw = self.tp(raw)
1603
+
1604
+ self.assertEqual(b"as", rw.read(2))
1605
+ self.assertEqual(2, rw.tell())
1606
+ rw.seek(0, 0)
1607
+ self.assertEqual(b"asdf", rw.read(4))
1608
+
1609
+ rw.write(b"123f")
1610
+ rw.seek(0, 0)
1611
+ self.assertEqual(b"asdf123fl", rw.read())
1612
+ self.assertEqual(9, rw.tell())
1613
+ rw.seek(-4, 2)
1614
+ self.assertEqual(5, rw.tell())
1615
+ rw.seek(2, 1)
1616
+ self.assertEqual(7, rw.tell())
1617
+ self.assertEqual(b"fl", rw.read(11))
1618
+ rw.flush()
1619
+ self.assertEqual(b"asdf123fl", raw.getvalue())
1620
+
1621
+ self.assertRaises(TypeError, rw.seek, 0.0)
1622
+
1623
+ def check_flush_and_read(self, read_func):
1624
+ raw = self.BytesIO(b"abcdefghi")
1625
+ bufio = self.tp(raw)
1626
+
1627
+ self.assertEqual(b"ab", read_func(bufio, 2))
1628
+ bufio.write(b"12")
1629
+ self.assertEqual(b"ef", read_func(bufio, 2))
1630
+ self.assertEqual(6, bufio.tell())
1631
+ bufio.flush()
1632
+ self.assertEqual(6, bufio.tell())
1633
+ self.assertEqual(b"ghi", read_func(bufio))
1634
+ raw.seek(0, 0)
1635
+ raw.write(b"XYZ")
1636
+ # flush() resets the read buffer
1637
+ bufio.flush()
1638
+ bufio.seek(0, 0)
1639
+ self.assertEqual(b"XYZ", read_func(bufio, 3))
1640
+
1641
+ def test_flush_and_read(self):
1642
+ self.check_flush_and_read(lambda bufio, *args: bufio.read(*args))
1643
+
1644
+ def test_flush_and_readinto(self):
1645
+ def _readinto(bufio, n=-1):
1646
+ b = bytearray(n if n >= 0 else 9999)
1647
+ n = bufio.readinto(b)
1648
+ return bytes(b[:n])
1649
+ self.check_flush_and_read(_readinto)
1650
+
1651
+ def test_flush_and_peek(self):
1652
+ def _peek(bufio, n=-1):
1653
+ # This relies on the fact that the buffer can contain the whole
1654
+ # raw stream, otherwise peek() can return less.
1655
+ b = bufio.peek(n)
1656
+ if n != -1:
1657
+ b = b[:n]
1658
+ bufio.seek(len(b), 1)
1659
+ return b
1660
+ self.check_flush_and_read(_peek)
1661
+
1662
+ def test_flush_and_write(self):
1663
+ raw = self.BytesIO(b"abcdefghi")
1664
+ bufio = self.tp(raw)
1665
+
1666
+ bufio.write(b"123")
1667
+ bufio.flush()
1668
+ bufio.write(b"45")
1669
+ bufio.flush()
1670
+ bufio.seek(0, 0)
1671
+ self.assertEqual(b"12345fghi", raw.getvalue())
1672
+ self.assertEqual(b"12345fghi", bufio.read())
1673
+
1674
+ def test_threads(self):
1675
+ BufferedReaderTest.test_threads(self)
1676
+ BufferedWriterTest.test_threads(self)
1677
+
1678
+ def test_writes_and_peek(self):
1679
+ def _peek(bufio):
1680
+ bufio.peek(1)
1681
+ self.check_writes(_peek)
1682
+ def _peek(bufio):
1683
+ pos = bufio.tell()
1684
+ bufio.seek(-1, 1)
1685
+ bufio.peek(1)
1686
+ bufio.seek(pos, 0)
1687
+ self.check_writes(_peek)
1688
+
1689
+ def test_writes_and_reads(self):
1690
+ def _read(bufio):
1691
+ bufio.seek(-1, 1)
1692
+ bufio.read(1)
1693
+ self.check_writes(_read)
1694
+
1695
+ def test_writes_and_read1s(self):
1696
+ def _read1(bufio):
1697
+ bufio.seek(-1, 1)
1698
+ bufio.read1(1)
1699
+ self.check_writes(_read1)
1700
+
1701
+ def test_writes_and_readintos(self):
1702
+ def _read(bufio):
1703
+ bufio.seek(-1, 1)
1704
+ bufio.readinto(bytearray(1))
1705
+ self.check_writes(_read)
1706
+
1707
+ def test_write_after_readahead(self):
1708
+ # Issue #6629: writing after the buffer was filled by readahead should
1709
+ # first rewind the raw stream.
1710
+ for overwrite_size in [1, 5]:
1711
+ raw = self.BytesIO(b"A" * 10)
1712
+ bufio = self.tp(raw, 4)
1713
+ # Trigger readahead
1714
+ self.assertEqual(bufio.read(1), b"A")
1715
+ self.assertEqual(bufio.tell(), 1)
1716
+ # Overwriting should rewind the raw stream if it needs so
1717
+ bufio.write(b"B" * overwrite_size)
1718
+ self.assertEqual(bufio.tell(), overwrite_size + 1)
1719
+ # If the write size was smaller than the buffer size, flush() and
1720
+ # check that rewind happens.
1721
+ bufio.flush()
1722
+ self.assertEqual(bufio.tell(), overwrite_size + 1)
1723
+ s = raw.getvalue()
1724
+ self.assertEqual(s,
1725
+ b"A" + b"B" * overwrite_size + b"A" * (9 - overwrite_size))
1726
+
1727
+ def test_write_rewind_write(self):
1728
+ # Various combinations of reading / writing / seeking backwards / writing again
1729
+ def mutate(bufio, pos1, pos2):
1730
+ assert pos2 >= pos1
1731
+ # Fill the buffer
1732
+ bufio.seek(pos1)
1733
+ bufio.read(pos2 - pos1)
1734
+ bufio.write(b'\x02')
1735
+ # This writes earlier than the previous write, but still inside
1736
+ # the buffer.
1737
+ bufio.seek(pos1)
1738
+ bufio.write(b'\x01')
1739
+
1740
+ b = b"\x80\x81\x82\x83\x84"
1741
+ for i in range(0, len(b)):
1742
+ for j in range(i, len(b)):
1743
+ raw = self.BytesIO(b)
1744
+ bufio = self.tp(raw, 100)
1745
+ mutate(bufio, i, j)
1746
+ bufio.flush()
1747
+ expected = bytearray(b)
1748
+ expected[j] = 2
1749
+ expected[i] = 1
1750
+ self.assertEqual(raw.getvalue(), expected,
1751
+ "failed result for i=%d, j=%d" % (i, j))
1752
+
1753
+ def test_truncate_after_read_or_write(self):
1754
+ raw = self.BytesIO(b"A" * 10)
1755
+ bufio = self.tp(raw, 100)
1756
+ self.assertEqual(bufio.read(2), b"AA") # the read buffer gets filled
1757
+ self.assertEqual(bufio.truncate(), 2)
1758
+ self.assertEqual(bufio.write(b"BB"), 2) # the write buffer increases
1759
+ self.assertEqual(bufio.truncate(), 4)
1760
+
1761
+ def test_misbehaved_io(self):
1762
+ BufferedReaderTest.test_misbehaved_io(self)
1763
+ BufferedWriterTest.test_misbehaved_io(self)
1764
+
1765
+ def test_interleaved_read_write(self):
1766
+ # Test for issue #12213
1767
+ with self.BytesIO(b'abcdefgh') as raw:
1768
+ with self.tp(raw, 100) as f:
1769
+ f.write(b"1")
1770
+ self.assertEqual(f.read(1), b'b')
1771
+ f.write(b'2')
1772
+ self.assertEqual(f.read1(1), b'd')
1773
+ f.write(b'3')
1774
+ buf = bytearray(1)
1775
+ f.readinto(buf)
1776
+ self.assertEqual(buf, b'f')
1777
+ f.write(b'4')
1778
+ self.assertEqual(f.peek(1), b'h')
1779
+ f.flush()
1780
+ self.assertEqual(raw.getvalue(), b'1b2d3f4h')
1781
+
1782
+ with self.BytesIO(b'abc') as raw:
1783
+ with self.tp(raw, 100) as f:
1784
+ self.assertEqual(f.read(1), b'a')
1785
+ f.write(b"2")
1786
+ self.assertEqual(f.read(1), b'c')
1787
+ f.flush()
1788
+ self.assertEqual(raw.getvalue(), b'a2c')
1789
+
1790
+ def test_interleaved_readline_write(self):
1791
+ with self.BytesIO(b'ab\ncdef\ng\n') as raw:
1792
+ with self.tp(raw) as f:
1793
+ f.write(b'1')
1794
+ self.assertEqual(f.readline(), b'b\n')
1795
+ f.write(b'2')
1796
+ self.assertEqual(f.readline(), b'def\n')
1797
+ f.write(b'3')
1798
+ self.assertEqual(f.readline(), b'\n')
1799
+ f.flush()
1800
+ self.assertEqual(raw.getvalue(), b'1b\n2def\n3\n')
1801
+
1802
+ # You can't construct a BufferedRandom over a non-seekable stream.
1803
+ test_unseekable = None
1804
+
1805
+
1806
+ class CBufferedRandomTest(BufferedRandomTest, SizeofTest):
1807
+ tp = io.BufferedRandom
1808
+
1809
+ def test_constructor(self):
1810
+ BufferedRandomTest.test_constructor(self)
1811
+ # The allocation can succeed on 32-bit builds, e.g. with more
1812
+ # than 2GB RAM and a 64-bit kernel.
1813
+ if sys.maxsize > 0x7FFFFFFF:
1814
+ rawio = self.MockRawIO()
1815
+ bufio = self.tp(rawio)
1816
+ self.assertRaises((OverflowError, MemoryError, ValueError),
1817
+ bufio.__init__, rawio, sys.maxsize)
1818
+
1819
+ def test_garbage_collection(self):
1820
+ CBufferedReaderTest.test_garbage_collection(self)
1821
+ CBufferedWriterTest.test_garbage_collection(self)
1822
+
1823
+ def test_args_error(self):
1824
+ # Issue #17275
1825
+ with self.assertRaisesRegex(TypeError, "BufferedRandom"):
1826
+ self.tp(io.BytesIO(), 1024, 1024, 1024)
1827
+
1828
+
1829
+ class PyBufferedRandomTest(BufferedRandomTest):
1830
+ tp = pyio.BufferedRandom
1831
+
1832
+
1833
+ # To fully exercise seek/tell, the StatefulIncrementalDecoder has these
1834
+ # properties:
1835
+ # - A single output character can correspond to many bytes of input.
1836
+ # - The number of input bytes to complete the character can be
1837
+ # undetermined until the last input byte is received.
1838
+ # - The number of input bytes can vary depending on previous input.
1839
+ # - A single input byte can correspond to many characters of output.
1840
+ # - The number of output characters can be undetermined until the
1841
+ # last input byte is received.
1842
+ # - The number of output characters can vary depending on previous input.
1843
+
1844
+ class StatefulIncrementalDecoder(codecs.IncrementalDecoder):
1845
+ """
1846
+ For testing seek/tell behavior with a stateful, buffering decoder.
1847
+
1848
+ Input is a sequence of words. Words may be fixed-length (length set
1849
+ by input) or variable-length (period-terminated). In variable-length
1850
+ mode, extra periods are ignored. Possible words are:
1851
+ - 'i' followed by a number sets the input length, I (maximum 99).
1852
+ When I is set to 0, words are space-terminated.
1853
+ - 'o' followed by a number sets the output length, O (maximum 99).
1854
+ - Any other word is converted into a word followed by a period on
1855
+ the output. The output word consists of the input word truncated
1856
+ or padded out with hyphens to make its length equal to O. If O
1857
+ is 0, the word is output verbatim without truncating or padding.
1858
+ I and O are initially set to 1. When I changes, any buffered input is
1859
+ re-scanned according to the new I. EOF also terminates the last word.
1860
+ """
1861
+
1862
+ def __init__(self, errors='strict'):
1863
+ codecs.IncrementalDecoder.__init__(self, errors)
1864
+ self.reset()
1865
+
1866
+ def __repr__(self):
1867
+ return '<SID %x>' % id(self)
1868
+
1869
+ def reset(self):
1870
+ self.i = 1
1871
+ self.o = 1
1872
+ self.buffer = bytearray()
1873
+
1874
+ def getstate(self):
1875
+ i, o = self.i ^ 1, self.o ^ 1 # so that flags = 0 after reset()
1876
+ return bytes(self.buffer), i*100 + o
1877
+
1878
+ def setstate(self, state):
1879
+ buffer, io = state
1880
+ self.buffer = bytearray(buffer)
1881
+ i, o = divmod(io, 100)
1882
+ self.i, self.o = i ^ 1, o ^ 1
1883
+
1884
+ def decode(self, input, final=False):
1885
+ output = ''
1886
+ for b in input:
1887
+ if self.i == 0: # variable-length, terminated with period
1888
+ if b == ord('.'):
1889
+ if self.buffer:
1890
+ output += self.process_word()
1891
+ else:
1892
+ self.buffer.append(b)
1893
+ else: # fixed-length, terminate after self.i bytes
1894
+ self.buffer.append(b)
1895
+ if len(self.buffer) == self.i:
1896
+ output += self.process_word()
1897
+ if final and self.buffer: # EOF terminates the last word
1898
+ output += self.process_word()
1899
+ return output
1900
+
1901
+ def process_word(self):
1902
+ output = ''
1903
+ if self.buffer[0] == ord('i'):
1904
+ self.i = min(99, int(self.buffer[1:] or 0)) # set input length
1905
+ elif self.buffer[0] == ord('o'):
1906
+ self.o = min(99, int(self.buffer[1:] or 0)) # set output length
1907
+ else:
1908
+ output = self.buffer.decode('ascii')
1909
+ if len(output) < self.o:
1910
+ output += '-'*self.o # pad out with hyphens
1911
+ if self.o:
1912
+ output = output[:self.o] # truncate to output length
1913
+ output += '.'
1914
+ self.buffer = bytearray()
1915
+ return output
1916
+
1917
+ codecEnabled = False
1918
+
1919
+ @classmethod
1920
+ def lookupTestDecoder(cls, name):
1921
+ if cls.codecEnabled and name == 'test_decoder':
1922
+ latin1 = codecs.lookup('latin-1')
1923
+ return codecs.CodecInfo(
1924
+ name='test_decoder', encode=latin1.encode, decode=None,
1925
+ incrementalencoder=None,
1926
+ streamreader=None, streamwriter=None,
1927
+ incrementaldecoder=cls)
1928
+
1929
+ # Register the previous decoder for testing.
1930
+ # Disabled by default, tests will enable it.
1931
+ codecs.register(StatefulIncrementalDecoder.lookupTestDecoder)
1932
+
1933
+
1934
+ class StatefulIncrementalDecoderTest(unittest.TestCase):
1935
+ """
1936
+ Make sure the StatefulIncrementalDecoder actually works.
1937
+ """
1938
+
1939
+ test_cases = [
1940
+ # I=1, O=1 (fixed-length input == fixed-length output)
1941
+ (b'abcd', False, 'a.b.c.d.'),
1942
+ # I=0, O=0 (variable-length input, variable-length output)
1943
+ (b'oiabcd', True, 'abcd.'),
1944
+ # I=0, O=0 (should ignore extra periods)
1945
+ (b'oi...abcd...', True, 'abcd.'),
1946
+ # I=0, O=6 (variable-length input, fixed-length output)
1947
+ (b'i.o6.x.xyz.toolongtofit.', False, 'x-----.xyz---.toolon.'),
1948
+ # I=2, O=6 (fixed-length input < fixed-length output)
1949
+ (b'i.i2.o6xyz', True, 'xy----.z-----.'),
1950
+ # I=6, O=3 (fixed-length input > fixed-length output)
1951
+ (b'i.o3.i6.abcdefghijklmnop', True, 'abc.ghi.mno.'),
1952
+ # I=0, then 3; O=29, then 15 (with longer output)
1953
+ (b'i.o29.a.b.cde.o15.abcdefghijabcdefghij.i3.a.b.c.d.ei00k.l.m', True,
1954
+ 'a----------------------------.' +
1955
+ 'b----------------------------.' +
1956
+ 'cde--------------------------.' +
1957
+ 'abcdefghijabcde.' +
1958
+ 'a.b------------.' +
1959
+ '.c.------------.' +
1960
+ 'd.e------------.' +
1961
+ 'k--------------.' +
1962
+ 'l--------------.' +
1963
+ 'm--------------.')
1964
+ ]
1965
+
1966
+ def test_decoder(self):
1967
+ # Try a few one-shot test cases.
1968
+ for input, eof, output in self.test_cases:
1969
+ d = StatefulIncrementalDecoder()
1970
+ self.assertEqual(d.decode(input, eof), output)
1971
+
1972
+ # Also test an unfinished decode, followed by forcing EOF.
1973
+ d = StatefulIncrementalDecoder()
1974
+ self.assertEqual(d.decode(b'oiabcd'), '')
1975
+ self.assertEqual(d.decode(b'', 1), 'abcd.')
1976
+
1977
+ class TextIOWrapperTest(unittest.TestCase):
1978
+
1979
+ def setUp(self):
1980
+ self.testdata = b"AAA\r\nBBB\rCCC\r\nDDD\nEEE\r\n"
1981
+ self.normalized = b"AAA\nBBB\nCCC\nDDD\nEEE\n".decode("ascii")
1982
+ support.unlink(support.TESTFN)
1983
+
1984
+ def tearDown(self):
1985
+ support.unlink(support.TESTFN)
1986
+
1987
+ def test_constructor(self):
1988
+ r = self.BytesIO(b"\xc3\xa9\n\n")
1989
+ b = self.BufferedReader(r, 1000)
1990
+ t = self.TextIOWrapper(b)
1991
+ t.__init__(b, encoding="latin-1", newline="\r\n")
1992
+ self.assertEqual(t.encoding, "latin-1")
1993
+ self.assertEqual(t.line_buffering, False)
1994
+ t.__init__(b, encoding="utf-8", line_buffering=True)
1995
+ self.assertEqual(t.encoding, "utf-8")
1996
+ self.assertEqual(t.line_buffering, True)
1997
+ self.assertEqual("\xe9\n", t.readline())
1998
+ self.assertRaises(TypeError, t.__init__, b, newline=42)
1999
+ self.assertRaises(ValueError, t.__init__, b, newline='xyzzy')
2000
+
2001
+ def test_non_text_encoding_codecs_are_rejected(self):
2002
+ # Ensure the constructor complains if passed a codec that isn't
2003
+ # marked as a text encoding
2004
+ # http://bugs.python.org/issue20404
2005
+ r = self.BytesIO()
2006
+ b = self.BufferedWriter(r)
2007
+ with self.assertRaisesRegex(LookupError, "is not a text encoding"):
2008
+ self.TextIOWrapper(b, encoding="hex")
2009
+
2010
+ def test_detach(self):
2011
+ r = self.BytesIO()
2012
+ b = self.BufferedWriter(r)
2013
+ t = self.TextIOWrapper(b)
2014
+ self.assertIs(t.detach(), b)
2015
+
2016
+ t = self.TextIOWrapper(b, encoding="ascii")
2017
+ t.write("howdy")
2018
+ self.assertFalse(r.getvalue())
2019
+ t.detach()
2020
+ self.assertEqual(r.getvalue(), b"howdy")
2021
+ self.assertRaises(ValueError, t.detach)
2022
+
2023
+ def test_repr(self):
2024
+ raw = self.BytesIO("hello".encode("utf-8"))
2025
+ b = self.BufferedReader(raw)
2026
+ t = self.TextIOWrapper(b, encoding="utf-8")
2027
+ modname = self.TextIOWrapper.__module__
2028
+ self.assertEqual(repr(t),
2029
+ "<%s.TextIOWrapper encoding='utf-8'>" % modname)
2030
+ raw.name = "dummy"
2031
+ self.assertEqual(repr(t),
2032
+ "<%s.TextIOWrapper name='dummy' encoding='utf-8'>" % modname)
2033
+ t.mode = "r"
2034
+ self.assertEqual(repr(t),
2035
+ "<%s.TextIOWrapper name='dummy' mode='r' encoding='utf-8'>" % modname)
2036
+ raw.name = b"dummy"
2037
+ self.assertEqual(repr(t),
2038
+ "<%s.TextIOWrapper name=b'dummy' mode='r' encoding='utf-8'>" % modname)
2039
+
2040
+ def test_line_buffering(self):
2041
+ r = self.BytesIO()
2042
+ b = self.BufferedWriter(r, 1000)
2043
+ t = self.TextIOWrapper(b, newline="\n", line_buffering=True)
2044
+ t.write("X")
2045
+ self.assertEqual(r.getvalue(), b"") # No flush happened
2046
+ t.write("Y\nZ")
2047
+ self.assertEqual(r.getvalue(), b"XY\nZ") # All got flushed
2048
+ t.write("A\rB")
2049
+ self.assertEqual(r.getvalue(), b"XY\nZA\rB")
2050
+
2051
+ def test_default_encoding(self):
2052
+ old_environ = dict(os.environ)
2053
+ try:
2054
+ # try to get a user preferred encoding different than the current
2055
+ # locale encoding to check that TextIOWrapper() uses the current
2056
+ # locale encoding and not the user preferred encoding
2057
+ for key in ('LC_ALL', 'LANG', 'LC_CTYPE'):
2058
+ if key in os.environ:
2059
+ del os.environ[key]
2060
+
2061
+ current_locale_encoding = locale.getpreferredencoding(False)
2062
+ b = self.BytesIO()
2063
+ t = self.TextIOWrapper(b)
2064
+ self.assertEqual(t.encoding, current_locale_encoding)
2065
+ finally:
2066
+ os.environ.clear()
2067
+ os.environ.update(old_environ)
2068
+
2069
+ @support.cpython_only
2070
+ def test_device_encoding(self):
2071
+ # Issue 15989
2072
+ import _testcapi
2073
+ b = self.BytesIO()
2074
+ b.fileno = lambda: _testcapi.INT_MAX + 1
2075
+ self.assertRaises(OverflowError, self.TextIOWrapper, b)
2076
+ b.fileno = lambda: _testcapi.UINT_MAX + 1
2077
+ self.assertRaises(OverflowError, self.TextIOWrapper, b)
2078
+
2079
+ def test_encoding(self):
2080
+ # Check the encoding attribute is always set, and valid
2081
+ b = self.BytesIO()
2082
+ t = self.TextIOWrapper(b, encoding="utf-8")
2083
+ self.assertEqual(t.encoding, "utf-8")
2084
+ t = self.TextIOWrapper(b)
2085
+ self.assertTrue(t.encoding is not None)
2086
+ codecs.lookup(t.encoding)
2087
+
2088
+ def test_encoding_errors_reading(self):
2089
+ # (1) default
2090
+ b = self.BytesIO(b"abc\n\xff\n")
2091
+ t = self.TextIOWrapper(b, encoding="ascii")
2092
+ self.assertRaises(UnicodeError, t.read)
2093
+ # (2) explicit strict
2094
+ b = self.BytesIO(b"abc\n\xff\n")
2095
+ t = self.TextIOWrapper(b, encoding="ascii", errors="strict")
2096
+ self.assertRaises(UnicodeError, t.read)
2097
+ # (3) ignore
2098
+ b = self.BytesIO(b"abc\n\xff\n")
2099
+ t = self.TextIOWrapper(b, encoding="ascii", errors="ignore")
2100
+ self.assertEqual(t.read(), "abc\n\n")
2101
+ # (4) replace
2102
+ b = self.BytesIO(b"abc\n\xff\n")
2103
+ t = self.TextIOWrapper(b, encoding="ascii", errors="replace")
2104
+ self.assertEqual(t.read(), "abc\n\ufffd\n")
2105
+
2106
+ def test_encoding_errors_writing(self):
2107
+ # (1) default
2108
+ b = self.BytesIO()
2109
+ t = self.TextIOWrapper(b, encoding="ascii")
2110
+ self.assertRaises(UnicodeError, t.write, "\xff")
2111
+ # (2) explicit strict
2112
+ b = self.BytesIO()
2113
+ t = self.TextIOWrapper(b, encoding="ascii", errors="strict")
2114
+ self.assertRaises(UnicodeError, t.write, "\xff")
2115
+ # (3) ignore
2116
+ b = self.BytesIO()
2117
+ t = self.TextIOWrapper(b, encoding="ascii", errors="ignore",
2118
+ newline="\n")
2119
+ t.write("abc\xffdef\n")
2120
+ t.flush()
2121
+ self.assertEqual(b.getvalue(), b"abcdef\n")
2122
+ # (4) replace
2123
+ b = self.BytesIO()
2124
+ t = self.TextIOWrapper(b, encoding="ascii", errors="replace",
2125
+ newline="\n")
2126
+ t.write("abc\xffdef\n")
2127
+ t.flush()
2128
+ self.assertEqual(b.getvalue(), b"abc?def\n")
2129
+
2130
+ def test_newlines(self):
2131
+ input_lines = [ "unix\n", "windows\r\n", "os9\r", "last\n", "nonl" ]
2132
+
2133
+ tests = [
2134
+ [ None, [ 'unix\n', 'windows\n', 'os9\n', 'last\n', 'nonl' ] ],
2135
+ [ '', input_lines ],
2136
+ [ '\n', [ "unix\n", "windows\r\n", "os9\rlast\n", "nonl" ] ],
2137
+ [ '\r\n', [ "unix\nwindows\r\n", "os9\rlast\nnonl" ] ],
2138
+ [ '\r', [ "unix\nwindows\r", "\nos9\r", "last\nnonl" ] ],
2139
+ ]
2140
+ encodings = (
2141
+ 'utf-8', 'latin-1',
2142
+ 'utf-16', 'utf-16-le', 'utf-16-be',
2143
+ 'utf-32', 'utf-32-le', 'utf-32-be',
2144
+ )
2145
+
2146
+ # Try a range of buffer sizes to test the case where \r is the last
2147
+ # character in TextIOWrapper._pending_line.
2148
+ for encoding in encodings:
2149
+ # XXX: str.encode() should return bytes
2150
+ data = bytes(''.join(input_lines).encode(encoding))
2151
+ for do_reads in (False, True):
2152
+ for bufsize in range(1, 10):
2153
+ for newline, exp_lines in tests:
2154
+ bufio = self.BufferedReader(self.BytesIO(data), bufsize)
2155
+ textio = self.TextIOWrapper(bufio, newline=newline,
2156
+ encoding=encoding)
2157
+ if do_reads:
2158
+ got_lines = []
2159
+ while True:
2160
+ c2 = textio.read(2)
2161
+ if c2 == '':
2162
+ break
2163
+ self.assertEqual(len(c2), 2)
2164
+ got_lines.append(c2 + textio.readline())
2165
+ else:
2166
+ got_lines = list(textio)
2167
+
2168
+ for got_line, exp_line in zip(got_lines, exp_lines):
2169
+ self.assertEqual(got_line, exp_line)
2170
+ self.assertEqual(len(got_lines), len(exp_lines))
2171
+
2172
+ def test_newlines_input(self):
2173
+ testdata = b"AAA\nBB\x00B\nCCC\rDDD\rEEE\r\nFFF\r\nGGG"
2174
+ normalized = testdata.replace(b"\r\n", b"\n").replace(b"\r", b"\n")
2175
+ for newline, expected in [
2176
+ (None, normalized.decode("ascii").splitlines(keepends=True)),
2177
+ ("", testdata.decode("ascii").splitlines(keepends=True)),
2178
+ ("\n", ["AAA\n", "BB\x00B\n", "CCC\rDDD\rEEE\r\n", "FFF\r\n", "GGG"]),
2179
+ ("\r\n", ["AAA\nBB\x00B\nCCC\rDDD\rEEE\r\n", "FFF\r\n", "GGG"]),
2180
+ ("\r", ["AAA\nBB\x00B\nCCC\r", "DDD\r", "EEE\r", "\nFFF\r", "\nGGG"]),
2181
+ ]:
2182
+ buf = self.BytesIO(testdata)
2183
+ txt = self.TextIOWrapper(buf, encoding="ascii", newline=newline)
2184
+ self.assertEqual(txt.readlines(), expected)
2185
+ txt.seek(0)
2186
+ self.assertEqual(txt.read(), "".join(expected))
2187
+
2188
+ def test_newlines_output(self):
2189
+ testdict = {
2190
+ "": b"AAA\nBBB\nCCC\nX\rY\r\nZ",
2191
+ "\n": b"AAA\nBBB\nCCC\nX\rY\r\nZ",
2192
+ "\r": b"AAA\rBBB\rCCC\rX\rY\r\rZ",
2193
+ "\r\n": b"AAA\r\nBBB\r\nCCC\r\nX\rY\r\r\nZ",
2194
+ }
2195
+ tests = [(None, testdict[os.linesep])] + sorted(testdict.items())
2196
+ for newline, expected in tests:
2197
+ buf = self.BytesIO()
2198
+ txt = self.TextIOWrapper(buf, encoding="ascii", newline=newline)
2199
+ txt.write("AAA\nB")
2200
+ txt.write("BB\nCCC\n")
2201
+ txt.write("X\rY\r\nZ")
2202
+ txt.flush()
2203
+ self.assertEqual(buf.closed, False)
2204
+ self.assertEqual(buf.getvalue(), expected)
2205
+
2206
+ def test_destructor(self):
2207
+ l = []
2208
+ base = self.BytesIO
2209
+ class MyBytesIO(base):
2210
+ def close(self):
2211
+ l.append(self.getvalue())
2212
+ base.close(self)
2213
+ b = MyBytesIO()
2214
+ t = self.TextIOWrapper(b, encoding="ascii")
2215
+ t.write("abc")
2216
+ del t
2217
+ support.gc_collect()
2218
+ self.assertEqual([b"abc"], l)
2219
+
2220
+ def test_override_destructor(self):
2221
+ record = []
2222
+ class MyTextIO(self.TextIOWrapper):
2223
+ def __del__(self):
2224
+ record.append(1)
2225
+ try:
2226
+ f = super().__del__
2227
+ except AttributeError:
2228
+ pass
2229
+ else:
2230
+ f()
2231
+ def close(self):
2232
+ record.append(2)
2233
+ super().close()
2234
+ def flush(self):
2235
+ record.append(3)
2236
+ super().flush()
2237
+ b = self.BytesIO()
2238
+ t = MyTextIO(b, encoding="ascii")
2239
+ del t
2240
+ support.gc_collect()
2241
+ self.assertEqual(record, [1, 2, 3])
2242
+
2243
+ def test_error_through_destructor(self):
2244
+ # Test that the exception state is not modified by a destructor,
2245
+ # even if close() fails.
2246
+ rawio = self.CloseFailureIO()
2247
+ def f():
2248
+ self.TextIOWrapper(rawio).xyzzy
2249
+ with support.captured_output("stderr") as s:
2250
+ self.assertRaises(AttributeError, f)
2251
+ s = s.getvalue().strip()
2252
+ if s:
2253
+ # The destructor *may* have printed an unraisable error, check it
2254
+ self.assertEqual(len(s.splitlines()), 1)
2255
+ self.assertTrue(s.startswith("Exception OSError: "), s)
2256
+ self.assertTrue(s.endswith(" ignored"), s)
2257
+
2258
+ # Systematic tests of the text I/O API
2259
+
2260
+ def test_basic_io(self):
2261
+ for chunksize in (1, 2, 3, 4, 5, 15, 16, 17, 31, 32, 33, 63, 64, 65):
2262
+ for enc in "ascii", "latin-1", "utf-8" :# , "utf-16-be", "utf-16-le":
2263
+ f = self.open(support.TESTFN, "w+", encoding=enc)
2264
+ f._CHUNK_SIZE = chunksize
2265
+ self.assertEqual(f.write("abc"), 3)
2266
+ f.close()
2267
+ f = self.open(support.TESTFN, "r+", encoding=enc)
2268
+ f._CHUNK_SIZE = chunksize
2269
+ self.assertEqual(f.tell(), 0)
2270
+ self.assertEqual(f.read(), "abc")
2271
+ cookie = f.tell()
2272
+ self.assertEqual(f.seek(0), 0)
2273
+ self.assertEqual(f.read(None), "abc")
2274
+ f.seek(0)
2275
+ self.assertEqual(f.read(2), "ab")
2276
+ self.assertEqual(f.read(1), "c")
2277
+ self.assertEqual(f.read(1), "")
2278
+ self.assertEqual(f.read(), "")
2279
+ self.assertEqual(f.tell(), cookie)
2280
+ self.assertEqual(f.seek(0), 0)
2281
+ self.assertEqual(f.seek(0, 2), cookie)
2282
+ self.assertEqual(f.write("def"), 3)
2283
+ self.assertEqual(f.seek(cookie), cookie)
2284
+ self.assertEqual(f.read(), "def")
2285
+ if enc.startswith("utf"):
2286
+ self.multi_line_test(f, enc)
2287
+ f.close()
2288
+
2289
+ def multi_line_test(self, f, enc):
2290
+ f.seek(0)
2291
+ f.truncate()
2292
+ sample = "s\xff\u0fff\uffff"
2293
+ wlines = []
2294
+ for size in (0, 1, 2, 3, 4, 5, 30, 31, 32, 33, 62, 63, 64, 65, 1000):
2295
+ chars = []
2296
+ for i in range(size):
2297
+ chars.append(sample[i % len(sample)])
2298
+ line = "".join(chars) + "\n"
2299
+ wlines.append((f.tell(), line))
2300
+ f.write(line)
2301
+ f.seek(0)
2302
+ rlines = []
2303
+ while True:
2304
+ pos = f.tell()
2305
+ line = f.readline()
2306
+ if not line:
2307
+ break
2308
+ rlines.append((pos, line))
2309
+ self.assertEqual(rlines, wlines)
2310
+
2311
+ def test_telling(self):
2312
+ f = self.open(support.TESTFN, "w+", encoding="utf-8")
2313
+ p0 = f.tell()
2314
+ f.write("\xff\n")
2315
+ p1 = f.tell()
2316
+ f.write("\xff\n")
2317
+ p2 = f.tell()
2318
+ f.seek(0)
2319
+ self.assertEqual(f.tell(), p0)
2320
+ self.assertEqual(f.readline(), "\xff\n")
2321
+ self.assertEqual(f.tell(), p1)
2322
+ self.assertEqual(f.readline(), "\xff\n")
2323
+ self.assertEqual(f.tell(), p2)
2324
+ f.seek(0)
2325
+ for line in f:
2326
+ self.assertEqual(line, "\xff\n")
2327
+ self.assertRaises(OSError, f.tell)
2328
+ self.assertEqual(f.tell(), p2)
2329
+ f.close()
2330
+
2331
+ def test_seeking(self):
2332
+ chunk_size = _default_chunk_size()
2333
+ prefix_size = chunk_size - 2
2334
+ u_prefix = "a" * prefix_size
2335
+ prefix = bytes(u_prefix.encode("utf-8"))
2336
+ self.assertEqual(len(u_prefix), len(prefix))
2337
+ u_suffix = "\u8888\n"
2338
+ suffix = bytes(u_suffix.encode("utf-8"))
2339
+ line = prefix + suffix
2340
+ with self.open(support.TESTFN, "wb") as f:
2341
+ f.write(line*2)
2342
+ with self.open(support.TESTFN, "r", encoding="utf-8") as f:
2343
+ s = f.read(prefix_size)
2344
+ self.assertEqual(s, str(prefix, "ascii"))
2345
+ self.assertEqual(f.tell(), prefix_size)
2346
+ self.assertEqual(f.readline(), u_suffix)
2347
+
2348
+ def test_seeking_too(self):
2349
+ # Regression test for a specific bug
2350
+ data = b'\xe0\xbf\xbf\n'
2351
+ with self.open(support.TESTFN, "wb") as f:
2352
+ f.write(data)
2353
+ with self.open(support.TESTFN, "r", encoding="utf-8") as f:
2354
+ f._CHUNK_SIZE # Just test that it exists
2355
+ f._CHUNK_SIZE = 2
2356
+ f.readline()
2357
+ f.tell()
2358
+
2359
+ def test_seek_and_tell(self):
2360
+ #Test seek/tell using the StatefulIncrementalDecoder.
2361
+ # Make test faster by doing smaller seeks
2362
+ CHUNK_SIZE = 128
2363
+
2364
+ def test_seek_and_tell_with_data(data, min_pos=0):
2365
+ """Tell/seek to various points within a data stream and ensure
2366
+ that the decoded data returned by read() is consistent."""
2367
+ f = self.open(support.TESTFN, 'wb')
2368
+ f.write(data)
2369
+ f.close()
2370
+ f = self.open(support.TESTFN, encoding='test_decoder')
2371
+ f._CHUNK_SIZE = CHUNK_SIZE
2372
+ decoded = f.read()
2373
+ f.close()
2374
+
2375
+ for i in range(min_pos, len(decoded) + 1): # seek positions
2376
+ for j in [1, 5, len(decoded) - i]: # read lengths
2377
+ f = self.open(support.TESTFN, encoding='test_decoder')
2378
+ self.assertEqual(f.read(i), decoded[:i])
2379
+ cookie = f.tell()
2380
+ self.assertEqual(f.read(j), decoded[i:i + j])
2381
+ f.seek(cookie)
2382
+ self.assertEqual(f.read(), decoded[i:])
2383
+ f.close()
2384
+
2385
+ # Enable the test decoder.
2386
+ StatefulIncrementalDecoder.codecEnabled = 1
2387
+
2388
+ # Run the tests.
2389
+ try:
2390
+ # Try each test case.
2391
+ for input, _, _ in StatefulIncrementalDecoderTest.test_cases:
2392
+ test_seek_and_tell_with_data(input)
2393
+
2394
+ # Position each test case so that it crosses a chunk boundary.
2395
+ for input, _, _ in StatefulIncrementalDecoderTest.test_cases:
2396
+ offset = CHUNK_SIZE - len(input)//2
2397
+ prefix = b'.'*offset
2398
+ # Don't bother seeking into the prefix (takes too long).
2399
+ min_pos = offset*2
2400
+ test_seek_and_tell_with_data(prefix + input, min_pos)
2401
+
2402
+ # Ensure our test decoder won't interfere with subsequent tests.
2403
+ finally:
2404
+ StatefulIncrementalDecoder.codecEnabled = 0
2405
+
2406
+ def test_encoded_writes(self):
2407
+ data = "1234567890"
2408
+ tests = ("utf-16",
2409
+ "utf-16-le",
2410
+ "utf-16-be",
2411
+ "utf-32",
2412
+ "utf-32-le",
2413
+ "utf-32-be")
2414
+ for encoding in tests:
2415
+ buf = self.BytesIO()
2416
+ f = self.TextIOWrapper(buf, encoding=encoding)
2417
+ # Check if the BOM is written only once (see issue1753).
2418
+ f.write(data)
2419
+ f.write(data)
2420
+ f.seek(0)
2421
+ self.assertEqual(f.read(), data * 2)
2422
+ f.seek(0)
2423
+ self.assertEqual(f.read(), data * 2)
2424
+ self.assertEqual(buf.getvalue(), (data * 2).encode(encoding))
2425
+
2426
+ def test_unreadable(self):
2427
+ class UnReadable(self.BytesIO):
2428
+ def readable(self):
2429
+ return False
2430
+ txt = self.TextIOWrapper(UnReadable())
2431
+ self.assertRaises(OSError, txt.read)
2432
+
2433
+ def test_read_one_by_one(self):
2434
+ txt = self.TextIOWrapper(self.BytesIO(b"AA\r\nBB"))
2435
+ reads = ""
2436
+ while True:
2437
+ c = txt.read(1)
2438
+ if not c:
2439
+ break
2440
+ reads += c
2441
+ self.assertEqual(reads, "AA\nBB")
2442
+
2443
+ def test_readlines(self):
2444
+ txt = self.TextIOWrapper(self.BytesIO(b"AA\nBB\nCC"))
2445
+ self.assertEqual(txt.readlines(), ["AA\n", "BB\n", "CC"])
2446
+ txt.seek(0)
2447
+ self.assertEqual(txt.readlines(None), ["AA\n", "BB\n", "CC"])
2448
+ txt.seek(0)
2449
+ self.assertEqual(txt.readlines(5), ["AA\n", "BB\n"])
2450
+
2451
+ # read in amounts equal to TextIOWrapper._CHUNK_SIZE which is 128.
2452
+ def test_read_by_chunk(self):
2453
+ # make sure "\r\n" straddles 128 char boundary.
2454
+ txt = self.TextIOWrapper(self.BytesIO(b"A" * 127 + b"\r\nB"))
2455
+ reads = ""
2456
+ while True:
2457
+ c = txt.read(128)
2458
+ if not c:
2459
+ break
2460
+ reads += c
2461
+ self.assertEqual(reads, "A"*127+"\nB")
2462
+
2463
+ def test_writelines(self):
2464
+ l = ['ab', 'cd', 'ef']
2465
+ buf = self.BytesIO()
2466
+ txt = self.TextIOWrapper(buf)
2467
+ txt.writelines(l)
2468
+ txt.flush()
2469
+ self.assertEqual(buf.getvalue(), b'abcdef')
2470
+
2471
+ def test_writelines_userlist(self):
2472
+ l = UserList(['ab', 'cd', 'ef'])
2473
+ buf = self.BytesIO()
2474
+ txt = self.TextIOWrapper(buf)
2475
+ txt.writelines(l)
2476
+ txt.flush()
2477
+ self.assertEqual(buf.getvalue(), b'abcdef')
2478
+
2479
+ def test_writelines_error(self):
2480
+ txt = self.TextIOWrapper(self.BytesIO())
2481
+ self.assertRaises(TypeError, txt.writelines, [1, 2, 3])
2482
+ self.assertRaises(TypeError, txt.writelines, None)
2483
+ self.assertRaises(TypeError, txt.writelines, b'abc')
2484
+
2485
+ def test_issue1395_1(self):
2486
+ txt = self.TextIOWrapper(self.BytesIO(self.testdata), encoding="ascii")
2487
+
2488
+ # read one char at a time
2489
+ reads = ""
2490
+ while True:
2491
+ c = txt.read(1)
2492
+ if not c:
2493
+ break
2494
+ reads += c
2495
+ self.assertEqual(reads, self.normalized)
2496
+
2497
+ def test_issue1395_2(self):
2498
+ txt = self.TextIOWrapper(self.BytesIO(self.testdata), encoding="ascii")
2499
+ txt._CHUNK_SIZE = 4
2500
+
2501
+ reads = ""
2502
+ while True:
2503
+ c = txt.read(4)
2504
+ if not c:
2505
+ break
2506
+ reads += c
2507
+ self.assertEqual(reads, self.normalized)
2508
+
2509
+ def test_issue1395_3(self):
2510
+ txt = self.TextIOWrapper(self.BytesIO(self.testdata), encoding="ascii")
2511
+ txt._CHUNK_SIZE = 4
2512
+
2513
+ reads = txt.read(4)
2514
+ reads += txt.read(4)
2515
+ reads += txt.readline()
2516
+ reads += txt.readline()
2517
+ reads += txt.readline()
2518
+ self.assertEqual(reads, self.normalized)
2519
+
2520
+ def test_issue1395_4(self):
2521
+ txt = self.TextIOWrapper(self.BytesIO(self.testdata), encoding="ascii")
2522
+ txt._CHUNK_SIZE = 4
2523
+
2524
+ reads = txt.read(4)
2525
+ reads += txt.read()
2526
+ self.assertEqual(reads, self.normalized)
2527
+
2528
+ def test_issue1395_5(self):
2529
+ txt = self.TextIOWrapper(self.BytesIO(self.testdata), encoding="ascii")
2530
+ txt._CHUNK_SIZE = 4
2531
+
2532
+ reads = txt.read(4)
2533
+ pos = txt.tell()
2534
+ txt.seek(0)
2535
+ txt.seek(pos)
2536
+ self.assertEqual(txt.read(4), "BBB\n")
2537
+
2538
+ def test_issue2282(self):
2539
+ buffer = self.BytesIO(self.testdata)
2540
+ txt = self.TextIOWrapper(buffer, encoding="ascii")
2541
+
2542
+ self.assertEqual(buffer.seekable(), txt.seekable())
2543
+
2544
+ def test_append_bom(self):
2545
+ # The BOM is not written again when appending to a non-empty file
2546
+ filename = support.TESTFN
2547
+ for charset in ('utf-8-sig', 'utf-16', 'utf-32'):
2548
+ with self.open(filename, 'w', encoding=charset) as f:
2549
+ f.write('aaa')
2550
+ pos = f.tell()
2551
+ with self.open(filename, 'rb') as f:
2552
+ self.assertEqual(f.read(), 'aaa'.encode(charset))
2553
+
2554
+ with self.open(filename, 'a', encoding=charset) as f:
2555
+ f.write('xxx')
2556
+ with self.open(filename, 'rb') as f:
2557
+ self.assertEqual(f.read(), 'aaaxxx'.encode(charset))
2558
+
2559
+ def test_seek_bom(self):
2560
+ # Same test, but when seeking manually
2561
+ filename = support.TESTFN
2562
+ for charset in ('utf-8-sig', 'utf-16', 'utf-32'):
2563
+ with self.open(filename, 'w', encoding=charset) as f:
2564
+ f.write('aaa')
2565
+ pos = f.tell()
2566
+ with self.open(filename, 'r+', encoding=charset) as f:
2567
+ f.seek(pos)
2568
+ f.write('zzz')
2569
+ f.seek(0)
2570
+ f.write('bbb')
2571
+ with self.open(filename, 'rb') as f:
2572
+ self.assertEqual(f.read(), 'bbbzzz'.encode(charset))
2573
+
2574
+ def test_errors_property(self):
2575
+ with self.open(support.TESTFN, "w") as f:
2576
+ self.assertEqual(f.errors, "strict")
2577
+ with self.open(support.TESTFN, "w", errors="replace") as f:
2578
+ self.assertEqual(f.errors, "replace")
2579
+
2580
+ @support.no_tracing
2581
+ @unittest.skipUnless(threading, 'Threading required for this test.')
2582
+ def test_threads_write(self):
2583
+ # Issue6750: concurrent writes could duplicate data
2584
+ event = threading.Event()
2585
+ with self.open(support.TESTFN, "w", buffering=1) as f:
2586
+ def run(n):
2587
+ text = "Thread%03d\n" % n
2588
+ event.wait()
2589
+ f.write(text)
2590
+ threads = [threading.Thread(target=lambda n=x: run(n))
2591
+ for x in range(20)]
2592
+ for t in threads:
2593
+ t.start()
2594
+ time.sleep(0.02)
2595
+ event.set()
2596
+ for t in threads:
2597
+ t.join()
2598
+ with self.open(support.TESTFN) as f:
2599
+ content = f.read()
2600
+ for n in range(20):
2601
+ self.assertEqual(content.count("Thread%03d\n" % n), 1)
2602
+
2603
+ def test_flush_error_on_close(self):
2604
+ txt = self.TextIOWrapper(self.BytesIO(self.testdata), encoding="ascii")
2605
+ def bad_flush():
2606
+ raise OSError()
2607
+ txt.flush = bad_flush
2608
+ self.assertRaises(OSError, txt.close) # exception not swallowed
2609
+ self.assertTrue(txt.closed)
2610
+
2611
+ def test_close_error_on_close(self):
2612
+ buffer = self.BytesIO(self.testdata)
2613
+ def bad_flush():
2614
+ raise OSError('flush')
2615
+ def bad_close():
2616
+ raise OSError('close')
2617
+ buffer.close = bad_close
2618
+ txt = self.TextIOWrapper(buffer, encoding="ascii")
2619
+ txt.flush = bad_flush
2620
+ with self.assertRaises(OSError) as err: # exception not swallowed
2621
+ txt.close()
2622
+ self.assertEqual(err.exception.args, ('close',))
2623
+ self.assertIsInstance(err.exception.__context__, OSError)
2624
+ self.assertEqual(err.exception.__context__.args, ('flush',))
2625
+ self.assertFalse(txt.closed)
2626
+
2627
+ def test_nonnormalized_close_error_on_close(self):
2628
+ # Issue #21677
2629
+ buffer = self.BytesIO(self.testdata)
2630
+ def bad_flush():
2631
+ raise non_existing_flush
2632
+ def bad_close():
2633
+ raise non_existing_close
2634
+ buffer.close = bad_close
2635
+ txt = self.TextIOWrapper(buffer, encoding="ascii")
2636
+ txt.flush = bad_flush
2637
+ with self.assertRaises(NameError) as err: # exception not swallowed
2638
+ txt.close()
2639
+ self.assertIn('non_existing_close', str(err.exception))
2640
+ self.assertIsInstance(err.exception.__context__, NameError)
2641
+ self.assertIn('non_existing_flush', str(err.exception.__context__))
2642
+ self.assertFalse(txt.closed)
2643
+
2644
+ def test_multi_close(self):
2645
+ txt = self.TextIOWrapper(self.BytesIO(self.testdata), encoding="ascii")
2646
+ txt.close()
2647
+ txt.close()
2648
+ txt.close()
2649
+ self.assertRaises(ValueError, txt.flush)
2650
+
2651
+ def test_unseekable(self):
2652
+ txt = self.TextIOWrapper(self.MockUnseekableIO(self.testdata))
2653
+ self.assertRaises(self.UnsupportedOperation, txt.tell)
2654
+ self.assertRaises(self.UnsupportedOperation, txt.seek, 0)
2655
+
2656
+ def test_readonly_attributes(self):
2657
+ txt = self.TextIOWrapper(self.BytesIO(self.testdata), encoding="ascii")
2658
+ buf = self.BytesIO(self.testdata)
2659
+ with self.assertRaises(AttributeError):
2660
+ txt.buffer = buf
2661
+
2662
+ def test_rawio(self):
2663
+ # Issue #12591: TextIOWrapper must work with raw I/O objects, so
2664
+ # that subprocess.Popen() can have the required unbuffered
2665
+ # semantics with universal_newlines=True.
2666
+ raw = self.MockRawIO([b'abc', b'def', b'ghi\njkl\nopq\n'])
2667
+ txt = self.TextIOWrapper(raw, encoding='ascii', newline='\n')
2668
+ # Reads
2669
+ self.assertEqual(txt.read(4), 'abcd')
2670
+ self.assertEqual(txt.readline(), 'efghi\n')
2671
+ self.assertEqual(list(txt), ['jkl\n', 'opq\n'])
2672
+
2673
+ def test_rawio_write_through(self):
2674
+ # Issue #12591: with write_through=True, writes don't need a flush
2675
+ raw = self.MockRawIO([b'abc', b'def', b'ghi\njkl\nopq\n'])
2676
+ txt = self.TextIOWrapper(raw, encoding='ascii', newline='\n',
2677
+ write_through=True)
2678
+ txt.write('1')
2679
+ txt.write('23\n4')
2680
+ txt.write('5')
2681
+ self.assertEqual(b''.join(raw._write_stack), b'123\n45')
2682
+
2683
+ def test_bufio_write_through(self):
2684
+ # Issue #21396: write_through=True doesn't force a flush()
2685
+ # on the underlying binary buffered object.
2686
+ flush_called, write_called = [], []
2687
+ class BufferedWriter(self.BufferedWriter):
2688
+ def flush(self, *args, **kwargs):
2689
+ flush_called.append(True)
2690
+ return super().flush(*args, **kwargs)
2691
+ def write(self, *args, **kwargs):
2692
+ write_called.append(True)
2693
+ return super().write(*args, **kwargs)
2694
+
2695
+ rawio = self.BytesIO()
2696
+ data = b"a"
2697
+ bufio = BufferedWriter(rawio, len(data)*2)
2698
+ textio = self.TextIOWrapper(bufio, encoding='ascii',
2699
+ write_through=True)
2700
+ # write to the buffered io but don't overflow the buffer
2701
+ text = data.decode('ascii')
2702
+ textio.write(text)
2703
+
2704
+ # buffer.flush is not called with write_through=True
2705
+ self.assertFalse(flush_called)
2706
+ # buffer.write *is* called with write_through=True
2707
+ self.assertTrue(write_called)
2708
+ self.assertEqual(rawio.getvalue(), b"") # no flush
2709
+
2710
+ write_called = [] # reset
2711
+ textio.write(text * 10) # total content is larger than bufio buffer
2712
+ self.assertTrue(write_called)
2713
+ self.assertEqual(rawio.getvalue(), data * 11) # all flushed
2714
+
2715
+ def test_read_nonbytes(self):
2716
+ # Issue #17106
2717
+ # Crash when underlying read() returns non-bytes
2718
+ t = self.TextIOWrapper(self.StringIO('a'))
2719
+ self.assertRaises(TypeError, t.read, 1)
2720
+ t = self.TextIOWrapper(self.StringIO('a'))
2721
+ self.assertRaises(TypeError, t.readline)
2722
+ t = self.TextIOWrapper(self.StringIO('a'))
2723
+ self.assertRaises(TypeError, t.read)
2724
+
2725
+ def test_illegal_decoder(self):
2726
+ # Issue #17106
2727
+ # Bypass the early encoding check added in issue 20404
2728
+ def _make_illegal_wrapper():
2729
+ quopri = codecs.lookup("quopri")
2730
+ quopri._is_text_encoding = True
2731
+ try:
2732
+ t = self.TextIOWrapper(self.BytesIO(b'aaaaaa'),
2733
+ newline='\n', encoding="quopri")
2734
+ finally:
2735
+ quopri._is_text_encoding = False
2736
+ return t
2737
+ # Crash when decoder returns non-string
2738
+ t = _make_illegal_wrapper()
2739
+ self.assertRaises(TypeError, t.read, 1)
2740
+ t = _make_illegal_wrapper()
2741
+ self.assertRaises(TypeError, t.readline)
2742
+ t = _make_illegal_wrapper()
2743
+ self.assertRaises(TypeError, t.read)
2744
+
2745
+ def _check_create_at_shutdown(self, **kwargs):
2746
+ # Issue #20037: creating a TextIOWrapper at shutdown
2747
+ # shouldn't crash the interpreter.
2748
+ iomod = self.io.__name__
2749
+ code = """if 1:
2750
+ import codecs
2751
+ import {iomod} as io
2752
+
2753
+ # Avoid looking up codecs at shutdown
2754
+ codecs.lookup('utf-8')
2755
+
2756
+ class C:
2757
+ def __init__(self):
2758
+ self.buf = io.BytesIO()
2759
+ def __del__(self):
2760
+ io.TextIOWrapper(self.buf, **{kwargs})
2761
+ print("ok")
2762
+ c = C()
2763
+ """.format(iomod=iomod, kwargs=kwargs)
2764
+ return assert_python_ok("-c", code)
2765
+
2766
+ def test_create_at_shutdown_without_encoding(self):
2767
+ rc, out, err = self._check_create_at_shutdown()
2768
+ if err:
2769
+ # Can error out with a RuntimeError if the module state
2770
+ # isn't found.
2771
+ self.assertIn(self.shutdown_error, err.decode())
2772
+ else:
2773
+ self.assertEqual("ok", out.decode().strip())
2774
+
2775
+ def test_create_at_shutdown_with_encoding(self):
2776
+ rc, out, err = self._check_create_at_shutdown(encoding='utf-8',
2777
+ errors='strict')
2778
+ self.assertFalse(err)
2779
+ self.assertEqual("ok", out.decode().strip())
2780
+
2781
+
2782
+ class CTextIOWrapperTest(TextIOWrapperTest):
2783
+ io = io
2784
+ shutdown_error = "RuntimeError: could not find io module state"
2785
+
2786
+ def test_initialization(self):
2787
+ r = self.BytesIO(b"\xc3\xa9\n\n")
2788
+ b = self.BufferedReader(r, 1000)
2789
+ t = self.TextIOWrapper(b)
2790
+ self.assertRaises(TypeError, t.__init__, b, newline=42)
2791
+ self.assertRaises(ValueError, t.read)
2792
+ self.assertRaises(ValueError, t.__init__, b, newline='xyzzy')
2793
+ self.assertRaises(ValueError, t.read)
2794
+
2795
+ def test_garbage_collection(self):
2796
+ # C TextIOWrapper objects are collected, and collecting them flushes
2797
+ # all data to disk.
2798
+ # The Python version has __del__, so it ends in gc.garbage instead.
2799
+ with support.check_warnings(('', ResourceWarning)):
2800
+ rawio = io.FileIO(support.TESTFN, "wb")
2801
+ b = self.BufferedWriter(rawio)
2802
+ t = self.TextIOWrapper(b, encoding="ascii")
2803
+ t.write("456def")
2804
+ t.x = t
2805
+ wr = weakref.ref(t)
2806
+ del t
2807
+ support.gc_collect()
2808
+ self.assertTrue(wr() is None, wr)
2809
+ with self.open(support.TESTFN, "rb") as f:
2810
+ self.assertEqual(f.read(), b"456def")
2811
+
2812
+ def test_rwpair_cleared_before_textio(self):
2813
+ # Issue 13070: TextIOWrapper's finalization would crash when called
2814
+ # after the reference to the underlying BufferedRWPair's writer got
2815
+ # cleared by the GC.
2816
+ for i in range(1000):
2817
+ b1 = self.BufferedRWPair(self.MockRawIO(), self.MockRawIO())
2818
+ t1 = self.TextIOWrapper(b1, encoding="ascii")
2819
+ b2 = self.BufferedRWPair(self.MockRawIO(), self.MockRawIO())
2820
+ t2 = self.TextIOWrapper(b2, encoding="ascii")
2821
+ # circular references
2822
+ t1.buddy = t2
2823
+ t2.buddy = t1
2824
+ support.gc_collect()
2825
+
2826
+
2827
+ class PyTextIOWrapperTest(TextIOWrapperTest):
2828
+ io = pyio
2829
+ #shutdown_error = "LookupError: unknown encoding: ascii"
2830
+ shutdown_error = "TypeError: 'NoneType' object is not iterable"
2831
+
2832
+
2833
+ class IncrementalNewlineDecoderTest(unittest.TestCase):
2834
+
2835
+ def check_newline_decoding_utf8(self, decoder):
2836
+ # UTF-8 specific tests for a newline decoder
2837
+ def _check_decode(b, s, **kwargs):
2838
+ # We exercise getstate() / setstate() as well as decode()
2839
+ state = decoder.getstate()
2840
+ self.assertEqual(decoder.decode(b, **kwargs), s)
2841
+ decoder.setstate(state)
2842
+ self.assertEqual(decoder.decode(b, **kwargs), s)
2843
+
2844
+ _check_decode(b'\xe8\xa2\x88', "\u8888")
2845
+
2846
+ _check_decode(b'\xe8', "")
2847
+ _check_decode(b'\xa2', "")
2848
+ _check_decode(b'\x88', "\u8888")
2849
+
2850
+ _check_decode(b'\xe8', "")
2851
+ _check_decode(b'\xa2', "")
2852
+ _check_decode(b'\x88', "\u8888")
2853
+
2854
+ _check_decode(b'\xe8', "")
2855
+ self.assertRaises(UnicodeDecodeError, decoder.decode, b'', final=True)
2856
+
2857
+ decoder.reset()
2858
+ _check_decode(b'\n', "\n")
2859
+ _check_decode(b'\r', "")
2860
+ _check_decode(b'', "\n", final=True)
2861
+ _check_decode(b'\r', "\n", final=True)
2862
+
2863
+ _check_decode(b'\r', "")
2864
+ _check_decode(b'a', "\na")
2865
+
2866
+ _check_decode(b'\r\r\n', "\n\n")
2867
+ _check_decode(b'\r', "")
2868
+ _check_decode(b'\r', "\n")
2869
+ _check_decode(b'\na', "\na")
2870
+
2871
+ _check_decode(b'\xe8\xa2\x88\r\n', "\u8888\n")
2872
+ _check_decode(b'\xe8\xa2\x88', "\u8888")
2873
+ _check_decode(b'\n', "\n")
2874
+ _check_decode(b'\xe8\xa2\x88\r', "\u8888")
2875
+ _check_decode(b'\n', "\n")
2876
+
2877
+ def check_newline_decoding(self, decoder, encoding):
2878
+ result = []
2879
+ if encoding is not None:
2880
+ encoder = codecs.getincrementalencoder(encoding)()
2881
+ def _decode_bytewise(s):
2882
+ # Decode one byte at a time
2883
+ for b in encoder.encode(s):
2884
+ result.append(decoder.decode(bytes([b])))
2885
+ else:
2886
+ encoder = None
2887
+ def _decode_bytewise(s):
2888
+ # Decode one char at a time
2889
+ for c in s:
2890
+ result.append(decoder.decode(c))
2891
+ self.assertEqual(decoder.newlines, None)
2892
+ _decode_bytewise("abc\n\r")
2893
+ self.assertEqual(decoder.newlines, '\n')
2894
+ _decode_bytewise("\nabc")
2895
+ self.assertEqual(decoder.newlines, ('\n', '\r\n'))
2896
+ _decode_bytewise("abc\r")
2897
+ self.assertEqual(decoder.newlines, ('\n', '\r\n'))
2898
+ _decode_bytewise("abc")
2899
+ self.assertEqual(decoder.newlines, ('\r', '\n', '\r\n'))
2900
+ _decode_bytewise("abc\r")
2901
+ self.assertEqual("".join(result), "abc\n\nabcabc\nabcabc")
2902
+ decoder.reset()
2903
+ input = "abc"
2904
+ if encoder is not None:
2905
+ encoder.reset()
2906
+ input = encoder.encode(input)
2907
+ self.assertEqual(decoder.decode(input), "abc")
2908
+ self.assertEqual(decoder.newlines, None)
2909
+
2910
+ def test_newline_decoder(self):
2911
+ encodings = (
2912
+ # None meaning the IncrementalNewlineDecoder takes unicode input
2913
+ # rather than bytes input
2914
+ None, 'utf-8', 'latin-1',
2915
+ 'utf-16', 'utf-16-le', 'utf-16-be',
2916
+ 'utf-32', 'utf-32-le', 'utf-32-be',
2917
+ )
2918
+ for enc in encodings:
2919
+ decoder = enc and codecs.getincrementaldecoder(enc)()
2920
+ decoder = self.IncrementalNewlineDecoder(decoder, translate=True)
2921
+ self.check_newline_decoding(decoder, enc)
2922
+ decoder = codecs.getincrementaldecoder("utf-8")()
2923
+ decoder = self.IncrementalNewlineDecoder(decoder, translate=True)
2924
+ self.check_newline_decoding_utf8(decoder)
2925
+
2926
+ def test_newline_bytes(self):
2927
+ # Issue 5433: Excessive optimization in IncrementalNewlineDecoder
2928
+ def _check(dec):
2929
+ self.assertEqual(dec.newlines, None)
2930
+ self.assertEqual(dec.decode("\u0D00"), "\u0D00")
2931
+ self.assertEqual(dec.newlines, None)
2932
+ self.assertEqual(dec.decode("\u0A00"), "\u0A00")
2933
+ self.assertEqual(dec.newlines, None)
2934
+ dec = self.IncrementalNewlineDecoder(None, translate=False)
2935
+ _check(dec)
2936
+ dec = self.IncrementalNewlineDecoder(None, translate=True)
2937
+ _check(dec)
2938
+
2939
+ class CIncrementalNewlineDecoderTest(IncrementalNewlineDecoderTest):
2940
+ pass
2941
+
2942
+ class PyIncrementalNewlineDecoderTest(IncrementalNewlineDecoderTest):
2943
+ pass
2944
+
2945
+
2946
+ # XXX Tests for open()
2947
+
2948
+ class MiscIOTest(unittest.TestCase):
2949
+
2950
+ def tearDown(self):
2951
+ support.unlink(support.TESTFN)
2952
+
2953
+ def test___all__(self):
2954
+ for name in self.io.__all__:
2955
+ obj = getattr(self.io, name, None)
2956
+ self.assertTrue(obj is not None, name)
2957
+ if name == "open":
2958
+ continue
2959
+ elif "error" in name.lower() or name == "UnsupportedOperation":
2960
+ self.assertTrue(issubclass(obj, Exception), name)
2961
+ elif not name.startswith("SEEK_"):
2962
+ self.assertTrue(issubclass(obj, self.IOBase))
2963
+
2964
+ def test_attributes(self):
2965
+ f = self.open(support.TESTFN, "wb", buffering=0)
2966
+ self.assertEqual(f.mode, "wb")
2967
+ f.close()
2968
+
2969
+ with support.check_warnings(('', DeprecationWarning)):
2970
+ f = self.open(support.TESTFN, "U")
2971
+ self.assertEqual(f.name, support.TESTFN)
2972
+ self.assertEqual(f.buffer.name, support.TESTFN)
2973
+ self.assertEqual(f.buffer.raw.name, support.TESTFN)
2974
+ self.assertEqual(f.mode, "U")
2975
+ self.assertEqual(f.buffer.mode, "rb")
2976
+ self.assertEqual(f.buffer.raw.mode, "rb")
2977
+ f.close()
2978
+
2979
+ f = self.open(support.TESTFN, "w+")
2980
+ self.assertEqual(f.mode, "w+")
2981
+ self.assertEqual(f.buffer.mode, "rb+") # Does it really matter?
2982
+ self.assertEqual(f.buffer.raw.mode, "rb+")
2983
+
2984
+ g = self.open(f.fileno(), "wb", closefd=False)
2985
+ self.assertEqual(g.mode, "wb")
2986
+ self.assertEqual(g.raw.mode, "wb")
2987
+ self.assertEqual(g.name, f.fileno())
2988
+ self.assertEqual(g.raw.name, f.fileno())
2989
+ f.close()
2990
+ g.close()
2991
+
2992
+ def test_io_after_close(self):
2993
+ for kwargs in [
2994
+ {"mode": "w"},
2995
+ {"mode": "wb"},
2996
+ {"mode": "w", "buffering": 1},
2997
+ {"mode": "w", "buffering": 2},
2998
+ {"mode": "wb", "buffering": 0},
2999
+ {"mode": "r"},
3000
+ {"mode": "rb"},
3001
+ {"mode": "r", "buffering": 1},
3002
+ {"mode": "r", "buffering": 2},
3003
+ {"mode": "rb", "buffering": 0},
3004
+ {"mode": "w+"},
3005
+ {"mode": "w+b"},
3006
+ {"mode": "w+", "buffering": 1},
3007
+ {"mode": "w+", "buffering": 2},
3008
+ {"mode": "w+b", "buffering": 0},
3009
+ ]:
3010
+ f = self.open(support.TESTFN, **kwargs)
3011
+ f.close()
3012
+ self.assertRaises(ValueError, f.flush)
3013
+ self.assertRaises(ValueError, f.fileno)
3014
+ self.assertRaises(ValueError, f.isatty)
3015
+ self.assertRaises(ValueError, f.__iter__)
3016
+ if hasattr(f, "peek"):
3017
+ self.assertRaises(ValueError, f.peek, 1)
3018
+ self.assertRaises(ValueError, f.read)
3019
+ if hasattr(f, "read1"):
3020
+ self.assertRaises(ValueError, f.read1, 1024)
3021
+ if hasattr(f, "readall"):
3022
+ self.assertRaises(ValueError, f.readall)
3023
+ if hasattr(f, "readinto"):
3024
+ self.assertRaises(ValueError, f.readinto, bytearray(1024))
3025
+ self.assertRaises(ValueError, f.readline)
3026
+ self.assertRaises(ValueError, f.readlines)
3027
+ self.assertRaises(ValueError, f.seek, 0)
3028
+ self.assertRaises(ValueError, f.tell)
3029
+ self.assertRaises(ValueError, f.truncate)
3030
+ self.assertRaises(ValueError, f.write,
3031
+ b"" if "b" in kwargs['mode'] else "")
3032
+ self.assertRaises(ValueError, f.writelines, [])
3033
+ self.assertRaises(ValueError, next, f)
3034
+
3035
+ def test_blockingioerror(self):
3036
+ # Various BlockingIOError issues
3037
+ class C(str):
3038
+ pass
3039
+ c = C("")
3040
+ b = self.BlockingIOError(1, c)
3041
+ c.b = b
3042
+ b.c = c
3043
+ wr = weakref.ref(c)
3044
+ del c, b
3045
+ support.gc_collect()
3046
+ self.assertTrue(wr() is None, wr)
3047
+
3048
+ def test_abcs(self):
3049
+ # Test the visible base classes are ABCs.
3050
+ self.assertIsInstance(self.IOBase, abc.ABCMeta)
3051
+ self.assertIsInstance(self.RawIOBase, abc.ABCMeta)
3052
+ self.assertIsInstance(self.BufferedIOBase, abc.ABCMeta)
3053
+ self.assertIsInstance(self.TextIOBase, abc.ABCMeta)
3054
+
3055
+ def _check_abc_inheritance(self, abcmodule):
3056
+ with self.open(support.TESTFN, "wb", buffering=0) as f:
3057
+ self.assertIsInstance(f, abcmodule.IOBase)
3058
+ self.assertIsInstance(f, abcmodule.RawIOBase)
3059
+ self.assertNotIsInstance(f, abcmodule.BufferedIOBase)
3060
+ self.assertNotIsInstance(f, abcmodule.TextIOBase)
3061
+ with self.open(support.TESTFN, "wb") as f:
3062
+ self.assertIsInstance(f, abcmodule.IOBase)
3063
+ self.assertNotIsInstance(f, abcmodule.RawIOBase)
3064
+ self.assertIsInstance(f, abcmodule.BufferedIOBase)
3065
+ self.assertNotIsInstance(f, abcmodule.TextIOBase)
3066
+ with self.open(support.TESTFN, "w") as f:
3067
+ self.assertIsInstance(f, abcmodule.IOBase)
3068
+ self.assertNotIsInstance(f, abcmodule.RawIOBase)
3069
+ self.assertNotIsInstance(f, abcmodule.BufferedIOBase)
3070
+ self.assertIsInstance(f, abcmodule.TextIOBase)
3071
+
3072
+ def test_abc_inheritance(self):
3073
+ # Test implementations inherit from their respective ABCs
3074
+ self._check_abc_inheritance(self)
3075
+
3076
+ def test_abc_inheritance_official(self):
3077
+ # Test implementations inherit from the official ABCs of the
3078
+ # baseline "io" module.
3079
+ self._check_abc_inheritance(io)
3080
+
3081
+ def _check_warn_on_dealloc(self, *args, **kwargs):
3082
+ f = open(*args, **kwargs)
3083
+ r = repr(f)
3084
+ with self.assertWarns(ResourceWarning) as cm:
3085
+ f = None
3086
+ support.gc_collect()
3087
+ self.assertIn(r, str(cm.warning.args[0]))
3088
+
3089
+ def test_warn_on_dealloc(self):
3090
+ self._check_warn_on_dealloc(support.TESTFN, "wb", buffering=0)
3091
+ self._check_warn_on_dealloc(support.TESTFN, "wb")
3092
+ self._check_warn_on_dealloc(support.TESTFN, "w")
3093
+
3094
+ def _check_warn_on_dealloc_fd(self, *args, **kwargs):
3095
+ fds = []
3096
+ def cleanup_fds():
3097
+ for fd in fds:
3098
+ try:
3099
+ os.close(fd)
3100
+ except OSError as e:
3101
+ if e.errno != errno.EBADF:
3102
+ raise
3103
+ self.addCleanup(cleanup_fds)
3104
+ r, w = os.pipe()
3105
+ fds += r, w
3106
+ self._check_warn_on_dealloc(r, *args, **kwargs)
3107
+ # When using closefd=False, there's no warning
3108
+ r, w = os.pipe()
3109
+ fds += r, w
3110
+ with warnings.catch_warnings(record=True) as recorded:
3111
+ open(r, *args, closefd=False, **kwargs)
3112
+ support.gc_collect()
3113
+ self.assertEqual(recorded, [])
3114
+
3115
+ def test_warn_on_dealloc_fd(self):
3116
+ self._check_warn_on_dealloc_fd("rb", buffering=0)
3117
+ self._check_warn_on_dealloc_fd("rb")
3118
+ self._check_warn_on_dealloc_fd("r")
3119
+
3120
+
3121
+ def test_pickling(self):
3122
+ # Pickling file objects is forbidden
3123
+ for kwargs in [
3124
+ {"mode": "w"},
3125
+ {"mode": "wb"},
3126
+ {"mode": "wb", "buffering": 0},
3127
+ {"mode": "r"},
3128
+ {"mode": "rb"},
3129
+ {"mode": "rb", "buffering": 0},
3130
+ {"mode": "w+"},
3131
+ {"mode": "w+b"},
3132
+ {"mode": "w+b", "buffering": 0},
3133
+ ]:
3134
+ for protocol in range(pickle.HIGHEST_PROTOCOL + 1):
3135
+ with self.open(support.TESTFN, **kwargs) as f:
3136
+ self.assertRaises(TypeError, pickle.dumps, f, protocol)
3137
+
3138
+ @unittest.skipUnless(fcntl, 'fcntl required for this test')
3139
+ def test_nonblock_pipe_write_bigbuf(self):
3140
+ self._test_nonblock_pipe_write(16*1024)
3141
+
3142
+ @unittest.skipUnless(fcntl, 'fcntl required for this test')
3143
+ def test_nonblock_pipe_write_smallbuf(self):
3144
+ self._test_nonblock_pipe_write(1024)
3145
+
3146
+ def _set_non_blocking(self, fd):
3147
+ flags = fcntl.fcntl(fd, fcntl.F_GETFL)
3148
+ self.assertNotEqual(flags, -1)
3149
+ res = fcntl.fcntl(fd, fcntl.F_SETFL, flags | os.O_NONBLOCK)
3150
+ self.assertEqual(res, 0)
3151
+
3152
+ def _test_nonblock_pipe_write(self, bufsize):
3153
+ sent = []
3154
+ received = []
3155
+ r, w = os.pipe()
3156
+ self._set_non_blocking(r)
3157
+ self._set_non_blocking(w)
3158
+
3159
+ # To exercise all code paths in the C implementation we need
3160
+ # to play with buffer sizes. For instance, if we choose a
3161
+ # buffer size less than or equal to _PIPE_BUF (4096 on Linux)
3162
+ # then we will never get a partial write of the buffer.
3163
+ rf = self.open(r, mode='rb', closefd=True, buffering=bufsize)
3164
+ wf = self.open(w, mode='wb', closefd=True, buffering=bufsize)
3165
+
3166
+ with rf, wf:
3167
+ for N in 9999, 73, 7574:
3168
+ try:
3169
+ i = 0
3170
+ while True:
3171
+ msg = bytes([i % 26 + 97]) * N
3172
+ sent.append(msg)
3173
+ wf.write(msg)
3174
+ i += 1
3175
+
3176
+ except self.BlockingIOError as e:
3177
+ self.assertEqual(e.args[0], errno.EAGAIN)
3178
+ self.assertEqual(e.args[2], e.characters_written)
3179
+ sent[-1] = sent[-1][:e.characters_written]
3180
+ received.append(rf.read())
3181
+ msg = b'BLOCKED'
3182
+ wf.write(msg)
3183
+ sent.append(msg)
3184
+
3185
+ while True:
3186
+ try:
3187
+ wf.flush()
3188
+ break
3189
+ except self.BlockingIOError as e:
3190
+ self.assertEqual(e.args[0], errno.EAGAIN)
3191
+ self.assertEqual(e.args[2], e.characters_written)
3192
+ self.assertEqual(e.characters_written, 0)
3193
+ received.append(rf.read())
3194
+
3195
+ received += iter(rf.read, None)
3196
+
3197
+ sent, received = b''.join(sent), b''.join(received)
3198
+ self.assertTrue(sent == received)
3199
+ self.assertTrue(wf.closed)
3200
+ self.assertTrue(rf.closed)
3201
+
3202
+ def test_create_fail(self):
3203
+ # 'x' mode fails if file is existing
3204
+ with self.open(support.TESTFN, 'w'):
3205
+ pass
3206
+ self.assertRaises(FileExistsError, self.open, support.TESTFN, 'x')
3207
+
3208
+ def test_create_writes(self):
3209
+ # 'x' mode opens for writing
3210
+ with self.open(support.TESTFN, 'xb') as f:
3211
+ f.write(b"spam")
3212
+ with self.open(support.TESTFN, 'rb') as f:
3213
+ self.assertEqual(b"spam", f.read())
3214
+
3215
+ def test_open_allargs(self):
3216
+ # there used to be a buffer overflow in the parser for rawmode
3217
+ self.assertRaises(ValueError, self.open, support.TESTFN, 'rwax+')
3218
+
3219
+
3220
+ class CMiscIOTest(MiscIOTest):
3221
+ io = io
3222
+
3223
+ def test_readinto_buffer_overflow(self):
3224
+ # Issue #18025
3225
+ class BadReader(self.io.BufferedIOBase):
3226
+ def read(self, n=-1):
3227
+ return b'x' * 10**6
3228
+ bufio = BadReader()
3229
+ b = bytearray(2)
3230
+ self.assertRaises(ValueError, bufio.readinto, b)
3231
+
3232
+ class PyMiscIOTest(MiscIOTest):
3233
+ io = pyio
3234
+
3235
+
3236
+ @unittest.skipIf(os.name == 'nt', 'POSIX signals required for this test.')
3237
+ class SignalsTest(unittest.TestCase):
3238
+
3239
+ def setUp(self):
3240
+ self.oldalrm = signal.signal(signal.SIGALRM, self.alarm_interrupt)
3241
+
3242
+ def tearDown(self):
3243
+ signal.signal(signal.SIGALRM, self.oldalrm)
3244
+
3245
+ def alarm_interrupt(self, sig, frame):
3246
+ 1/0
3247
+
3248
+ @unittest.skipUnless(threading, 'Threading required for this test.')
3249
+ def check_interrupted_write(self, item, bytes, **fdopen_kwargs):
3250
+ """Check that a partial write, when it gets interrupted, properly
3251
+ invokes the signal handler, and bubbles up the exception raised
3252
+ in the latter."""
3253
+ read_results = []
3254
+ def _read():
3255
+ if hasattr(signal, 'pthread_sigmask'):
3256
+ signal.pthread_sigmask(signal.SIG_BLOCK, [signal.SIGALRM])
3257
+ s = os.read(r, 1)
3258
+ read_results.append(s)
3259
+ t = threading.Thread(target=_read)
3260
+ t.daemon = True
3261
+ r, w = os.pipe()
3262
+ fdopen_kwargs["closefd"] = False
3263
+ try:
3264
+ wio = self.io.open(w, **fdopen_kwargs)
3265
+ t.start()
3266
+ # Fill the pipe enough that the write will be blocking.
3267
+ # It will be interrupted by the timer armed above. Since the
3268
+ # other thread has read one byte, the low-level write will
3269
+ # return with a successful (partial) result rather than an EINTR.
3270
+ # The buffered IO layer must check for pending signal
3271
+ # handlers, which in this case will invoke alarm_interrupt().
3272
+ signal.alarm(1)
3273
+ try:
3274
+ self.assertRaises(ZeroDivisionError,
3275
+ wio.write, item * (support.PIPE_MAX_SIZE // len(item) + 1))
3276
+ finally:
3277
+ signal.alarm(0)
3278
+ t.join()
3279
+ # We got one byte, get another one and check that it isn't a
3280
+ # repeat of the first one.
3281
+ read_results.append(os.read(r, 1))
3282
+ self.assertEqual(read_results, [bytes[0:1], bytes[1:2]])
3283
+ finally:
3284
+ os.close(w)
3285
+ os.close(r)
3286
+ # This is deliberate. If we didn't close the file descriptor
3287
+ # before closing wio, wio would try to flush its internal
3288
+ # buffer, and block again.
3289
+ try:
3290
+ wio.close()
3291
+ except OSError as e:
3292
+ if e.errno != errno.EBADF:
3293
+ raise
3294
+
3295
+ def test_interrupted_write_unbuffered(self):
3296
+ self.check_interrupted_write(b"xy", b"xy", mode="wb", buffering=0)
3297
+
3298
+ def test_interrupted_write_buffered(self):
3299
+ self.check_interrupted_write(b"xy", b"xy", mode="wb")
3300
+
3301
+ # Issue #22331: The test hangs on FreeBSD 7.2
3302
+ @support.requires_freebsd_version(8)
3303
+ def test_interrupted_write_text(self):
3304
+ self.check_interrupted_write("xy", b"xy", mode="w", encoding="ascii")
3305
+
3306
+ @support.no_tracing
3307
+ def check_reentrant_write(self, data, **fdopen_kwargs):
3308
+ def on_alarm(*args):
3309
+ # Will be called reentrantly from the same thread
3310
+ wio.write(data)
3311
+ 1/0
3312
+ signal.signal(signal.SIGALRM, on_alarm)
3313
+ r, w = os.pipe()
3314
+ wio = self.io.open(w, **fdopen_kwargs)
3315
+ try:
3316
+ signal.alarm(1)
3317
+ # Either the reentrant call to wio.write() fails with RuntimeError,
3318
+ # or the signal handler raises ZeroDivisionError.
3319
+ with self.assertRaises((ZeroDivisionError, RuntimeError)) as cm:
3320
+ while 1:
3321
+ for i in range(100):
3322
+ wio.write(data)
3323
+ wio.flush()
3324
+ # Make sure the buffer doesn't fill up and block further writes
3325
+ os.read(r, len(data) * 100)
3326
+ exc = cm.exception
3327
+ if isinstance(exc, RuntimeError):
3328
+ self.assertTrue(str(exc).startswith("reentrant call"), str(exc))
3329
+ finally:
3330
+ wio.close()
3331
+ os.close(r)
3332
+
3333
+ def test_reentrant_write_buffered(self):
3334
+ self.check_reentrant_write(b"xy", mode="wb")
3335
+
3336
+ def test_reentrant_write_text(self):
3337
+ self.check_reentrant_write("xy", mode="w", encoding="ascii")
3338
+
3339
+ def check_interrupted_read_retry(self, decode, **fdopen_kwargs):
3340
+ """Check that a buffered read, when it gets interrupted (either
3341
+ returning a partial result or EINTR), properly invokes the signal
3342
+ handler and retries if the latter returned successfully."""
3343
+ r, w = os.pipe()
3344
+ fdopen_kwargs["closefd"] = False
3345
+ def alarm_handler(sig, frame):
3346
+ os.write(w, b"bar")
3347
+ signal.signal(signal.SIGALRM, alarm_handler)
3348
+ try:
3349
+ rio = self.io.open(r, **fdopen_kwargs)
3350
+ os.write(w, b"foo")
3351
+ signal.alarm(1)
3352
+ # Expected behaviour:
3353
+ # - first raw read() returns partial b"foo"
3354
+ # - second raw read() returns EINTR
3355
+ # - third raw read() returns b"bar"
3356
+ self.assertEqual(decode(rio.read(6)), "foobar")
3357
+ finally:
3358
+ rio.close()
3359
+ os.close(w)
3360
+ os.close(r)
3361
+
3362
+ def test_interrupted_read_retry_buffered(self):
3363
+ self.check_interrupted_read_retry(lambda x: x.decode('latin1'),
3364
+ mode="rb")
3365
+
3366
+ def test_interrupted_read_retry_text(self):
3367
+ self.check_interrupted_read_retry(lambda x: x,
3368
+ mode="r")
3369
+
3370
+ @unittest.skipUnless(threading, 'Threading required for this test.')
3371
+ def check_interrupted_write_retry(self, item, **fdopen_kwargs):
3372
+ """Check that a buffered write, when it gets interrupted (either
3373
+ returning a partial result or EINTR), properly invokes the signal
3374
+ handler and retries if the latter returned successfully."""
3375
+ select = support.import_module("select")
3376
+ # A quantity that exceeds the buffer size of an anonymous pipe's
3377
+ # write end.
3378
+ N = support.PIPE_MAX_SIZE
3379
+ r, w = os.pipe()
3380
+ fdopen_kwargs["closefd"] = False
3381
+ # We need a separate thread to read from the pipe and allow the
3382
+ # write() to finish. This thread is started after the SIGALRM is
3383
+ # received (forcing a first EINTR in write()).
3384
+ read_results = []
3385
+ write_finished = False
3386
+ def _read():
3387
+ while not write_finished:
3388
+ while r in select.select([r], [], [], 1.0)[0]:
3389
+ s = os.read(r, 1024)
3390
+ read_results.append(s)
3391
+ t = threading.Thread(target=_read)
3392
+ t.daemon = True
3393
+ def alarm1(sig, frame):
3394
+ signal.signal(signal.SIGALRM, alarm2)
3395
+ signal.alarm(1)
3396
+ def alarm2(sig, frame):
3397
+ t.start()
3398
+ signal.signal(signal.SIGALRM, alarm1)
3399
+ try:
3400
+ wio = self.io.open(w, **fdopen_kwargs)
3401
+ signal.alarm(1)
3402
+ # Expected behaviour:
3403
+ # - first raw write() is partial (because of the limited pipe buffer
3404
+ # and the first alarm)
3405
+ # - second raw write() returns EINTR (because of the second alarm)
3406
+ # - subsequent write()s are successful (either partial or complete)
3407
+ self.assertEqual(N, wio.write(item * N))
3408
+ wio.flush()
3409
+ write_finished = True
3410
+ t.join()
3411
+ self.assertEqual(N, sum(len(x) for x in read_results))
3412
+ finally:
3413
+ write_finished = True
3414
+ os.close(w)
3415
+ os.close(r)
3416
+ # This is deliberate. If we didn't close the file descriptor
3417
+ # before closing wio, wio would try to flush its internal
3418
+ # buffer, and could block (in case of failure).
3419
+ try:
3420
+ wio.close()
3421
+ except OSError as e:
3422
+ if e.errno != errno.EBADF:
3423
+ raise
3424
+
3425
+ def test_interrupted_write_retry_buffered(self):
3426
+ self.check_interrupted_write_retry(b"x", mode="wb")
3427
+
3428
+ def test_interrupted_write_retry_text(self):
3429
+ self.check_interrupted_write_retry("x", mode="w", encoding="latin1")
3430
+
3431
+
3432
+ class CSignalsTest(SignalsTest):
3433
+ io = io
3434
+
3435
+ class PySignalsTest(SignalsTest):
3436
+ io = pyio
3437
+
3438
+ # Handling reentrancy issues would slow down _pyio even more, so the
3439
+ # tests are disabled.
3440
+ test_reentrant_write_buffered = None
3441
+ test_reentrant_write_text = None
3442
+
3443
+
3444
+ def load_tests(*args):
3445
+ tests = (CIOTest, PyIOTest,
3446
+ CBufferedReaderTest, PyBufferedReaderTest,
3447
+ CBufferedWriterTest, PyBufferedWriterTest,
3448
+ CBufferedRWPairTest, PyBufferedRWPairTest,
3449
+ CBufferedRandomTest, PyBufferedRandomTest,
3450
+ StatefulIncrementalDecoderTest,
3451
+ CIncrementalNewlineDecoderTest, PyIncrementalNewlineDecoderTest,
3452
+ CTextIOWrapperTest, PyTextIOWrapperTest,
3453
+ CMiscIOTest, PyMiscIOTest,
3454
+ CSignalsTest, PySignalsTest,
3455
+ )
3456
+
3457
+ # Put the namespaces of the IO module we are testing and some useful mock
3458
+ # classes in the __dict__ of each test.
3459
+ mocks = (MockRawIO, MisbehavedRawIO, MockFileIO, CloseFailureIO,
3460
+ MockNonBlockWriterIO, MockUnseekableIO, MockRawIOWithoutRead)
3461
+ all_members = io.__all__ + ["IncrementalNewlineDecoder"]
3462
+ c_io_ns = {name : getattr(io, name) for name in all_members}
3463
+ py_io_ns = {name : getattr(pyio, name) for name in all_members}
3464
+ globs = globals()
3465
+ c_io_ns.update((x.__name__, globs["C" + x.__name__]) for x in mocks)
3466
+ py_io_ns.update((x.__name__, globs["Py" + x.__name__]) for x in mocks)
3467
+ # Avoid turning open into a bound method.
3468
+ py_io_ns["open"] = pyio.OpenWrapper
3469
+ for test in tests:
3470
+ if test.__name__.startswith("C"):
3471
+ for name, obj in c_io_ns.items():
3472
+ setattr(test, name, obj)
3473
+ elif test.__name__.startswith("Py"):
3474
+ for name, obj in py_io_ns.items():
3475
+ setattr(test, name, obj)
3476
+
3477
+ suite = unittest.TestSuite([unittest.makeSuite(test) for test in tests])
3478
+ return suite
3479
+
3480
+ if __name__ == "__main__":
3481
+ unittest.main()