[pywin32-bugs] [ pywin32-Bugs-1097153 ] DispatchWithEvents always rebuild makepy support
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2005-01-06 12:52:01
|
Bugs item #1097153, was opened at 2005-01-06 13:51 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1097153&group_id=78018 Category: com Group: None Status: Open Resolution: None Priority: 5 Submitted By: Giovanni Bajo (giovannibajo) Assigned to: Nobody/Anonymous (nobody) Summary: DispatchWithEvents always rebuild makepy support Initial Comment: Hello, it looks like DispatchWithEvents has a bug and always rebuild the makepy support even if it is not necessary. The bug is here: if not disp.__dict__.get("CLSID"): # Eeek - no makepy support - try and build it. try: [...] The problem is the use of disp.__dict__ which is the dictionary instance. makepy generates objects which have their CLSID as a class attribute (rather than instance attributes). To fix this bug, it is sufficient to change this bug to the more straightforward and standard: if not getattr(disp, "CLSID"): # Eeek - no makepy support - try and build it. try: I'm not sure if the use of __dict__ was to avoid looking up in base classes (no clue about how win32com internally wraps COM objects). In that case, I suggest to use disp.__class__.__dict__ instead of disp.__dict__. Please, let me know in which official released version of win32all this fix will appear. Thanks. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1097153&group_id=78018 |