comtypes 1.4.0__zip → 1.4.1__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.0 → comtypes-1.4.1}/CHANGES.txt +4 -0
- {comtypes-1.4.0/comtypes.egg-info → comtypes-1.4.1}/PKG-INFO +1 -1
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/__init__.py +1 -1
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_client.py +10 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/tools/codegenerator.py +12 -12
- {comtypes-1.4.0 → comtypes-1.4.1/comtypes.egg-info}/PKG-INFO +1 -1
- {comtypes-1.4.0 → comtypes-1.4.1}/LICENSE.txt +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/MANIFEST.in +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/README.md +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/GUID.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/_comobject.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/_memberspec.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/_meta.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/_npsupport.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/_safearray.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/automation.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/clear_cache.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/client/__init__.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/client/_code_cache.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/client/_constants.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/client/_events.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/client/_generate.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/client/dynamic.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/client/lazybind.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/connectionpoints.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/errorinfo.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/git.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/hints.pyi +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/hresult.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/logutil.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/messageloop.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/patcher.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/persist.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/safearray.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/server/__init__.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/server/automation.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/server/connectionpoints.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/server/inprocserver.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/server/localserver.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/server/register.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/server/w_getopt.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/shelllink.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/TestComServer.idl +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/TestComServer.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/TestComServer.tlb +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/TestDispServer.idl +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/TestDispServer.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/TestDispServer.tlb +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/__init__.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/find_memleak.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/mylib.idl +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/mytypelib.idl +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/runtests.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/setup.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_BSTR.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_DISPPARAMS.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_GUID.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_QueryService.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_agilent.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_avmc.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_basic.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_casesensitivity.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_clear_cache.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_client_dynamic.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_collections.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_comserver.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_createwrappers.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_dict.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_dispinterface.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_dyndispatch.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_excel.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_findgendir.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_getactiveobj.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_ie.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_ienum.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_imfattributes.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_inout_args.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_jscript.js +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_msscript.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_npsupport.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_outparam.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_propputref.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_pump_events.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_safearray.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_sapi.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_server.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_showevents.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_subinterface.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_typeinfo.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_urlhistory.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_variant.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_win32com_interop.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_wmi.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/test/test_word.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/tools/__init__.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/tools/tlbparser.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/tools/typeannotator.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/tools/typedesc.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/tools/typedesc_base.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/typeinfo.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/util.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes/viewobject.py +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes.egg-info/SOURCES.txt +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes.egg-info/dependency_links.txt +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes.egg-info/entry_points.txt +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/comtypes.egg-info/top_level.txt +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/setup.cfg +0 -0
- {comtypes-1.4.0 → comtypes-1.4.1}/setup.py +0 -0
|
@@ -74,6 +74,16 @@ class Test_GetModule(ut.TestCase):
|
|
|
74
74
|
# NOTE: `WindowsInstaller`, which has `Patch` definition in dll.
|
|
75
75
|
comtypes.client.GetModule("msi.dll")
|
|
76
76
|
|
|
77
|
+
def test_the_name_of_the_enum_member_and_the_coclass_are_duplicated(self):
|
|
78
|
+
# NOTE: In `MSHTML`, the name `htmlInputImage` is used both as a member of
|
|
79
|
+
# the `_htmlInput` enum type and as a CoClass that has `IHTMLElement` and
|
|
80
|
+
# others as interfaces.
|
|
81
|
+
# If a CoClass is assigned where an integer should be assigned, such as in
|
|
82
|
+
# the definition of an enumeration, the generation of the module will fail.
|
|
83
|
+
# See also https://github.com/enthought/comtypes/issues/524
|
|
84
|
+
with contextlib.redirect_stdout(None): # supress warnings
|
|
85
|
+
comtypes.client.GetModule("mshtml.tlb")
|
|
86
|
+
|
|
77
87
|
def test_abstracted_wrapper_module_in_friendly_module(self):
|
|
78
88
|
mod = comtypes.client.GetModule("scrrun.dll")
|
|
79
89
|
self.assertTrue(hasattr(mod, "__wrapper_module__"))
|
|
@@ -671,7 +671,7 @@ class CodeGenerator(object):
|
|
|
671
671
|
tp_name = self._to_type_name(tp)
|
|
672
672
|
print("%s = %d" % (tp_name, value), file=self.stream)
|
|
673
673
|
if tp.enumeration.name:
|
|
674
|
-
self.enums.add(tp.enumeration.name, tp_name)
|
|
674
|
+
self.enums.add(tp.enumeration.name, tp_name, value)
|
|
675
675
|
self.names.add(tp_name)
|
|
676
676
|
|
|
677
677
|
def Enumeration(self, tp: typedesc.Enumeration) -> None:
|
|
@@ -1546,28 +1546,28 @@ class DeclaredNamespaces(object):
|
|
|
1546
1546
|
|
|
1547
1547
|
class EnumerationNamespaces(object):
|
|
1548
1548
|
def __init__(self):
|
|
1549
|
-
self.data: Dict[str, List[str]] = {}
|
|
1549
|
+
self.data: Dict[str, List[Tuple[str, int]]] = {}
|
|
1550
1550
|
|
|
1551
|
-
def add(self, enum_name: str, member_name: str) -> None:
|
|
1551
|
+
def add(self, enum_name: str, member_name: str, value: int) -> None:
|
|
1552
1552
|
"""Adds a namespace will be enumeration and its member.
|
|
1553
1553
|
|
|
1554
1554
|
Examples:
|
|
1555
1555
|
>>> enums = EnumerationNamespaces()
|
|
1556
|
-
>>> enums.add('Foo', 'ham')
|
|
1557
|
-
>>> enums.add('Foo', 'spam')
|
|
1558
|
-
>>> enums.add('Bar', 'bacon')
|
|
1556
|
+
>>> enums.add('Foo', 'ham', 1)
|
|
1557
|
+
>>> enums.add('Foo', 'spam', 2)
|
|
1558
|
+
>>> enums.add('Bar', 'bacon', 3)
|
|
1559
1559
|
>>> assert 'Foo' in enums
|
|
1560
1560
|
>>> assert 'Baz' not in enums
|
|
1561
1561
|
>>> print(enums.getvalue()) # <BLANKLINE> is necessary for doctest
|
|
1562
1562
|
class Foo(IntFlag):
|
|
1563
|
-
ham =
|
|
1564
|
-
spam =
|
|
1563
|
+
ham = 1
|
|
1564
|
+
spam = 2
|
|
1565
1565
|
<BLANKLINE>
|
|
1566
1566
|
<BLANKLINE>
|
|
1567
1567
|
class Bar(IntFlag):
|
|
1568
|
-
bacon =
|
|
1568
|
+
bacon = 3
|
|
1569
1569
|
"""
|
|
1570
|
-
self.data.setdefault(enum_name, []).append(member_name)
|
|
1570
|
+
self.data.setdefault(enum_name, []).append((member_name, value))
|
|
1571
1571
|
|
|
1572
1572
|
def __contains__(self, item: str) -> bool:
|
|
1573
1573
|
return item in self.data
|
|
@@ -1580,7 +1580,7 @@ class EnumerationNamespaces(object):
|
|
|
1580
1580
|
for enum_name, enum_members in self.data.items():
|
|
1581
1581
|
lines = []
|
|
1582
1582
|
lines.append(f"class {enum_name}(IntFlag):")
|
|
1583
|
-
for member_name in enum_members:
|
|
1584
|
-
lines.append(f" {member_name} =
|
|
1583
|
+
for member_name, value in enum_members:
|
|
1584
|
+
lines.append(f" {member_name} = {value}")
|
|
1585
1585
|
blocks.append("\n".join(lines))
|
|
1586
1586
|
return "\n\n\n".join(blocks)
|
|
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
|