py2docfx 0.1.13.dev2016838__py3-none-any.whl → 0.1.13.dev2021865__py3-none-any.whl

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 (346) hide show
  1. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/_modified.py +26 -4
  2. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/_msvccompiler.py +2 -603
  3. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/archive_util.py +48 -18
  4. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/ccompiler.py +17 -1257
  5. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/cmd.py +133 -41
  6. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/bdist.py +19 -8
  7. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/bdist_dumb.py +2 -1
  8. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/bdist_rpm.py +6 -5
  9. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/build.py +8 -4
  10. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/build_clib.py +8 -7
  11. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/build_ext.py +32 -13
  12. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/build_py.py +10 -9
  13. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/build_scripts.py +3 -14
  14. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/check.py +1 -1
  15. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/clean.py +2 -1
  16. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/config.py +1 -8
  17. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/install.py +22 -19
  18. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/install_data.py +4 -3
  19. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/install_headers.py +1 -1
  20. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/install_lib.py +11 -7
  21. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/install_scripts.py +4 -3
  22. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/sdist.py +22 -16
  23. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/compat/__init__.py +6 -1
  24. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/compilers/C/base.py +1391 -0
  25. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/compilers/C/cygwin.py +340 -0
  26. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/compilers/C/errors.py +24 -0
  27. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/compilers/C/msvc.py +614 -0
  28. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/{tests/test_ccompiler.py → compilers/C/tests/test_base.py} +9 -19
  29. py2docfx/venv/{venv1/Lib/site-packages/setuptools/_distutils/tests/test_cygwinccompiler.py → basevenv/Lib/site-packages/setuptools/_distutils/compilers/C/tests/test_cygwin.py} +7 -12
  30. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/{tests/test_mingwccompiler.py → compilers/C/tests/test_mingw.py} +12 -20
  31. py2docfx/venv/{venv1/Lib/site-packages/setuptools/_distutils/tests/test_msvccompiler.py → basevenv/Lib/site-packages/setuptools/_distutils/compilers/C/tests/test_msvc.py} +11 -12
  32. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/{tests/test_unixccompiler.py → compilers/C/tests/test_unix.py} +5 -5
  33. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/compilers/C/unix.py +409 -0
  34. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/compilers/C/zos.py +230 -0
  35. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/cygwinccompiler.py +20 -328
  36. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/dist.py +148 -80
  37. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/errors.py +11 -27
  38. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/extension.py +19 -16
  39. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/filelist.py +80 -15
  40. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/spawn.py +22 -5
  41. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/sysconfig.py +32 -7
  42. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/tests/test_build_ext.py +13 -0
  43. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/tests/test_sdist.py +1 -1
  44. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/unixccompiler.py +2 -401
  45. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/util.py +38 -23
  46. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/zosccompiler.py +2 -228
  47. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_static.py +1 -1
  48. py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/editable_wheel.py +3 -3
  49. py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/install.py +1 -1
  50. py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/config/test_setupcfg.py +2 -0
  51. py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_build_py.py +1 -1
  52. py2docfx/venv/basevenv/Lib/site-packages/setuptools/unicode_utils.py +1 -1
  53. py2docfx/venv/venv1/Lib/site-packages/adodbapi/__init__.py +2 -1
  54. py2docfx/venv/venv1/Lib/site-packages/adodbapi/ado_consts.py +3 -1
  55. py2docfx/venv/venv1/Lib/site-packages/adodbapi/adodbapi.py +22 -26
  56. py2docfx/venv/venv1/Lib/site-packages/adodbapi/apibase.py +3 -4
  57. py2docfx/venv/venv1/Lib/site-packages/adodbapi/examples/db_print.py +1 -1
  58. py2docfx/venv/venv1/Lib/site-packages/adodbapi/examples/db_table_names.py +1 -1
  59. py2docfx/venv/venv1/Lib/site-packages/adodbapi/process_connect_string.py +7 -7
  60. py2docfx/venv/venv1/Lib/site-packages/adodbapi/setup.py +2 -2
  61. py2docfx/venv/venv1/Lib/site-packages/adodbapi/test/adodbapitest.py +21 -73
  62. py2docfx/venv/venv1/Lib/site-packages/adodbapi/test/adodbapitestconfig.py +1 -1
  63. py2docfx/venv/venv1/Lib/site-packages/adodbapi/test/dbapi20.py +11 -17
  64. py2docfx/venv/venv1/Lib/site-packages/adodbapi/test/setuptestframework.py +2 -1
  65. py2docfx/venv/venv1/Lib/site-packages/isapi/install.py +8 -11
  66. py2docfx/venv/venv1/Lib/site-packages/isapi/samples/redirector.py +1 -1
  67. py2docfx/venv/venv1/Lib/site-packages/isapi/samples/redirector_asynch.py +1 -1
  68. py2docfx/venv/venv1/Lib/site-packages/isapi/samples/redirector_with_filter.py +2 -1
  69. py2docfx/venv/venv1/Lib/site-packages/isapi/simple.py +1 -0
  70. py2docfx/venv/venv1/Lib/site-packages/isapi/threaded_extension.py +1 -0
  71. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/app/basictimerapp.py +1 -1
  72. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/app/customprint.py +1 -3
  73. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/app/demoutils.py +1 -3
  74. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/cmdserver.py +2 -5
  75. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/guidemo.py +14 -41
  76. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/objdoc.py +1 -1
  77. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/ocx/demoutils.py +1 -3
  78. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/ocx/flash.py +1 -1
  79. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/ocx/ocxserialtest.py +1 -2
  80. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/ocx/ocxtest.py +1 -2
  81. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/ocx/webbrowser.py +3 -3
  82. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/openGLDemo.py +57 -12
  83. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/toolbar.py +0 -1
  84. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/debugger/configui.py +1 -1
  85. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/debugger/dbgcon.py +0 -1
  86. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/debugger/debugger.py +7 -8
  87. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/debugger/fail.py +1 -1
  88. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/dialogs/ideoptions.py +7 -10
  89. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/dialogs/list.py +11 -8
  90. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/dialogs/login.py +0 -1
  91. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/docking/DockingBar.py +0 -1
  92. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/app.py +19 -22
  93. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/dbgcommands.py +2 -3
  94. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/editor/ModuleBrowser.py +1 -1
  95. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/editor/__init__.py +3 -1
  96. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/editor/document.py +0 -1
  97. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/editor/editor.py +6 -6
  98. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/editor/vss.py +2 -2
  99. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/help.py +2 -1
  100. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/interact.py +1 -1
  101. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/intpyapp.py +5 -7
  102. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/intpydde.py +7 -2
  103. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/scriptutils.py +4 -6
  104. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/sgrepmdi.py +13 -22
  105. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/startup.py +1 -1
  106. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/stdin.py +1 -0
  107. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/toolmenu.py +0 -2
  108. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/idle/AutoIndent.py +3 -3
  109. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/idle/CallTips.py +1 -3
  110. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/mfc/activex.py +1 -2
  111. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/mfc/dialog.py +7 -10
  112. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/scintilla/IDLEenvironment.py +1 -5
  113. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/scintilla/bindings.py +4 -2
  114. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/scintilla/config.py +3 -5
  115. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/scintilla/configui.py +2 -3
  116. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/scintilla/document.py +1 -1
  117. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/scintilla/formatter.py +3 -3
  118. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/scintilla/keycodes.py +2 -2
  119. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/scintilla/scintillacon.py +1178 -78
  120. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/scintilla/view.py +17 -21
  121. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/tools/browser.py +6 -18
  122. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/tools/hierlist.py +2 -2
  123. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/_modified.py +26 -4
  124. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/_msvccompiler.py +2 -603
  125. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/archive_util.py +48 -18
  126. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/ccompiler.py +17 -1257
  127. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/cmd.py +133 -41
  128. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/bdist.py +19 -8
  129. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/bdist_dumb.py +2 -1
  130. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/bdist_rpm.py +6 -5
  131. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/build.py +8 -4
  132. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/build_clib.py +8 -7
  133. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/build_ext.py +32 -13
  134. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/build_py.py +10 -9
  135. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/build_scripts.py +3 -14
  136. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/check.py +1 -1
  137. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/clean.py +2 -1
  138. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/config.py +1 -8
  139. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/install.py +22 -19
  140. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/install_data.py +4 -3
  141. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/install_headers.py +1 -1
  142. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/install_lib.py +11 -7
  143. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/install_scripts.py +4 -3
  144. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/sdist.py +22 -16
  145. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/compat/__init__.py +6 -1
  146. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/compilers/C/base.py +1391 -0
  147. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/compilers/C/cygwin.py +340 -0
  148. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/compilers/C/errors.py +24 -0
  149. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/compilers/C/msvc.py +614 -0
  150. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/{tests/test_ccompiler.py → compilers/C/tests/test_base.py} +9 -19
  151. py2docfx/venv/{basevenv/Lib/site-packages/setuptools/_distutils/tests/test_cygwinccompiler.py → venv1/Lib/site-packages/setuptools/_distutils/compilers/C/tests/test_cygwin.py} +7 -12
  152. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/{tests/test_mingwccompiler.py → compilers/C/tests/test_mingw.py} +12 -20
  153. py2docfx/venv/{basevenv/Lib/site-packages/setuptools/_distutils/tests/test_msvccompiler.py → venv1/Lib/site-packages/setuptools/_distutils/compilers/C/tests/test_msvc.py} +11 -12
  154. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/{tests/test_unixccompiler.py → compilers/C/tests/test_unix.py} +5 -5
  155. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/compilers/C/unix.py +409 -0
  156. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/compilers/C/zos.py +230 -0
  157. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/cygwinccompiler.py +20 -328
  158. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/dist.py +148 -80
  159. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/errors.py +11 -27
  160. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/extension.py +19 -16
  161. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/filelist.py +80 -15
  162. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/spawn.py +22 -5
  163. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/sysconfig.py +32 -7
  164. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/tests/test_build_ext.py +13 -0
  165. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/tests/test_sdist.py +1 -1
  166. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/unixccompiler.py +2 -401
  167. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/util.py +38 -23
  168. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/zosccompiler.py +2 -228
  169. py2docfx/venv/venv1/Lib/site-packages/setuptools/_static.py +1 -1
  170. py2docfx/venv/venv1/Lib/site-packages/setuptools/command/editable_wheel.py +3 -3
  171. py2docfx/venv/venv1/Lib/site-packages/setuptools/command/install.py +1 -1
  172. py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/config/test_setupcfg.py +2 -0
  173. py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_build_py.py +1 -1
  174. py2docfx/venv/venv1/Lib/site-packages/setuptools/unicode_utils.py +1 -1
  175. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/EvtFormatMessage.py +1 -1
  176. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/EvtSubscribe_push.py +8 -1
  177. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/GetSaveFileName.py +8 -8
  178. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/c_extension/setup.py +1 -1
  179. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/dde/ddeclient.py +1 -1
  180. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/dde/ddeserver.py +1 -1
  181. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/getfilever.py +1 -1
  182. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/pipes/runproc.py +2 -2
  183. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/rastest.py +4 -6
  184. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/GetTokenInformation.py +4 -4
  185. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/account_rights.py +0 -2
  186. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/explicit_entries.py +0 -1
  187. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/get_policy_info.py +0 -3
  188. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/list_rights.py +0 -2
  189. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/localized_names.py +7 -2
  190. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/query_information.py +1 -1
  191. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/set_file_audit.py +1 -2
  192. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/set_file_owner.py +0 -1
  193. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/set_policy_info.py +0 -3
  194. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/setkernelobjectsecurity.py +0 -1
  195. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/setsecurityinfo.py +0 -1
  196. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/setuserobjectsecurity.py +0 -1
  197. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/sspi/fetch_url.py +3 -3
  198. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/sspi/simple_auth.py +3 -3
  199. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/sspi/socket_server.py +1 -2
  200. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/service/pipeTestService.py +10 -9
  201. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/service/pipeTestServiceClient.py +6 -3
  202. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/win32clipboardDemo.py +17 -5
  203. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/win32comport_demo.py +32 -2
  204. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/win32console_demo.py +1 -4
  205. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/win32gui_devicenotify.py +0 -1
  206. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/win32gui_menu.py +60 -5
  207. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/win32gui_taskbar.py +1 -1
  208. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/win32netdemo.py +2 -5
  209. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/win32ts_logoff_disconnected.py +1 -1
  210. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/win32wnet/testwnet.py +1 -1
  211. py2docfx/venv/venv1/Lib/site-packages/win32/lib/commctrl.py +1 -1
  212. py2docfx/venv/venv1/Lib/site-packages/win32/lib/netbios.py +8 -10
  213. py2docfx/venv/venv1/Lib/site-packages/win32/lib/pywin32_bootstrap.py +2 -10
  214. py2docfx/venv/venv1/Lib/site-packages/win32/lib/pywin32_testutil.py +2 -2
  215. py2docfx/venv/venv1/Lib/site-packages/win32/lib/pywintypes.py +1 -1
  216. py2docfx/venv/venv1/Lib/site-packages/win32/lib/regutil.py +1 -1
  217. py2docfx/venv/venv1/Lib/site-packages/win32/lib/sspi.py +3 -3
  218. py2docfx/venv/venv1/Lib/site-packages/win32/lib/win2kras.py +14 -7
  219. py2docfx/venv/venv1/Lib/site-packages/win32/lib/win32con.py +16 -35
  220. py2docfx/venv/venv1/Lib/site-packages/win32/lib/win32cryptcon.py +1 -4
  221. py2docfx/venv/venv1/Lib/site-packages/win32/lib/win32evtlogutil.py +1 -2
  222. py2docfx/venv/venv1/Lib/site-packages/win32/lib/win32gui_struct.py +6 -6
  223. py2docfx/venv/venv1/Lib/site-packages/win32/lib/win32pdhquery.py +10 -11
  224. py2docfx/venv/venv1/Lib/site-packages/win32/lib/win32pdhutil.py +5 -5
  225. py2docfx/venv/venv1/Lib/site-packages/win32/lib/win32rcparser.py +1 -0
  226. py2docfx/venv/venv1/Lib/site-packages/win32/lib/win32serviceutil.py +4 -6
  227. py2docfx/venv/venv1/Lib/site-packages/win32/lib/win32timezone.py +304 -121
  228. py2docfx/venv/venv1/Lib/site-packages/win32/lib/win32verstamp.py +1 -1
  229. py2docfx/venv/venv1/Lib/site-packages/win32/lib/winerror.py +4926 -604
  230. py2docfx/venv/venv1/Lib/site-packages/win32/lib/winxptheme.py +1 -1
  231. py2docfx/venv/venv1/Lib/site-packages/win32/scripts/h2py.py +194 -0
  232. py2docfx/venv/venv1/Lib/site-packages/win32/scripts/pywin32_postinstall.py +733 -0
  233. py2docfx/venv/venv1/Lib/site-packages/win32/scripts/pywin32_testall.py +120 -0
  234. py2docfx/venv/venv1/Lib/site-packages/win32/scripts/regsetup.py +4 -7
  235. py2docfx/venv/venv1/Lib/site-packages/win32/scripts/setup_d.py +1 -1
  236. py2docfx/venv/venv1/Lib/site-packages/win32/test/handles.py +13 -5
  237. py2docfx/venv/venv1/Lib/site-packages/win32/test/test_clipboard.py +12 -1
  238. py2docfx/venv/venv1/Lib/site-packages/win32/test/test_sspi.py +1 -1
  239. py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32api.py +8 -4
  240. py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32clipboard.py +2 -3
  241. py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32cred.py +0 -1
  242. py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32crypt.py +16 -3
  243. py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32file.py +24 -8
  244. py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32gui.py +0 -1
  245. py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32guistruct.py +2 -5
  246. py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32inet.py +23 -6
  247. py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32net.py +0 -1
  248. py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32ts.py +19 -0
  249. py2docfx/venv/venv1/Lib/site-packages/win32/winxpgui.py +3 -11
  250. py2docfx/venv/venv1/Lib/site-packages/win32com/client/CLSIDToClass.py +3 -1
  251. py2docfx/venv/venv1/Lib/site-packages/win32com/client/__init__.py +97 -65
  252. py2docfx/venv/venv1/Lib/site-packages/win32com/client/build.py +24 -24
  253. py2docfx/venv/venv1/Lib/site-packages/win32com/client/combrowse.py +17 -33
  254. py2docfx/venv/venv1/Lib/site-packages/win32com/client/dynamic.py +14 -14
  255. py2docfx/venv/venv1/Lib/site-packages/win32com/client/gencache.py +30 -12
  256. py2docfx/venv/venv1/Lib/site-packages/win32com/client/genpy.py +50 -98
  257. py2docfx/venv/venv1/Lib/site-packages/win32com/client/makepy.py +12 -8
  258. py2docfx/venv/venv1/Lib/site-packages/win32com/client/selecttlb.py +3 -4
  259. py2docfx/venv/venv1/Lib/site-packages/win32com/client/util.py +1 -1
  260. py2docfx/venv/venv1/Lib/site-packages/win32com/demos/dump_clipboard.py +1 -1
  261. py2docfx/venv/venv1/Lib/site-packages/win32com/demos/excelAddin.py +1 -1
  262. py2docfx/venv/venv1/Lib/site-packages/win32com/demos/excelRTDServer.py +1 -1
  263. py2docfx/venv/venv1/Lib/site-packages/win32com/demos/iebutton.py +0 -3
  264. py2docfx/venv/venv1/Lib/site-packages/win32com/demos/ietoolbar.py +1 -1
  265. py2docfx/venv/venv1/Lib/site-packages/win32com/demos/outlookAddin.py +1 -3
  266. py2docfx/venv/venv1/Lib/site-packages/win32com/makegw/makegw.py +48 -56
  267. py2docfx/venv/venv1/Lib/site-packages/win32com/makegw/makegwenum.py +2 -6
  268. py2docfx/venv/venv1/Lib/site-packages/win32com/makegw/makegwparse.py +9 -11
  269. py2docfx/venv/venv1/Lib/site-packages/win32com/olectl.py +1 -1
  270. py2docfx/venv/venv1/Lib/site-packages/win32com/server/connect.py +2 -2
  271. py2docfx/venv/venv1/Lib/site-packages/win32com/server/dispatcher.py +20 -24
  272. py2docfx/venv/venv1/Lib/site-packages/win32com/server/exception.py +8 -8
  273. py2docfx/venv/venv1/Lib/site-packages/win32com/server/policy.py +4 -18
  274. py2docfx/venv/venv1/Lib/site-packages/win32com/server/register.py +5 -6
  275. py2docfx/venv/venv1/Lib/site-packages/win32com/servers/dictionary.py +2 -5
  276. py2docfx/venv/venv1/Lib/site-packages/win32com/servers/interp.py +7 -7
  277. py2docfx/venv/venv1/Lib/site-packages/win32com/servers/test_pycomtest.py +0 -1
  278. py2docfx/venv/venv1/Lib/site-packages/win32com/test/GenTestScripts.py +2 -4
  279. py2docfx/venv/venv1/Lib/site-packages/win32com/test/errorSemantics.py +3 -3
  280. py2docfx/venv/venv1/Lib/site-packages/win32com/test/pippo_server.py +1 -4
  281. py2docfx/venv/venv1/Lib/site-packages/win32com/test/testADOEvents.py +1 -1
  282. py2docfx/venv/venv1/Lib/site-packages/win32com/test/testAXScript.py +1 -2
  283. py2docfx/venv/venv1/Lib/site-packages/win32com/test/testDictionary.py +4 -3
  284. py2docfx/venv/venv1/Lib/site-packages/win32com/test/testDynamic.py +3 -5
  285. py2docfx/venv/venv1/Lib/site-packages/win32com/test/testExchange.py +2 -7
  286. py2docfx/venv/venv1/Lib/site-packages/win32com/test/testGatewayAddresses.py +1 -1
  287. py2docfx/venv/venv1/Lib/site-packages/win32com/test/testIterators.py +1 -1
  288. py2docfx/venv/venv1/Lib/site-packages/win32com/test/testMSOffice.py +40 -57
  289. py2docfx/venv/venv1/Lib/site-packages/win32com/test/testMSOfficeEvents.py +3 -3
  290. py2docfx/venv/venv1/Lib/site-packages/win32com/test/testPersist.py +7 -7
  291. py2docfx/venv/venv1/Lib/site-packages/win32com/test/testPippo.py +2 -3
  292. py2docfx/venv/venv1/Lib/site-packages/win32com/test/testPyComTest.py +143 -7
  293. py2docfx/venv/venv1/Lib/site-packages/win32com/test/testServers.py +1 -2
  294. py2docfx/venv/venv1/Lib/site-packages/win32com/test/testall.py +1 -2
  295. py2docfx/venv/venv1/Lib/site-packages/win32com/test/testmakepy.py +1 -2
  296. py2docfx/venv/venv1/Lib/site-packages/win32com/test/testvb.py +12 -8
  297. py2docfx/venv/venv1/Lib/site-packages/win32com/test/util.py +1 -3
  298. py2docfx/venv/venv1/Lib/site-packages/win32com/universal.py +1 -3
  299. py2docfx/venv/venv1/Lib/site-packages/win32com/util.py +1 -1
  300. py2docfx/venv/venv1/Lib/site-packages/win32comext/adsi/demos/scp.py +1 -1
  301. py2docfx/venv/venv1/Lib/site-packages/win32comext/adsi/demos/search.py +0 -1
  302. py2docfx/venv/venv1/Lib/site-packages/win32comext/authorization/demos/EditSecurity.py +1 -24
  303. py2docfx/venv/venv1/Lib/site-packages/win32comext/authorization/demos/EditServiceSecurity.py +0 -20
  304. py2docfx/venv/venv1/Lib/site-packages/win32comext/axdebug/adb.py +2 -8
  305. py2docfx/venv/venv1/Lib/site-packages/win32comext/axdebug/codecontainer.py +16 -12
  306. py2docfx/venv/venv1/Lib/site-packages/win32comext/axdebug/contexts.py +1 -3
  307. py2docfx/venv/venv1/Lib/site-packages/win32comext/axdebug/debugger.py +2 -2
  308. py2docfx/venv/venv1/Lib/site-packages/win32comext/axdebug/documents.py +2 -3
  309. py2docfx/venv/venv1/Lib/site-packages/win32comext/axdebug/dump.py +2 -4
  310. py2docfx/venv/venv1/Lib/site-packages/win32comext/axdebug/expressions.py +2 -2
  311. py2docfx/venv/venv1/Lib/site-packages/win32comext/axdebug/util.py +7 -14
  312. py2docfx/venv/venv1/Lib/site-packages/win32comext/axscript/client/debug.py +2 -14
  313. py2docfx/venv/venv1/Lib/site-packages/win32comext/axscript/client/error.py +4 -5
  314. py2docfx/venv/venv1/Lib/site-packages/win32comext/axscript/client/framework.py +5 -5
  315. py2docfx/venv/venv1/Lib/site-packages/win32comext/axscript/client/pydumper.py +0 -1
  316. py2docfx/venv/venv1/Lib/site-packages/win32comext/axscript/client/pyscript.py +5 -10
  317. py2docfx/venv/venv1/Lib/site-packages/win32comext/axscript/client/scriptdispatch.py +3 -4
  318. py2docfx/venv/venv1/Lib/site-packages/win32comext/axscript/server/axsite.py +1 -2
  319. py2docfx/venv/venv1/Lib/site-packages/win32comext/axscript/test/leakTest.py +2 -3
  320. py2docfx/venv/venv1/Lib/site-packages/win32comext/axscript/test/testHost4Dbg.py +0 -3
  321. py2docfx/venv/venv1/Lib/site-packages/win32comext/bits/test/test_bits.py +3 -3
  322. py2docfx/venv/venv1/Lib/site-packages/win32comext/ifilter/demo/filterDemo.py +1 -1
  323. py2docfx/venv/venv1/Lib/site-packages/win32comext/mapi/demos/mapisend.py +1 -1
  324. py2docfx/venv/venv1/Lib/site-packages/win32comext/mapi/emsabtags.py +1 -0
  325. py2docfx/venv/venv1/Lib/site-packages/win32comext/mapi/mapitags.py +1 -3
  326. py2docfx/venv/venv1/Lib/site-packages/win32comext/mapi/mapiutil.py +2 -2
  327. py2docfx/venv/venv1/Lib/site-packages/win32comext/propsys/test/testpropsys.py +1 -1
  328. py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/demos/IFileOperationProgressSink.py +1 -1
  329. py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/demos/ITransferAdviseSink.py +5 -3
  330. py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/demos/servers/column_provider.py +0 -1
  331. py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/demos/servers/copy_hook.py +1 -1
  332. py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/demos/servers/empty_volume_cache.py +1 -1
  333. py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/demos/servers/folder_view.py +2 -2
  334. py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/demos/servers/icon_handler.py +1 -2
  335. py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/demos/servers/shell_view.py +4 -5
  336. py2docfx/venv/venv1/Lib/site-packages/win32comext/taskscheduler/test/test_addtask_2.py +0 -1
  337. py2docfx/venv/venv1/Scripts/pywin32_postinstall.py +77 -122
  338. py2docfx/venv/venv1/Scripts/pywin32_testall.py +4 -9
  339. {py2docfx-0.1.13.dev2016838.dist-info → py2docfx-0.1.13.dev2021865.dist-info}/METADATA +1 -1
  340. {py2docfx-0.1.13.dev2016838.dist-info → py2docfx-0.1.13.dev2021865.dist-info}/RECORD +342 -330
  341. py2docfx/venv/venv1/Lib/site-packages/docs/conf.py +0 -384
  342. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/ocx/__init__.py +0 -0
  343. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/mdi_pychecker.py +0 -850
  344. py2docfx/venv/venv1/Lib/site-packages/win32com/test/testNetscape.py +0 -24
  345. {py2docfx-0.1.13.dev2016838.dist-info → py2docfx-0.1.13.dev2021865.dist-info}/WHEEL +0 -0
  346. {py2docfx-0.1.13.dev2016838.dist-info → py2docfx-0.1.13.dev2021865.dist-info}/top_level.txt +0 -0
@@ -5,8 +5,10 @@
5
5
  # Note that if the unknown dispatch object then returns a known
6
6
  # dispatch object, the known class will be used. This contrasts
7
7
  # with dynamic.Dispatch behaviour, where dynamic objects are always used.
8
+ from __future__ import annotations
8
9
 
9
10
  import sys
11
+ from itertools import chain
10
12
 
11
13
  import pythoncom
12
14
  import pywintypes
@@ -262,7 +264,39 @@ class EventsProxy:
262
264
  setattr(self._obj_, attr, val)
263
265
 
264
266
 
265
- def DispatchWithEvents(clsid, user_event_class):
267
+ def __get_disp_and_event_classes(dispatch):
268
+ # Create/Get the object.
269
+ disp = Dispatch(dispatch)
270
+
271
+ if disp.__class__.__dict__.get("CLSID"):
272
+ return disp.__class__
273
+
274
+ # Eeek - no makepy support - try and build it.
275
+ error_msg = "This COM object can not automate the makepy process - please run makepy manually for this object"
276
+ try:
277
+ ti = disp._oleobj_.GetTypeInfo()
278
+ disp_clsid = ti.GetTypeAttr()[0]
279
+ tlb, index = ti.GetContainingTypeLib()
280
+ tla = tlb.GetLibAttr()
281
+ gencache.EnsureModule(tla[0], tla[1], tla[3], tla[4], bValidateFile=0)
282
+ # Get the class from the module.
283
+ disp_class = gencache.GetClassForProgID(str(disp_clsid))
284
+ except pythoncom.com_error as error:
285
+ raise TypeError(error_msg) from error
286
+
287
+ if disp_class is None:
288
+ raise TypeError(error_msg)
289
+ # Get the clsid
290
+ clsid = disp_class.CLSID
291
+ # Create a new class that derives from 2 classes:
292
+ # the event sink class and the user class.
293
+ events_class = getevents(clsid)
294
+ if events_class is None:
295
+ raise ValueError("This COM object does not support events.")
296
+ return disp, disp_class, events_class
297
+
298
+
299
+ def DispatchWithEvents(clsid, user_event_class) -> EventsProxy:
266
300
  """Create a COM object that can fire events to a user defined class.
267
301
  clsid -- The ProgID or CLSID of the object to create.
268
302
  user_event_class -- A Python class object that responds to the events.
@@ -301,39 +335,14 @@ def DispatchWithEvents(clsid, user_event_class):
301
335
  Visible changed: 1
302
336
  >>>
303
337
  """
304
- # Create/Get the object.
305
- disp = Dispatch(clsid)
306
- if not disp.__class__.__dict__.get(
307
- "CLSID"
308
- ): # Eeek - no makepy support - try and build it.
309
- try:
310
- ti = disp._oleobj_.GetTypeInfo()
311
- disp_clsid = ti.GetTypeAttr()[0]
312
- tlb, index = ti.GetContainingTypeLib()
313
- tla = tlb.GetLibAttr()
314
- gencache.EnsureModule(tla[0], tla[1], tla[3], tla[4], bValidateFile=0)
315
- # Get the class from the module.
316
- disp_class = gencache.GetClassForProgID(str(disp_clsid))
317
- except pythoncom.com_error:
318
- raise TypeError(
319
- "This COM object can not automate the makepy process - please run makepy manually for this object"
320
- )
321
- else:
322
- disp_class = disp.__class__
323
- # If the clsid was an object, get the clsid
324
- clsid = disp_class.CLSID
325
- # Create a new class that derives from 3 classes - the dispatch class, the event sink class and the user class.
326
- events_class = getevents(clsid)
327
- if events_class is None:
328
- raise ValueError("This COM object does not support events.")
338
+ disp, disp_class, events_class = __get_disp_and_event_classes(clsid)
329
339
  result_class = type(
330
340
  "COMEventClass",
331
341
  (disp_class, events_class, user_event_class),
332
342
  {"__setattr__": _event_setattr_},
333
343
  )
334
- instance = result_class(
335
- disp._oleobj_
336
- ) # This only calls the first base class __init__.
344
+ # This only calls the first base class __init__.
345
+ instance = result_class(disp._oleobj_)
337
346
  events_class.__init__(instance, instance)
338
347
  if hasattr(user_event_class, "__init__"):
339
348
  user_event_class.__init__(instance)
@@ -364,33 +373,14 @@ def WithEvents(disp, user_event_class):
364
373
  This is mainly useful where using DispatchWithEvents causes
365
374
  circular reference problems that the simple proxy doesn't deal with
366
375
  """
367
- disp = Dispatch(disp)
368
- if not disp.__class__.__dict__.get(
369
- "CLSID"
370
- ): # Eeek - no makepy support - try and build it.
371
- try:
372
- ti = disp._oleobj_.GetTypeInfo()
373
- disp_clsid = ti.GetTypeAttr()[0]
374
- tlb, index = ti.GetContainingTypeLib()
375
- tla = tlb.GetLibAttr()
376
- gencache.EnsureModule(tla[0], tla[1], tla[3], tla[4], bValidateFile=0)
377
- # Get the class from the module.
378
- disp_class = gencache.GetClassForProgID(str(disp_clsid))
379
- except pythoncom.com_error:
380
- raise TypeError(
381
- "This COM object can not automate the makepy process - please run makepy manually for this object"
382
- )
383
- else:
384
- disp_class = disp.__class__
385
- # Get the clsid
386
- clsid = disp_class.CLSID
387
- # Create a new class that derives from 2 classes - the event sink
388
- # class and the user class.
389
- events_class = getevents(clsid)
390
- if events_class is None:
391
- raise ValueError("This COM object does not support events.")
392
- result_class = type("COMEventClass", (events_class, user_event_class), {})
393
- instance = result_class(disp) # This only calls the first base class __init__.
376
+ disp, disp_class, events_class = __get_disp_and_event_classes(disp)
377
+ result_class = type(
378
+ "COMEventClass",
379
+ (events_class, user_event_class),
380
+ {},
381
+ )
382
+ # This only calls the first base class __init__.
383
+ instance = result_class(disp)
394
384
  if hasattr(user_event_class, "__init__"):
395
385
  user_event_class.__init__(instance)
396
386
  return instance
@@ -486,6 +476,47 @@ def Record(name, object):
486
476
  )
487
477
 
488
478
 
479
+ # Registration function for com_record subclasses.
480
+ def register_record_class(cls):
481
+ """
482
+ Register a subclass of com_record to enable creation of the represented record objects.
483
+
484
+ A subclass of com_record requires the following class attributes to be instantiable:
485
+
486
+ TLBID : The GUID of the containing TypeLibrary as a string.
487
+ MJVER : The major version number of the TypeLibrary as an integer.
488
+ MNVER : The minor version number of the TypeLibrary as an integer.
489
+ LCID : The LCID of the TypeLibrary as an integer.
490
+ GUID : The GUID of the COM Record as a string.
491
+
492
+ with GUID strings in {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} notation.
493
+
494
+ To instantiate such a subclasses it has to be registered via this function.
495
+ """
496
+ if not issubclass(cls, pythoncom.com_record):
497
+ raise TypeError("Only subclasses of 'com_record' can be registered.")
498
+ try:
499
+ TLBID = cls.TLBID
500
+ MJVER = cls.MJVER
501
+ MNVER = cls.MNVER
502
+ LCID = cls.LCID
503
+ GUID = cls.GUID
504
+ except AttributeError as e:
505
+ raise AttributeError(f"Class {cls.__name__} cannot be instantiated.") from e
506
+ try:
507
+ _ = pythoncom.GetRecordFromGuids(TLBID, MJVER, MNVER, LCID, GUID)
508
+ except Exception as e:
509
+ raise TypeError(f"Class {cls.__name__} cannot be instantiated.") from e
510
+ # Since the class can be instantiated we know that it represents a valid COM Record
511
+ # in a properly registered TypeLibrary and that it has a 'GUID' class attribute.
512
+ if cls.GUID in pythoncom.RecordClasses:
513
+ raise ValueError(
514
+ f"Record class with same GUID {cls.GUID} "
515
+ f"is already registered with name '{pythoncom.RecordClasses[cls.GUID].__name__}'."
516
+ )
517
+ pythoncom.RecordClasses[cls.GUID] = cls
518
+
519
+
489
520
  ############################################
490
521
  # The base of all makepy generated classes
491
522
  ############################################
@@ -510,17 +541,18 @@ class DispatchBaseClass:
510
541
  self.__dict__["_oleobj_"] = oobj # so we don't call __setattr__
511
542
 
512
543
  def __dir__(self):
513
- lst = (
514
- list(self.__dict__.keys())
515
- + dir(self.__class__)
516
- + list(self._prop_map_get_.keys())
517
- + list(self._prop_map_put_.keys())
544
+ attributes = chain(
545
+ self.__dict__,
546
+ dir(self.__class__),
547
+ self._prop_map_get_,
548
+ self._prop_map_put_,
518
549
  )
550
+
519
551
  try:
520
- lst += [p.Name for p in self.Properties_]
552
+ attributes = chain(attributes, [p.Name for p in self.Properties_])
521
553
  except AttributeError:
522
554
  pass
523
- return list(set(lst))
555
+ return list(set(attributes))
524
556
 
525
557
  # Provide a prettier name than the CLSID
526
558
  def __repr__(self):
@@ -554,7 +586,7 @@ class DispatchBaseClass:
554
586
  def __getattr__(self, attr):
555
587
  args = self._prop_map_get_.get(attr)
556
588
  if args is None:
557
- raise AttributeError(f"'{repr(self)}' object has no attribute '{attr}'")
589
+ raise AttributeError(f"'{self!r}' object has no attribute '{attr}'")
558
590
  return self._ApplyTypes_(*args)
559
591
 
560
592
  def __setattr__(self, attr, value):
@@ -564,7 +596,7 @@ class DispatchBaseClass:
564
596
  try:
565
597
  args, defArgs = self._prop_map_put_[attr]
566
598
  except KeyError:
567
- raise AttributeError(f"'{repr(self)}' object has no attribute '{attr}'")
599
+ raise AttributeError(f"'{self!r}' object has no attribute '{attr}'")
568
600
  self._oleobj_.Invoke(*(args + (value,) + defArgs))
569
601
 
570
602
  def _get_good_single_object_(self, obj, obUserName=None, resultCLSID=None):
@@ -16,8 +16,10 @@ dynamically, or possibly even generate .html documentation for objects.
16
16
  #
17
17
  # OleItem, DispatchItem, MapEntry, BuildCallList() is used by makepy
18
18
 
19
+ import builtins
19
20
  import datetime
20
21
  import string
22
+ from itertools import chain
21
23
  from keyword import iskeyword
22
24
 
23
25
  import pythoncom
@@ -113,9 +115,8 @@ class MapEntry:
113
115
  rc = self.GetResultCLSID()
114
116
  if rc is None:
115
117
  return "None"
116
- return repr(
117
- str(rc)
118
- ) # Convert the IID object to a string, then to a string in a string.
118
+ # Convert the IID object to a string in a string.
119
+ return f"'{rc}'"
119
120
 
120
121
  def GetResultName(self):
121
122
  if self.resultDocumentation is None:
@@ -403,7 +404,7 @@ class DispatchItem(OleItem):
403
404
  if len(bad_params) == 0 and len(retDesc) == 2 and retDesc[1] == 0:
404
405
  rd = retDesc[0]
405
406
  if rd in NoTranslateMap:
406
- s = "%s\treturn self._oleobj_.InvokeTypes(%d, LCID, %s, %s, %s%s)" % (
407
+ s = "{}\treturn self._oleobj_.InvokeTypes({}, LCID, {}, {}, {}{})".format(
407
408
  linePrefix,
408
409
  id,
409
410
  fdesc[4],
@@ -412,12 +413,12 @@ class DispatchItem(OleItem):
412
413
  _BuildArgList(fdesc, names),
413
414
  )
414
415
  elif rd in [pythoncom.VT_DISPATCH, pythoncom.VT_UNKNOWN]:
415
- s = "%s\tret = self._oleobj_.InvokeTypes(%d, LCID, %s, %s, %s%s)\n" % (
416
+ s = "{}\tret = self._oleobj_.InvokeTypes({}, LCID, {}, {}, {!r}{})\n".format(
416
417
  linePrefix,
417
418
  id,
418
419
  fdesc[4],
419
420
  retDesc,
420
- repr(argsDesc),
421
+ argsDesc,
421
422
  _BuildArgList(fdesc, names),
422
423
  )
423
424
  s += f"{linePrefix}\tif ret is not None:\n"
@@ -431,29 +432,27 @@ class DispatchItem(OleItem):
431
432
  )
432
433
  s += f"{linePrefix}\t\texcept pythoncom.error:\n"
433
434
  s += f"{linePrefix}\t\t\treturn ret\n"
434
- s += "{}\t\tret = Dispatch(ret, {}, {})\n".format(
435
- linePrefix, repr(name), resclsid
436
- )
437
- s += "%s\treturn ret" % linePrefix
435
+ s += f"{linePrefix}\t\tret = Dispatch(ret, {name!r}, {resclsid})\n"
436
+ s += f"{linePrefix}\treturn ret"
438
437
  elif rd == pythoncom.VT_BSTR:
439
438
  s = f"{linePrefix}\t# Result is a Unicode object\n"
440
- s += "%s\treturn self._oleobj_.InvokeTypes(%d, LCID, %s, %s, %s%s)" % (
439
+ s += "{}\treturn self._oleobj_.InvokeTypes({}, LCID, {}, {}, {!r}{})".format(
441
440
  linePrefix,
442
441
  id,
443
442
  fdesc[4],
444
443
  retDesc,
445
- repr(argsDesc),
444
+ argsDesc,
446
445
  _BuildArgList(fdesc, names),
447
446
  )
448
447
  # else s remains None
449
448
  if s is None:
450
- s = "%s\treturn self._ApplyTypes_(%d, %s, %s, %s, %s, %s%s)" % (
449
+ s = "{}\treturn self._ApplyTypes_({}, {}, {}, {}, {!r}, {}{})".format(
451
450
  linePrefix,
452
451
  id,
453
452
  fdesc[4],
454
453
  retDesc,
455
454
  argsDesc,
456
- repr(name),
455
+ name,
457
456
  resclsid,
458
457
  _BuildArgList(fdesc, names),
459
458
  )
@@ -493,18 +492,20 @@ class VTableItem(DispatchItem):
493
492
  DispatchItem.Build(self, typeinfo, attr, bForUser)
494
493
  assert typeinfo is not None, "Can't build vtables without type info!"
495
494
 
496
- meth_list = (
497
- list(self.mapFuncs.values())
498
- + list(self.propMapGet.values())
499
- + list(self.propMapPut.values())
495
+ meth_list = sorted(
496
+ chain(
497
+ self.mapFuncs.values(),
498
+ self.propMapGet.values(),
499
+ self.propMapPut.values(),
500
+ ),
501
+ key=lambda m: m.desc[7],
500
502
  )
501
- meth_list.sort(key=lambda m: m.desc[7])
502
503
 
503
504
  # Now turn this list into the run-time representation
504
505
  # (ready for immediate use or writing to gencache)
505
- self.vtableFuncs = []
506
- for entry in meth_list:
507
- self.vtableFuncs.append((entry.names, entry.dispid, entry.desc))
506
+ self.vtableFuncs = [
507
+ (entry.names, entry.dispid, entry.desc) for entry in meth_list
508
+ ]
508
509
 
509
510
 
510
511
  # A Lazy dispatch item - builds an item on request using info from
@@ -545,7 +546,6 @@ def _ResolveType(typerepr, itypeinfo):
545
546
  if was_user and subrepr in [
546
547
  pythoncom.VT_DISPATCH,
547
548
  pythoncom.VT_UNKNOWN,
548
- pythoncom.VT_RECORD,
549
549
  ]:
550
550
  # Drop the VT_PTR indirection
551
551
  return subrepr, sub_clsid, sub_doc
@@ -654,7 +654,7 @@ def MakePublicAttributeName(className, is_global=False):
654
654
  if ret == className:
655
655
  ret = ret.upper()
656
656
  return ret
657
- elif is_global and hasattr(__builtins__, className):
657
+ elif is_global and hasattr(builtins, className):
658
658
  # builtins may be mixed case. If capitalizing it doesn't change it,
659
659
  # force to all uppercase (eg, "None", "True" become "NONE", "TRUE"
660
660
  ret = className.capitalize()
@@ -1,25 +1,25 @@
1
1
  """A utility for browsing COM objects.
2
2
 
3
- Usage:
3
+ Usage:
4
4
 
5
- Command Prompt
5
+ Command Prompt
6
6
 
7
- Use the command *"python.exe combrowse.py"*. This will display
8
- display a fairly small, modal dialog.
7
+ Use the command *"python.exe combrowse.py"*. This will display
8
+ display a fairly small, modal dialog.
9
9
 
10
- Pythonwin
10
+ Pythonwin
11
11
 
12
- Use the "Run Script" menu item, and this will create the browser in an
13
- MDI window. This window can be fully resized.
12
+ Use the "Run Script" menu item, and this will create the browser in an
13
+ MDI window. This window can be fully resized.
14
14
 
15
- Details
15
+ Details
16
16
 
17
- This module allows browsing of registered Type Libraries, COM categories,
18
- and running COM objects. The display is similar to the Pythonwin object
19
- browser, and displays the objects in a hierarchical window.
17
+ This module allows browsing of registered Type Libraries, COM categories,
18
+ and running COM objects. The display is similar to the Pythonwin object
19
+ browser, and displays the objects in a hierarchical window.
20
20
 
21
- Note that this module requires the win32ui (ie, Pythonwin) distribution to
22
- work.
21
+ Note that this module requires the win32ui (ie, Pythonwin) distribution to
22
+ work.
23
23
 
24
24
  """
25
25
 
@@ -93,8 +93,6 @@ class HLI_Enum(HLI_Interface):
93
93
  rc = 0
94
94
  return rc
95
95
 
96
- pass
97
-
98
96
 
99
97
  class HLI_IEnumMoniker(HLI_Enum):
100
98
  def GetSubList(self):
@@ -265,10 +263,7 @@ class HLITypeLibEntry(HLICOM):
265
263
  def GetText(self):
266
264
  tlb, index = self.myobject
267
265
  name, doc, ctx, helpFile = tlb.GetDocumentation(index)
268
- try:
269
- typedesc = HLITypeKinds[tlb.GetTypeInfoType(index)][1]
270
- except KeyError:
271
- typedesc = "Unknown!"
266
+ typedesc = HLITypeKinds.get(tlb.GetTypeInfoType(index), (None, "Unknown!"))[1]
272
267
  return name + " - " + typedesc
273
268
 
274
269
  def GetSubList(self):
@@ -448,10 +443,7 @@ class HLITypeLibFunction(HLICOM):
448
443
 
449
444
  def MakeReturnTypeName(self, typ):
450
445
  justtyp = typ & pythoncom.VT_TYPEMASK
451
- try:
452
- typname = self.vartypes[justtyp]
453
- except KeyError:
454
- typname = "?Bad type?"
446
+ typname = self.vartypes.get(justtyp, "?Bad type?")
455
447
  for flag, desc in self.type_flags:
456
448
  if flag & typ:
457
449
  typname = f"{desc}({typname})"
@@ -493,15 +485,9 @@ class HLITypeLibFunction(HLICOM):
493
485
  val += f" (Default={default})"
494
486
  ret.append(browser.MakeHLI(val, "Argument"))
495
487
 
496
- try:
497
- fkind = self.funckinds[fd[3]]
498
- except KeyError:
499
- fkind = "Unknown"
488
+ fkind = self.funckinds.get(fd[3], "Unknown")
500
489
  ret.append(browser.MakeHLI(fkind, "Function Kind"))
501
- try:
502
- ikind = self.invokekinds[fd[4]]
503
- except KeyError:
504
- ikind = "Unknown"
490
+ ikind = self.invokekinds.get([fd[4]], "Unknown")
505
491
  ret.append(browser.MakeHLI(ikind, "Invoke Kind"))
506
492
  # 5 = call conv
507
493
  # 5 = offset vtbl
@@ -595,8 +581,6 @@ class HLIHeadingRegisterdTypeLibs(HLICOM):
595
581
 
596
582
 
597
583
  def main(modal=True, mdi=False):
598
- from pywin.tools import hierlist
599
-
600
584
  root = HLIRoot("COM Browser")
601
585
  if mdi and "pywin.framework.app" in sys.modules:
602
586
  # do it in a MDI window
@@ -17,6 +17,7 @@ Example
17
17
  """
18
18
 
19
19
  import traceback
20
+ from itertools import chain
20
21
  from types import MethodType
21
22
 
22
23
  import pythoncom # Needed as code we eval() references it.
@@ -233,19 +234,19 @@ class CDispatch:
233
234
  return self.__repr__()
234
235
 
235
236
  def __dir__(self):
236
- lst = list(self.__dict__.keys()) + dir(self.__class__) + self._dir_ole_()
237
+ attributes = chain(self.__dict__, dir(self.__class__), self._dir_ole_())
237
238
  try:
238
- lst += [p.Name for p in self.Properties_]
239
+ attributes = chain(attributes, [p.Name for p in self.Properties_])
239
240
  except AttributeError:
240
241
  pass
241
- return list(set(lst))
242
+ return list(set(attributes))
242
243
 
243
244
  def _dir_ole_(self):
244
245
  items_dict = {}
245
246
  for iTI in range(0, self._oleobj_.GetTypeInfoCount()):
246
247
  typeInfo = self._oleobj_.GetTypeInfo(iTI)
247
248
  self._UpdateWithITypeInfo_(items_dict, typeInfo)
248
- return list(items_dict.keys())
249
+ return list(items_dict)
249
250
 
250
251
  def _UpdateWithITypeInfo_(self, items_dict, typeInfo):
251
252
  typeInfos = [typeInfo]
@@ -388,9 +389,10 @@ class CDispatch:
388
389
  elif isinstance(ob, tuple):
389
390
  return tuple(
390
391
  map(
391
- lambda o, s=self, oun=userName, rc=ReturnCLSID: s._get_good_single_object_(
392
- o, oun, rc
393
- ),
392
+ lambda o,
393
+ s=self,
394
+ oun=userName,
395
+ rc=ReturnCLSID: s._get_good_single_object_(o, oun, rc),
394
396
  ob,
395
397
  )
396
398
  )
@@ -455,17 +457,17 @@ class CDispatch:
455
457
  print("AxDispatch container", self._username_)
456
458
  try:
457
459
  print("Methods:")
458
- for method in self._olerepr_.mapFuncs.keys():
460
+ for method in self._olerepr_.mapFuncs:
459
461
  print("\t", method)
460
462
  print("Props:")
461
463
  for prop, entry in self._olerepr_.propMap.items():
462
- print(f"\t{prop} = 0x{entry.dispid:x} - {repr(entry)}")
464
+ print(f"\t{prop} = 0x{entry.dispid:x} - {entry!r}")
463
465
  print("Get Props:")
464
466
  for prop, entry in self._olerepr_.propMapGet.items():
465
- print(f"\t{prop} = 0x{entry.dispid:x} - {repr(entry)}")
467
+ print(f"\t{prop} = 0x{entry.dispid:x} - {entry!r}")
466
468
  print("Put Props:")
467
469
  for prop, entry in self._olerepr_.propMapPut.items():
468
- print(f"\t{prop} = 0x{entry.dispid:x} - {repr(entry)}")
470
+ print(f"\t{prop} = 0x{entry.dispid:x} - {entry!r}")
469
471
  except:
470
472
  traceback.print_exc()
471
473
 
@@ -638,9 +640,7 @@ class CDispatch:
638
640
  return
639
641
  # Allow property assignment.
640
642
  debug_attr_print(
641
- "SetAttr called for {}.{}={} on DispatchContainer".format(
642
- self._username_, attr, repr(value)
643
- )
643
+ f"SetAttr called for {self._username_}.{attr}={value!r} on DispatchContainer"
644
644
  )
645
645
 
646
646
  if self._olerepr_:
@@ -23,6 +23,7 @@ Hacks, to do, etc
23
23
 
24
24
  from __future__ import annotations
25
25
 
26
+ import contextlib
26
27
  import glob
27
28
  import os
28
29
  import sys
@@ -34,6 +35,7 @@ import pythoncom
34
35
  import pywintypes
35
36
  import win32com
36
37
  import win32com.client
38
+ import win32event
37
39
 
38
40
  from . import CLSIDToClass
39
41
 
@@ -133,6 +135,22 @@ def _LoadDicts():
133
135
  f.close()
134
136
 
135
137
 
138
+ @contextlib.contextmanager
139
+ def ModuleMutex(module_name):
140
+ """Given the output of GetGeneratedFilename, acquire a named mutex for that module
141
+
142
+ This is required so that writes (generation) don't interfere with each other and with reads (import)
143
+ """
144
+ mutex = win32event.CreateMutex(None, False, module_name)
145
+ with contextlib.closing(mutex):
146
+ # acquire mutex
147
+ win32event.WaitForSingleObject(mutex, win32event.INFINITE)
148
+ try:
149
+ yield
150
+ finally:
151
+ win32event.ReleaseMutex(mutex)
152
+
153
+
136
154
  def GetGeneratedFileName(clsid, lcid, major, minor):
137
155
  """Given the clsid, lcid, major and minor for a type lib, return
138
156
  the file name (no extension) providing this support.
@@ -258,7 +276,8 @@ def GetModuleForCLSID(clsid):
258
276
  if sub_mod is not None:
259
277
  sub_mod_name = mod.__name__ + "." + sub_mod
260
278
  try:
261
- __import__(sub_mod_name)
279
+ with ModuleMutex(mod.__name__.split(".")[-1]):
280
+ __import__(sub_mod_name)
262
281
  except ImportError:
263
282
  info = typelibCLSID, lcid, major, minor
264
283
  # Force the generation. If this typelibrary has explicitly been added,
@@ -420,7 +439,7 @@ def ForgetAboutTypelibInterface(typelib_ob):
420
439
  )
421
440
  )
422
441
  # and drop any version redirects to it
423
- for key, val in list(versionRedirectMap.items()):
442
+ for key, val in versionRedirectMap.items():
424
443
  if val == info:
425
444
  del versionRedirectMap[key]
426
445
 
@@ -626,7 +645,7 @@ def EnsureDispatch(
626
645
  ): # New fn, so we default the new demand feature to on!
627
646
  """Given a COM prog_id, return an object that is using makepy support, building if necessary"""
628
647
  disp = win32com.client.Dispatch(prog_id)
629
- if not disp.__dict__.get("CLSID"): # Eeek - no makepy support - try and build it.
648
+ if not hasattr(disp, "CLSID"): # Eeek - no makepy support - try and build it.
630
649
  try:
631
650
  ti = disp._oleobj_.GetTypeInfo()
632
651
  disp_clsid = ti.GetTypeAttr()[0]
@@ -660,7 +679,7 @@ def AddModuleToCache(
660
679
 
661
680
  def SetTypelibForAllClsids(dict):
662
681
  nonlocal dict_modified
663
- for clsid, cls in dict.items():
682
+ for clsid in dict:
664
683
  if clsidToTypelib.get(clsid) != info:
665
684
  clsidToTypelib[clsid] = info
666
685
  dict_modified = True
@@ -685,7 +704,7 @@ def GetGeneratedInfos():
685
704
  zip_file = win32com.__gen_path__[: zip_pos + 4]
686
705
  zip_path = win32com.__gen_path__[zip_pos + 5 :].replace("\\", "/")
687
706
  zf = zipfile.ZipFile(zip_file)
688
- infos = {}
707
+ infos = set()
689
708
  for n in zf.namelist():
690
709
  if not n.startswith(zip_path):
691
710
  continue
@@ -701,9 +720,9 @@ def GetGeneratedInfos():
701
720
  except pywintypes.com_error:
702
721
  # invalid IID
703
722
  continue
704
- infos[(iid, lcid, major, minor)] = 1
723
+ infos.add((iid, lcid, major, minor))
705
724
  zf.close()
706
- return list(infos.keys())
725
+ return list(infos)
707
726
  else:
708
727
  # on the file system
709
728
  files = glob.glob(win32com.__gen_path__ + "\\*")
@@ -730,7 +749,8 @@ def GetGeneratedInfos():
730
749
  def _GetModule(fname):
731
750
  """Given the name of a module in the gen_py directory, import and return it."""
732
751
  mod_name = "win32com.gen_py.%s" % fname
733
- mod = __import__(mod_name)
752
+ with ModuleMutex(fname):
753
+ __import__(mod_name)
734
754
  return sys.modules[mod_name]
735
755
 
736
756
 
@@ -760,10 +780,8 @@ def Rebuild(verbose=1):
760
780
  def _Dump():
761
781
  print("Cache is in directory", win32com.__gen_path__)
762
782
  # Build a unique dir
763
- d = {}
764
- for clsid, (typelibCLSID, lcid, major, minor) in clsidToTypelib.items():
765
- d[typelibCLSID, lcid, major, minor] = None
766
- for typelibCLSID, lcid, major, minor in d.keys():
783
+ d = set(clsidToTypelib.values())
784
+ for typelibCLSID, lcid, major, minor in d:
767
785
  mod = GetModuleForTypelib(typelibCLSID, lcid, major, minor)
768
786
  print(f"{mod.__doc__} - {typelibCLSID}")
769
787