comtypes 1.4.12__zip → 1.4.13__zip
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.
- {comtypes-1.4.12 → comtypes-1.4.13}/CHANGES.txt +7 -0
- {comtypes-1.4.12/comtypes.egg-info → comtypes-1.4.13}/PKG-INFO +4 -4
- {comtypes-1.4.12 → comtypes-1.4.13}/README.md +2 -2
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/__init__.py +1 -1
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/_meta.py +7 -3
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/_post_coinit/unknwn.py +6 -2
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_comserver.py +8 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_excel.py +1 -2
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/util.py +63 -13
- {comtypes-1.4.12 → comtypes-1.4.13/comtypes.egg-info}/PKG-INFO +4 -4
- {comtypes-1.4.12 → comtypes-1.4.13}/setup.cfg +1 -1
- {comtypes-1.4.12 → comtypes-1.4.13}/LICENSE.txt +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/MANIFEST.in +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/GUID.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/_comobject.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/_memberspec.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/_npsupport.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/_post_coinit/__init__.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/_post_coinit/_cominterface_meta_patcher.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/_post_coinit/activeobj.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/_post_coinit/bstr.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/_post_coinit/instancemethod.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/_post_coinit/misc.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/_safearray.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/_tlib_version_checker.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/_vtbl.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/automation.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/clear_cache.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/client/__init__.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/client/_activeobj.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/client/_code_cache.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/client/_constants.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/client/_create.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/client/_events.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/client/_generate.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/client/_managing.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/client/dynamic.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/client/lazybind.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/connectionpoints.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/errorinfo.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/git.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/hints.pyi +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/hresult.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/logutil.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/messageloop.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/patcher.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/persist.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/safearray.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/server/__init__.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/server/automation.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/server/connectionpoints.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/server/inprocserver.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/server/localserver.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/server/register.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/server/w_getopt.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/shelllink.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/stream.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/TestComServer.idl +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/TestComServer.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/TestComServer.tlb +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/TestDispServer.idl +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/TestDispServer.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/TestDispServer.tlb +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/__init__.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/find_memleak.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/mylib.idl +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/mylib.tlb +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/mytypelib.idl +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/runtests.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/setup.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_BSTR.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_DISPPARAMS.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_GUID.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_QueryService.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_agilent.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_avmc.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_basic.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_casesensitivity.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_clear_cache.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_client.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_client_dynamic.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_client_regenerate_modules.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_collections.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_comobject.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_createwrappers.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_dict.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_dispifc_records.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_dispifc_safearrays.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_dispinterface.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_dyndispatch.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_errorinfo.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_findgendir.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_getactiveobj.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_hresult.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_ie.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_ienum.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_imfattributes.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_inout_args.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_jscript.js +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_messageloop.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_midl_safearray_create.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_monikers.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_msscript.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_npsupport.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_outparam.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_persist.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_pump_events.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_recordinfo.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_safearray.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_sapi.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_server.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_server_register.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_shelllink.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_showevents.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_storage.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_stream.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_subinterface.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_typeannotator.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_typeinfo.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_urlhistory.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_util.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_variant.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_viewobject.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_w_getopt.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_win32com_interop.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_wmi.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/test_word.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/test/urlhist.tlb +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/tools/__init__.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/tools/codegenerator/__init__.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/tools/codegenerator/codegenerator.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/tools/codegenerator/comments.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/tools/codegenerator/heads.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/tools/codegenerator/helpers.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/tools/codegenerator/modulenamer.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/tools/codegenerator/namespaces.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/tools/codegenerator/packing.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/tools/codegenerator/typeannotator.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/tools/tlbparser.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/tools/typedesc.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/tools/typedesc_base.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/typeinfo.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes/viewobject.py +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes.egg-info/SOURCES.txt +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes.egg-info/dependency_links.txt +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes.egg-info/entry_points.txt +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/comtypes.egg-info/top_level.txt +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/pyproject.toml +0 -0
- {comtypes-1.4.12 → comtypes-1.4.13}/setup.py +0 -0
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
Comtypes CHANGELOG
|
|
2
2
|
==================
|
|
3
3
|
|
|
4
|
+
Release 1.4.13
|
|
5
|
+
--------------
|
|
6
|
+
* Remove Python 3.8 and add Python 3.14 to the CI pipelines. By @junkmd.
|
|
7
|
+
* Declare the minimum Python version as 3.9. By @junkmd. By @junkmd.
|
|
8
|
+
* Update ``PyCArgObject.value`` for Python 3.14 compatibility. By @junkmd.
|
|
9
|
+
* Add version bridges for the ``__pointer_type__`` attribute protocol. By @junkmd.
|
|
10
|
+
|
|
4
11
|
Release 1.4.12
|
|
5
12
|
--------------
|
|
6
13
|
* Add support for coverage. By @moi15moi.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: comtypes
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.13
|
|
4
4
|
Summary: Pure Python COM package
|
|
5
5
|
Home-page: https://github.com/enthought/comtypes
|
|
6
6
|
Download-URL: https://github.com/enthought/comtypes/releases
|
|
@@ -13,7 +13,7 @@ Classifier: Operating System :: Microsoft :: Windows
|
|
|
13
13
|
Classifier: Programming Language :: Python
|
|
14
14
|
Classifier: Programming Language :: Python :: 3
|
|
15
15
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
16
|
-
Requires-Python: >=3.
|
|
16
|
+
Requires-Python: >=3.9
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
18
18
|
License-File: LICENSE.txt
|
|
19
19
|
Dynamic: download-url
|
|
@@ -32,11 +32,11 @@ Dynamic: license-file
|
|
|
32
32
|
|
|
33
33
|
`comtypes` allows you to define, call, and implement custom and dispatch-based COM interfaces in pure Python.
|
|
34
34
|
|
|
35
|
-
`comtypes` requires Windows and Python 3.
|
|
35
|
+
`comtypes` requires Windows and Python 3.9 or later.
|
|
36
|
+
- Version [1.4.12](https://pypi.org/project/comtypes/1.4.12/) is the last version to support Python 3.8.
|
|
36
37
|
- Version <= [1.4.7](https://pypi.org/project/comtypes/1.4.7/) does not work with Python 3.13 as reported in [GH-618](https://github.com/enthought/comtypes/issues/618). Version [1.4.8](https://pypi.org/project/comtypes/1.4.8/) can work with Python 3.13.
|
|
37
38
|
- Version [1.4.6](https://pypi.org/project/comtypes/1.4.6/) is the last version to support Python 3.7.
|
|
38
39
|
- Version [1.2.1](https://pypi.org/project/comtypes/1.2.1/) is the last version to support Python 2.7 and 3.3–3.6.
|
|
39
|
-
- `comtypes` does not work with Python 3.8.1 as reported in [GH-202](https://github.com/enthought/comtypes/issues/202). This bug has been fixed in Python >= 3.8.2.
|
|
40
40
|
- Certain `comtypes` functions may not work correctly in Python 3.8 and 3.9 as reported in [GH-212](https://github.com/enthought/comtypes/issues/212). This bug has been fixed in Python >= 3.10.10 and >= 3.11.2.
|
|
41
41
|
|
|
42
42
|
## Installation
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
|
|
12
12
|
`comtypes` allows you to define, call, and implement custom and dispatch-based COM interfaces in pure Python.
|
|
13
13
|
|
|
14
|
-
`comtypes` requires Windows and Python 3.
|
|
14
|
+
`comtypes` requires Windows and Python 3.9 or later.
|
|
15
|
+
- Version [1.4.12](https://pypi.org/project/comtypes/1.4.12/) is the last version to support Python 3.8.
|
|
15
16
|
- Version <= [1.4.7](https://pypi.org/project/comtypes/1.4.7/) does not work with Python 3.13 as reported in [GH-618](https://github.com/enthought/comtypes/issues/618). Version [1.4.8](https://pypi.org/project/comtypes/1.4.8/) can work with Python 3.13.
|
|
16
17
|
- Version [1.4.6](https://pypi.org/project/comtypes/1.4.6/) is the last version to support Python 3.7.
|
|
17
18
|
- Version [1.2.1](https://pypi.org/project/comtypes/1.2.1/) is the last version to support Python 2.7 and 3.3–3.6.
|
|
18
|
-
- `comtypes` does not work with Python 3.8.1 as reported in [GH-202](https://github.com/enthought/comtypes/issues/202). This bug has been fixed in Python >= 3.8.2.
|
|
19
19
|
- Certain `comtypes` functions may not work correctly in Python 3.8 and 3.9 as reported in [GH-212](https://github.com/enthought/comtypes/issues/212). This bug has been fixed in Python >= 3.10.10 and >= 3.11.2.
|
|
20
20
|
|
|
21
21
|
## Installation
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# comtypes._meta helper module
|
|
2
|
+
import sys
|
|
2
3
|
from ctypes import POINTER, c_void_p, cast
|
|
3
4
|
|
|
4
5
|
import comtypes
|
|
@@ -74,7 +75,7 @@ class _coclass_meta(type):
|
|
|
74
75
|
# Depending on a version or revision of Python, this may be essential.
|
|
75
76
|
return self
|
|
76
77
|
|
|
77
|
-
|
|
78
|
+
p = _coclass_pointer_meta(
|
|
78
79
|
f"POINTER({self.__name__})",
|
|
79
80
|
(self, c_void_p),
|
|
80
81
|
{
|
|
@@ -82,9 +83,12 @@ class _coclass_meta(type):
|
|
|
82
83
|
"from_param": classmethod(_coclass_from_param),
|
|
83
84
|
},
|
|
84
85
|
)
|
|
85
|
-
|
|
86
|
+
if sys.version_info >= (3, 14):
|
|
87
|
+
self.__pointer_type__ = p
|
|
88
|
+
else:
|
|
89
|
+
from ctypes import _pointer_type_cache # type: ignore
|
|
86
90
|
|
|
87
|
-
|
|
91
|
+
_pointer_type_cache[self] = p
|
|
88
92
|
|
|
89
93
|
return self
|
|
90
94
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# https://learn.microsoft.com/en-us/windows/win32/api/unknwn/
|
|
2
2
|
|
|
3
3
|
import logging
|
|
4
|
+
import sys
|
|
4
5
|
from ctypes import HRESULT, POINTER, byref, c_ulong, c_void_p
|
|
5
6
|
from typing import TYPE_CHECKING, Any, ClassVar, List, Optional, Type, TypeVar
|
|
6
7
|
|
|
@@ -126,9 +127,12 @@ class _cominterface_meta(type):
|
|
|
126
127
|
{"__com_interface__": self, "_needs_com_addref_": None},
|
|
127
128
|
)
|
|
128
129
|
|
|
129
|
-
|
|
130
|
+
if sys.version_info >= (3, 14):
|
|
131
|
+
self.__pointer_type__ = p
|
|
132
|
+
else:
|
|
133
|
+
from ctypes import _pointer_type_cache # type: ignore
|
|
130
134
|
|
|
131
|
-
|
|
135
|
+
_pointer_type_cache[self] = p
|
|
132
136
|
|
|
133
137
|
if self._case_insensitive_:
|
|
134
138
|
_meta_patch.case_insensitive(p)
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import doctest
|
|
2
|
+
import sys
|
|
2
3
|
import unittest
|
|
3
4
|
from ctypes import pointer
|
|
4
5
|
from typing import Any
|
|
@@ -140,6 +141,13 @@ class TestInproc_win32com(BaseServerTest, unittest.TestCase):
|
|
|
140
141
|
def create_object(self):
|
|
141
142
|
return Dispatch("TestComServerLib.TestComServer")
|
|
142
143
|
|
|
144
|
+
if sys.version_info >= (3, 14):
|
|
145
|
+
|
|
146
|
+
@unittest.skip("Fails occasionally with a memory leak on INPROC.")
|
|
147
|
+
def test_eval(self):
|
|
148
|
+
# This test sometimes leaks memory when run as an in-process server.
|
|
149
|
+
pass
|
|
150
|
+
|
|
143
151
|
# These tests make no sense with win32com, override to disable them:
|
|
144
152
|
@unittest.skip("This test make no sense with win32com.")
|
|
145
153
|
def test_get_typeinfo(self):
|
|
@@ -125,8 +125,7 @@ PY_VER = "Python {0}.{1}.{2}".format(*sys.version_info[:3])
|
|
|
125
125
|
|
|
126
126
|
@unittest.skipIf(IMPORT_FAILED, "This depends on Excel.")
|
|
127
127
|
@unittest.skipIf(
|
|
128
|
-
sys.version_info[:2] == (3,
|
|
129
|
-
or sys.version_info[:2] == (3, 9)
|
|
128
|
+
sys.version_info[:2] == (3, 9)
|
|
130
129
|
or (sys.version_info[:2] == (3, 10) and sys.version_info < (3, 10, 10))
|
|
131
130
|
or (sys.version_info[:2] == (3, 11) and sys.version_info < (3, 11, 2)),
|
|
132
131
|
f"This fails in {PY_VER}. See https://github.com/enthought/comtypes/issues/212",
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
and cast_field(struct, fieldname, fieldtype).
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
+
import sys
|
|
5
6
|
from ctypes import (
|
|
6
7
|
POINTER,
|
|
7
8
|
Structure,
|
|
@@ -15,6 +16,7 @@ from ctypes import (
|
|
|
15
16
|
c_float,
|
|
16
17
|
c_int,
|
|
17
18
|
c_long,
|
|
19
|
+
c_longdouble,
|
|
18
20
|
c_longlong,
|
|
19
21
|
c_short,
|
|
20
22
|
c_void_p,
|
|
@@ -38,17 +40,61 @@ def _calc_offset():
|
|
|
38
40
|
# The definition of PyCArgObject in C code (that is the type of
|
|
39
41
|
# object that a byref() call returns):
|
|
40
42
|
class PyCArgObject(Structure):
|
|
43
|
+
if sys.version_info >= (3, 14):
|
|
44
|
+
# While C compilers automatically determine appropriate
|
|
45
|
+
# alignment based on field data types, `ctypes` requires
|
|
46
|
+
# explicit control over memory layout.
|
|
47
|
+
#
|
|
48
|
+
# `_pack_ = 8` ensures 8-byte alignment for fields.
|
|
49
|
+
#
|
|
50
|
+
# This works on both 32-bit and 64-bit systems:
|
|
51
|
+
# - On 64-bit systems, this matches the natural alignment
|
|
52
|
+
# for pointers.
|
|
53
|
+
# - On 32-bit systems, this is more strict than necessary
|
|
54
|
+
# (4-byte would be enough), but still produces the
|
|
55
|
+
# correct memory layout with proper padding.
|
|
56
|
+
#
|
|
57
|
+
# With `_pack_`, `ctypes` will automatically add padding
|
|
58
|
+
# here to ensure proper alignment of the `value` field
|
|
59
|
+
# after the `tag` and after the `size`.
|
|
60
|
+
_pack_ = 8
|
|
61
|
+
else:
|
|
62
|
+
# No special packing needed for Python 3.13 and earlier
|
|
63
|
+
# because the default alignment works fine for the legacy
|
|
64
|
+
# structure.
|
|
65
|
+
pass
|
|
66
|
+
|
|
41
67
|
class value(Union):
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
68
|
+
if sys.version_info >= (3, 14):
|
|
69
|
+
# In Python 3.14, the tagPyCArgObject structure was
|
|
70
|
+
# modified to better support complex types.
|
|
71
|
+
_fields_ = [
|
|
72
|
+
("c", c_char),
|
|
73
|
+
("b", c_char),
|
|
74
|
+
("h", c_short),
|
|
75
|
+
("i", c_int),
|
|
76
|
+
("l", c_long),
|
|
77
|
+
("q", c_longlong),
|
|
78
|
+
("g", c_longdouble),
|
|
79
|
+
("d", c_double),
|
|
80
|
+
("f", c_float),
|
|
81
|
+
("p", c_void_p),
|
|
82
|
+
# arrays for real and imaginary of complex
|
|
83
|
+
("D", c_double * 2),
|
|
84
|
+
("F", c_float * 2),
|
|
85
|
+
("G", c_longdouble * 2),
|
|
86
|
+
]
|
|
87
|
+
else:
|
|
88
|
+
_fields_ = [
|
|
89
|
+
("c", c_char),
|
|
90
|
+
("h", c_short),
|
|
91
|
+
("i", c_int),
|
|
92
|
+
("l", c_long),
|
|
93
|
+
("q", c_longlong),
|
|
94
|
+
("d", c_double),
|
|
95
|
+
("f", c_float),
|
|
96
|
+
("p", c_void_p),
|
|
97
|
+
]
|
|
52
98
|
|
|
53
99
|
#
|
|
54
100
|
# Thanks to Lenard Lindstrom for this tip:
|
|
@@ -66,9 +112,13 @@ def _calc_offset():
|
|
|
66
112
|
_anonymous_ = ["value"]
|
|
67
113
|
|
|
68
114
|
# additional checks to make sure that everything works as expected
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
115
|
+
expected_size = type(byref(c_int())).__basicsize__
|
|
116
|
+
actual_size = sizeof(PyCArgObject)
|
|
117
|
+
if actual_size != expected_size:
|
|
118
|
+
raise RuntimeError(
|
|
119
|
+
f"sizeof(PyCArgObject) mismatch: expected {expected_size}, "
|
|
120
|
+
f"got {actual_size}."
|
|
121
|
+
)
|
|
72
122
|
|
|
73
123
|
obj = c_int()
|
|
74
124
|
ref = byref(obj)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: comtypes
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.13
|
|
4
4
|
Summary: Pure Python COM package
|
|
5
5
|
Home-page: https://github.com/enthought/comtypes
|
|
6
6
|
Download-URL: https://github.com/enthought/comtypes/releases
|
|
@@ -13,7 +13,7 @@ Classifier: Operating System :: Microsoft :: Windows
|
|
|
13
13
|
Classifier: Programming Language :: Python
|
|
14
14
|
Classifier: Programming Language :: Python :: 3
|
|
15
15
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
16
|
-
Requires-Python: >=3.
|
|
16
|
+
Requires-Python: >=3.9
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
18
18
|
License-File: LICENSE.txt
|
|
19
19
|
Dynamic: download-url
|
|
@@ -32,11 +32,11 @@ Dynamic: license-file
|
|
|
32
32
|
|
|
33
33
|
`comtypes` allows you to define, call, and implement custom and dispatch-based COM interfaces in pure Python.
|
|
34
34
|
|
|
35
|
-
`comtypes` requires Windows and Python 3.
|
|
35
|
+
`comtypes` requires Windows and Python 3.9 or later.
|
|
36
|
+
- Version [1.4.12](https://pypi.org/project/comtypes/1.4.12/) is the last version to support Python 3.8.
|
|
36
37
|
- Version <= [1.4.7](https://pypi.org/project/comtypes/1.4.7/) does not work with Python 3.13 as reported in [GH-618](https://github.com/enthought/comtypes/issues/618). Version [1.4.8](https://pypi.org/project/comtypes/1.4.8/) can work with Python 3.13.
|
|
37
38
|
- Version [1.4.6](https://pypi.org/project/comtypes/1.4.6/) is the last version to support Python 3.7.
|
|
38
39
|
- Version [1.2.1](https://pypi.org/project/comtypes/1.2.1/) is the last version to support Python 2.7 and 3.3–3.6.
|
|
39
|
-
- `comtypes` does not work with Python 3.8.1 as reported in [GH-202](https://github.com/enthought/comtypes/issues/202). This bug has been fixed in Python >= 3.8.2.
|
|
40
40
|
- Certain `comtypes` functions may not work correctly in Python 3.8 and 3.9 as reported in [GH-212](https://github.com/enthought/comtypes/issues/212). This bug has been fixed in Python >= 3.10.10 and >= 3.11.2.
|
|
41
41
|
|
|
42
42
|
## Installation
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|