forked from enthought/comtypes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CHANGES.txt
1305 lines (928 loc) · 48.3 KB
/
CHANGES.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Comtypes CHANGELOG
==================
Release 1.4.8
--------------
* Remove Python 3.7 and add Python 3.13 to the CI pipelines. By @junkmd.
* Add constant definitions to ``shelllink``. By @junkmd.
* Add more tests to ``test_stream``. By @junkmd.
* Add the ``void_type`` definition to ``tlbparser``. By @junkmd.
* Modernize ``tools.tlbparser.get_tlib_filename``. By @junkmd.
* Extract the methods for parsing externals and dual interfaces from ``Parser.parse_typeinfo``. By @junkmd.
* Fix type annotations referenced by ``tlbparser``. By @junkmd.
* Modernize ``codegenerator.namespaces``. By @junkmd.
* Improve static typing for ``CoGetClassObject`` and ``GetClassObject``. By @junkmd.
* Refactor the ``__new__`` methods of ``_cominterface_meta`` and ``_coclass_meta``. By @junkmd.
* Prevent errors caused by defining members with the same name within an enum type. By @junkmd.
* Remove remaining ``__cmp__`` methods. By @newwingbird.
* Remove remaining ``from __future__ import print_function`` lines. By @newwingbird.
* Prevent ``itf`` to be an unbound variable in ``_cominterface_meta.__get_baseinterface_methodcount``. By @newwingbird.
* Modify the metaclasses to ensure compatibility with Python 3.13 and earlier versions. By @junkmd.
Release 1.4.7
--------------
* Improve ``_CArrayType`` alias import. By @junkmd.
* Rename ``_byref_type`` and ``_carg_obj`` to ``_CArgObject``. By @junkmd.
* Fix typos and make the wording more natural in ``README.md``. By @umarbutler.
* Modernize ``BSTR`` definition. By @junkmd.
* Modernize ``tagDEC`` definition. By @junkmd.
* Remove methods with mangling names in ``typeinfo``. By @junkmd.
* Rename ``test_istream`` to ``test_stream``. By @junkmd.
* Add ``test_msvidctl``. By @junkmd.
* Add ``test_storage``. By @junkmd.
* Add ``test_monikers``. By @junkmd.
* Add ``test_shelllink``. By @junkmd.
* Add ``test_persist``. By @junkmd.
* Modernize ``persist``. By @junkmd.
* Add type annotations to ``shelllink``. By @junkmd.
* Bump ``python_requires`` to ``>=3.8`` in ``setup.cfg``. By @junkmd.
Release 1.4.6
--------------
* Add tests and method annotations for ``IRecordInfo``. By @junkmd.
* Improve static typings in ``automation``. By @junkmd.
* Tidy up import part in some modules. By @junkmd.
* Refer to ``Any`` and ``Tuple`` from the ``hints`` stub instead of directly importing them in generated modules. By @junkmd.
* Modernize ``GUID.py``. By @junkmd.
* Improve ``codegenerator.modulenamer`` static typing. By @junkmd.
* Avoid using keywords in ``TYPE_CHECKING`` blocks. By @junkmd.
* Improve member defining parts of ``ParseInterface`` and ``ParseDispatch``. By @junkmd.
* Fix Annoying SyntaxWarning. By @v01d-gh.
Release 1.4.5
--------------
* Split ``__init__.py`` into some modules. By @junkmd.
* Fix importing ``_DispMemberSpec`` in ``automation``. By @junkmd.
* Fix importing ``_encode_idl`` in ``_comobject``. By @junkmd.
* Change the name of the component that implements the interface for record parameter testing. By @geppi.
* Implement ``SAFEARRAY`` pointers and ``SAFEARRAY``s as method parameters of a Dispatch Interface. By @geppi.
* Change the default value of the ``extra`` parameter in the ``create`` method of ``tagSAFEARRAY`` subtypes. By @geppi.
* Implement static import for ``ISequentialStream``. By @jonschz.
* Modernize ``test_wmi``. By @junkmd.
* Add static typing for ``_midlSAFEARRAY``. By @junkmd.
Release 1.4.4
--------------
* Stop mentioning the last version supporting Windows CE in ``README.md``. By @forderud.
* Declare the minimum Python version as 3.7. By @jaraco.
* Move package configuration to declarative config. By @jaraco.
Release 1.4.3
--------------
* Refactor ``test_findgendir``. By @junkmd.
* Update ``test_GUID``. By @junkmd.
* Add a feature to ``typeannotator`` that interprets the return value. By @junkmd.
* Update type annotations for ``_IUnknown_Base`` and ``IUnknown``. By @junkmd.
* Add ``groupby_impltypeflags``. By @junkmd.
* Add static typing for when a ``CoClass`` is assigned as the return value type. By @junkmd.
* Improve ``EnumerationNamespaces`` and ``CodeGenerator.enum_aliases``. By @junkmd.
* Modernize constructor arguments and attributes of each stuff in ``typedesc``. By @junkmd.
* Split ``codegenerator`` into some modules in the sub-package directory. By @junkmd.
* Implement record pointers as method parameters of a Dispatch Interface. By @geppi.
* Add ``npsupport`` to CI pipeline matrix. By @junkmd.
* Add "Frequently Asked Questions" to ``README.md``. By @junkmd.
Release 1.4.2
--------------
* Improve the stability of module generation by ``GetModule``. By @junkmd.
* Define ``c_int`` aliases earlier than others in wrapper modules. By @junkmd.
* Remove trailing newlines generated by ``codegenerator`` and ``typeannotator``. By @junkmd.
* Determine whether a interface is one of the known symbols not only by its name but also by using its iid. By @junkmd.
* Add ``Incomplete`` and ``Hresult`` to ``hints.pyi``. By @junkmd.
Release 1.4.1
--------------
* Fix ``TypeError`` when defining enumeration types. By @junkmd.
Release 1.4.0
--------------
* Add enumeration definitions in generated friendly modules. By @junkmd.
* Add descriptions to ``index.rst`` about the enumeration types. By @junkmd.
* Add GitHub Actions auto-test workflow. By @junkmd.
Release 1.3.1
--------------
* Add type annotations to dynamically generated modules. By @junkmd.
* Bring back Excel early-bind test. By @junkmd.
* update ``README.md``. By @junkmd.
Release 1.3.0
--------------
* Improve error message on non Windows environments. By @CristiFati.
* Adjust styles of codebase. By @junkmd.
* Apply ``black==22.12.0`` formatter. By @junkmd.
* Modernize ``client.dynamic``. By @junkmd.
* Add tests for ``client.dynamic``. By @junkmd.
* Fix ``test_client``. By @junkmd.
* Fix ``test_getactiveobj``. By @junkmd.
* Make explicit the symbols that imports from the wrapper module into the friendly module. By @junkmd.
* Modernize type annotations in statically defined modules. By @junkmd.
* Fix several type annotations in statically defined modules. By @jonschz and @junkmd.
* Remove ``sys.version_info`` bridges from production codebase. By @junkmd.
* Remove ``for_stub=True`` conditional branch from the ``tools.codegenerator.ImportedNamespaces.getvalue``. By @junkmd.
* Fix ``codegenerator`` as generating ``__next__()`` instead of ``next()`` in ``IEnum...``. By @jonschz.
* Add unit test for generated ``IEnum...`` interfaces. By @jonschz.
* Remove ``'Programming Language :: Python :: 2.7'`` from ``setup.py``. By @junkmd.
* Change the base class of ``_ComMemberSpec`` and ``_DispMemberSpec`` to ``typing.NamedTuple``. By @junkmd.
* Delint and remove wildcard-import from ``typeinfo``. By @junkmd.
* Split ``DISPPARAMS`` instantiation in ``IDispatch.Invoke`` method. By @junkmd.
* Move ``clear_comtypes_cache`` to be a callable ``comtypes.clear_cache`` module. By @bennyrowland.
* Wrapper modules are now imported into friendly modules using an abstracted name, ``__wrapper_module__``. By @junkmd.
* Fix old index bug in ``call_with_inout`` within ``_fix_inout_args``. By @jonschz.
* Fix ``CONTRIBUTING.md``. By @junkmd.
* Update ``README.md``. By @junkmd.
Release 1.2.1
--------------
* Replace ``distutils`` with ``setuptools``. By @junkmd.
* Add Python 3.12 testing into CI pipeline. By @junkmd.
* Set long description type to "markdown" to fix PyPI description rendering. By @junkmd.
* Add ``hints.pyi`` to ``package_data`` in ``setup.py`` which copies ``hints.pyi`` to correct install location. By @junkmd.
* Remove Python >=3.3, <=3.6 from CI pipeline. By @vasily-v-ryabov.
Release 1.2.0
--------------
* Remove all automatic imports of ``numpy``, and make ``numpy`` interop opt-in. By @bennyrowland.
* Move and redefine generating module functions for fixing cross imports. By @junkmd.
* Refactor creating ``__all__`` part in ``codegenerator.Generator.generate_code``. By @junkmd.
* Quit calling ``GetModule`` from ``tools.codegenerator``. By @junkmd.
* Commonize module-creating functions. By @junkmd.
* Shorten the lifetime of ``io.StringIO`` used for code generation. By @junkmd.
* Fix import source of ``Array`` from ``_ctypes`` to ``ctypes``. By @junkmd.
* Add ``for_stub`` mode to ``ImportedNamespaces.getvalue``. By @junkmd.
* Remove ``monkeypatch_COMError``. By @junkmd.
* Remove ``CodeGenerator.need_GUID``. By @junkmd.
* Carve out ``CodeGenerator.type_name`` method to ``TypeNamer`` class. By @junkmd.
* Add ``__known_symbols__`` attributes. By @junkmd.
* Remove ``CodeGenerator.type_name`` calls no longer needed and rename to ``_to_type_name``. By @junkmd.
* Change ``_fix_inout_args`` to module-level top level function. By @junkmd.
* Fix docstring from ``DispInterfaceHead``. By @junkmd.
* ``...METHOD`` and ``...PROPERTY`` return ``_MemberSpec``s instead of ``tuple``s. By @junkmd.
* Make generating ``...property`` DRY. By @junkmd.
* Refactor ``_MemberSpec`` stuffs and separate modules. By @junkmd.
* Carve out ``make_...Method`` and ``make_...Property`` of ``codegenerator``. By @junkmd.
* Removed extra space in ``typeinfo.IRecordInfo._methods_``. By @j0ker70.
* Add type annotations to many modules. By @junkmd.
* Fix type annotations in many modules. By @j0ker70, @muddi900, and @junkmd.
* Delint ``setup.py``. By @jaraco.
* Add ``CONTRIBUTING.md``. By @junkmd.
* Modernize ``README.md`` style. By @junkmd.
* Add announcements of plan for renaming ``master`` branch to ``main`` and dropping Python2 to ``README.md``. By @junkmd.
Release 1.1.14
--------------
* Fix ``SyntaxError`` in generated docstring. Thanks @junkmd.
Release 1.1.13
--------------
* Many fixes in code generator. Thanks @junkmd.
* Make tests runnable on AppVeyor CI. Many improvements in tests. Thanks @junkmd and @dmwyatt.
* Update (bound_)named_property args and attributes names to be similar to builtin property. Thanks @junkmd.
* Refactor function ``GetModule`` and fix type lib timestamping for incomplete generated module. Thanks @junkmd.
* Fix recent numpy versions support. Thanks @mworion.
* Split ``Constants`` into a separate module. Thanks @junkmd.
* ``client.GetModule`` can take a one liner containing lib UUID. Thanks @junkmd.
* Use ``Generator.imports`` instead of ``Generator._externals``. Thanks @junkmd.
* Rename README to README.md. Thanks @junkmd and @filipporomani.
* No patching or modifying ``typedesc.Obj.name`` in ``tools.codegenerator``. Thanks @junkmd.
* Load enumerations into ``client.Constants``. Thanks @junkmd.
Release 1.1.12
--------------
* Fix ``_pack_`` being returned as a float. Thanks @kdschlosser.
* More general fix for timestamping a type library. Thanks @kdschlosser.
Release 1.1.11
--------------
* Fix setuptools>=57.5.0 compatibility. Thanks @kdschlosser.
* Fix timestamping for typelib. Thanks @fusentasticus.
* Fix 64bit inproc server. Thanks @klusidy.
* Drop Python 2.6 support (Python 2.7 is still supported).
* Fix IndexError for empty safearray. Thanks @BALOGHBence.
* Make numpy typecodes consistent across numpy versions. Thanks @bennyrowland.
Release 1.1.10
--------------
* Fix loading module from relative path on Windows 7.
Release 1.1.9
-------------
* Fix loading module from relative path.
* Use comtypes release version in code generator version check.
Release 1.1.8
-------------
* Fix No module named 'comtypes.gen.stdole'. Thanks @fxthomas.
* Fix NumPy >= 1.16 support. Thanks @mobiusklein.
* Use the embedded timestamp for cache invalidation. Thanks @vijairaj.
* Allow customization of shutdown behavior (It fixes crash during exit in applications that embed Python). Thanks @lassoan.
* Extend GetModule() with CLSID support. Thanks @forderud.
* Fix invalid handling of WindowsError on Python 3. Thanks @leonardder.
* End bdist_wininst support in setup.py. Thanks @wkschwartz.
* Drop Windows CE support. Thanks @forderud.
Release 1.1.7
-------------
* Fix command ``pip install comtypes --no-cache-dir --target="C:\tmp"`` (issue #158).
Release 1.1.6
-------------
* Fix ``pip install comtypes`` error: "option --single-version-externally-managed
not recognized" (issue #155).
Release 1.1.5
-------------
* Fix using temp directory as a cache folder when it has no write permission.
Thanks to @kviktor, @totaam, @morganwillcock, @kongxinchi, @Chaoste
for their pull requests and patience.
* Revive ``clear_comtypes_cache.py`` and add it to post-install step.
* Fix hang in ``CreateObject`` for restricted user (#124).
Release 1.1.4
-------------
* Fix TypeError when gen folder is unwriteable and it is a
namespace package (#102). Thanks to @orf for the bug report. Thanks
to @jornb for the initial proposal demonstrating a workaround.
Release 1.1.3
-------------
* Fix SyntaxError caused by enums containing python keywords. Thanks to
@laripk for the fix and @janbrohl for the bug report.
Release 1.1.2
-------------
* Fix TypeError when interfaces return a single in-out result (#84). Thanks to
FranOis for the bug report and max-egger for suggesting the fix.
* Fix AttributeError when cleaning up safe arrays at shutdown (#83). Thanks to
mitaa for the bug report and fix.
* Fix 64-bit ULONG_PTR definition in typeinfo module (#82). Thanks to aparamon
for the bug report.
* Add POINTER(BSTR) to supported VARIANT types (#81). This allows the Esri
ArcObjects library to be loaded. Thanks to Matt Wilkie for the patch.
* Properly catch error when attempting to cache code to an unwritable
directory (#78). Thanks to Robin Dunn for the patch.
Release 1.1.1
-------------
* Fixed backwards-incompatible change where empty strings in VARIANTs were
being converted to NULL (#68). Thanks to shgohh for the bug report.
* Fixed npsupport module to fail gracefully when numpy is not present (#62).
Thanks to kyleMR for the patch.
* Fixed low-level property machinery in _comobject (#60).
* Fixed bug where numpy would be imported when using safe arrays (#59). Thanks
to Paul Moore (pfmoore) for submitting the bug and a patch.
* Fixed bug in patching machinery (#57). Thanks to Paul Moore (pfmoore) for
the patch.
* Various documentation cleanups.
Release 1.1.0
-------------
* Updated automation code to convert c_int64 and c_uint64 to their VT_I8 and
VT_UI8, respectively (#49).
* Update automation code to convert VT_DECIMAL VARIANT to Decimal type (#44).
* Fixed an undocumented bug that would lead to improper behavior when nesting
the ``safearray_as_ndarray`` context (#41).
* Added a license file and merged the ChangeLog into CHANGES.txt (#35, #39).
* Extended and homogenized indexing across container and named property
interfaces (#32, #43). This introduces the ability to index with an empty
slice, which has the same meaning as indexing with an empty tuple.
* Completed migration to ``patcher`` module (#31).
* Extended NumPy support so object and datetime64 arrays can be converted to
VARIANT safearrays (#29).
* Extended test runner so it can be run under 32- and 64-bit Python and be used
in an automated testing system (#25, #28).
* Modified many tests so they run under 64-bit python (#21, #22, #23).
* Removed reference cycle in PumpEvents (#19).
* Fixed safearray test that would fail under NumPy 1.6 (#19).
* Project migrated to http://github.com/enthought/comtypes. Issue numbers
refer to the new project page.
Release 1.0.0
-------------
* #27: Replaced the ``partial`` module with a ``patcher`` module. This new
technique patches the underlying classes explicitly. This technique avoids
the problems with the metaclass magic on Python 3.
* Officially dropped support for Python 2.5.
* #25: Allow installation on non-Windows systems.
* #31: Improved 64-bit compatibility by specifying argtypes for GetMessage.
Earlier Changes
---------------
2010-04-09 Thomas Heller <[email protected]>
* comtypes.client.dynamic: Added _FlagAsMethod(*names) method
to the _Dispatch class.
This allows to flag these attribute names as being methods. Some
objects do not correctly differentiate methods and properties,
leading to problems when calling these methods.
2010-02-23 Thomas Heller <[email protected]>
* pointers and byref() objects will now be stored in a VARIANT as
VT_BYREF type. This allows to call dispinterface methods with
BYREF arguments.
2010-01-21 Thomas Heller <[email protected]>
* Add a __repr__ method to named_property and bound_named_property
object.
2010-01-15 Thomas Heller <[email protected]>
* Bump version number to 0.6.3dev: development version.
2010-01-15 Thomas Heller <[email protected]>
* Bumped version number to 0.6.2.
* CoUninitialize() returns nothing, not HRESULT.
2009-12-22 Thomas Heller <[email protected]>
* Bug fixes for event handlers implemented in Python.
2009-12-11 Thomas Heller <[email protected]>
* COM servers implemented in Python can now fire events; it did
not work in some cases.
* When an exception occurs in a COM event handler, a traceback is
printed.
2009-11-26 Thomas Heller <[email protected]>
* Allow typelib wrappers that contain 'SAFEARRAY(VARIANT*)'
parameter types to be imported. Calling these methods will fail,
though.
2009-11-13 Thomas Heller <[email protected]>
* To avoid a memory leak when PyInitialize()/PyUninitialize() are
called several times, return S_FALSE from inproc server's
DllCanUnloadNow().
2009-11-05 Thomas Heller <[email protected]>
* COMObject subclasses can now implement a _final_release_()
method to free up resources, for example. This method is called
when the COM reference count reaches zero.
* Implement __hash__ method in dynamic dispatch classes. This
fixes a 'python -3' warning.
* comtypes\safearray.py: When numpy is not installed, creating
safearrays took a very long time. This is fixed now.
* comtypes\test\test_server.py: New way to test COM client and
server. Work in progress.
2009-10-22 Thomas Heller <[email protected]>
* Support broken COM objects that provide IProvideClassInfo2, but
not IProvideClassInfo (although the latter is derived from the
former). See
http://sourceforge.net/tracker/index.php?func=detail&aid=2829887&group_id=115265&atid=692942
* Fixed a regression from the 0.4 version, [out] parameters didn't
accept pointers or arrays any longer. Thanks again to Michael
Eddington.
2009-10-19 Thomas Heller <[email protected]>
* Fix a memory leak in Python COM servers. Thanks to Michael
Eddington for the patch.
2009-10-02 Thomas Heller <[email protected]>
* comtypes\test\test_server.py: Start a better approach to test
both COM object calls and COM object implementations.
2009-09-09 Thomas Heller <[email protected]>
* Fix returning SAFEARRAY of VT_RECORDs. Based on a patch from
Eduardo Arias.
* New module comtypes.viewobject, contains the interfaces
IViewObject, IViewObject2, IViewObjectEx. IAdviseSink is faked.
* Change version number to 0.6.2dev.
2009-09-04 Thomas Heller <[email protected]>
* CoTaskMemFree does not return a HRESULT. Patch from James Teh.
2009-08-19 Thomas Heller <[email protected]>
* Bumped version number to 0.6.1.
2009-08-07 Thomas Heller <[email protected]>
* When an interface was specified in the call to
IClassObject.CreateInstance, return that instead of calling
GetBestInterface. Patch from James Teh.
2009-08-04 Thomas Heller <[email protected]>
* Added comtypes.CoGetClassObject() low-level function,
comtypes.client.GetClassObject() high-level function, and
implemented a pythonic interface to IClassFactory's CreateInstance
method:
def CreateInstance(self,
punkouter=None,
interface=None,
dynamic=False)
* Added the 'dynamic=False' parameter to the
comtypes.client.CoGetObject and comtypes.client.GetActiveObject
functions. Suggested by James Teh.
2009-06-17 Thomas Heller <[email protected]>
* comtypes.automation: Support VT_I8 and VT_UI8 SAFEARRAYs.
* comtypes._comobject: Restore compatibility with Python 2.3.
* Add the comtypes.IServiceProvider interface. Based on a patch
from Michael Curran.
2009-04-30 Thomas Heller <[email protected]>
* Change version number in repository to 0.6.0.2dev.
* Replace the VARIANTEnumerator implementation class in
comtypes.server.automation with a new one which should actually be
usable.
* A completely new way how localserver and inproc server instances
are managed:
A comtypes.LocalServer or comtypes.InprocServer instance
is attached to the comtypes.COMObject class at runtime.
These changes keep localserver running as long as
COMObject instances are alive.
2009-04-29 Thomas Heller <[email protected]>
* comtypes.errorinfo.ReportException now takes an additional
'stacklevel' named argument.
* Add E_OUTOFMEMORY hresult code.
* Register the InprocServer32 only when running as script or
py2exe dll, not when running as py2exe exe server.
2009-04-25 Thomas Heller <[email protected]>
* SAFEARRAYs can now also be created from multi-dimensional numpy
arrays.
2009-04-23 Thomas Heller <[email protected]>
* Change version number in repository to 0.6.0.1dev.
* SAFEARRAYs can now also be created from array.array objects, and
from (one-dimensional) numpy arrays. This is a lot faster than
creating them from Python lists or tuples, at least for large
arrays.
* ctypes instances like c_int, c_ubyte, and so on can now be
assigned to VARIANT().value. This allows to force creation of
VARIANTs with the corresponding typecodes V_I4, VT_UI1 and alike.
* Accept typelibs that contain SAFEARRAY(char).
2009-03-17 Thomas Heller <[email protected]>
* Fixed the return type of ITypeLib::ReleaseTLibAttr, which is
documented wrongly in MSDN. The return type is void, not HRESULT.
Reported to cause crashes on Windows 7.
2009-01-29 Thomas Heller <[email protected]>
* Restore compatibility with Python 2.3.
* comtypes\client\_code_cache.py: Add missing 'import types' in
comtypes\client\_code_cache.py.
2008-12-19 Thomas Heller <[email protected]>
* Bumped version number to 0.6.0.
* comtypes.client.lazybind.Dipatch:
If __getitem__ fails the get the indexed default value, try
NewENUM. Implement __eq__ for Python 3 compatibility.
* Fix a problem with SAFEARRAYs where the contained data was
released too early.
* Fix property get handling for FUNC_PUREVIRTUAL functions in
lazybind.py
2008-12-18 Thomas Heller <[email protected]>
* Fix memoryleak in IEnumVARIANT.
2008-12-12 Thomas Heller <[email protected]>
* Merged changes from the dyndispatch branch:
* Add a comtypes.client.Constants class that provides a way to
access constants in the type library for an object, even when
no wrapper has been created for the type library. The
contants can be accessed as attributes like this, assuming
'obj' is a COM object that exposes type information at runtime
via the dispatch interface:
Constants(obj).MyConstant
* New comtypes.client.lazybind module.
* Implement NamedProperty.__call__(). Extend
NamedProperty.__getitem__() and NamedProperty.__setitem__() so
that they accept a tuple, which make lazy bound objects more
compatible with early bound objects.
* Finished (for now) the comtypes.client.lazybind module.
IEnumVARIANT instances get a _dynamic attribute which defaults
to False. The values returned from next() calls are retrived
by calling ._set_value(self._dynamic) on the VARIANT result.
* comtypes.client.dynamic:
* Started changes based on ideas from Michael Curran: better
dynamic dispatch support, and a way to disable the
time-consuming wrapper code generation on demand.
* comtypes\client: Add a new 'dynamic=False' parameter to the
CreateObject function. This parameter allows to create a
dynamic dispatch object, bypassing the code generation.
* comtypes\automation.py: Add a new parameter to the
VARIANT._get_value(dynamic=False) method. This allows to
retrieve the current value as a _Dispatch() instance if the
typecode is VT_DISPATCH, bypassing the code generation on the
result. The IDispatch.Invoke implementation now uses this to
ensure that dynamic objects are returned when possible.
* comtypes\client\dynamic.py: Implement _Dispatch.__eq__ so
that we can compare instances for equality.
2008-12-12 Thomas Heller <[email protected]>
* Bumped version number to 0.5.3.
* Added VARIANT support for VT_I8 and VT_UI8 typecodes.
2008-12-11 Thomas Heller <[email protected]>
* Workaround for Python bug: Python 3 cannot handle a distutils
installscript in the setup script
* Merged the py3-branch:
Various changes for py3 compatibility. The setup script now uses
distutils.command.build_py.build_py_2to3 when run with Python 3.x,
and converts the sources into py3 syntax on the fly (in the build
directory).
2008-11-26 Thomas Heller <[email protected]>
* Added untested code to comtypes.server: RegisterActiveObject()
and RevokeActiveObject(), plus some flags.
* Applied a patch from Torbjørn Tyridal. This allows to
high-level implement methods in COM servers, and event handler
methods that have [in] and [out] arguments in mixed order.
2008-11-05 Thomas Heller <[email protected]>
* Add the IPersistFile interface to the comtypes.persist module.
Add comtypes.shelllink module which contains IShellLinkA and
IShellLinkW interfaces, plus the ShellLink coclass.
2008-10-29 Thomas Heller <[email protected]>
* Handle coclass pointers as arguments in com interface methods
correctly. Method calls will now accept pointers to the default
interface of this coclass.
* The Fire_Event() method in comtypes.server.connectionpoints now
returns a list of results.
2008-10-10 Thomas Heller <[email protected]>
* Import cStringIO, which should always be available on Windows,
instead of first trying cStringIO and then StringIO.
* Python 2.6 compatibility: use 'types.MethodType' instead of
'new.instancemethod' to fix a -3 warning.
Use 'raise Exception(details)' instead of
'raise Exception, details'.
Don't use tuple unpacking in exception handlers:
'except COMError, err:
(hresult, text, details) = err'
instead of
'except COMError, (hresult, text, details)'
* Python 2.4 compatibility: os.stat() raises OSError instead of
WindowsError when a file is not found.
2008-09-19 Thomas Heller <[email protected]>
* Bump version number to 0.5.3dev.
* Bump version number to 0.5.2.
Released comtypes-0.5.2.
* COMError nows prints the contained hresult in hex.
2008-09-18 Thomas Heller <[email protected]>
* Changed the version-checking code that the code generator
creates. Reintroduced (sorry, Anthony!) the comparison of
timestamps, if both the typelib and the generated module are
files.
2008-09-10 Thomas Heller <[email protected]>
* In comtypes\_comobject.py, Invoke: Named arguments passed to
COMObject.IDispatch_Invoke are now (hopefully!) unpacked
correctly. This should fix the order of parameters passed to MS
office (Word, Excel) and other (autocad?) event handlers.
2008-09-04 Thomas Heller <[email protected]>
* Removed the code that compared the timestamps of Python wrapper
modules and type library files - this approach was totally broken.
Generated modules are out of date if they were created by the code
generator module with a different version number; the version
number is now checked when a module is imported.
The current mechanism also works correctly for generated modules
in frozen scripts.
Thanks to Anthony Tuininga.
2008-08-27 Thomas Heller <[email protected]>
* Avoid double-free of BSTR strings under certain conditions.
* A NULL handler is now added to the comtypes logger; this
prevents messages like 'No handlers could be found for logger
"comtypes"' when an error message is logged and the logging module
is not configured.
https://sourceforge.net/tracker/index.php?func=detail&aid=2066024&group_id=115265&atid=692940
2008-08-20 Thomas Heller <[email protected]>
* Changed the codegenerator to generate 'c_longlong' instead of
'c_float' for CURRENCY. This is not really correct since the
CURRENCY value is a fixed point integer scaled by a factor of
10000, but at least the code will not crash. Need a test case.
* comtypes.server.register: Add an optional 'executable' parameter
to Registrar.register(cls), can be used to override the executable
image name that comtypes detects itself. Patch by Michael
Robellard.
2008-08-15 Thomas Heller <[email protected]>
* comtypes.client._find_gen_dir() improved (based on a patch and
helpful thoughts of Stefan Schukat): If comtypes.gen is not a
directory in the filesystem, or not writeable by users, a new
directory is created which will cache generated code. This could
be the case if comtypes is installed in a directory that has no
write permissions by the urrent user, if the comtypes package
resides in a zip-archive or a zipped egg, or if comtypes is used
in a py2exe'd script.
'%APPDATA%\<username>\Python\Python<XY>\comtypes_cache'
is used for a normal Python script, for a py2exe frozen executables
the directory will be
'%TEMP%\comtypes_cache\<imagebasename>-<XY>'
where <imagebasename> is the basename without extension of the
frozen executable image, and <XY> is the major and minor Python
version number, '25' for example.
This makes sure that generated modules will *always* cached in the
file system.
2008-08-13 Thomas Heller <[email protected]>
* comtypes\automation.py: Allow this module to be imported on
Windows CE. Using safearrays on Windows CE will not work. I'm not
sure if they are used much.
2008-08-08 Thomas Heller <[email protected]>
* Implement InterlockedIncrement and InterlockedDecrement for
win64.
2008-08-07 Thomas Heller <[email protected]>
* Bump version number to 0.5.1
* comtypes\tools\codegenerator.py: Change the order of the
interfaces in the _com_interfaces_ and _outgoing_interfaces_ list
so that the default interface is the first one. This fixes the
bug that GetEvents() and ShowEvents() sometimes did use the wrong
event interface.
2008-08-06 Thomas Heller <[email protected]>
* The repository was moved from python.org to sourceforge.net.
The svn trunk URL is now:
https://comtypes.svn.sourceforge.net/svnroot/comtypes/trunk
The script that extracted the repository is in
admin/extract_comtypes_repo. The repository structure and the
revision numbers have changed; the last revision on python.org is
rev 65336, this was imported as revision rev 355.
2008-07-18 Thomas Heller <[email protected]>
* comtypes\test\find_memleak.py: Windows CE does not have
GetProcessMemoryInfo; disable the find_memleak function because it
cannot work.
* comtypes\client\_generate.py, comtypes\typeinfo.py: Windows CE
doesn't have QueryPathOfRegTypeLib - try to emulate it. Also it
doesn't use tha PATH environment variable; use a hardcoded search
path for type libraries.
* comtypes\test\runtests.py: Define a main() function.
2008-05-29 Thomas Heller <[email protected]>
* Improved the [in, out] parameter workaround. These parameters
are now optional. Removed the special codegeneration for [in,
out] parameters in IEnumXXX.Next methods. Added test.
2008-05-16 Thomas Heller <[email protected]>
* Provide a workaround for a bug in ctypes. This allows methods
using [in, out] parameters to correctly convert native Python
values.
* comtypes/tools/tlbparser.py: When GetRefTypeInfo(hreftype)
fails, emit a warning and generate a fake type instead.
2008-05-07 Thomas Heller <[email protected]>
* Fixed the definition of VARIANT.empty and VARIANT.null; the
values were swapped.
https://sourceforge.net/tracker/?func=detail&atid=692940&aid=1959722&group_id=115265
2008-04-25 Thomas Heller <[email protected]>
* Replace logger.info() calls with logger.debug() since it is more
appropriate.
In comtypes.server.connectionpoints, when a event notification
fails with an error indicating that the event sink is no longer
present, close the connection and log a warning.
The __repr__ of VARIANT changed again to make it a little bit shorter.
VARIANT instances of VT_BREF are NOT unpacked when the .value
attribute as accessed. The value instead can be got or set by
indexing, so the api is the same as for pointer instances:
print byref_var[0]
byref_var[0] = value
2008-04-17 Thomas Heller <[email protected]>
* More changes merged from upstream svn 26400, add support for
implementing (non-dual) dispinterfaces (work in progress).
* Merge in a lot of changes from the private upstream repository
26394; mainly much better support for implementing comtypes
servers.
2008-04-09 Thomas Heller <[email protected]>
* Bump version number to 0.4.3a
* Released version comtypes 0.4.2.
* comtypes.util: New module, containing the byref_at() and
cast_field() helper functions.
2008-04-07 Thomas Heller <[email protected]>
* Fix the codegenerator to handle all kinds of IEnumXXX::Next
method signatures; the second and third parameters may be [out] or
[in, out].
2008-03-07 Thomas Heller <[email protected]>
* Implemented support for SAFEARRAYs containing com interface
pointers.
2008-03-04 Thomas Heller <[email protected]>
* Add comtypes.client.gen_dir to comtypes.gen.__path__ so that the
codegenerator can import its generated module(s).
2008-02-08 Thomas Heller <[email protected]>
* Hacked support for 'open array' [out] parameters in COM methods.
These are arrays that have both size_is() and length_is() in IDL.
See the comments in comtypes\tools\codegenerator.py, search for
'OPENARRAY'.
2008-02-06 Thomas Heller <[email protected]>
* The badly named comtypes.client.wrap function was renamed into
comtypes.client.GetBestInterface. For backwards compatibility the
old name stays as an alias.
* Replaced the comtypes.messageloop.add_filter(filter) function
with comtypes-messageloop.insert_filter(index, filter). This
allows to specify the order in which the filters are applied.
* Added a workaround for the buggy _ctypes.COMError in Python 2.5
and 2.51.
2007-12-19 Thomas Heller <[email protected]>
* Bump version number to 0.4.2.
* Special methods (__iter__ and so on) did not work on
dispinterfaces, because the __map_case__ dictionary was not
populated.
2007-11-23 Thomas Heller <[email protected]>
* Released version comtypes 0.4.1.
* Add a PumpEvents(timeout) function to comtypes.client. This
function calls the win32 CoWaitForMultipleHandles() function which
will wait in a way compatible with all types of apartments;
additionally this function can be interrupted with Control+C.
2007-11-21 Thomas Heller <[email protected]>
* comtypes\__init__.py: Add docstrings to special methods. Make
named_property a data descriptor by providing a __set__ method
(which will raise AttributeError when called).
2007-11-15 Thomas Heller <[email protected]>
* comtypes\__init__.py: Fix bound_named_property.__setitem__ so
that COM properties can be set that require zero or more than one
arguments.
* comtypes\__init__.py: Restructure the code that extend the COM
interface subclasses with __len__, __call__, __getitem__, and
__iter__ methods. This is done with the comtypes.partial module,
and apparently had strange behaviour when the code is run under a
debugger.
2007-11-07 Thomas Heller <[email protected]>
* Changed version number to 0.4.1.
* Add an post-install script that will (after confirmation) remove
the comtypes\gen directory containing the generated modules.
2007-11-02 Thomas Heller <[email protected]>
* Bump version number to 0.4.0.
Released version 0.4.0.
* In _wrap_coclass, attach a __clsid attribute to the returned
object. This allows, for example, to find outgoing interfaces when
a CoClass is returned from a COM method call.
2007-10-26 Thomas Heller <[email protected]>
* Implemented property get, put, and putref with arguments
in comtypes.client.dynamic.
* When a COM property has both propput and propputref accessor
methods, the Python property fset methods determines the type of
the argument.
If the argument is a COM interface pointer, or a VARIANT
containing one, then propputref is called, otherwise proput is
called to set the property.
* Allow the creation of SAFEARRAY(UDT) types even if the UDT has
no _recordinfo_. Creating instances of these types will fail
however since no IRecordInfo pointer can be created. This change
allows to import typelib wrappers that have UDTs without guids.
2007-10-24 Thomas Heller <[email protected]>
* When a COM property has a 'propputref' but no 'propput' accessor
method, use the former in the same way as a 'propput' would work.
When both 'propputref' and 'propput' are present, raise a
TypeError because we cannot handle this case for now.
* Fixed infinit recursion error in __getattr__ implementation.
* comtypes.dynamic._Dispatch now implements a __setattr__ methods
that will call to Invoke() with DISPATCH_PROPERTYPUT or
DISPATCH_PROPERTYPUTREF.
* Handle DISPATCH_PROPERTYPUTREF in IDispatch.Invoke
implementation.
* comtypes.dynamic._Dispatch objects can now be used as VARIANT
value.
2007-10-22 Thomas Heller <[email protected]>
* The repr of a COM pointer instance now includes the pointer
value for easier debugging.
2007-10-17 Thomas Heller <[email protected]>
* Disable the VT_UNKNOWN and VT_DISPATCH safearray codes, they do
not work yet.
* More multidimensional safearray tests, bug fixes.
* Speed up the unpacking of 1- and 2-dimensional safearrays.
* Lots of refatoring of the new SAFEARRAY code; added a docstring
to the public function comtypes.safearray._midlSAFEARRAY.
* For easier debugging, the repr of a VARIANT instance now
contains the vartype.
2007-10-16 Thomas Heller <[email protected]>
* Changed version number to 0.3.4.
* Mega-patch: Completely rewritten safearray support. SAFERARRAYs
are now automatically converted to Python tuples when they are
received as [out] parameters in COM methods, and sequences are
accepted as SAFEARRAY [in] parameters. Multidimensional safearray
support still has to be added.
* VARIANTs can now also contain SAFEARRAYs. VARIANTs containing
SAFEARRAYs with a typecode other than VT_VARIANT, Python
array.array instances can be used.
* Added a comtypes.messageloop module that contains a simple
messageloop which allows to add and remove custom filter functions.
* Removed the comtypes.client.PumpWaitingMessages function.
* Fixed the codegenerator so that it handles unnamed method
parameters.