forked from enthought/comtypes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CHANGES.txt
1105 lines (745 loc) · 37.5 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.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 <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* Add a __repr__ method to named_property and bound_named_property
object.
2010-01-15 Thomas Heller <theller@python.net>
* Bump version number to 0.6.3dev: development version.
2010-01-15 Thomas Heller <theller@python.net>
* Bumped version number to 0.6.2.
* CoUninitialize() returns nothing, not HRESULT.
2009-12-22 Thomas Heller <theller@python.net>
* Bug fixes for event handlers implemented in Python.
2009-12-11 Thomas Heller <theller@python.net>
* 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 <theller@python.net>
* Allow typelib wrappers that contain 'SAFEARRAY(VARIANT*)'
parameter types to be imported. Calling these methods will fail,
though.
2009-11-13 Thomas Heller <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* Fix a memory leak in Python COM servers. Thanks to Michael
Eddington for the patch.
2009-10-02 Thomas Heller <theller@python.net>
* comtypes\test\test_server.py: Start a better approach to test
both COM object calls and COM object implementations.
2009-09-09 Thomas Heller <theller@python.net>
* 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 <theller@python.net>
* CoTaskMemFree does not return a HRESULT. Patch from James Teh.
2009-08-19 Thomas Heller <theller@python.net>
* Bumped version number to 0.6.1.
2009-08-07 Thomas Heller <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* SAFEARRAYs can now also be created from multi-dimensional numpy
arrays.
2009-04-23 Thomas Heller <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* Fix memoryleak in IEnumVARIANT.
2008-12-12 Thomas Heller <theller@python.net>
* 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 <theller@python.net>
* Bumped version number to 0.5.3.
* Added VARIANT support for VT_I8 and VT_UI8 typecodes.
2008-12-11 Thomas Heller <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* Implement InterlockedIncrement and InterlockedDecrement for
win64.
2008-08-07 Thomas Heller <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* Implemented support for SAFEARRAYs containing com interface
pointers.
2008-03-04 Thomas Heller <theller@python.net>
* Add comtypes.client.gen_dir to comtypes.gen.__path__ so that the
codegenerator can import its generated module(s).
2008-02-08 Thomas Heller <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* 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 <theller@python.net>
* The repr of a COM pointer instance now includes the pointer
value for easier debugging.
2007-10-17 Thomas Heller <theller@python.net>
* 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 <theller@python.net>
* 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.
2007-10-04 Thomas Heller <theller@python.net>
* Several refactorings and a small bugfix from the upstream
repository.
* In the comtypes\gen\... type library wrappers, the code
generator now creates a commented out template that shows an
implementation for each interface it wraps.
2007-10-02 Thomas Heller <theller@python.net>
* comtypes.safearray.UnpackSafeArray can now unpack SAFEARRAYs
that containt UDT (user defined data types). Patch by Rimon Barr,
testcase by me.
2007-09-14 Thomas Heller <theller@python.net>
* Released version 0.3.3.
2007-09-12 Thomas Heller <theller@python.net>
* Bump version number to 0.3.3.
2007-09-03 Thomas Heller <theller@python.net>
* Add the partial module, which allows the usual class statement
syntax to attach methods to already existing classes.
* Use partial in comtypes.automation to attach methods to
POINTER(VARIANT).
2007-08-24 Thomas Heller <theller@python.net>
* Added a custom outgoing interface to TestComServer.idl.
Implemented IConnectionPointContainer in TestComServer.py.
* comtypes.server.automation: Fix the IProvideClassInfo2.GetGUID
implementation.
* comtypes.client: Fix ShowEvents(): COM methods must return a
HRESULT value, not None. Fix several NameErrors in the
PumpWaitingMessages function.
2007-08-14 Thomas Heller <theller@python.net>
* comtypes\tools\codegenerator.py: Generate the needed imports
when COM defaultvalues are used in parameter lists.
2007-08-10 Thomas Heller <theller@python.net>
* Add comtypes.client.PumpWaitingMessages() helper funtion. May
be used to dispatch COM events in single threaded appartments.
2007-08-09 Thomas Heller <theller@python.net>
* Added the IRecordInfo interface to comtypes.typeinfo.
* If UDTs (structures or unions) in a typelib have a GUID defined,
add a _recordinfo_ attribute to the generated code. This allows
to call GetRecordInfoFromGuids(*_recordinfo_) to get an
IRecordInfo pointer.
* Released comtypes-0.3.2
2007-08-08 Thomas Heller <theller@python.net>
* Add better support for dynamic dispatch, comtypes.CoUninitialize
function. Patch from Belyaev Dmitry.
2007-03-23 Thomas Heller <theller@python.net>
* Fixed: TextWrap did destroy the generated code when very long
symbol names used were in the type library.
* The IEnumVARIANT.Next(celt) method can now be called with
celt != 1. It will return a list of items then; this allows to get
more objects at a time.
2007-03-22 Thomas Heller <theller@python.net>
* In comtypes.hresult, add the hex HRESULT values in comments for
reference.
* In comtypes.errorinfo.ReportError, use the supplied hresult
value.
* Improved _NewEnum client-side handling.
* When a relative pathname to a type library is passed to
comtypes.client.GetModule(), the pathname is now interpreted
relative to the __file__ of the caller if this pathname actually
exists in the filesystem.
* Fixed several memory leaks and other problems in the BSTR
implementation. The previous change that requires ctypes version
1.0.2 was backed out again because it was the wrong approach.
2007-01-25 Thomas Heller <theller@python.net>
NOTE: This comment is no longer true, see above.
* Removed unneeded methods from comtypes.BSTR. The resource
management is handled by ctypes; this requires ctypes version
1.0.2 to correctly release BSTR resources.
2007-01-19 Thomas Heller <theller@python.net>
* The comtypes.test package is now self contained, it does no
longer depend on ctypes.test which may not be available.
2007-01-16 Thomas Heller <theller@python.net>
* comtypes.tools.tlbparser: Sort interface methods by VTable order
(there are typeinfos that list the methods in a different order).
2007-01-11 Thomas Heller <theller@python.net>
* comtypes codegenerator: Do not hardcode pointer and VARIANT size
and alignment. This fixes code generation issues on 64-bit
Windows.
* comtypes.automation: Fix size of VARIANT definition for 64-bit
Windows.
2007-01-10 Thomas Heller <theller@python.net>
* (Re-)Added comtypes.__version__ again, and set it to "0.3.2".
* Removed assert statements about sizeof() and alingment() of
generated Structure subclasses for portability to 64-bit Windows.
* Iterating over COM collections retrived the _NewEnum property
twice.
* Cleaned up the codegeneration. Generated modules now have a
'typelib_path' variable that points to the type library used to
generate them, 'CoClass' subclasses have '_typelib_path_' which is
used for registration.
2007-01-02 Thomas Heller <theller@python.net>
* comtypes\client\_generate.py: Make sure that generated modules
have a __file__ attribute, even if gen_dir is None. The filename
part of the __file__ attribute is '<memory>' in this case.
2006-12-20 Thomas Heller <theller@python.net>
* comtypes.client.GetModule now recreates the Python module
automatically if the type library file timestamp is newer than the
module. The actual code for GetModule now lives in a separate
module comtypes.client._generate, but the GetModule symbol is
still exposed from comtypes.client.
* COM method implementations are now found doing case insensitive
lookup if the interfaces "_case_insensitivity_" attribute is True.
* Some memory leaks with BSTR have been fixed.
2006-12-13 Thomas Heller <theller@python.net>
* Fix the case insensitivity for COM interfaces (client-side only,
so far): If the Python interface class has a "_case_insensitive_"
attribute which is True, access of methods and properties is case
insensitive.
By default, this attribute is set to True in interfaces generated
from type libraries, because type libraries generally don't
preserve the casing of identifiers from IDL interface definitions.
2006-12-06 Thomas Heller <theller@python.net>
* Fix comtypes.test.test_typeinfo to work when either IE6 or IE7
is installed.
* comtypes.hresult: Add MAKE_HRESULT and HRESULT_FROM_WIN32
functions which return HRESULT values.
* Receive events from the event interface plus all the super
interfaces.
* When a NULL IDispatch pointer is received as an [out] parameter,
return None instead of the NULL pointer.
* Changed the way COM is shut down. No longer a need to call the
possibly expensive (or dangerous?) _is_com_initialized.
2006-11-15 Thomas Heller <theller@python.net>
* comtypes.client._events.GetEvents: Catch the exception when
IProvideClassInfo::GetGUID fails, and try the next strategy for
finding the outgoing interface.
* comtypes now has a __version__ attribute. This is set to
"0.3.1". Added test command to the setup script.
* New function comtypes.client.ShowEvents(source, interface=None).
This function is useful for debugging; it connects the source
object to a special event receiver that will first print out all
the event names, and later print out the events as they occur.