@tedbrain/vlink 0.0.0-dpv2.ted-runner.python-linux-x64.3.9.0-dpv2.1.r6 → 0.0.0-dpv2.ted-runner.vlink-linux-x64.0.2.24.r6

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 (660) hide show
  1. package/bin/vlink +0 -0
  2. package/package.json +1 -1
  3. package/bin/python3 +0 -0
  4. package/lib/libX11.so.6 +0 -0
  5. package/lib/libXau.so.6 +0 -0
  6. package/lib/libXdmcp.so.6 +0 -0
  7. package/lib/libcrypt.so.1 +0 -0
  8. package/lib/libcrypto.so.1.1 +0 -0
  9. package/lib/libffi.so.7 +0 -0
  10. package/lib/libfreebl3.so +0 -0
  11. package/lib/liblzma.so.5 +0 -0
  12. package/lib/libncursesw.so.6 +0 -0
  13. package/lib/libnsl.so.1 +0 -0
  14. package/lib/libpanelw.so.6 +0 -0
  15. package/lib/libpython3.9.so.1.0 +0 -0
  16. package/lib/libreadline.so.8 +0 -0
  17. package/lib/libsqlite3.so.0 +0 -0
  18. package/lib/libssl.so.1.1 +0 -0
  19. package/lib/libtcl8.6.so +0 -0
  20. package/lib/libtinfow.so.6 +0 -0
  21. package/lib/libtk8.6.so +0 -0
  22. package/lib/libxcb.so.1 +0 -0
  23. package/lib/libz.so.1 +0 -0
  24. package/lib/python3.9/LICENSE.txt +0 -279
  25. package/lib/python3.9/__future__.py +0 -147
  26. package/lib/python3.9/__phello__.foo.py +0 -1
  27. package/lib/python3.9/_aix_support.py +0 -89
  28. package/lib/python3.9/_bootlocale.py +0 -46
  29. package/lib/python3.9/_bootsubprocess.py +0 -97
  30. package/lib/python3.9/_collections_abc.py +0 -1031
  31. package/lib/python3.9/_compat_pickle.py +0 -251
  32. package/lib/python3.9/_compression.py +0 -152
  33. package/lib/python3.9/_markupbase.py +0 -395
  34. package/lib/python3.9/_osx_support.py +0 -515
  35. package/lib/python3.9/_py_abc.py +0 -147
  36. package/lib/python3.9/_pydecimal.py +0 -6410
  37. package/lib/python3.9/_pyio.py +0 -2692
  38. package/lib/python3.9/_sitebuiltins.py +0 -103
  39. package/lib/python3.9/_strptime.py +0 -579
  40. package/lib/python3.9/_sysconfigdata__linux_x86_64-linux-gnu.py +0 -969
  41. package/lib/python3.9/_sysconfigdata__linux_x86_64-linux-gnu.py.orig +0 -969
  42. package/lib/python3.9/_sysconfigdata_x86_64_conda_cos6_linux_gnu.py +0 -969
  43. package/lib/python3.9/_threading_local.py +0 -242
  44. package/lib/python3.9/_weakrefset.py +0 -202
  45. package/lib/python3.9/abc.py +0 -129
  46. package/lib/python3.9/aifc.py +0 -947
  47. package/lib/python3.9/antigravity.py +0 -17
  48. package/lib/python3.9/argparse.py +0 -2575
  49. package/lib/python3.9/ast.py +0 -1530
  50. package/lib/python3.9/asynchat.py +0 -307
  51. package/lib/python3.9/asyncio/__init__.py +0 -47
  52. package/lib/python3.9/asyncio/__main__.py +0 -125
  53. package/lib/python3.9/asyncio/base_events.py +0 -1915
  54. package/lib/python3.9/asyncio/base_futures.py +0 -61
  55. package/lib/python3.9/asyncio/base_subprocess.py +0 -285
  56. package/lib/python3.9/asyncio/base_tasks.py +0 -85
  57. package/lib/python3.9/asyncio/constants.py +0 -27
  58. package/lib/python3.9/asyncio/coroutines.py +0 -269
  59. package/lib/python3.9/asyncio/events.py +0 -795
  60. package/lib/python3.9/asyncio/exceptions.py +0 -57
  61. package/lib/python3.9/asyncio/format_helpers.py +0 -76
  62. package/lib/python3.9/asyncio/futures.py +0 -423
  63. package/lib/python3.9/asyncio/locks.py +0 -451
  64. package/lib/python3.9/asyncio/log.py +0 -7
  65. package/lib/python3.9/asyncio/proactor_events.py +0 -868
  66. package/lib/python3.9/asyncio/protocols.py +0 -220
  67. package/lib/python3.9/asyncio/queues.py +0 -252
  68. package/lib/python3.9/asyncio/runners.py +0 -74
  69. package/lib/python3.9/asyncio/selector_events.py +0 -1099
  70. package/lib/python3.9/asyncio/sslproto.py +0 -733
  71. package/lib/python3.9/asyncio/staggered.py +0 -149
  72. package/lib/python3.9/asyncio/streams.py +0 -741
  73. package/lib/python3.9/asyncio/subprocess.py +0 -241
  74. package/lib/python3.9/asyncio/tasks.py +0 -980
  75. package/lib/python3.9/asyncio/threads.py +0 -25
  76. package/lib/python3.9/asyncio/transports.py +0 -329
  77. package/lib/python3.9/asyncio/trsock.py +0 -206
  78. package/lib/python3.9/asyncio/unix_events.py +0 -1466
  79. package/lib/python3.9/asyncio/windows_events.py +0 -908
  80. package/lib/python3.9/asyncio/windows_utils.py +0 -173
  81. package/lib/python3.9/asyncore.py +0 -642
  82. package/lib/python3.9/base64.py +0 -579
  83. package/lib/python3.9/bdb.py +0 -864
  84. package/lib/python3.9/binhex.py +0 -502
  85. package/lib/python3.9/bisect.py +0 -80
  86. package/lib/python3.9/bz2.py +0 -350
  87. package/lib/python3.9/cProfile.py +0 -180
  88. package/lib/python3.9/calendar.py +0 -770
  89. package/lib/python3.9/cgi.py +0 -996
  90. package/lib/python3.9/cgitb.py +0 -321
  91. package/lib/python3.9/chunk.py +0 -169
  92. package/lib/python3.9/cmd.py +0 -401
  93. package/lib/python3.9/code.py +0 -315
  94. package/lib/python3.9/codecs.py +0 -1126
  95. package/lib/python3.9/codeop.py +0 -178
  96. package/lib/python3.9/collections/__init__.py +0 -1508
  97. package/lib/python3.9/collections/abc.py +0 -2
  98. package/lib/python3.9/colorsys.py +0 -164
  99. package/lib/python3.9/compileall.py +0 -461
  100. package/lib/python3.9/concurrent/__init__.py +0 -1
  101. package/lib/python3.9/concurrent/futures/__init__.py +0 -53
  102. package/lib/python3.9/concurrent/futures/_base.py +0 -635
  103. package/lib/python3.9/concurrent/futures/process.py +0 -751
  104. package/lib/python3.9/concurrent/futures/thread.py +0 -230
  105. package/lib/python3.9/config-3.9-x86_64-linux-gnu/Makefile +0 -2015
  106. package/lib/python3.9/config-3.9-x86_64-linux-gnu/Setup +0 -372
  107. package/lib/python3.9/config-3.9-x86_64-linux-gnu/Setup.local +0 -1
  108. package/lib/python3.9/config-3.9-x86_64-linux-gnu/config.c +0 -116
  109. package/lib/python3.9/config-3.9-x86_64-linux-gnu/config.c.in +0 -67
  110. package/lib/python3.9/config-3.9-x86_64-linux-gnu/install-sh +0 -518
  111. package/lib/python3.9/config-3.9-x86_64-linux-gnu/makesetup +0 -309
  112. package/lib/python3.9/config-3.9-x86_64-linux-gnu/python-config.py +0 -74
  113. package/lib/python3.9/config-3.9-x86_64-linux-gnu/python.o +0 -0
  114. package/lib/python3.9/configparser.py +0 -1363
  115. package/lib/python3.9/contextlib.py +0 -676
  116. package/lib/python3.9/contextvars.py +0 -4
  117. package/lib/python3.9/copy.py +0 -303
  118. package/lib/python3.9/copyreg.py +0 -209
  119. package/lib/python3.9/crypt.py +0 -120
  120. package/lib/python3.9/csv.py +0 -448
  121. package/lib/python3.9/ctypes/__init__.py +0 -571
  122. package/lib/python3.9/ctypes/_aix.py +0 -331
  123. package/lib/python3.9/ctypes/_endian.py +0 -61
  124. package/lib/python3.9/ctypes/macholib/README.ctypes +0 -7
  125. package/lib/python3.9/ctypes/macholib/__init__.py +0 -9
  126. package/lib/python3.9/ctypes/macholib/dyld.py +0 -182
  127. package/lib/python3.9/ctypes/macholib/dylib.py +0 -63
  128. package/lib/python3.9/ctypes/macholib/fetch_macholib +0 -2
  129. package/lib/python3.9/ctypes/macholib/fetch_macholib.bat +0 -1
  130. package/lib/python3.9/ctypes/macholib/framework.py +0 -65
  131. package/lib/python3.9/ctypes/util.py +0 -379
  132. package/lib/python3.9/ctypes/wintypes.py +0 -202
  133. package/lib/python3.9/curses/__init__.py +0 -101
  134. package/lib/python3.9/curses/ascii.py +0 -99
  135. package/lib/python3.9/curses/has_key.py +0 -192
  136. package/lib/python3.9/curses/panel.py +0 -6
  137. package/lib/python3.9/curses/textpad.py +0 -201
  138. package/lib/python3.9/dataclasses.py +0 -1284
  139. package/lib/python3.9/datetime.py +0 -2555
  140. package/lib/python3.9/dbm/__init__.py +0 -189
  141. package/lib/python3.9/dbm/dumb.py +0 -316
  142. package/lib/python3.9/dbm/gnu.py +0 -3
  143. package/lib/python3.9/dbm/ndbm.py +0 -3
  144. package/lib/python3.9/decimal.py +0 -11
  145. package/lib/python3.9/difflib.py +0 -2096
  146. package/lib/python3.9/dis.py +0 -553
  147. package/lib/python3.9/distutils/README +0 -11
  148. package/lib/python3.9/distutils/__init__.py +0 -13
  149. package/lib/python3.9/distutils/_msvccompiler.py +0 -546
  150. package/lib/python3.9/distutils/archive_util.py +0 -256
  151. package/lib/python3.9/distutils/bcppcompiler.py +0 -393
  152. package/lib/python3.9/distutils/ccompiler.py +0 -1116
  153. package/lib/python3.9/distutils/cmd.py +0 -403
  154. package/lib/python3.9/distutils/command/__init__.py +0 -31
  155. package/lib/python3.9/distutils/command/bdist.py +0 -143
  156. package/lib/python3.9/distutils/command/bdist_dumb.py +0 -123
  157. package/lib/python3.9/distutils/command/bdist_msi.py +0 -749
  158. package/lib/python3.9/distutils/command/bdist_rpm.py +0 -579
  159. package/lib/python3.9/distutils/command/bdist_wininst.py +0 -377
  160. package/lib/python3.9/distutils/command/build.py +0 -157
  161. package/lib/python3.9/distutils/command/build_clib.py +0 -209
  162. package/lib/python3.9/distutils/command/build_ext.py +0 -754
  163. package/lib/python3.9/distutils/command/build_py.py +0 -416
  164. package/lib/python3.9/distutils/command/build_scripts.py +0 -160
  165. package/lib/python3.9/distutils/command/check.py +0 -148
  166. package/lib/python3.9/distutils/command/clean.py +0 -76
  167. package/lib/python3.9/distutils/command/command_template +0 -33
  168. package/lib/python3.9/distutils/command/config.py +0 -344
  169. package/lib/python3.9/distutils/command/install.py +0 -657
  170. package/lib/python3.9/distutils/command/install_data.py +0 -79
  171. package/lib/python3.9/distutils/command/install_egg_info.py +0 -77
  172. package/lib/python3.9/distutils/command/install_headers.py +0 -47
  173. package/lib/python3.9/distutils/command/install_lib.py +0 -217
  174. package/lib/python3.9/distutils/command/install_scripts.py +0 -60
  175. package/lib/python3.9/distutils/command/register.py +0 -304
  176. package/lib/python3.9/distutils/command/sdist.py +0 -494
  177. package/lib/python3.9/distutils/command/upload.py +0 -214
  178. package/lib/python3.9/distutils/config.py +0 -130
  179. package/lib/python3.9/distutils/core.py +0 -234
  180. package/lib/python3.9/distutils/cygwinccompiler.py +0 -410
  181. package/lib/python3.9/distutils/debug.py +0 -5
  182. package/lib/python3.9/distutils/dep_util.py +0 -92
  183. package/lib/python3.9/distutils/dir_util.py +0 -210
  184. package/lib/python3.9/distutils/dist.py +0 -1256
  185. package/lib/python3.9/distutils/errors.py +0 -97
  186. package/lib/python3.9/distutils/extension.py +0 -240
  187. package/lib/python3.9/distutils/fancy_getopt.py +0 -457
  188. package/lib/python3.9/distutils/file_util.py +0 -238
  189. package/lib/python3.9/distutils/filelist.py +0 -327
  190. package/lib/python3.9/distutils/log.py +0 -77
  191. package/lib/python3.9/distutils/msvc9compiler.py +0 -788
  192. package/lib/python3.9/distutils/msvccompiler.py +0 -643
  193. package/lib/python3.9/distutils/spawn.py +0 -125
  194. package/lib/python3.9/distutils/sysconfig.py +0 -560
  195. package/lib/python3.9/distutils/text_file.py +0 -286
  196. package/lib/python3.9/distutils/unixccompiler.py +0 -330
  197. package/lib/python3.9/distutils/util.py +0 -559
  198. package/lib/python3.9/distutils/version.py +0 -347
  199. package/lib/python3.9/distutils/versionpredicate.py +0 -166
  200. package/lib/python3.9/doctest.py +0 -2793
  201. package/lib/python3.9/email/__init__.py +0 -62
  202. package/lib/python3.9/email/_encoded_words.py +0 -233
  203. package/lib/python3.9/email/_header_value_parser.py +0 -3003
  204. package/lib/python3.9/email/_parseaddr.py +0 -549
  205. package/lib/python3.9/email/_policybase.py +0 -374
  206. package/lib/python3.9/email/architecture.rst +0 -216
  207. package/lib/python3.9/email/base64mime.py +0 -119
  208. package/lib/python3.9/email/charset.py +0 -404
  209. package/lib/python3.9/email/contentmanager.py +0 -250
  210. package/lib/python3.9/email/encoders.py +0 -69
  211. package/lib/python3.9/email/errors.py +0 -110
  212. package/lib/python3.9/email/feedparser.py +0 -536
  213. package/lib/python3.9/email/generator.py +0 -508
  214. package/lib/python3.9/email/header.py +0 -578
  215. package/lib/python3.9/email/headerregistry.py +0 -601
  216. package/lib/python3.9/email/iterators.py +0 -71
  217. package/lib/python3.9/email/message.py +0 -1173
  218. package/lib/python3.9/email/mime/__init__.py +0 -0
  219. package/lib/python3.9/email/mime/application.py +0 -37
  220. package/lib/python3.9/email/mime/audio.py +0 -74
  221. package/lib/python3.9/email/mime/base.py +0 -30
  222. package/lib/python3.9/email/mime/image.py +0 -47
  223. package/lib/python3.9/email/mime/message.py +0 -34
  224. package/lib/python3.9/email/mime/multipart.py +0 -48
  225. package/lib/python3.9/email/mime/nonmultipart.py +0 -22
  226. package/lib/python3.9/email/mime/text.py +0 -42
  227. package/lib/python3.9/email/parser.py +0 -131
  228. package/lib/python3.9/email/policy.py +0 -224
  229. package/lib/python3.9/email/quoprimime.py +0 -299
  230. package/lib/python3.9/email/utils.py +0 -368
  231. package/lib/python3.9/encodings/__init__.py +0 -169
  232. package/lib/python3.9/encodings/aliases.py +0 -551
  233. package/lib/python3.9/encodings/ascii.py +0 -50
  234. package/lib/python3.9/encodings/base64_codec.py +0 -55
  235. package/lib/python3.9/encodings/big5.py +0 -39
  236. package/lib/python3.9/encodings/big5hkscs.py +0 -39
  237. package/lib/python3.9/encodings/bz2_codec.py +0 -78
  238. package/lib/python3.9/encodings/charmap.py +0 -69
  239. package/lib/python3.9/encodings/cp037.py +0 -307
  240. package/lib/python3.9/encodings/cp1006.py +0 -307
  241. package/lib/python3.9/encodings/cp1026.py +0 -307
  242. package/lib/python3.9/encodings/cp1125.py +0 -698
  243. package/lib/python3.9/encodings/cp1140.py +0 -307
  244. package/lib/python3.9/encodings/cp1250.py +0 -307
  245. package/lib/python3.9/encodings/cp1251.py +0 -307
  246. package/lib/python3.9/encodings/cp1252.py +0 -307
  247. package/lib/python3.9/encodings/cp1253.py +0 -307
  248. package/lib/python3.9/encodings/cp1254.py +0 -307
  249. package/lib/python3.9/encodings/cp1255.py +0 -307
  250. package/lib/python3.9/encodings/cp1256.py +0 -307
  251. package/lib/python3.9/encodings/cp1257.py +0 -307
  252. package/lib/python3.9/encodings/cp1258.py +0 -307
  253. package/lib/python3.9/encodings/cp273.py +0 -307
  254. package/lib/python3.9/encodings/cp424.py +0 -307
  255. package/lib/python3.9/encodings/cp437.py +0 -698
  256. package/lib/python3.9/encodings/cp500.py +0 -307
  257. package/lib/python3.9/encodings/cp720.py +0 -309
  258. package/lib/python3.9/encodings/cp737.py +0 -698
  259. package/lib/python3.9/encodings/cp775.py +0 -697
  260. package/lib/python3.9/encodings/cp850.py +0 -698
  261. package/lib/python3.9/encodings/cp852.py +0 -698
  262. package/lib/python3.9/encodings/cp855.py +0 -698
  263. package/lib/python3.9/encodings/cp856.py +0 -307
  264. package/lib/python3.9/encodings/cp857.py +0 -694
  265. package/lib/python3.9/encodings/cp858.py +0 -698
  266. package/lib/python3.9/encodings/cp860.py +0 -698
  267. package/lib/python3.9/encodings/cp861.py +0 -698
  268. package/lib/python3.9/encodings/cp862.py +0 -698
  269. package/lib/python3.9/encodings/cp863.py +0 -698
  270. package/lib/python3.9/encodings/cp864.py +0 -690
  271. package/lib/python3.9/encodings/cp865.py +0 -698
  272. package/lib/python3.9/encodings/cp866.py +0 -698
  273. package/lib/python3.9/encodings/cp869.py +0 -689
  274. package/lib/python3.9/encodings/cp874.py +0 -307
  275. package/lib/python3.9/encodings/cp875.py +0 -307
  276. package/lib/python3.9/encodings/cp932.py +0 -39
  277. package/lib/python3.9/encodings/cp949.py +0 -39
  278. package/lib/python3.9/encodings/cp950.py +0 -39
  279. package/lib/python3.9/encodings/euc_jis_2004.py +0 -39
  280. package/lib/python3.9/encodings/euc_jisx0213.py +0 -39
  281. package/lib/python3.9/encodings/euc_jp.py +0 -39
  282. package/lib/python3.9/encodings/euc_kr.py +0 -39
  283. package/lib/python3.9/encodings/gb18030.py +0 -39
  284. package/lib/python3.9/encodings/gb2312.py +0 -39
  285. package/lib/python3.9/encodings/gbk.py +0 -39
  286. package/lib/python3.9/encodings/hex_codec.py +0 -55
  287. package/lib/python3.9/encodings/hp_roman8.py +0 -314
  288. package/lib/python3.9/encodings/hz.py +0 -39
  289. package/lib/python3.9/encodings/idna.py +0 -309
  290. package/lib/python3.9/encodings/iso2022_jp.py +0 -39
  291. package/lib/python3.9/encodings/iso2022_jp_1.py +0 -39
  292. package/lib/python3.9/encodings/iso2022_jp_2.py +0 -39
  293. package/lib/python3.9/encodings/iso2022_jp_2004.py +0 -39
  294. package/lib/python3.9/encodings/iso2022_jp_3.py +0 -39
  295. package/lib/python3.9/encodings/iso2022_jp_ext.py +0 -39
  296. package/lib/python3.9/encodings/iso2022_kr.py +0 -39
  297. package/lib/python3.9/encodings/iso8859_1.py +0 -307
  298. package/lib/python3.9/encodings/iso8859_10.py +0 -307
  299. package/lib/python3.9/encodings/iso8859_11.py +0 -307
  300. package/lib/python3.9/encodings/iso8859_13.py +0 -307
  301. package/lib/python3.9/encodings/iso8859_14.py +0 -307
  302. package/lib/python3.9/encodings/iso8859_15.py +0 -307
  303. package/lib/python3.9/encodings/iso8859_16.py +0 -307
  304. package/lib/python3.9/encodings/iso8859_2.py +0 -307
  305. package/lib/python3.9/encodings/iso8859_3.py +0 -307
  306. package/lib/python3.9/encodings/iso8859_4.py +0 -307
  307. package/lib/python3.9/encodings/iso8859_5.py +0 -307
  308. package/lib/python3.9/encodings/iso8859_6.py +0 -307
  309. package/lib/python3.9/encodings/iso8859_7.py +0 -307
  310. package/lib/python3.9/encodings/iso8859_8.py +0 -307
  311. package/lib/python3.9/encodings/iso8859_9.py +0 -307
  312. package/lib/python3.9/encodings/johab.py +0 -39
  313. package/lib/python3.9/encodings/koi8_r.py +0 -307
  314. package/lib/python3.9/encodings/koi8_t.py +0 -308
  315. package/lib/python3.9/encodings/koi8_u.py +0 -307
  316. package/lib/python3.9/encodings/kz1048.py +0 -307
  317. package/lib/python3.9/encodings/latin_1.py +0 -50
  318. package/lib/python3.9/encodings/mac_arabic.py +0 -698
  319. package/lib/python3.9/encodings/mac_croatian.py +0 -307
  320. package/lib/python3.9/encodings/mac_cyrillic.py +0 -307
  321. package/lib/python3.9/encodings/mac_farsi.py +0 -307
  322. package/lib/python3.9/encodings/mac_greek.py +0 -307
  323. package/lib/python3.9/encodings/mac_iceland.py +0 -307
  324. package/lib/python3.9/encodings/mac_latin2.py +0 -312
  325. package/lib/python3.9/encodings/mac_roman.py +0 -307
  326. package/lib/python3.9/encodings/mac_romanian.py +0 -307
  327. package/lib/python3.9/encodings/mac_turkish.py +0 -307
  328. package/lib/python3.9/encodings/mbcs.py +0 -47
  329. package/lib/python3.9/encodings/oem.py +0 -41
  330. package/lib/python3.9/encodings/palmos.py +0 -308
  331. package/lib/python3.9/encodings/ptcp154.py +0 -312
  332. package/lib/python3.9/encodings/punycode.py +0 -237
  333. package/lib/python3.9/encodings/quopri_codec.py +0 -56
  334. package/lib/python3.9/encodings/raw_unicode_escape.py +0 -45
  335. package/lib/python3.9/encodings/rot_13.py +0 -113
  336. package/lib/python3.9/encodings/shift_jis.py +0 -39
  337. package/lib/python3.9/encodings/shift_jis_2004.py +0 -39
  338. package/lib/python3.9/encodings/shift_jisx0213.py +0 -39
  339. package/lib/python3.9/encodings/tis_620.py +0 -307
  340. package/lib/python3.9/encodings/undefined.py +0 -49
  341. package/lib/python3.9/encodings/unicode_escape.py +0 -45
  342. package/lib/python3.9/encodings/utf_16.py +0 -155
  343. package/lib/python3.9/encodings/utf_16_be.py +0 -42
  344. package/lib/python3.9/encodings/utf_16_le.py +0 -42
  345. package/lib/python3.9/encodings/utf_32.py +0 -150
  346. package/lib/python3.9/encodings/utf_32_be.py +0 -37
  347. package/lib/python3.9/encodings/utf_32_le.py +0 -37
  348. package/lib/python3.9/encodings/utf_7.py +0 -38
  349. package/lib/python3.9/encodings/utf_8.py +0 -42
  350. package/lib/python3.9/encodings/utf_8_sig.py +0 -130
  351. package/lib/python3.9/encodings/uu_codec.py +0 -103
  352. package/lib/python3.9/encodings/zlib_codec.py +0 -77
  353. package/lib/python3.9/enum.py +0 -913
  354. package/lib/python3.9/filecmp.py +0 -309
  355. package/lib/python3.9/fileinput.py +0 -432
  356. package/lib/python3.9/fnmatch.py +0 -183
  357. package/lib/python3.9/formatter.py +0 -452
  358. package/lib/python3.9/fractions.py +0 -641
  359. package/lib/python3.9/ftplib.py +0 -974
  360. package/lib/python3.9/functools.py +0 -980
  361. package/lib/python3.9/genericpath.py +0 -155
  362. package/lib/python3.9/getopt.py +0 -215
  363. package/lib/python3.9/getpass.py +0 -185
  364. package/lib/python3.9/gettext.py +0 -788
  365. package/lib/python3.9/glob.py +0 -173
  366. package/lib/python3.9/graphlib.py +0 -245
  367. package/lib/python3.9/gzip.py +0 -609
  368. package/lib/python3.9/hashlib.py +0 -262
  369. package/lib/python3.9/heapq.py +0 -601
  370. package/lib/python3.9/hmac.py +0 -203
  371. package/lib/python3.9/html/__init__.py +0 -132
  372. package/lib/python3.9/html/entities.py +0 -2509
  373. package/lib/python3.9/html/parser.py +0 -462
  374. package/lib/python3.9/http/__init__.py +0 -149
  375. package/lib/python3.9/http/client.py +0 -1495
  376. package/lib/python3.9/http/cookiejar.py +0 -2113
  377. package/lib/python3.9/http/cookies.py +0 -612
  378. package/lib/python3.9/http/server.py +0 -1299
  379. package/lib/python3.9/imaplib.py +0 -1650
  380. package/lib/python3.9/imghdr.py +0 -168
  381. package/lib/python3.9/imp.py +0 -345
  382. package/lib/python3.9/importlib/__init__.py +0 -176
  383. package/lib/python3.9/importlib/_bootstrap.py +0 -1189
  384. package/lib/python3.9/importlib/_bootstrap_external.py +0 -1637
  385. package/lib/python3.9/importlib/_common.py +0 -62
  386. package/lib/python3.9/importlib/abc.py +0 -474
  387. package/lib/python3.9/importlib/machinery.py +0 -21
  388. package/lib/python3.9/importlib/metadata.py +0 -586
  389. package/lib/python3.9/importlib/resources.py +0 -215
  390. package/lib/python3.9/importlib/util.py +0 -300
  391. package/lib/python3.9/inspect.py +0 -3180
  392. package/lib/python3.9/io.py +0 -99
  393. package/lib/python3.9/ipaddress.py +0 -2280
  394. package/lib/python3.9/json/__init__.py +0 -359
  395. package/lib/python3.9/json/decoder.py +0 -356
  396. package/lib/python3.9/json/encoder.py +0 -442
  397. package/lib/python3.9/json/scanner.py +0 -73
  398. package/lib/python3.9/json/tool.py +0 -78
  399. package/lib/python3.9/keyword.py +0 -62
  400. package/lib/python3.9/lib-dynload/_asyncio.cpython-39-x86_64-linux-gnu.so +0 -0
  401. package/lib/python3.9/lib-dynload/_bisect.cpython-39-x86_64-linux-gnu.so +0 -0
  402. package/lib/python3.9/lib-dynload/_blake2.cpython-39-x86_64-linux-gnu.so +0 -0
  403. package/lib/python3.9/lib-dynload/_bz2.cpython-39-x86_64-linux-gnu.so +0 -0
  404. package/lib/python3.9/lib-dynload/_codecs_cn.cpython-39-x86_64-linux-gnu.so +0 -0
  405. package/lib/python3.9/lib-dynload/_codecs_hk.cpython-39-x86_64-linux-gnu.so +0 -0
  406. package/lib/python3.9/lib-dynload/_codecs_iso2022.cpython-39-x86_64-linux-gnu.so +0 -0
  407. package/lib/python3.9/lib-dynload/_codecs_jp.cpython-39-x86_64-linux-gnu.so +0 -0
  408. package/lib/python3.9/lib-dynload/_codecs_kr.cpython-39-x86_64-linux-gnu.so +0 -0
  409. package/lib/python3.9/lib-dynload/_codecs_tw.cpython-39-x86_64-linux-gnu.so +0 -0
  410. package/lib/python3.9/lib-dynload/_contextvars.cpython-39-x86_64-linux-gnu.so +0 -0
  411. package/lib/python3.9/lib-dynload/_crypt.cpython-39-x86_64-linux-gnu.so +0 -0
  412. package/lib/python3.9/lib-dynload/_csv.cpython-39-x86_64-linux-gnu.so +0 -0
  413. package/lib/python3.9/lib-dynload/_ctypes.cpython-39-x86_64-linux-gnu.so +0 -0
  414. package/lib/python3.9/lib-dynload/_ctypes_test.cpython-39-x86_64-linux-gnu.so +0 -0
  415. package/lib/python3.9/lib-dynload/_curses.cpython-39-x86_64-linux-gnu.so +0 -0
  416. package/lib/python3.9/lib-dynload/_curses_panel.cpython-39-x86_64-linux-gnu.so +0 -0
  417. package/lib/python3.9/lib-dynload/_datetime.cpython-39-x86_64-linux-gnu.so +0 -0
  418. package/lib/python3.9/lib-dynload/_decimal.cpython-39-x86_64-linux-gnu.so +0 -0
  419. package/lib/python3.9/lib-dynload/_elementtree.cpython-39-x86_64-linux-gnu.so +0 -0
  420. package/lib/python3.9/lib-dynload/_hashlib.cpython-39-x86_64-linux-gnu.so +0 -0
  421. package/lib/python3.9/lib-dynload/_heapq.cpython-39-x86_64-linux-gnu.so +0 -0
  422. package/lib/python3.9/lib-dynload/_json.cpython-39-x86_64-linux-gnu.so +0 -0
  423. package/lib/python3.9/lib-dynload/_lsprof.cpython-39-x86_64-linux-gnu.so +0 -0
  424. package/lib/python3.9/lib-dynload/_lzma.cpython-39-x86_64-linux-gnu.so +0 -0
  425. package/lib/python3.9/lib-dynload/_md5.cpython-39-x86_64-linux-gnu.so +0 -0
  426. package/lib/python3.9/lib-dynload/_multibytecodec.cpython-39-x86_64-linux-gnu.so +0 -0
  427. package/lib/python3.9/lib-dynload/_multiprocessing.cpython-39-x86_64-linux-gnu.so +0 -0
  428. package/lib/python3.9/lib-dynload/_opcode.cpython-39-x86_64-linux-gnu.so +0 -0
  429. package/lib/python3.9/lib-dynload/_pickle.cpython-39-x86_64-linux-gnu.so +0 -0
  430. package/lib/python3.9/lib-dynload/_posixshmem.cpython-39-x86_64-linux-gnu.so +0 -0
  431. package/lib/python3.9/lib-dynload/_posixsubprocess.cpython-39-x86_64-linux-gnu.so +0 -0
  432. package/lib/python3.9/lib-dynload/_queue.cpython-39-x86_64-linux-gnu.so +0 -0
  433. package/lib/python3.9/lib-dynload/_random.cpython-39-x86_64-linux-gnu.so +0 -0
  434. package/lib/python3.9/lib-dynload/_sha1.cpython-39-x86_64-linux-gnu.so +0 -0
  435. package/lib/python3.9/lib-dynload/_sha256.cpython-39-x86_64-linux-gnu.so +0 -0
  436. package/lib/python3.9/lib-dynload/_sha3.cpython-39-x86_64-linux-gnu.so +0 -0
  437. package/lib/python3.9/lib-dynload/_sha512.cpython-39-x86_64-linux-gnu.so +0 -0
  438. package/lib/python3.9/lib-dynload/_socket.cpython-39-x86_64-linux-gnu.so +0 -0
  439. package/lib/python3.9/lib-dynload/_sqlite3.cpython-39-x86_64-linux-gnu.so +0 -0
  440. package/lib/python3.9/lib-dynload/_ssl.cpython-39-x86_64-linux-gnu.so +0 -0
  441. package/lib/python3.9/lib-dynload/_statistics.cpython-39-x86_64-linux-gnu.so +0 -0
  442. package/lib/python3.9/lib-dynload/_struct.cpython-39-x86_64-linux-gnu.so +0 -0
  443. package/lib/python3.9/lib-dynload/_testbuffer.cpython-39-x86_64-linux-gnu.so +0 -0
  444. package/lib/python3.9/lib-dynload/_testcapi.cpython-39-x86_64-linux-gnu.so +0 -0
  445. package/lib/python3.9/lib-dynload/_testimportmultiple.cpython-39-x86_64-linux-gnu.so +0 -0
  446. package/lib/python3.9/lib-dynload/_testinternalcapi.cpython-39-x86_64-linux-gnu.so +0 -0
  447. package/lib/python3.9/lib-dynload/_testmultiphase.cpython-39-x86_64-linux-gnu.so +0 -0
  448. package/lib/python3.9/lib-dynload/_tkinter.cpython-39-x86_64-linux-gnu.so +0 -0
  449. package/lib/python3.9/lib-dynload/_xxsubinterpreters.cpython-39-x86_64-linux-gnu.so +0 -0
  450. package/lib/python3.9/lib-dynload/_xxtestfuzz.cpython-39-x86_64-linux-gnu.so +0 -0
  451. package/lib/python3.9/lib-dynload/_zoneinfo.cpython-39-x86_64-linux-gnu.so +0 -0
  452. package/lib/python3.9/lib-dynload/array.cpython-39-x86_64-linux-gnu.so +0 -0
  453. package/lib/python3.9/lib-dynload/audioop.cpython-39-x86_64-linux-gnu.so +0 -0
  454. package/lib/python3.9/lib-dynload/binascii.cpython-39-x86_64-linux-gnu.so +0 -0
  455. package/lib/python3.9/lib-dynload/cmath.cpython-39-x86_64-linux-gnu.so +0 -0
  456. package/lib/python3.9/lib-dynload/fcntl.cpython-39-x86_64-linux-gnu.so +0 -0
  457. package/lib/python3.9/lib-dynload/grp.cpython-39-x86_64-linux-gnu.so +0 -0
  458. package/lib/python3.9/lib-dynload/math.cpython-39-x86_64-linux-gnu.so +0 -0
  459. package/lib/python3.9/lib-dynload/mmap.cpython-39-x86_64-linux-gnu.so +0 -0
  460. package/lib/python3.9/lib-dynload/nis.cpython-39-x86_64-linux-gnu.so +0 -0
  461. package/lib/python3.9/lib-dynload/ossaudiodev.cpython-39-x86_64-linux-gnu.so +0 -0
  462. package/lib/python3.9/lib-dynload/parser.cpython-39-x86_64-linux-gnu.so +0 -0
  463. package/lib/python3.9/lib-dynload/pyexpat.cpython-39-x86_64-linux-gnu.so +0 -0
  464. package/lib/python3.9/lib-dynload/readline.cpython-39-x86_64-linux-gnu.so +0 -0
  465. package/lib/python3.9/lib-dynload/resource.cpython-39-x86_64-linux-gnu.so +0 -0
  466. package/lib/python3.9/lib-dynload/select.cpython-39-x86_64-linux-gnu.so +0 -0
  467. package/lib/python3.9/lib-dynload/spwd.cpython-39-x86_64-linux-gnu.so +0 -0
  468. package/lib/python3.9/lib-dynload/syslog.cpython-39-x86_64-linux-gnu.so +0 -0
  469. package/lib/python3.9/lib-dynload/termios.cpython-39-x86_64-linux-gnu.so +0 -0
  470. package/lib/python3.9/lib-dynload/unicodedata.cpython-39-x86_64-linux-gnu.so +0 -0
  471. package/lib/python3.9/lib-dynload/xxlimited.cpython-39-x86_64-linux-gnu.so +0 -0
  472. package/lib/python3.9/lib-dynload/zlib.cpython-39-x86_64-linux-gnu.so +0 -0
  473. package/lib/python3.9/linecache.py +0 -177
  474. package/lib/python3.9/locale.py +0 -1755
  475. package/lib/python3.9/logging/__init__.py +0 -2208
  476. package/lib/python3.9/logging/config.py +0 -945
  477. package/lib/python3.9/logging/handlers.py +0 -1543
  478. package/lib/python3.9/lzma.py +0 -347
  479. package/lib/python3.9/mailbox.py +0 -2151
  480. package/lib/python3.9/mailcap.py +0 -276
  481. package/lib/python3.9/mimetypes.py +0 -614
  482. package/lib/python3.9/modulefinder.py +0 -685
  483. package/lib/python3.9/multiprocessing/__init__.py +0 -37
  484. package/lib/python3.9/multiprocessing/connection.py +0 -978
  485. package/lib/python3.9/multiprocessing/context.py +0 -362
  486. package/lib/python3.9/multiprocessing/dummy/__init__.py +0 -126
  487. package/lib/python3.9/multiprocessing/dummy/connection.py +0 -75
  488. package/lib/python3.9/multiprocessing/forkserver.py +0 -348
  489. package/lib/python3.9/multiprocessing/heap.py +0 -337
  490. package/lib/python3.9/multiprocessing/managers.py +0 -1369
  491. package/lib/python3.9/multiprocessing/pool.py +0 -954
  492. package/lib/python3.9/multiprocessing/popen_fork.py +0 -83
  493. package/lib/python3.9/multiprocessing/popen_forkserver.py +0 -74
  494. package/lib/python3.9/multiprocessing/popen_spawn_posix.py +0 -72
  495. package/lib/python3.9/multiprocessing/popen_spawn_win32.py +0 -131
  496. package/lib/python3.9/multiprocessing/process.py +0 -432
  497. package/lib/python3.9/multiprocessing/queues.py +0 -380
  498. package/lib/python3.9/multiprocessing/reduction.py +0 -281
  499. package/lib/python3.9/multiprocessing/resource_sharer.py +0 -154
  500. package/lib/python3.9/multiprocessing/resource_tracker.py +0 -231
  501. package/lib/python3.9/multiprocessing/shared_memory.py +0 -532
  502. package/lib/python3.9/multiprocessing/sharedctypes.py +0 -240
  503. package/lib/python3.9/multiprocessing/spawn.py +0 -297
  504. package/lib/python3.9/multiprocessing/synchronize.py +0 -394
  505. package/lib/python3.9/multiprocessing/util.py +0 -489
  506. package/lib/python3.9/netrc.py +0 -139
  507. package/lib/python3.9/nntplib.py +0 -1090
  508. package/lib/python3.9/ntpath.py +0 -794
  509. package/lib/python3.9/nturl2path.py +0 -73
  510. package/lib/python3.9/numbers.py +0 -389
  511. package/lib/python3.9/opcode.py +0 -217
  512. package/lib/python3.9/operator.py +0 -460
  513. package/lib/python3.9/optparse.py +0 -1681
  514. package/lib/python3.9/os.py +0 -1116
  515. package/lib/python3.9/pathlib.py +0 -1576
  516. package/lib/python3.9/pdb.py +0 -1731
  517. package/lib/python3.9/pickle.py +0 -1817
  518. package/lib/python3.9/pickletools.py +0 -2890
  519. package/lib/python3.9/pipes.py +0 -247
  520. package/lib/python3.9/pkgutil.py +0 -707
  521. package/lib/python3.9/platform.py +0 -1259
  522. package/lib/python3.9/plistlib.py +0 -881
  523. package/lib/python3.9/poplib.py +0 -483
  524. package/lib/python3.9/posixpath.py +0 -525
  525. package/lib/python3.9/pprint.py +0 -638
  526. package/lib/python3.9/profile.py +0 -600
  527. package/lib/python3.9/pstats.py +0 -779
  528. package/lib/python3.9/pty.py +0 -172
  529. package/lib/python3.9/py_compile.py +0 -215
  530. package/lib/python3.9/pyclbr.py +0 -404
  531. package/lib/python3.9/pydoc.py +0 -2855
  532. package/lib/python3.9/pydoc_data/__init__.py +0 -0
  533. package/lib/python3.9/pydoc_data/_pydoc.css +0 -6
  534. package/lib/python3.9/pydoc_data/topics.py +0 -13968
  535. package/lib/python3.9/queue.py +0 -326
  536. package/lib/python3.9/quopri.py +0 -242
  537. package/lib/python3.9/random.py +0 -887
  538. package/lib/python3.9/re.py +0 -384
  539. package/lib/python3.9/reprlib.py +0 -161
  540. package/lib/python3.9/rlcompleter.py +0 -205
  541. package/lib/python3.9/runpy.py +0 -300
  542. package/lib/python3.9/sched.py +0 -167
  543. package/lib/python3.9/secrets.py +0 -72
  544. package/lib/python3.9/selectors.py +0 -619
  545. package/lib/python3.9/shelve.py +0 -243
  546. package/lib/python3.9/shlex.py +0 -350
  547. package/lib/python3.9/shutil.py +0 -1443
  548. package/lib/python3.9/signal.py +0 -85
  549. package/lib/python3.9/site.py +0 -643
  550. package/lib/python3.9/smtpd.py +0 -967
  551. package/lib/python3.9/smtplib.py +0 -1123
  552. package/lib/python3.9/sndhdr.py +0 -257
  553. package/lib/python3.9/socket.py +0 -958
  554. package/lib/python3.9/socketserver.py +0 -817
  555. package/lib/python3.9/sqlite3/__init__.py +0 -23
  556. package/lib/python3.9/sqlite3/dbapi2.py +0 -89
  557. package/lib/python3.9/sqlite3/dump.py +0 -70
  558. package/lib/python3.9/sre_compile.py +0 -784
  559. package/lib/python3.9/sre_constants.py +0 -259
  560. package/lib/python3.9/sre_parse.py +0 -1064
  561. package/lib/python3.9/ssl.py +0 -1489
  562. package/lib/python3.9/stat.py +0 -195
  563. package/lib/python3.9/statistics.py +0 -1120
  564. package/lib/python3.9/string.py +0 -280
  565. package/lib/python3.9/stringprep.py +0 -272
  566. package/lib/python3.9/struct.py +0 -15
  567. package/lib/python3.9/subprocess.py +0 -2074
  568. package/lib/python3.9/sunau.py +0 -526
  569. package/lib/python3.9/symbol.py +0 -122
  570. package/lib/python3.9/symtable.py +0 -243
  571. package/lib/python3.9/sysconfig.py +0 -720
  572. package/lib/python3.9/tabnanny.py +0 -333
  573. package/lib/python3.9/tarfile.py +0 -2576
  574. package/lib/python3.9/telnetlib.py +0 -677
  575. package/lib/python3.9/tempfile.py +0 -832
  576. package/lib/python3.9/textwrap.py +0 -486
  577. package/lib/python3.9/this.py +0 -28
  578. package/lib/python3.9/threading.py +0 -1502
  579. package/lib/python3.9/timeit.py +0 -375
  580. package/lib/python3.9/token.py +0 -136
  581. package/lib/python3.9/tokenize.py +0 -682
  582. package/lib/python3.9/trace.py +0 -740
  583. package/lib/python3.9/traceback.py +0 -623
  584. package/lib/python3.9/tracemalloc.py +0 -560
  585. package/lib/python3.9/tty.py +0 -36
  586. package/lib/python3.9/turtle.py +0 -4140
  587. package/lib/python3.9/types.py +0 -299
  588. package/lib/python3.9/typing.py +0 -2147
  589. package/lib/python3.9/unittest/__init__.py +0 -95
  590. package/lib/python3.9/unittest/__main__.py +0 -18
  591. package/lib/python3.9/unittest/_log.py +0 -69
  592. package/lib/python3.9/unittest/async_case.py +0 -160
  593. package/lib/python3.9/unittest/case.py +0 -1437
  594. package/lib/python3.9/unittest/loader.py +0 -517
  595. package/lib/python3.9/unittest/main.py +0 -275
  596. package/lib/python3.9/unittest/mock.py +0 -2891
  597. package/lib/python3.9/unittest/result.py +0 -216
  598. package/lib/python3.9/unittest/runner.py +0 -221
  599. package/lib/python3.9/unittest/signals.py +0 -71
  600. package/lib/python3.9/unittest/suite.py +0 -361
  601. package/lib/python3.9/unittest/util.py +0 -170
  602. package/lib/python3.9/urllib/__init__.py +0 -0
  603. package/lib/python3.9/urllib/error.py +0 -77
  604. package/lib/python3.9/urllib/parse.py +0 -1179
  605. package/lib/python3.9/urllib/request.py +0 -2765
  606. package/lib/python3.9/urllib/response.py +0 -84
  607. package/lib/python3.9/urllib/robotparser.py +0 -273
  608. package/lib/python3.9/uu.py +0 -206
  609. package/lib/python3.9/uuid.py +0 -728
  610. package/lib/python3.9/venv/__init__.py +0 -504
  611. package/lib/python3.9/venv/__main__.py +0 -10
  612. package/lib/python3.9/venv/scripts/common/Activate.ps1 +0 -241
  613. package/lib/python3.9/venv/scripts/common/activate +0 -66
  614. package/lib/python3.9/venv/scripts/posix/activate.csh +0 -25
  615. package/lib/python3.9/venv/scripts/posix/activate.fish +0 -64
  616. package/lib/python3.9/warnings.py +0 -549
  617. package/lib/python3.9/wave.py +0 -513
  618. package/lib/python3.9/weakref.py +0 -664
  619. package/lib/python3.9/webbrowser.py +0 -713
  620. package/lib/python3.9/wsgiref/__init__.py +0 -23
  621. package/lib/python3.9/wsgiref/handlers.py +0 -571
  622. package/lib/python3.9/wsgiref/headers.py +0 -184
  623. package/lib/python3.9/wsgiref/simple_server.py +0 -165
  624. package/lib/python3.9/wsgiref/util.py +0 -172
  625. package/lib/python3.9/wsgiref/validate.py +0 -441
  626. package/lib/python3.9/xdrlib.py +0 -241
  627. package/lib/python3.9/xml/__init__.py +0 -20
  628. package/lib/python3.9/xml/dom/NodeFilter.py +0 -27
  629. package/lib/python3.9/xml/dom/__init__.py +0 -140
  630. package/lib/python3.9/xml/dom/domreg.py +0 -99
  631. package/lib/python3.9/xml/dom/expatbuilder.py +0 -965
  632. package/lib/python3.9/xml/dom/minicompat.py +0 -109
  633. package/lib/python3.9/xml/dom/minidom.py +0 -2011
  634. package/lib/python3.9/xml/dom/pulldom.py +0 -349
  635. package/lib/python3.9/xml/dom/xmlbuilder.py +0 -387
  636. package/lib/python3.9/xml/etree/ElementInclude.py +0 -185
  637. package/lib/python3.9/xml/etree/ElementPath.py +0 -405
  638. package/lib/python3.9/xml/etree/ElementTree.py +0 -2085
  639. package/lib/python3.9/xml/etree/__init__.py +0 -33
  640. package/lib/python3.9/xml/etree/cElementTree.py +0 -3
  641. package/lib/python3.9/xml/parsers/__init__.py +0 -8
  642. package/lib/python3.9/xml/parsers/expat.py +0 -8
  643. package/lib/python3.9/xml/sax/__init__.py +0 -107
  644. package/lib/python3.9/xml/sax/_exceptions.py +0 -131
  645. package/lib/python3.9/xml/sax/expatreader.py +0 -446
  646. package/lib/python3.9/xml/sax/handler.py +0 -342
  647. package/lib/python3.9/xml/sax/saxutils.py +0 -369
  648. package/lib/python3.9/xml/sax/xmlreader.py +0 -380
  649. package/lib/python3.9/xmlrpc/__init__.py +0 -1
  650. package/lib/python3.9/xmlrpc/client.py +0 -1524
  651. package/lib/python3.9/xmlrpc/server.py +0 -993
  652. package/lib/python3.9/zipapp.py +0 -206
  653. package/lib/python3.9/zipfile.py +0 -2426
  654. package/lib/python3.9/zipimport.py +0 -792
  655. package/lib/python3.9/zoneinfo/__init__.py +0 -31
  656. package/lib/python3.9/zoneinfo/_common.py +0 -165
  657. package/lib/python3.9/zoneinfo/_tzpath.py +0 -175
  658. package/lib/python3.9/zoneinfo/_zoneinfo.py +0 -752
  659. package/runtime.json +0 -1
  660. package/ssl/cacert.pem +0 -3959
@@ -1,1363 +0,0 @@
1
- """Configuration file parser.
2
-
3
- A configuration file consists of sections, lead by a "[section]" header,
4
- and followed by "name: value" entries, with continuations and such in
5
- the style of RFC 822.
6
-
7
- Intrinsic defaults can be specified by passing them into the
8
- ConfigParser constructor as a dictionary.
9
-
10
- class:
11
-
12
- ConfigParser -- responsible for parsing a list of
13
- configuration files, and managing the parsed database.
14
-
15
- methods:
16
-
17
- __init__(defaults=None, dict_type=_default_dict, allow_no_value=False,
18
- delimiters=('=', ':'), comment_prefixes=('#', ';'),
19
- inline_comment_prefixes=None, strict=True,
20
- empty_lines_in_values=True, default_section='DEFAULT',
21
- interpolation=<unset>, converters=<unset>):
22
- Create the parser. When `defaults' is given, it is initialized into the
23
- dictionary or intrinsic defaults. The keys must be strings, the values
24
- must be appropriate for %()s string interpolation.
25
-
26
- When `dict_type' is given, it will be used to create the dictionary
27
- objects for the list of sections, for the options within a section, and
28
- for the default values.
29
-
30
- When `delimiters' is given, it will be used as the set of substrings
31
- that divide keys from values.
32
-
33
- When `comment_prefixes' is given, it will be used as the set of
34
- substrings that prefix comments in empty lines. Comments can be
35
- indented.
36
-
37
- When `inline_comment_prefixes' is given, it will be used as the set of
38
- substrings that prefix comments in non-empty lines.
39
-
40
- When `strict` is True, the parser won't allow for any section or option
41
- duplicates while reading from a single source (file, string or
42
- dictionary). Default is True.
43
-
44
- When `empty_lines_in_values' is False (default: True), each empty line
45
- marks the end of an option. Otherwise, internal empty lines of
46
- a multiline option are kept as part of the value.
47
-
48
- When `allow_no_value' is True (default: False), options without
49
- values are accepted; the value presented for these is None.
50
-
51
- When `default_section' is given, the name of the special section is
52
- named accordingly. By default it is called ``"DEFAULT"`` but this can
53
- be customized to point to any other valid section name. Its current
54
- value can be retrieved using the ``parser_instance.default_section``
55
- attribute and may be modified at runtime.
56
-
57
- When `interpolation` is given, it should be an Interpolation subclass
58
- instance. It will be used as the handler for option value
59
- pre-processing when using getters. RawConfigParser objects don't do
60
- any sort of interpolation, whereas ConfigParser uses an instance of
61
- BasicInterpolation. The library also provides a ``zc.buildbot``
62
- inspired ExtendedInterpolation implementation.
63
-
64
- When `converters` is given, it should be a dictionary where each key
65
- represents the name of a type converter and each value is a callable
66
- implementing the conversion from string to the desired datatype. Every
67
- converter gets its corresponding get*() method on the parser object and
68
- section proxies.
69
-
70
- sections()
71
- Return all the configuration section names, sans DEFAULT.
72
-
73
- has_section(section)
74
- Return whether the given section exists.
75
-
76
- has_option(section, option)
77
- Return whether the given option exists in the given section.
78
-
79
- options(section)
80
- Return list of configuration options for the named section.
81
-
82
- read(filenames, encoding=None)
83
- Read and parse the iterable of named configuration files, given by
84
- name. A single filename is also allowed. Non-existing files
85
- are ignored. Return list of successfully read files.
86
-
87
- read_file(f, filename=None)
88
- Read and parse one configuration file, given as a file object.
89
- The filename defaults to f.name; it is only used in error
90
- messages (if f has no `name' attribute, the string `<???>' is used).
91
-
92
- read_string(string)
93
- Read configuration from a given string.
94
-
95
- read_dict(dictionary)
96
- Read configuration from a dictionary. Keys are section names,
97
- values are dictionaries with keys and values that should be present
98
- in the section. If the used dictionary type preserves order, sections
99
- and their keys will be added in order. Values are automatically
100
- converted to strings.
101
-
102
- get(section, option, raw=False, vars=None, fallback=_UNSET)
103
- Return a string value for the named option. All % interpolations are
104
- expanded in the return values, based on the defaults passed into the
105
- constructor and the DEFAULT section. Additional substitutions may be
106
- provided using the `vars' argument, which must be a dictionary whose
107
- contents override any pre-existing defaults. If `option' is a key in
108
- `vars', the value from `vars' is used.
109
-
110
- getint(section, options, raw=False, vars=None, fallback=_UNSET)
111
- Like get(), but convert value to an integer.
112
-
113
- getfloat(section, options, raw=False, vars=None, fallback=_UNSET)
114
- Like get(), but convert value to a float.
115
-
116
- getboolean(section, options, raw=False, vars=None, fallback=_UNSET)
117
- Like get(), but convert value to a boolean (currently case
118
- insensitively defined as 0, false, no, off for False, and 1, true,
119
- yes, on for True). Returns False or True.
120
-
121
- items(section=_UNSET, raw=False, vars=None)
122
- If section is given, return a list of tuples with (name, value) for
123
- each option in the section. Otherwise, return a list of tuples with
124
- (section_name, section_proxy) for each section, including DEFAULTSECT.
125
-
126
- remove_section(section)
127
- Remove the given file section and all its options.
128
-
129
- remove_option(section, option)
130
- Remove the given option from the given section.
131
-
132
- set(section, option, value)
133
- Set the given option.
134
-
135
- write(fp, space_around_delimiters=True)
136
- Write the configuration state in .ini format. If
137
- `space_around_delimiters' is True (the default), delimiters
138
- between keys and values are surrounded by spaces.
139
- """
140
-
141
- from collections.abc import MutableMapping
142
- from collections import ChainMap as _ChainMap
143
- import functools
144
- import io
145
- import itertools
146
- import os
147
- import re
148
- import sys
149
- import warnings
150
-
151
- __all__ = ["NoSectionError", "DuplicateOptionError", "DuplicateSectionError",
152
- "NoOptionError", "InterpolationError", "InterpolationDepthError",
153
- "InterpolationMissingOptionError", "InterpolationSyntaxError",
154
- "ParsingError", "MissingSectionHeaderError",
155
- "ConfigParser", "SafeConfigParser", "RawConfigParser",
156
- "Interpolation", "BasicInterpolation", "ExtendedInterpolation",
157
- "LegacyInterpolation", "SectionProxy", "ConverterMapping",
158
- "DEFAULTSECT", "MAX_INTERPOLATION_DEPTH"]
159
-
160
- _default_dict = dict
161
- DEFAULTSECT = "DEFAULT"
162
-
163
- MAX_INTERPOLATION_DEPTH = 10
164
-
165
-
166
-
167
- # exception classes
168
- class Error(Exception):
169
- """Base class for ConfigParser exceptions."""
170
-
171
- def __init__(self, msg=''):
172
- self.message = msg
173
- Exception.__init__(self, msg)
174
-
175
- def __repr__(self):
176
- return self.message
177
-
178
- __str__ = __repr__
179
-
180
-
181
- class NoSectionError(Error):
182
- """Raised when no section matches a requested option."""
183
-
184
- def __init__(self, section):
185
- Error.__init__(self, 'No section: %r' % (section,))
186
- self.section = section
187
- self.args = (section, )
188
-
189
-
190
- class DuplicateSectionError(Error):
191
- """Raised when a section is repeated in an input source.
192
-
193
- Possible repetitions that raise this exception are: multiple creation
194
- using the API or in strict parsers when a section is found more than once
195
- in a single input file, string or dictionary.
196
- """
197
-
198
- def __init__(self, section, source=None, lineno=None):
199
- msg = [repr(section), " already exists"]
200
- if source is not None:
201
- message = ["While reading from ", repr(source)]
202
- if lineno is not None:
203
- message.append(" [line {0:2d}]".format(lineno))
204
- message.append(": section ")
205
- message.extend(msg)
206
- msg = message
207
- else:
208
- msg.insert(0, "Section ")
209
- Error.__init__(self, "".join(msg))
210
- self.section = section
211
- self.source = source
212
- self.lineno = lineno
213
- self.args = (section, source, lineno)
214
-
215
-
216
- class DuplicateOptionError(Error):
217
- """Raised by strict parsers when an option is repeated in an input source.
218
-
219
- Current implementation raises this exception only when an option is found
220
- more than once in a single file, string or dictionary.
221
- """
222
-
223
- def __init__(self, section, option, source=None, lineno=None):
224
- msg = [repr(option), " in section ", repr(section),
225
- " already exists"]
226
- if source is not None:
227
- message = ["While reading from ", repr(source)]
228
- if lineno is not None:
229
- message.append(" [line {0:2d}]".format(lineno))
230
- message.append(": option ")
231
- message.extend(msg)
232
- msg = message
233
- else:
234
- msg.insert(0, "Option ")
235
- Error.__init__(self, "".join(msg))
236
- self.section = section
237
- self.option = option
238
- self.source = source
239
- self.lineno = lineno
240
- self.args = (section, option, source, lineno)
241
-
242
-
243
- class NoOptionError(Error):
244
- """A requested option was not found."""
245
-
246
- def __init__(self, option, section):
247
- Error.__init__(self, "No option %r in section: %r" %
248
- (option, section))
249
- self.option = option
250
- self.section = section
251
- self.args = (option, section)
252
-
253
-
254
- class InterpolationError(Error):
255
- """Base class for interpolation-related exceptions."""
256
-
257
- def __init__(self, option, section, msg):
258
- Error.__init__(self, msg)
259
- self.option = option
260
- self.section = section
261
- self.args = (option, section, msg)
262
-
263
-
264
- class InterpolationMissingOptionError(InterpolationError):
265
- """A string substitution required a setting which was not available."""
266
-
267
- def __init__(self, option, section, rawval, reference):
268
- msg = ("Bad value substitution: option {!r} in section {!r} contains "
269
- "an interpolation key {!r} which is not a valid option name. "
270
- "Raw value: {!r}".format(option, section, reference, rawval))
271
- InterpolationError.__init__(self, option, section, msg)
272
- self.reference = reference
273
- self.args = (option, section, rawval, reference)
274
-
275
-
276
- class InterpolationSyntaxError(InterpolationError):
277
- """Raised when the source text contains invalid syntax.
278
-
279
- Current implementation raises this exception when the source text into
280
- which substitutions are made does not conform to the required syntax.
281
- """
282
-
283
-
284
- class InterpolationDepthError(InterpolationError):
285
- """Raised when substitutions are nested too deeply."""
286
-
287
- def __init__(self, option, section, rawval):
288
- msg = ("Recursion limit exceeded in value substitution: option {!r} "
289
- "in section {!r} contains an interpolation key which "
290
- "cannot be substituted in {} steps. Raw value: {!r}"
291
- "".format(option, section, MAX_INTERPOLATION_DEPTH,
292
- rawval))
293
- InterpolationError.__init__(self, option, section, msg)
294
- self.args = (option, section, rawval)
295
-
296
-
297
- class ParsingError(Error):
298
- """Raised when a configuration file does not follow legal syntax."""
299
-
300
- def __init__(self, source=None, filename=None):
301
- # Exactly one of `source'/`filename' arguments has to be given.
302
- # `filename' kept for compatibility.
303
- if filename and source:
304
- raise ValueError("Cannot specify both `filename' and `source'. "
305
- "Use `source'.")
306
- elif not filename and not source:
307
- raise ValueError("Required argument `source' not given.")
308
- elif filename:
309
- source = filename
310
- Error.__init__(self, 'Source contains parsing errors: %r' % source)
311
- self.source = source
312
- self.errors = []
313
- self.args = (source, )
314
-
315
- @property
316
- def filename(self):
317
- """Deprecated, use `source'."""
318
- warnings.warn(
319
- "The 'filename' attribute will be removed in future versions. "
320
- "Use 'source' instead.",
321
- DeprecationWarning, stacklevel=2
322
- )
323
- return self.source
324
-
325
- @filename.setter
326
- def filename(self, value):
327
- """Deprecated, user `source'."""
328
- warnings.warn(
329
- "The 'filename' attribute will be removed in future versions. "
330
- "Use 'source' instead.",
331
- DeprecationWarning, stacklevel=2
332
- )
333
- self.source = value
334
-
335
- def append(self, lineno, line):
336
- self.errors.append((lineno, line))
337
- self.message += '\n\t[line %2d]: %s' % (lineno, line)
338
-
339
-
340
- class MissingSectionHeaderError(ParsingError):
341
- """Raised when a key-value pair is found before any section header."""
342
-
343
- def __init__(self, filename, lineno, line):
344
- Error.__init__(
345
- self,
346
- 'File contains no section headers.\nfile: %r, line: %d\n%r' %
347
- (filename, lineno, line))
348
- self.source = filename
349
- self.lineno = lineno
350
- self.line = line
351
- self.args = (filename, lineno, line)
352
-
353
-
354
- # Used in parser getters to indicate the default behaviour when a specific
355
- # option is not found it to raise an exception. Created to enable `None' as
356
- # a valid fallback value.
357
- _UNSET = object()
358
-
359
-
360
- class Interpolation:
361
- """Dummy interpolation that passes the value through with no changes."""
362
-
363
- def before_get(self, parser, section, option, value, defaults):
364
- return value
365
-
366
- def before_set(self, parser, section, option, value):
367
- return value
368
-
369
- def before_read(self, parser, section, option, value):
370
- return value
371
-
372
- def before_write(self, parser, section, option, value):
373
- return value
374
-
375
-
376
- class BasicInterpolation(Interpolation):
377
- """Interpolation as implemented in the classic ConfigParser.
378
-
379
- The option values can contain format strings which refer to other values in
380
- the same section, or values in the special default section.
381
-
382
- For example:
383
-
384
- something: %(dir)s/whatever
385
-
386
- would resolve the "%(dir)s" to the value of dir. All reference
387
- expansions are done late, on demand. If a user needs to use a bare % in
388
- a configuration file, she can escape it by writing %%. Other % usage
389
- is considered a user error and raises `InterpolationSyntaxError'."""
390
-
391
- _KEYCRE = re.compile(r"%\(([^)]+)\)s")
392
-
393
- def before_get(self, parser, section, option, value, defaults):
394
- L = []
395
- self._interpolate_some(parser, option, L, value, section, defaults, 1)
396
- return ''.join(L)
397
-
398
- def before_set(self, parser, section, option, value):
399
- tmp_value = value.replace('%%', '') # escaped percent signs
400
- tmp_value = self._KEYCRE.sub('', tmp_value) # valid syntax
401
- if '%' in tmp_value:
402
- raise ValueError("invalid interpolation syntax in %r at "
403
- "position %d" % (value, tmp_value.find('%')))
404
- return value
405
-
406
- def _interpolate_some(self, parser, option, accum, rest, section, map,
407
- depth):
408
- rawval = parser.get(section, option, raw=True, fallback=rest)
409
- if depth > MAX_INTERPOLATION_DEPTH:
410
- raise InterpolationDepthError(option, section, rawval)
411
- while rest:
412
- p = rest.find("%")
413
- if p < 0:
414
- accum.append(rest)
415
- return
416
- if p > 0:
417
- accum.append(rest[:p])
418
- rest = rest[p:]
419
- # p is no longer used
420
- c = rest[1:2]
421
- if c == "%":
422
- accum.append("%")
423
- rest = rest[2:]
424
- elif c == "(":
425
- m = self._KEYCRE.match(rest)
426
- if m is None:
427
- raise InterpolationSyntaxError(option, section,
428
- "bad interpolation variable reference %r" % rest)
429
- var = parser.optionxform(m.group(1))
430
- rest = rest[m.end():]
431
- try:
432
- v = map[var]
433
- except KeyError:
434
- raise InterpolationMissingOptionError(
435
- option, section, rawval, var) from None
436
- if "%" in v:
437
- self._interpolate_some(parser, option, accum, v,
438
- section, map, depth + 1)
439
- else:
440
- accum.append(v)
441
- else:
442
- raise InterpolationSyntaxError(
443
- option, section,
444
- "'%%' must be followed by '%%' or '(', "
445
- "found: %r" % (rest,))
446
-
447
-
448
- class ExtendedInterpolation(Interpolation):
449
- """Advanced variant of interpolation, supports the syntax used by
450
- `zc.buildout'. Enables interpolation between sections."""
451
-
452
- _KEYCRE = re.compile(r"\$\{([^}]+)\}")
453
-
454
- def before_get(self, parser, section, option, value, defaults):
455
- L = []
456
- self._interpolate_some(parser, option, L, value, section, defaults, 1)
457
- return ''.join(L)
458
-
459
- def before_set(self, parser, section, option, value):
460
- tmp_value = value.replace('$$', '') # escaped dollar signs
461
- tmp_value = self._KEYCRE.sub('', tmp_value) # valid syntax
462
- if '$' in tmp_value:
463
- raise ValueError("invalid interpolation syntax in %r at "
464
- "position %d" % (value, tmp_value.find('$')))
465
- return value
466
-
467
- def _interpolate_some(self, parser, option, accum, rest, section, map,
468
- depth):
469
- rawval = parser.get(section, option, raw=True, fallback=rest)
470
- if depth > MAX_INTERPOLATION_DEPTH:
471
- raise InterpolationDepthError(option, section, rawval)
472
- while rest:
473
- p = rest.find("$")
474
- if p < 0:
475
- accum.append(rest)
476
- return
477
- if p > 0:
478
- accum.append(rest[:p])
479
- rest = rest[p:]
480
- # p is no longer used
481
- c = rest[1:2]
482
- if c == "$":
483
- accum.append("$")
484
- rest = rest[2:]
485
- elif c == "{":
486
- m = self._KEYCRE.match(rest)
487
- if m is None:
488
- raise InterpolationSyntaxError(option, section,
489
- "bad interpolation variable reference %r" % rest)
490
- path = m.group(1).split(':')
491
- rest = rest[m.end():]
492
- sect = section
493
- opt = option
494
- try:
495
- if len(path) == 1:
496
- opt = parser.optionxform(path[0])
497
- v = map[opt]
498
- elif len(path) == 2:
499
- sect = path[0]
500
- opt = parser.optionxform(path[1])
501
- v = parser.get(sect, opt, raw=True)
502
- else:
503
- raise InterpolationSyntaxError(
504
- option, section,
505
- "More than one ':' found: %r" % (rest,))
506
- except (KeyError, NoSectionError, NoOptionError):
507
- raise InterpolationMissingOptionError(
508
- option, section, rawval, ":".join(path)) from None
509
- if "$" in v:
510
- self._interpolate_some(parser, opt, accum, v, sect,
511
- dict(parser.items(sect, raw=True)),
512
- depth + 1)
513
- else:
514
- accum.append(v)
515
- else:
516
- raise InterpolationSyntaxError(
517
- option, section,
518
- "'$' must be followed by '$' or '{', "
519
- "found: %r" % (rest,))
520
-
521
-
522
- class LegacyInterpolation(Interpolation):
523
- """Deprecated interpolation used in old versions of ConfigParser.
524
- Use BasicInterpolation or ExtendedInterpolation instead."""
525
-
526
- _KEYCRE = re.compile(r"%\(([^)]*)\)s|.")
527
-
528
- def before_get(self, parser, section, option, value, vars):
529
- rawval = value
530
- depth = MAX_INTERPOLATION_DEPTH
531
- while depth: # Loop through this until it's done
532
- depth -= 1
533
- if value and "%(" in value:
534
- replace = functools.partial(self._interpolation_replace,
535
- parser=parser)
536
- value = self._KEYCRE.sub(replace, value)
537
- try:
538
- value = value % vars
539
- except KeyError as e:
540
- raise InterpolationMissingOptionError(
541
- option, section, rawval, e.args[0]) from None
542
- else:
543
- break
544
- if value and "%(" in value:
545
- raise InterpolationDepthError(option, section, rawval)
546
- return value
547
-
548
- def before_set(self, parser, section, option, value):
549
- return value
550
-
551
- @staticmethod
552
- def _interpolation_replace(match, parser):
553
- s = match.group(1)
554
- if s is None:
555
- return match.group()
556
- else:
557
- return "%%(%s)s" % parser.optionxform(s)
558
-
559
-
560
- class RawConfigParser(MutableMapping):
561
- """ConfigParser that does not do interpolation."""
562
-
563
- # Regular expressions for parsing section headers and options
564
- _SECT_TMPL = r"""
565
- \[ # [
566
- (?P<header>[^]]+) # very permissive!
567
- \] # ]
568
- """
569
- _OPT_TMPL = r"""
570
- (?P<option>.*?) # very permissive!
571
- \s*(?P<vi>{delim})\s* # any number of space/tab,
572
- # followed by any of the
573
- # allowed delimiters,
574
- # followed by any space/tab
575
- (?P<value>.*)$ # everything up to eol
576
- """
577
- _OPT_NV_TMPL = r"""
578
- (?P<option>.*?) # very permissive!
579
- \s*(?: # any number of space/tab,
580
- (?P<vi>{delim})\s* # optionally followed by
581
- # any of the allowed
582
- # delimiters, followed by any
583
- # space/tab
584
- (?P<value>.*))?$ # everything up to eol
585
- """
586
- # Interpolation algorithm to be used if the user does not specify another
587
- _DEFAULT_INTERPOLATION = Interpolation()
588
- # Compiled regular expression for matching sections
589
- SECTCRE = re.compile(_SECT_TMPL, re.VERBOSE)
590
- # Compiled regular expression for matching options with typical separators
591
- OPTCRE = re.compile(_OPT_TMPL.format(delim="=|:"), re.VERBOSE)
592
- # Compiled regular expression for matching options with optional values
593
- # delimited using typical separators
594
- OPTCRE_NV = re.compile(_OPT_NV_TMPL.format(delim="=|:"), re.VERBOSE)
595
- # Compiled regular expression for matching leading whitespace in a line
596
- NONSPACECRE = re.compile(r"\S")
597
- # Possible boolean values in the configuration.
598
- BOOLEAN_STATES = {'1': True, 'yes': True, 'true': True, 'on': True,
599
- '0': False, 'no': False, 'false': False, 'off': False}
600
-
601
- def __init__(self, defaults=None, dict_type=_default_dict,
602
- allow_no_value=False, *, delimiters=('=', ':'),
603
- comment_prefixes=('#', ';'), inline_comment_prefixes=None,
604
- strict=True, empty_lines_in_values=True,
605
- default_section=DEFAULTSECT,
606
- interpolation=_UNSET, converters=_UNSET):
607
-
608
- self._dict = dict_type
609
- self._sections = self._dict()
610
- self._defaults = self._dict()
611
- self._converters = ConverterMapping(self)
612
- self._proxies = self._dict()
613
- self._proxies[default_section] = SectionProxy(self, default_section)
614
- self._delimiters = tuple(delimiters)
615
- if delimiters == ('=', ':'):
616
- self._optcre = self.OPTCRE_NV if allow_no_value else self.OPTCRE
617
- else:
618
- d = "|".join(re.escape(d) for d in delimiters)
619
- if allow_no_value:
620
- self._optcre = re.compile(self._OPT_NV_TMPL.format(delim=d),
621
- re.VERBOSE)
622
- else:
623
- self._optcre = re.compile(self._OPT_TMPL.format(delim=d),
624
- re.VERBOSE)
625
- self._comment_prefixes = tuple(comment_prefixes or ())
626
- self._inline_comment_prefixes = tuple(inline_comment_prefixes or ())
627
- self._strict = strict
628
- self._allow_no_value = allow_no_value
629
- self._empty_lines_in_values = empty_lines_in_values
630
- self.default_section=default_section
631
- self._interpolation = interpolation
632
- if self._interpolation is _UNSET:
633
- self._interpolation = self._DEFAULT_INTERPOLATION
634
- if self._interpolation is None:
635
- self._interpolation = Interpolation()
636
- if converters is not _UNSET:
637
- self._converters.update(converters)
638
- if defaults:
639
- self._read_defaults(defaults)
640
-
641
- def defaults(self):
642
- return self._defaults
643
-
644
- def sections(self):
645
- """Return a list of section names, excluding [DEFAULT]"""
646
- # self._sections will never have [DEFAULT] in it
647
- return list(self._sections.keys())
648
-
649
- def add_section(self, section):
650
- """Create a new section in the configuration.
651
-
652
- Raise DuplicateSectionError if a section by the specified name
653
- already exists. Raise ValueError if name is DEFAULT.
654
- """
655
- if section == self.default_section:
656
- raise ValueError('Invalid section name: %r' % section)
657
-
658
- if section in self._sections:
659
- raise DuplicateSectionError(section)
660
- self._sections[section] = self._dict()
661
- self._proxies[section] = SectionProxy(self, section)
662
-
663
- def has_section(self, section):
664
- """Indicate whether the named section is present in the configuration.
665
-
666
- The DEFAULT section is not acknowledged.
667
- """
668
- return section in self._sections
669
-
670
- def options(self, section):
671
- """Return a list of option names for the given section name."""
672
- try:
673
- opts = self._sections[section].copy()
674
- except KeyError:
675
- raise NoSectionError(section) from None
676
- opts.update(self._defaults)
677
- return list(opts.keys())
678
-
679
- def read(self, filenames, encoding=None):
680
- """Read and parse a filename or an iterable of filenames.
681
-
682
- Files that cannot be opened are silently ignored; this is
683
- designed so that you can specify an iterable of potential
684
- configuration file locations (e.g. current directory, user's
685
- home directory, systemwide directory), and all existing
686
- configuration files in the iterable will be read. A single
687
- filename may also be given.
688
-
689
- Return list of successfully read files.
690
- """
691
- if isinstance(filenames, (str, bytes, os.PathLike)):
692
- filenames = [filenames]
693
- read_ok = []
694
- for filename in filenames:
695
- try:
696
- with open(filename, encoding=encoding) as fp:
697
- self._read(fp, filename)
698
- except OSError:
699
- continue
700
- if isinstance(filename, os.PathLike):
701
- filename = os.fspath(filename)
702
- read_ok.append(filename)
703
- return read_ok
704
-
705
- def read_file(self, f, source=None):
706
- """Like read() but the argument must be a file-like object.
707
-
708
- The `f' argument must be iterable, returning one line at a time.
709
- Optional second argument is the `source' specifying the name of the
710
- file being read. If not given, it is taken from f.name. If `f' has no
711
- `name' attribute, `<???>' is used.
712
- """
713
- if source is None:
714
- try:
715
- source = f.name
716
- except AttributeError:
717
- source = '<???>'
718
- self._read(f, source)
719
-
720
- def read_string(self, string, source='<string>'):
721
- """Read configuration from a given string."""
722
- sfile = io.StringIO(string)
723
- self.read_file(sfile, source)
724
-
725
- def read_dict(self, dictionary, source='<dict>'):
726
- """Read configuration from a dictionary.
727
-
728
- Keys are section names, values are dictionaries with keys and values
729
- that should be present in the section. If the used dictionary type
730
- preserves order, sections and their keys will be added in order.
731
-
732
- All types held in the dictionary are converted to strings during
733
- reading, including section names, option names and keys.
734
-
735
- Optional second argument is the `source' specifying the name of the
736
- dictionary being read.
737
- """
738
- elements_added = set()
739
- for section, keys in dictionary.items():
740
- section = str(section)
741
- try:
742
- self.add_section(section)
743
- except (DuplicateSectionError, ValueError):
744
- if self._strict and section in elements_added:
745
- raise
746
- elements_added.add(section)
747
- for key, value in keys.items():
748
- key = self.optionxform(str(key))
749
- if value is not None:
750
- value = str(value)
751
- if self._strict and (section, key) in elements_added:
752
- raise DuplicateOptionError(section, key, source)
753
- elements_added.add((section, key))
754
- self.set(section, key, value)
755
-
756
- def readfp(self, fp, filename=None):
757
- """Deprecated, use read_file instead."""
758
- warnings.warn(
759
- "This method will be removed in future versions. "
760
- "Use 'parser.read_file()' instead.",
761
- DeprecationWarning, stacklevel=2
762
- )
763
- self.read_file(fp, source=filename)
764
-
765
- def get(self, section, option, *, raw=False, vars=None, fallback=_UNSET):
766
- """Get an option value for a given section.
767
-
768
- If `vars' is provided, it must be a dictionary. The option is looked up
769
- in `vars' (if provided), `section', and in `DEFAULTSECT' in that order.
770
- If the key is not found and `fallback' is provided, it is used as
771
- a fallback value. `None' can be provided as a `fallback' value.
772
-
773
- If interpolation is enabled and the optional argument `raw' is False,
774
- all interpolations are expanded in the return values.
775
-
776
- Arguments `raw', `vars', and `fallback' are keyword only.
777
-
778
- The section DEFAULT is special.
779
- """
780
- try:
781
- d = self._unify_values(section, vars)
782
- except NoSectionError:
783
- if fallback is _UNSET:
784
- raise
785
- else:
786
- return fallback
787
- option = self.optionxform(option)
788
- try:
789
- value = d[option]
790
- except KeyError:
791
- if fallback is _UNSET:
792
- raise NoOptionError(option, section)
793
- else:
794
- return fallback
795
-
796
- if raw or value is None:
797
- return value
798
- else:
799
- return self._interpolation.before_get(self, section, option, value,
800
- d)
801
-
802
- def _get(self, section, conv, option, **kwargs):
803
- return conv(self.get(section, option, **kwargs))
804
-
805
- def _get_conv(self, section, option, conv, *, raw=False, vars=None,
806
- fallback=_UNSET, **kwargs):
807
- try:
808
- return self._get(section, conv, option, raw=raw, vars=vars,
809
- **kwargs)
810
- except (NoSectionError, NoOptionError):
811
- if fallback is _UNSET:
812
- raise
813
- return fallback
814
-
815
- # getint, getfloat and getboolean provided directly for backwards compat
816
- def getint(self, section, option, *, raw=False, vars=None,
817
- fallback=_UNSET, **kwargs):
818
- return self._get_conv(section, option, int, raw=raw, vars=vars,
819
- fallback=fallback, **kwargs)
820
-
821
- def getfloat(self, section, option, *, raw=False, vars=None,
822
- fallback=_UNSET, **kwargs):
823
- return self._get_conv(section, option, float, raw=raw, vars=vars,
824
- fallback=fallback, **kwargs)
825
-
826
- def getboolean(self, section, option, *, raw=False, vars=None,
827
- fallback=_UNSET, **kwargs):
828
- return self._get_conv(section, option, self._convert_to_boolean,
829
- raw=raw, vars=vars, fallback=fallback, **kwargs)
830
-
831
- def items(self, section=_UNSET, raw=False, vars=None):
832
- """Return a list of (name, value) tuples for each option in a section.
833
-
834
- All % interpolations are expanded in the return values, based on the
835
- defaults passed into the constructor, unless the optional argument
836
- `raw' is true. Additional substitutions may be provided using the
837
- `vars' argument, which must be a dictionary whose contents overrides
838
- any pre-existing defaults.
839
-
840
- The section DEFAULT is special.
841
- """
842
- if section is _UNSET:
843
- return super().items()
844
- d = self._defaults.copy()
845
- try:
846
- d.update(self._sections[section])
847
- except KeyError:
848
- if section != self.default_section:
849
- raise NoSectionError(section)
850
- orig_keys = list(d.keys())
851
- # Update with the entry specific variables
852
- if vars:
853
- for key, value in vars.items():
854
- d[self.optionxform(key)] = value
855
- value_getter = lambda option: self._interpolation.before_get(self,
856
- section, option, d[option], d)
857
- if raw:
858
- value_getter = lambda option: d[option]
859
- return [(option, value_getter(option)) for option in orig_keys]
860
-
861
- def popitem(self):
862
- """Remove a section from the parser and return it as
863
- a (section_name, section_proxy) tuple. If no section is present, raise
864
- KeyError.
865
-
866
- The section DEFAULT is never returned because it cannot be removed.
867
- """
868
- for key in self.sections():
869
- value = self[key]
870
- del self[key]
871
- return key, value
872
- raise KeyError
873
-
874
- def optionxform(self, optionstr):
875
- return optionstr.lower()
876
-
877
- def has_option(self, section, option):
878
- """Check for the existence of a given option in a given section.
879
- If the specified `section' is None or an empty string, DEFAULT is
880
- assumed. If the specified `section' does not exist, returns False."""
881
- if not section or section == self.default_section:
882
- option = self.optionxform(option)
883
- return option in self._defaults
884
- elif section not in self._sections:
885
- return False
886
- else:
887
- option = self.optionxform(option)
888
- return (option in self._sections[section]
889
- or option in self._defaults)
890
-
891
- def set(self, section, option, value=None):
892
- """Set an option."""
893
- if value:
894
- value = self._interpolation.before_set(self, section, option,
895
- value)
896
- if not section or section == self.default_section:
897
- sectdict = self._defaults
898
- else:
899
- try:
900
- sectdict = self._sections[section]
901
- except KeyError:
902
- raise NoSectionError(section) from None
903
- sectdict[self.optionxform(option)] = value
904
-
905
- def write(self, fp, space_around_delimiters=True):
906
- """Write an .ini-format representation of the configuration state.
907
-
908
- If `space_around_delimiters' is True (the default), delimiters
909
- between keys and values are surrounded by spaces.
910
- """
911
- if space_around_delimiters:
912
- d = " {} ".format(self._delimiters[0])
913
- else:
914
- d = self._delimiters[0]
915
- if self._defaults:
916
- self._write_section(fp, self.default_section,
917
- self._defaults.items(), d)
918
- for section in self._sections:
919
- self._write_section(fp, section,
920
- self._sections[section].items(), d)
921
-
922
- def _write_section(self, fp, section_name, section_items, delimiter):
923
- """Write a single section to the specified `fp'."""
924
- fp.write("[{}]\n".format(section_name))
925
- for key, value in section_items:
926
- value = self._interpolation.before_write(self, section_name, key,
927
- value)
928
- if value is not None or not self._allow_no_value:
929
- value = delimiter + str(value).replace('\n', '\n\t')
930
- else:
931
- value = ""
932
- fp.write("{}{}\n".format(key, value))
933
- fp.write("\n")
934
-
935
- def remove_option(self, section, option):
936
- """Remove an option."""
937
- if not section or section == self.default_section:
938
- sectdict = self._defaults
939
- else:
940
- try:
941
- sectdict = self._sections[section]
942
- except KeyError:
943
- raise NoSectionError(section) from None
944
- option = self.optionxform(option)
945
- existed = option in sectdict
946
- if existed:
947
- del sectdict[option]
948
- return existed
949
-
950
- def remove_section(self, section):
951
- """Remove a file section."""
952
- existed = section in self._sections
953
- if existed:
954
- del self._sections[section]
955
- del self._proxies[section]
956
- return existed
957
-
958
- def __getitem__(self, key):
959
- if key != self.default_section and not self.has_section(key):
960
- raise KeyError(key)
961
- return self._proxies[key]
962
-
963
- def __setitem__(self, key, value):
964
- # To conform with the mapping protocol, overwrites existing values in
965
- # the section.
966
- if key in self and self[key] is value:
967
- return
968
- # XXX this is not atomic if read_dict fails at any point. Then again,
969
- # no update method in configparser is atomic in this implementation.
970
- if key == self.default_section:
971
- self._defaults.clear()
972
- elif key in self._sections:
973
- self._sections[key].clear()
974
- self.read_dict({key: value})
975
-
976
- def __delitem__(self, key):
977
- if key == self.default_section:
978
- raise ValueError("Cannot remove the default section.")
979
- if not self.has_section(key):
980
- raise KeyError(key)
981
- self.remove_section(key)
982
-
983
- def __contains__(self, key):
984
- return key == self.default_section or self.has_section(key)
985
-
986
- def __len__(self):
987
- return len(self._sections) + 1 # the default section
988
-
989
- def __iter__(self):
990
- # XXX does it break when underlying container state changed?
991
- return itertools.chain((self.default_section,), self._sections.keys())
992
-
993
- def _read(self, fp, fpname):
994
- """Parse a sectioned configuration file.
995
-
996
- Each section in a configuration file contains a header, indicated by
997
- a name in square brackets (`[]'), plus key/value options, indicated by
998
- `name' and `value' delimited with a specific substring (`=' or `:' by
999
- default).
1000
-
1001
- Values can span multiple lines, as long as they are indented deeper
1002
- than the first line of the value. Depending on the parser's mode, blank
1003
- lines may be treated as parts of multiline values or ignored.
1004
-
1005
- Configuration files may include comments, prefixed by specific
1006
- characters (`#' and `;' by default). Comments may appear on their own
1007
- in an otherwise empty line or may be entered in lines holding values or
1008
- section names.
1009
- """
1010
- elements_added = set()
1011
- cursect = None # None, or a dictionary
1012
- sectname = None
1013
- optname = None
1014
- lineno = 0
1015
- indent_level = 0
1016
- e = None # None, or an exception
1017
- for lineno, line in enumerate(fp, start=1):
1018
- comment_start = sys.maxsize
1019
- # strip inline comments
1020
- inline_prefixes = {p: -1 for p in self._inline_comment_prefixes}
1021
- while comment_start == sys.maxsize and inline_prefixes:
1022
- next_prefixes = {}
1023
- for prefix, index in inline_prefixes.items():
1024
- index = line.find(prefix, index+1)
1025
- if index == -1:
1026
- continue
1027
- next_prefixes[prefix] = index
1028
- if index == 0 or (index > 0 and line[index-1].isspace()):
1029
- comment_start = min(comment_start, index)
1030
- inline_prefixes = next_prefixes
1031
- # strip full line comments
1032
- for prefix in self._comment_prefixes:
1033
- if line.strip().startswith(prefix):
1034
- comment_start = 0
1035
- break
1036
- if comment_start == sys.maxsize:
1037
- comment_start = None
1038
- value = line[:comment_start].strip()
1039
- if not value:
1040
- if self._empty_lines_in_values:
1041
- # add empty line to the value, but only if there was no
1042
- # comment on the line
1043
- if (comment_start is None and
1044
- cursect is not None and
1045
- optname and
1046
- cursect[optname] is not None):
1047
- cursect[optname].append('') # newlines added at join
1048
- else:
1049
- # empty line marks end of value
1050
- indent_level = sys.maxsize
1051
- continue
1052
- # continuation line?
1053
- first_nonspace = self.NONSPACECRE.search(line)
1054
- cur_indent_level = first_nonspace.start() if first_nonspace else 0
1055
- if (cursect is not None and optname and
1056
- cur_indent_level > indent_level):
1057
- cursect[optname].append(value)
1058
- # a section header or option header?
1059
- else:
1060
- indent_level = cur_indent_level
1061
- # is it a section header?
1062
- mo = self.SECTCRE.match(value)
1063
- if mo:
1064
- sectname = mo.group('header')
1065
- if sectname in self._sections:
1066
- if self._strict and sectname in elements_added:
1067
- raise DuplicateSectionError(sectname, fpname,
1068
- lineno)
1069
- cursect = self._sections[sectname]
1070
- elements_added.add(sectname)
1071
- elif sectname == self.default_section:
1072
- cursect = self._defaults
1073
- else:
1074
- cursect = self._dict()
1075
- self._sections[sectname] = cursect
1076
- self._proxies[sectname] = SectionProxy(self, sectname)
1077
- elements_added.add(sectname)
1078
- # So sections can't start with a continuation line
1079
- optname = None
1080
- # no section header in the file?
1081
- elif cursect is None:
1082
- raise MissingSectionHeaderError(fpname, lineno, line)
1083
- # an option line?
1084
- else:
1085
- mo = self._optcre.match(value)
1086
- if mo:
1087
- optname, vi, optval = mo.group('option', 'vi', 'value')
1088
- if not optname:
1089
- e = self._handle_error(e, fpname, lineno, line)
1090
- optname = self.optionxform(optname.rstrip())
1091
- if (self._strict and
1092
- (sectname, optname) in elements_added):
1093
- raise DuplicateOptionError(sectname, optname,
1094
- fpname, lineno)
1095
- elements_added.add((sectname, optname))
1096
- # This check is fine because the OPTCRE cannot
1097
- # match if it would set optval to None
1098
- if optval is not None:
1099
- optval = optval.strip()
1100
- cursect[optname] = [optval]
1101
- else:
1102
- # valueless option handling
1103
- cursect[optname] = None
1104
- else:
1105
- # a non-fatal parsing error occurred. set up the
1106
- # exception but keep going. the exception will be
1107
- # raised at the end of the file and will contain a
1108
- # list of all bogus lines
1109
- e = self._handle_error(e, fpname, lineno, line)
1110
- self._join_multiline_values()
1111
- # if any parsing errors occurred, raise an exception
1112
- if e:
1113
- raise e
1114
-
1115
- def _join_multiline_values(self):
1116
- defaults = self.default_section, self._defaults
1117
- all_sections = itertools.chain((defaults,),
1118
- self._sections.items())
1119
- for section, options in all_sections:
1120
- for name, val in options.items():
1121
- if isinstance(val, list):
1122
- val = '\n'.join(val).rstrip()
1123
- options[name] = self._interpolation.before_read(self,
1124
- section,
1125
- name, val)
1126
-
1127
- def _read_defaults(self, defaults):
1128
- """Read the defaults passed in the initializer.
1129
- Note: values can be non-string."""
1130
- for key, value in defaults.items():
1131
- self._defaults[self.optionxform(key)] = value
1132
-
1133
- def _handle_error(self, exc, fpname, lineno, line):
1134
- if not exc:
1135
- exc = ParsingError(fpname)
1136
- exc.append(lineno, repr(line))
1137
- return exc
1138
-
1139
- def _unify_values(self, section, vars):
1140
- """Create a sequence of lookups with 'vars' taking priority over
1141
- the 'section' which takes priority over the DEFAULTSECT.
1142
-
1143
- """
1144
- sectiondict = {}
1145
- try:
1146
- sectiondict = self._sections[section]
1147
- except KeyError:
1148
- if section != self.default_section:
1149
- raise NoSectionError(section) from None
1150
- # Update with the entry specific variables
1151
- vardict = {}
1152
- if vars:
1153
- for key, value in vars.items():
1154
- if value is not None:
1155
- value = str(value)
1156
- vardict[self.optionxform(key)] = value
1157
- return _ChainMap(vardict, sectiondict, self._defaults)
1158
-
1159
- def _convert_to_boolean(self, value):
1160
- """Return a boolean value translating from other types if necessary.
1161
- """
1162
- if value.lower() not in self.BOOLEAN_STATES:
1163
- raise ValueError('Not a boolean: %s' % value)
1164
- return self.BOOLEAN_STATES[value.lower()]
1165
-
1166
- def _validate_value_types(self, *, section="", option="", value=""):
1167
- """Raises a TypeError for non-string values.
1168
-
1169
- The only legal non-string value if we allow valueless
1170
- options is None, so we need to check if the value is a
1171
- string if:
1172
- - we do not allow valueless options, or
1173
- - we allow valueless options but the value is not None
1174
-
1175
- For compatibility reasons this method is not used in classic set()
1176
- for RawConfigParsers. It is invoked in every case for mapping protocol
1177
- access and in ConfigParser.set().
1178
- """
1179
- if not isinstance(section, str):
1180
- raise TypeError("section names must be strings")
1181
- if not isinstance(option, str):
1182
- raise TypeError("option keys must be strings")
1183
- if not self._allow_no_value or value:
1184
- if not isinstance(value, str):
1185
- raise TypeError("option values must be strings")
1186
-
1187
- @property
1188
- def converters(self):
1189
- return self._converters
1190
-
1191
-
1192
- class ConfigParser(RawConfigParser):
1193
- """ConfigParser implementing interpolation."""
1194
-
1195
- _DEFAULT_INTERPOLATION = BasicInterpolation()
1196
-
1197
- def set(self, section, option, value=None):
1198
- """Set an option. Extends RawConfigParser.set by validating type and
1199
- interpolation syntax on the value."""
1200
- self._validate_value_types(option=option, value=value)
1201
- super().set(section, option, value)
1202
-
1203
- def add_section(self, section):
1204
- """Create a new section in the configuration. Extends
1205
- RawConfigParser.add_section by validating if the section name is
1206
- a string."""
1207
- self._validate_value_types(section=section)
1208
- super().add_section(section)
1209
-
1210
- def _read_defaults(self, defaults):
1211
- """Reads the defaults passed in the initializer, implicitly converting
1212
- values to strings like the rest of the API.
1213
-
1214
- Does not perform interpolation for backwards compatibility.
1215
- """
1216
- try:
1217
- hold_interpolation = self._interpolation
1218
- self._interpolation = Interpolation()
1219
- self.read_dict({self.default_section: defaults})
1220
- finally:
1221
- self._interpolation = hold_interpolation
1222
-
1223
-
1224
- class SafeConfigParser(ConfigParser):
1225
- """ConfigParser alias for backwards compatibility purposes."""
1226
-
1227
- def __init__(self, *args, **kwargs):
1228
- super().__init__(*args, **kwargs)
1229
- warnings.warn(
1230
- "The SafeConfigParser class has been renamed to ConfigParser "
1231
- "in Python 3.2. This alias will be removed in future versions."
1232
- " Use ConfigParser directly instead.",
1233
- DeprecationWarning, stacklevel=2
1234
- )
1235
-
1236
-
1237
- class SectionProxy(MutableMapping):
1238
- """A proxy for a single section from a parser."""
1239
-
1240
- def __init__(self, parser, name):
1241
- """Creates a view on a section of the specified `name` in `parser`."""
1242
- self._parser = parser
1243
- self._name = name
1244
- for conv in parser.converters:
1245
- key = 'get' + conv
1246
- getter = functools.partial(self.get, _impl=getattr(parser, key))
1247
- setattr(self, key, getter)
1248
-
1249
- def __repr__(self):
1250
- return '<Section: {}>'.format(self._name)
1251
-
1252
- def __getitem__(self, key):
1253
- if not self._parser.has_option(self._name, key):
1254
- raise KeyError(key)
1255
- return self._parser.get(self._name, key)
1256
-
1257
- def __setitem__(self, key, value):
1258
- self._parser._validate_value_types(option=key, value=value)
1259
- return self._parser.set(self._name, key, value)
1260
-
1261
- def __delitem__(self, key):
1262
- if not (self._parser.has_option(self._name, key) and
1263
- self._parser.remove_option(self._name, key)):
1264
- raise KeyError(key)
1265
-
1266
- def __contains__(self, key):
1267
- return self._parser.has_option(self._name, key)
1268
-
1269
- def __len__(self):
1270
- return len(self._options())
1271
-
1272
- def __iter__(self):
1273
- return self._options().__iter__()
1274
-
1275
- def _options(self):
1276
- if self._name != self._parser.default_section:
1277
- return self._parser.options(self._name)
1278
- else:
1279
- return self._parser.defaults()
1280
-
1281
- @property
1282
- def parser(self):
1283
- # The parser object of the proxy is read-only.
1284
- return self._parser
1285
-
1286
- @property
1287
- def name(self):
1288
- # The name of the section on a proxy is read-only.
1289
- return self._name
1290
-
1291
- def get(self, option, fallback=None, *, raw=False, vars=None,
1292
- _impl=None, **kwargs):
1293
- """Get an option value.
1294
-
1295
- Unless `fallback` is provided, `None` will be returned if the option
1296
- is not found.
1297
-
1298
- """
1299
- # If `_impl` is provided, it should be a getter method on the parser
1300
- # object that provides the desired type conversion.
1301
- if not _impl:
1302
- _impl = self._parser.get
1303
- return _impl(self._name, option, raw=raw, vars=vars,
1304
- fallback=fallback, **kwargs)
1305
-
1306
-
1307
- class ConverterMapping(MutableMapping):
1308
- """Enables reuse of get*() methods between the parser and section proxies.
1309
-
1310
- If a parser class implements a getter directly, the value for the given
1311
- key will be ``None``. The presence of the converter name here enables
1312
- section proxies to find and use the implementation on the parser class.
1313
- """
1314
-
1315
- GETTERCRE = re.compile(r"^get(?P<name>.+)$")
1316
-
1317
- def __init__(self, parser):
1318
- self._parser = parser
1319
- self._data = {}
1320
- for getter in dir(self._parser):
1321
- m = self.GETTERCRE.match(getter)
1322
- if not m or not callable(getattr(self._parser, getter)):
1323
- continue
1324
- self._data[m.group('name')] = None # See class docstring.
1325
-
1326
- def __getitem__(self, key):
1327
- return self._data[key]
1328
-
1329
- def __setitem__(self, key, value):
1330
- try:
1331
- k = 'get' + key
1332
- except TypeError:
1333
- raise ValueError('Incompatible key: {} (type: {})'
1334
- ''.format(key, type(key)))
1335
- if k == 'get':
1336
- raise ValueError('Incompatible key: cannot use "" as a name')
1337
- self._data[key] = value
1338
- func = functools.partial(self._parser._get_conv, conv=value)
1339
- func.converter = value
1340
- setattr(self._parser, k, func)
1341
- for proxy in self._parser.values():
1342
- getter = functools.partial(proxy.get, _impl=func)
1343
- setattr(proxy, k, getter)
1344
-
1345
- def __delitem__(self, key):
1346
- try:
1347
- k = 'get' + (key or None)
1348
- except TypeError:
1349
- raise KeyError(key)
1350
- del self._data[key]
1351
- for inst in itertools.chain((self._parser,), self._parser.values()):
1352
- try:
1353
- delattr(inst, k)
1354
- except AttributeError:
1355
- # don't raise since the entry was present in _data, silently
1356
- # clean up
1357
- continue
1358
-
1359
- def __iter__(self):
1360
- return iter(self._data)
1361
-
1362
- def __len__(self):
1363
- return len(self._data)