pywin32-bugs Mailing List for Python for Windows Extensions (Page 16)
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
(24) |
May
(19) |
Jun
(15) |
Jul
(43) |
Aug
(39) |
Sep
(25) |
Oct
(43) |
Nov
(19) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(21) |
Feb
(18) |
Mar
(14) |
Apr
(80) |
May
(56) |
Jun
(24) |
Jul
(30) |
Aug
(17) |
Sep
(36) |
Oct
(106) |
Nov
(38) |
Dec
(30) |
2005 |
Jan
(14) |
Feb
(14) |
Mar
(48) |
Apr
(28) |
May
(49) |
Jun
(23) |
Jul
(9) |
Aug
(13) |
Sep
(28) |
Oct
(21) |
Nov
(8) |
Dec
(26) |
2006 |
Jan
(56) |
Feb
(33) |
Mar
(33) |
Apr
(18) |
May
(16) |
Jun
(9) |
Jul
(24) |
Aug
(16) |
Sep
(14) |
Oct
(37) |
Nov
(38) |
Dec
(22) |
2007 |
Jan
(7) |
Feb
(16) |
Mar
(11) |
Apr
(15) |
May
(15) |
Jun
(8) |
Jul
(24) |
Aug
(26) |
Sep
(18) |
Oct
(11) |
Nov
(20) |
Dec
(1) |
2008 |
Jan
(19) |
Feb
(55) |
Mar
(7) |
Apr
(35) |
May
(66) |
Jun
(38) |
Jul
(26) |
Aug
(5) |
Sep
(25) |
Oct
(25) |
Nov
(18) |
Dec
(18) |
2009 |
Jan
(25) |
Feb
(38) |
Mar
(29) |
Apr
(25) |
May
(5) |
Jun
(11) |
Jul
(16) |
Aug
(16) |
Sep
(16) |
Oct
(1) |
Nov
(15) |
Dec
(33) |
2010 |
Jan
(13) |
Feb
(11) |
Mar
(1) |
Apr
(24) |
May
(26) |
Jun
(19) |
Jul
(22) |
Aug
(51) |
Sep
(38) |
Oct
(39) |
Nov
(25) |
Dec
(27) |
2011 |
Jan
(40) |
Feb
(31) |
Mar
(21) |
Apr
(42) |
May
(11) |
Jun
(16) |
Jul
(20) |
Aug
(14) |
Sep
(6) |
Oct
(8) |
Nov
(34) |
Dec
(7) |
2012 |
Jan
(60) |
Feb
(24) |
Mar
(6) |
Apr
(28) |
May
(41) |
Jun
(15) |
Jul
(14) |
Aug
(25) |
Sep
(30) |
Oct
(18) |
Nov
(30) |
Dec
(9) |
2013 |
Jan
(3) |
Feb
(8) |
Mar
(17) |
Apr
(23) |
May
(34) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
From: SourceForge.net <no...@so...> - 2012-01-02 07:44:28
|
Bugs item #3385752, was opened at 2011-08-03 10:38 Message generated for change (Comment added) made by mhammond You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3385752&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: win32 Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Rob Gardner (robmatic) Assigned to: Nobody/Anonymous (nobody) Summary: Byte Range Lock API incorrectly uses signed int for lock len Initial Comment: The win32 api for byte range locks, LockFileEx etc specifies unsigned (DWORD) arguments for the length of the lock. The Pywin32 api uses signed int, making it impossible to request some locks that would be allowed using the native wine32 api. ---------------------------------------------------------------------- >Comment By: Mark Hammond (mhammond) Date: 2012-01-01 23:44 Message: Fixed in 4182:57fc41295aa0 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3385752&group_id=78018 |
From: SourceForge.net <no...@so...> - 2012-01-02 07:39:09
|
Bugs item #2831327, was opened at 2009-08-03 00:22 Message generated for change (Comment added) made by mhammond You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=2831327&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: win32 Group: None >Status: Closed >Resolution: Wont Fix Priority: 5 Private: No Submitted By: lplatypus (ldeller) Assigned to: Nobody/Anonymous (nobody) Summary: GetProcessTimes converts wrongly to PyTime Initial Comment: win32process.GetProcessTimes returns PyTime objects which are off by time.timezone seconds. It appears that Windows returns a UTC time, but this is interpreted as if it were a local time. See attached example which demonstrates the bug. A similar problem probably exists with the win32process.GetThreadTimes function. ---------------------------------------------------------------------- >Comment By: Mark Hammond (mhammond) Date: 2012-01-01 23:39 Message: I'm reluctant to fix this, as (1) fixing it now could cause programs to break as they may already be working around the problem by applying the UTC offset manually, and (b) as the problem doesn't exist in the py3k version which uses datetime objects. I'm open to other ideas or thoughts though - for people who care, it might be best to start a thread on the python-win32 list where the opinions of others can also be heard. One useful concrete idea might be to allow a runtime flag be used so py2k can also use datetime objects but I'm not even sure that is worth the effort given py3k usage seems to be growing significantly. ---------------------------------------------------------------------- Comment By: Pascal Chambon (pchambon) Date: 2009-12-13 02:04 Message: I've had a hard time with that bug too :p The problem is that indeed the current pywin32 implementation uses FileTimeToSystemTime to get an UTC datetime, but then when converting to unix timestamp it uses mktime which expects localtime and automatically guesses the timzone/daylightsaving, so we get wrong values. Couldn't we just remove the #undef which prevents using python datetime api before py3k ? Or replace FileTimeToSystemTime by FileTimeToLocalTime and only work with local pytimes, by adding (SystemTimeToTzSpecificLocalTime(NULL, &st, <)) after FileTimeToSystemTime(&t, &st); ? ---------------------------------------------------------------------- Comment By: Mark Hammond (mhammond) Date: 2009-08-05 18:05 Message: Good catch - I should therefore nuke that function supporting a SYSTEMTIME seeing we have managed without *really* needing one so far... ---------------------------------------------------------------------- Comment By: lplatypus (ldeller) Date: 2009-08-05 17:40 Message: That sounds good to me. I see that the code for the py3k builds assumes that SYSTEMTIME always contains UTC, which contradicts the MSDN documentation for SYSTEMTIME [ http://msdn.microsoft.com/en-us/library/ms724950%28VS.85%29.aspx ]. Maybe this is not so bad: the only example I can find where SYSTEMTIME contains a local time is the return value of GetLocalTime(), and pywin's wrapper for this function return a tuple thus sidestepping the problem. ---------------------------------------------------------------------- Comment By: Mark Hammond (mhammond) Date: 2009-08-03 20:06 Message: Note the py3k builds use a datetime objects; I think a better solution is to allow these objects to also be used in py2k and let the PyTime object die a graceful death... ---------------------------------------------------------------------- Comment By: lplatypus (ldeller) Date: 2009-08-03 18:15 Message: Following through the C++ code, I see that the type conversion sequence is: FILETIME -> SYSTEMTIME -> DATE -> struct tm -> time_t Now with MSDN documentation handy I see that: - FILETIME is always UTC - SYSTEMTIME can be either UTC or the system's local time depending on the function being called - DATE documentation does not mention timezones at all - struct tm can contain UTC or the system's local time - time_t is always UTC In the present example, we have a UTC time all the way through to struct tm, but then it is converted to time_t using the mktime() function which expects the struct tm to be in local time. This occurs in PyTime::asLong() in PyTime.cpp How to fix this? I think that the PyTime object needs to be extended to know whether it contains UTC or local time. When constructed from a FILETIME value it needs to be marked as containing UTC. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=2831327&group_id=78018 |
From: SourceForge.net <no...@so...> - 2012-01-02 06:55:08
|
Bugs item #3438213, was opened at 2011-11-15 02:12 Message generated for change (Comment added) made by mhammond You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3438213&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: win32 Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Anthony (hovea) Assigned to: Mark Hammond (mhammond) Summary: astimezone could not process time on Pythonwin for 3.2 Initial Comment: Runing the testPersist.py Timezone processing failed on python32 returning Stat 1 pythoncom error: Unexpected exception in gateway method '<unknown>' ValueError: astimezone() cannot be applied to a naive datetime pythoncom error: Unexpected gateway error ValueError: astimezone() cannot be applied to a naive datetime Set Size0 Traceback (most recent call last): File "C:\Python32\Lib\site-packages\win32com\test\testPersist.py", line 204, in <module> test() File "C:\Python32\Lib\site-packages\win32com\test\testPersist.py", line 134, in test stcom = pythoncom.StgCreateDocfileOnILockBytes(lbcom, storagecon.STGM_DIRECT| storagecon.STGM_CREATE | storagecon.STGM_READWRITE | storagecon.STGM_SHARE_EXCLUSIVE, 0) pywintypes.com_error: (-2147467259, 'Unspecified error', None, None) ---------------------------------------------------------------------- >Comment By: Mark Hammond (mhammond) Date: 2012-01-01 22:55 Message: This is just a problem in testPersist.py, which I've fixed in 4181:cc10aa149c2c. I'll have a look at issue 2831327 next. ---------------------------------------------------------------------- Comment By: Jason R. Coombs (jaraco) Date: 2011-11-22 07:30 Message: Anthony, thanks for tracking this down. Mark, can you take a look at the proposed workaround. I don't understand the implications of the change, and I'm guessing you can do a better review of the patch than me. ---------------------------------------------------------------------- Comment By: Anthony (hovea) Date: 2011-11-22 00:49 Message: This issue could be fixed by change win32\src\PywinTypes.h from line 470 to 484 as follwings: #if (PY_VERSION_HEX < 0x03000000) # define NO_PYWINTYPES_TIME #endif // Python 2.3 doesn't have C Api for datetime, so can't have our new funky // support. #if (PY_VERSION_HEX >= 0x02040000) # define PYWIN_HAVE_DATETIME_CAPI #endif // XXX - fixme - ack - we don't yet like *both* defines existing - and for now // its only enabled in py3k #if (PY_VERSION_HEX > 0x03000000) # undef PYWIN_HAVE_DATETIME_CAPI #endif ########################################### This issue is caused by old, crap, custom time object, using standard one will be OK ---------------------------------------------------------------------- Comment By: Anthony (hovea) Date: 2011-11-21 19:26 Message: It's the same bug as https://sourceforge.net/tracker/?func=detail&aid=2831327&group_id=78018&atid=551954 Pytime in py3k does not work . ---------------------------------------------------------------------- Comment By: Anthony (hovea) Date: 2011-11-19 06:02 Message: This issues is cause in PyObject *PyIPropertyStorage::SetTimes(PyObject *self, PyObject *args). File PyIpropertyStorage.cpp line 622, which is called by Com Storage creation. PyWinObject_AsFILETIME not set the timezone information will cause failed of SetTimes. ---------------------------------------------------------------------- Comment By: Anthony (hovea) Date: 2011-11-16 01:02 Message: The Error is generated by pythoncom.StgCreateDocfileOnILockBytes call from testPersist.py" . Which is located in PyTime.cpp. line 806. I am building pywin by using VisualStudio 2008sp1. Simply Run setup.py build in the source code directory. When I am tracking down, it seems that from python3, astimezone should function should have timezone information to convert the correct time. I did not yet indentify where PyWinObject_AsSYSTEMTIME is called. ---------------------------------------------------------------------- Comment By: Jason R. Coombs (jaraco) Date: 2011-11-15 06:30 Message: I'm not familiar with building pywin32 from scratch. Are there instructions somewhere on how to build pywin32 on Python 3? I don't have VS2008 handy, so I tried using VS2010 and patched msvc9compilermodule with jaraco.develop.msvc (https://bitbucket.org/jaraco/jaraco.develop/src/5d0574e79d6f/jaraco/develop/msvc.py), but I'm still unable to build. Furthermore, I don't think this is an issue with win32timezone. "astimezone()" is a method on a datetime.datetime object (part of the stdlib). I don't think win32timezone comes into play. Furthermore, the text 'timezone' doesn't appear in testPersist.py. I don't understand what testPersist.py is trying to do. I think the errors about naive datetimes are coming from some other code which is opaque to testPersist. I don't feel qualified to address this issue, so I'm going to re-assign this to no one. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3438213&group_id=78018 |
From: SourceForge.net <no...@so...> - 2012-01-02 02:44:55
|
Patches item #3194663, was opened at 2011-02-27 20:11 Message generated for change (Comment added) made by mhammond You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=3194663&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: rv...@se... (rvolpe-swn) Assigned to: Nobody/Anonymous (nobody) Summary: Prevent LoadPythonServiceClass from importing non-services Initial Comment: The current implementation of LoadPythonServiceClass appends the target module's directory to sys.path. This means that if the target module's name is shadowed by that of another module already on sys.path, that shadowing module will be imported instead, leading to a cryptic "Python could not find the service class in the module" error logged to the Application event log. As an example, attempting to load the module "C:\Python27\lib\site-packages\pywinservice_example\test.py" loads the module "C:\Python27\lib\test\__init__.pyc" instead. This patch changes the logic to insert the module's directory at the beginning of sys.path, then remove it after attempting to import the module. The upside is that formerly shadowed module names (like "test.py") are now usable as service module names. The downside is that if the service module attempts to import another module with the same name, the service module itself will be imported instead. ---------------------------------------------------------------------- >Comment By: Mark Hammond (mhammond) Date: 2012-01-01 18:44 Message: Thanks! But the patch doesn't compile as it references variables outside the scope they are declared in. Further, I'm a little reluctant to remove the directory from sys.path as there might be code out there that relies on it. So I've taken the change which inserts the new path at the start of sys.path and dropped the rest as commit 4178:0dc6321ba653 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=3194663&group_id=78018 |
From: SourceForge.net <no...@so...> - 2012-01-02 02:22:56
|
Patches item #3433953, was opened at 2011-11-05 14:19 Message generated for change (Comment added) made by mhammond You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=3433953&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Oliver (otengler) Assigned to: Nobody/Anonymous (nobody) Summary: Auto complete methods of all implemented types for IDispatch Initial Comment: The auto completion for IDispatch COM objects only processes the methods of the implemented type but not the types this type implements. E.g. when trying to auto complete a "Shell.Application" object only "WindowSwitcher" is shown (Windows 7). "Shell.Application" implements IShellApplication5. IShellApplication5 implements IShellApplication4 and so on. The patch collects all methods in a none recursive way. ---------------------------------------------------------------------- >Comment By: Mark Hammond (mhammond) Date: 2012-01-01 18:22 Message: Thanks! Checked in as 4177:dc4e26c4e6a4 ---------------------------------------------------------------------- Comment By: Oliver (otengler) Date: 2011-11-06 10:30 Message: Yes, that would be nice. ---------------------------------------------------------------------- Comment By: Mark Hammond (mhammond) Date: 2011-11-05 18:35 Message: That looks pretty good to me - although I might move the pythoncom import locally to the new function. How would you like to be credited in the hg log and CHANGES.txt - "Oliver Tengler"? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=3433953&group_id=78018 |
From: SourceForge.net <no...@so...> - 2012-01-02 02:15:54
|
Patches item #3438431, was opened at 2011-11-15 10:42 Message generated for change (Comment added) made by mhammond You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=3438431&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: kxroberto (kxroberto) Assigned to: Nobody/Anonymous (nobody) Summary: ImportFile (Ctrl-I) iter bug Initial Comment: diff -ur --strip _orig/scriptutils.py ./scriptutils.py --- _orig/scriptutils.py 2010-08-25 17:46:40 +0000 +++ ./scriptutils.py 2011-11-15 18:37:26 +0000 @@ -391,7 +391,7 @@ path, modName = os.path.split(pathName) modName, modExt = os.path.splitext(modName) newPath = None - for key, mod in sys.modules.iteritems(): + for key, mod in list(sys.modules.iteritems()): if hasattr(mod, '__file__'): fname = mod.__file__ base, ext = os.path.splitext(fname) solves: Ctrl-I / FileImport: >>> Traceback (most recent call last): File "C:\Python27\Lib\site-packages\pythonwin\pywin\framework\intpyapp.py", line 330, in OnFileImport scriptutils.ImportFile() File "C:\Python27\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 394, in ImportFile for key, mod in sys.modules.iteritems(): RuntimeError: dictionary changed size during iteration win32ui.error: Error in Command Message handler for command ID 36867, Code 0 Note: in pure Python2 "sys.modules.iteritems()" would be ok. But for 2to3 the list(sys.modules.iteritems()) should be consistent ---------------------------------------------------------------------- >Comment By: Mark Hammond (mhammond) Date: 2012-01-01 18:15 Message: Sorry it has taken me so long to get back to this, but I'm interested in how sys,modules managed to change during this iteration. Did you have some other threads or similar running at the same time which may have imported modules? I can't repro it... ---------------------------------------------------------------------- Comment By: kxroberto (kxroberto) Date: 2011-11-16 02:40 Message: well, I do not completely understand the comment and 2to3 and if/how its used for pywin32 (auto-)maintenance ;-) (I don't really use Py3 except a raw one for esoteric fun tests. The problems start with my fingers not wanting to type all those extra braces for the many print statements ...). Isn't the problem that Py3 has only .items() but that behaves (oversmart & intransparently) like Py2's .iteritems(). Thus the problem of iteration over a dicts items while the dict itself changes, remains. But 2to3 I guess (?) doesn't auto-translate d.items() to list(d.items()) ? If so I see no other possib than "list(sys.modules.iteritems())" to trick it for working universal. C:\Python23\Lib>python32 Python 3.2.2 (default, Sep 4 2011, 09:51:08) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. File "C:\bin\pythonrc.py", line 19 print "-------------- First: PRESS ENTER 2x in GDB! -------------" ^ SyntaxError: invalid syntax >>> d={2:3,5:6} >>> d.items <built-in method items of dict object at 0x00B25930> >>> d.iteritems Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'dict' object has no attribute 'iteritems' >>> for x in d.keys(): del d[x] ... Traceback (most recent call last): File "<stdin>", line 1, in <module> RuntimeError: dictionary changed size during iteration >>> for x in list(d.keys()): del d[x] ... >>> >>> ---------------------------------------------------------------------- Comment By: Mark Hammond (mhammond) Date: 2011-11-16 01:46 Message: oops - just saw your comment :) I admit I like the items() version better as it is more "consistent" WRT other existing code - the fact that 2to3 changes it is actually a feature ---------------------------------------------------------------------- Comment By: Mark Hammond (mhammond) Date: 2011-11-16 01:44 Message: Wouldt sys,modules.items() be even better? ---------------------------------------------------------------------- Comment By: kxroberto (kxroberto) Date: 2011-11-15 10:46 Message: Note: in pure Python2 "sys.modules.items()" would be ok. But for 2to3 the list(sys.modules.iteritems()) should be consistent ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=3438431&group_id=78018 |
From: SourceForge.net <no...@so...> - 2012-01-02 02:05:14
|
Patches item #3468280, was opened at 2012-01-01 14:30 Message generated for change (Comment added) made by mhammond You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=3468280&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: kxroberto (kxroberto) Assigned to: Nobody/Anonymous (nobody) Summary: History for Pythonwin Search&Replace Dialog Initial Comment: adds (session) history comboboxes to the Pythonwin Search&Replace Dialog. Note: The history of the Replace combobox is not joint with the Search combobox so far. Don't know if it would really be better, and would require a few more lines. ---------------------------------------------------------------------- >Comment By: Mark Hammond (mhammond) Date: 2012-01-01 18:05 Message: Thanks. Checked in as 4176:9b3d4f355d25 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=3468280&group_id=78018 |
From: SourceForge.net <no...@so...> - 2012-01-02 02:00:53
|
Patches item #3439279, was opened at 2011-11-17 01:08 Message generated for change (Comment added) made by mhammond You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=3439279&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Dieter Verfaillie (dieterv1) Assigned to: Nobody/Anonymous (nobody) Summary: Add missing LOGON32 constants Initial Comment: While trying to get LogonUser/ImpersonateLoggedOnUser to work with cashed credentials, I noticed win32con is missing LOGON32_PROVIDER_WINNT40 and LOGON32_PROVIDER_WINNT50. I've also added some missing LOGON32_LOGON constants while at it. Relevant documentation: http://msdn.microsoft.com/en-us/library/windows/desktop/aa378184%28v=vs.85%29.aspx http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/w32api/include/winbase.h?rev=1.114&content-type=text/x-cvsweb-markup&cvsroot=src ---------------------------------------------------------------------- >Comment By: Mark Hammond (mhammond) Date: 2012-01-01 18:00 Message: Thanks - checked in as 4175:95c5dde755c2 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=3439279&group_id=78018 |
From: SourceForge.net <no...@so...> - 2012-01-02 01:50:22
|
Patches item #3468282, was opened at 2012-01-01 14:34 Message generated for change (Comment added) made by mhammond You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=3468282&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: kxroberto (kxroberto) Assigned to: Nobody/Anonymous (nobody) Summary: Pythonwin Autocompletion for win32ui/_obj_ Attributes too Initial Comment: Upon Autocompletion (pressing ".") win32ui/_obj_ attributes which were not used so far are shown too now ---------------------------------------------------------------------- >Comment By: Mark Hammond (mhammond) Date: 2012-01-01 17:50 Message: Thanks! Applied as 4174:a341ce8e7989 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=3468282&group_id=78018 |
From: SourceForge.net <no...@so...> - 2012-01-02 01:44:24
|
Patches item #3440738, was opened at 2011-11-21 05:54 Message generated for change (Comment added) made by mhammond You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=3440738&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 9 Private: No Submitted By: kxroberto (kxroberto) Assigned to: Nobody/Anonymous (nobody) Summary: DECREF INCREF Problem (probably severe) Initial Comment: See also bug #1590399 I still have nasty problems with Python objects magically changing / loosing attributes shortly after creation, while using win32ui and heavy threading. Mainly on machines with many Cores/CPUs. Patch below: I found 2 strongly smelling locations in win32ui, which are probably responsible: where objects are DECREF'ed and possibly INCREF'ed soon after - while "hoping" that they do not disappear. But I guess this is not valid (today). A new Python object somewhere may use this memory meanwhile and then the object may be stolen back and going hybrid ... (Unfortunately I don't have the MS full version compilers to compile current MFC based stuff. (Or is this possible somehow with VC Express versions?) I could make quick tests of win32ui.pyd (py2.3 and py2.6) diff -ur --strip _orig/win32assoc.cpp ./win32assoc.cpp --- _orig/win32assoc.cpp 2009-03-04 11:52:00 +0000 +++ ./win32assoc.cpp 2011-11-21 13:10:42 +0000 @@ -228,11 +228,11 @@ // So set the instance to NULL _before_ we decref it! PyObject *old = pAssoc->virtualInst; pAssoc->virtualInst = NULL; - XDODECREF(old); if (ob!=Py_None) { pAssoc->virtualInst = ob; DOINCREF(ob); } + XDODECREF(old); RETURN_NONE; } diff -ur --strip _orig/win32cmd.cpp ./win32cmd.cpp --- _orig/win32cmd.cpp 2009-01-08 22:33:00 +0000 +++ ./win32cmd.cpp 2011-11-21 13:10:26 +0000 @@ -208,17 +208,20 @@ RETURN_ERR("The parameter must be a callable object or None"); void *oldMethod = NULL; - // note I maybe decref, then maybe incref. I assume object wont be destroyed - // (ie, ref go to zero) between the 2 calls!) + // we need incref's early in order to avoid a ref erronously going to zero during DEDECREF + if (method!=Py_None) { + Py_INCREF(method); + Py_INCREF(hookedObject); + } if (pList->Lookup(message, oldMethod)) { pList->RemoveKey(message); // oldMethod is returned - don't drop its reference. DODECREF(hookedObject); } if (method!=Py_None) { - Py_INCREF(method); + // already done above: Py_INCREF(method); pList->SetAt(message,method); - Py_INCREF(hookedObject); + // already done above: Py_INCREF(hookedObject); } if (oldMethod) return (PyObject *)oldMethod; ---------------------------------------------------------------------- >Comment By: Mark Hammond (mhammond) Date: 2012-01-01 17:44 Message: Thanks! I think that first patch could also be done by checking the new object isn't the same as the old, but I did it your way :) The second one I made simpler - just always incref to add a temp ref and always decref at the end - I've attached that patch below - please let me know if you think it will not work correctly for some reason. Checked in as rev 4173:95b4f896b100 diff --git a/Pythonwin/win32cmd.cpp b/Pythonwin/win32cmd.cpp --- a/Pythonwin/win32cmd.cpp +++ b/Pythonwin/win32cmd.cpp @@ -208,8 +208,10 @@ RETURN_ERR("The parameter must be a callable object or None"); void *oldMethod = NULL; - // note I maybe decref, then maybe incref. I assume object wont be destroyed - // (ie, ref go to zero) between the 2 calls!) + // note I maybe decref, then maybe incref. To ensure the object will + // not be destroyed (ie, ref go to zero) between the 2 calls), I + // add a temporary reference first. + DOINCREF(hookedObject); if (pList->Lookup(message, oldMethod)) { pList->RemoveKey(message); // oldMethod is returned - don't drop its reference. @@ -220,6 +222,7 @@ pList->SetAt(message,method); Py_INCREF(hookedObject); } + DODECREF(hookedObject); // remove temp reference added above. if (oldMethod) return (PyObject *)oldMethod; else ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=3440738&group_id=78018 |
From: SourceForge.net <no...@so...> - 2012-01-01 22:34:20
|
Patches item #3468282, was opened at 2012-01-01 14:34 Message generated for change (Tracker Item Submitted) made by kxroberto You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=3468282&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: kxroberto (kxroberto) Assigned to: Nobody/Anonymous (nobody) Summary: Pythonwin Autocompletion for win32ui/_obj_ Attributes too Initial Comment: Upon Autocompletion (pressing ".") win32ui/_obj_ attributes which were not used so far are shown too now ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=3468282&group_id=78018 |
From: SourceForge.net <no...@so...> - 2012-01-01 22:30:33
|
Patches item #3468280, was opened at 2012-01-01 14:30 Message generated for change (Tracker Item Submitted) made by kxroberto You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=3468280&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: kxroberto (kxroberto) Assigned to: Nobody/Anonymous (nobody) Summary: History for Pythonwin Search&Replace Dialog Initial Comment: adds (session) history comboboxes to the Pythonwin Search&Replace Dialog. Note: The history of the Replace combobox is not joint with the Search combobox so far. Don't know if it would really be better, and would require a few more lines. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=3468280&group_id=78018 |
From: SourceForge.net <no...@so...> - 2012-01-01 19:07:29
|
Bugs item #3462537, was opened at 2011-12-19 13:20 Message generated for change (Comment added) made by rupole You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3462537&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: win32 Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: kxroberto (kxroberto) Assigned to: Nobody/Anonymous (nobody) Summary: PyCTreeCtrl.SetItem crashes hard Initial Comment: app crash with request to report to MS. Reproducible by this minimal app with various python (2) versions. attached as file too. When using the ctypes variant for .SetItem (indicated below) it doesn't crash. ###################################################################### ## ## Exposes the PyCTreeCtrl.SetItem hard crash bug in build216 ## (was probably already in build214) ## As soon as you click on a Folder with no subfolder, GetSubList wants ## to set cChildren to 0 to remove the '+'/expandable sign from the branch ## , then crash: #Exception Info: #Code: 0xc0000005 #Address: 0x1e7aa3c5 #AppName: pythonwin.exe AppVer: 2.6.216.0 ModName: pywintypes26.dll #ModVer: 2.6.216.0 Offset: 0000a3c5 ## ## note: the ctypes version of .SetItem (shown below) doesn't crash ## ###################################################################### import os, sys, re, time, traceback import win32con, win32ui, win32api, commctrl import win32gui from pywin.mfc import dialog,window from pywin.tools import hierlist #import ext debug = 1 # directory listbox # This has obvious limitations - doesnt track subdirs, etc. Demonstrates # simple use of Python code for querying the tree as needed. # Only use strings, and lists of strings (from curdir()) class DirHierList(hierlist.HierList): def __init__(self, root, listBoxID = win32ui.IDC_LIST1): self.item2handle = {} self.noexpands = {} hierlist.HierList.__init__(self, root, win32ui.IDB_HIERFOLDERS, listBoxID) def GetText(self, item): return os.path.basename(item) def AddItem(self, parentHandle, item, hInsertAfter = commctrl.TVI_LAST): hitem = hierlist.HierList.AddItem(self, parentHandle, item, hInsertAfter) self.item2handle[item] = hitem return hitem def GetSubList(self, item): print "GetSubList", item if os.path.isdir(item): ret = [os.path.join(item, fname) for fname in os.listdir(item) if os.path.isdir(os.path.join(item, fname))] else: ret = None if not ret: # learn, which items have no sub folders / '+' (cChildren>0) can be removed self.noexpands[item] = 1 h = self.item2handle.get(item) if h: tup = self.GetItem(h) if debug: print "GetSubList", tup, tup.__class__ tup = list(tup) tup[6] = 0 #[6] int : cChildren : Number of child items. tup = tuple(tup) self.SetItem(tup) # <=========== CRASH ! # the c-types version doesn't crash: ## tvi = ext.TV_GetItem(self.hwnd, h) ## if debug:print "GetSubList", tvi.cChildren, tvi.pszText ## tvi.cChildren = 0 ## tvi.mask = commctrl.TVIF_CHILDREN # tvi.mask = -1 ALSO NO CRASH ## ext.TV_SetItem(self.hwnd, tvi) return ret def IsExpandable(self, item): if os.path.isdir(item) and not item in self.noexpands: return 1 return 0 def GetSelectedBitmapColumn(self, item): return self.GetBitmapColumn(item)+6 # Use different color for selection if __name__ == "__main__": testList2 = DirHierList("c:\\temp") dlg = hierlist.HierDialog('hier list test',testList2) dlg.CreateWindow() ##dlg.hierList.GetSubList("C:\\temp\\bin") ---------------------------------------------------------------------- >Comment By: Roger Upole (rupole) Date: 2012-01-01 11:07 Message: Fixed in win32util.cpp r4172 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3462537&group_id=78018 |
From: SourceForge.net <no...@so...> - 2011-12-19 21:20:33
|
Bugs item #3462537, was opened at 2011-12-19 13:20 Message generated for change (Tracker Item Submitted) made by kxroberto You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3462537&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: win32 Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: kxroberto (kxroberto) Assigned to: Nobody/Anonymous (nobody) Summary: PyCTreeCtrl.SetItem crashes hard Initial Comment: app crash with request to report to MS. Reproducible by this minimal app with various python (2) versions. attached as file too. When using the ctypes variant for .SetItem (indicated below) it doesn't crash. ###################################################################### ## ## Exposes the PyCTreeCtrl.SetItem hard crash bug in build216 ## (was probably already in build214) ## As soon as you click on a Folder with no subfolder, GetSubList wants ## to set cChildren to 0 to remove the '+'/expandable sign from the branch ## , then crash: #Exception Info: #Code: 0xc0000005 #Address: 0x1e7aa3c5 #AppName: pythonwin.exe AppVer: 2.6.216.0 ModName: pywintypes26.dll #ModVer: 2.6.216.0 Offset: 0000a3c5 ## ## note: the ctypes version of .SetItem (shown below) doesn't crash ## ###################################################################### import os, sys, re, time, traceback import win32con, win32ui, win32api, commctrl import win32gui from pywin.mfc import dialog,window from pywin.tools import hierlist #import ext debug = 1 # directory listbox # This has obvious limitations - doesnt track subdirs, etc. Demonstrates # simple use of Python code for querying the tree as needed. # Only use strings, and lists of strings (from curdir()) class DirHierList(hierlist.HierList): def __init__(self, root, listBoxID = win32ui.IDC_LIST1): self.item2handle = {} self.noexpands = {} hierlist.HierList.__init__(self, root, win32ui.IDB_HIERFOLDERS, listBoxID) def GetText(self, item): return os.path.basename(item) def AddItem(self, parentHandle, item, hInsertAfter = commctrl.TVI_LAST): hitem = hierlist.HierList.AddItem(self, parentHandle, item, hInsertAfter) self.item2handle[item] = hitem return hitem def GetSubList(self, item): print "GetSubList", item if os.path.isdir(item): ret = [os.path.join(item, fname) for fname in os.listdir(item) if os.path.isdir(os.path.join(item, fname))] else: ret = None if not ret: # learn, which items have no sub folders / '+' (cChildren>0) can be removed self.noexpands[item] = 1 h = self.item2handle.get(item) if h: tup = self.GetItem(h) if debug: print "GetSubList", tup, tup.__class__ tup = list(tup) tup[6] = 0 #[6] int : cChildren : Number of child items. tup = tuple(tup) self.SetItem(tup) # <=========== CRASH ! # the c-types version doesn't crash: ## tvi = ext.TV_GetItem(self.hwnd, h) ## if debug:print "GetSubList", tvi.cChildren, tvi.pszText ## tvi.cChildren = 0 ## tvi.mask = commctrl.TVIF_CHILDREN # tvi.mask = -1 ALSO NO CRASH ## ext.TV_SetItem(self.hwnd, tvi) return ret def IsExpandable(self, item): if os.path.isdir(item) and not item in self.noexpands: return 1 return 0 def GetSelectedBitmapColumn(self, item): return self.GetBitmapColumn(item)+6 # Use different color for selection if __name__ == "__main__": testList2 = DirHierList("c:\\temp") dlg = hierlist.HierDialog('hier list test',testList2) dlg.CreateWindow() ##dlg.hierList.GetSubList("C:\\temp\\bin") ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3462537&group_id=78018 |
From: SourceForge.net <no...@so...> - 2011-12-14 22:22:15
|
Bugs item #3459565, was opened at 2011-12-14 09:41 Message generated for change (Comment added) made by mhammond You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3459565&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: installation Group: None >Status: Closed >Resolution: Wont Fix Priority: 5 Private: No Submitted By: Muhammad Bashir Al-Noimi (mbnoimi) Assigned to: Nobody/Anonymous (nobody) Summary: Unable to build .msi package Initial Comment: I forced to use msi installation package because of network needs so I tried to create msi by bdist_msi but it didn\'t work correctly because of ValueError: invalid version number \'216\' Could you please help me to build msi package? ---------------------------------------------------------------------- >Comment By: Mark Hammond (mhammond) Date: 2011-12-14 14:22 Message: Thanks for your report, but this tracker is for reporting bugs in pywin32 rather than a place to request new features - in addition, I have no experience with building MSI packages and believe there will be issued attempting to run the post_install script from a .MSI. If you can get this going I'd be happy to consider accepting patches. You may like to try requesting help from the python-win32 mailing list where many more people will see your request and be able to help. You need to be subscribed to the list before you can post to it - see http://mail.python.org/mailman/listinfo/python-win32 for subscription options. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3459565&group_id=78018 |
From: SourceForge.net <no...@so...> - 2011-12-14 17:41:16
|
Bugs item #3459565, was opened at 2011-12-14 09:41 Message generated for change (Tracker Item Submitted) made by mbnoimi You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3459565&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: installation Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Muhammad Bashir Al-Noimi (mbnoimi) Assigned to: Nobody/Anonymous (nobody) Summary: Unable to build .msi package Initial Comment: I forced to use msi installation package because of network needs so I tried to create msi by bdist_msi but it didn\'t work correctly because of ValueError: invalid version number \'216\' Could you please help me to build msi package? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3459565&group_id=78018 |
From: SourceForge.net <no...@so...> - 2011-12-12 23:04:07
|
Bugs item #3458396, was opened at 2011-12-12 15:04 Message generated for change (Tracker Item Submitted) made by kxroberto You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3458396&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: win32 Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: kxroberto (kxroberto) Assigned to: Nobody/Anonymous (nobody) Summary: SetWindowLongW, GetWindowLongW, CallWindowProcW missing Initial Comment: Unicode windows cannot be controlled by the existing functions. (Except via re-setting the windowproc with ctypes...SetWindowLongW plus routing all unicode picky messages (like WM_S/GETTEXT, EM_REPLACESEL,...) through the message map and subclass-call ctypes....CallWindowProcW) The W versions of SetWindowLongW, GetWindowLongW, CallWindowProcW are needed for that. For SetWindowLongW(hwnd, wc.GWL_WNDPROC, msgmap) a extra dict/func handler UnicodeWindowProc needs to be used, which defaults to calling CallWindowProcW(oldfunc, ...) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3458396&group_id=78018 |
From: SourceForge.net <no...@so...> - 2011-12-12 17:09:01
|
Bugs item #2846720, was opened at 2009-08-28 22:56 Message generated for change (Comment added) made by sancelot2 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=2846720&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: win32 Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Farshid Lashkari (farshizzo) Assigned to: Nobody/Anonymous (nobody) Summary: win32ui crash in embedded app (212 -> 213 & 214 regression) Initial Comment: I have an application that embeds python and uses the win32ui module. Everything worked fine until I upgraded from 212 to 214. After the upgrade my application crashes on exit. The Visual Studio debugger is showing that the crash is occurring after my application calls CoUninitialize. Here is a rough outline of what my app does: CoInitialize(NULL) InitPython() RunPythonCode() //This code will import win32ui ClosePython() CoUninitialize() Simply importing the win32ui module causes the crash. I don't even need to call any of the modules functions. If I don't import win32ui then my application exits cleanly. I tried downgrading to version 213 but the crash still occurs. Version 212 seems to be the last version that was stable with my application. ---------------------------------------------------------------------- Comment By: s ANCELOT (sancelot2) Date: 2011-12-12 09:08 Message: I have exactly the same problem using python 2.6 32 bits version on win7 64 bits. on a win32 32 bits platform it has worked, but It did when launching the same application on 64 bits platform. after lot of researchs I found that loading win32ui was the problem. I tried the 212 build and the problem disappeared. I think it does not seem complicated to watch at changes between 212 and 216 build.? ---------------------------------------------------------------------- Comment By: Farshid Lashkari (farshizzo) Date: 2010-09-30 14:43 Message: I've experienced this crash on 2.4, 2.6, and 2.7. Since reporting this issue, I've abandoned the use of win32ui, so it's not a big deal for me anymore. But if you come up with a fix, I am willing to test it out. ---------------------------------------------------------------------- Comment By: Mark Hammond (mhammond) Date: 2010-09-30 00:57 Message: I can reproduce a problem after Py_Finalize is called - win32ui is trying to process a message (presumably sent during CoUninitialize) and getting upset as Python has been torn down. I can't explain how that has changed in recent versions though. If I change the example to CoUninitialize before the finalize everything seems to work fine. ---------------------------------------------------------------------- Comment By: Christoph Gohlke (cjgohlke) Date: 2010-09-29 23:27 Message: I can reproduce the crash with pywin32-214.win-amd64-py2.6 and main.cpp. The following code worked for me when compiled with msvc9 "cl.exe main.cpp /MD /link python26.lib ole32.lib": #include "Python.h" #include <windows.h> int main( int argc, char **argv ) { Py_Initialize(); CoInitialize(NULL); PyRun_SimpleString("import win32ui"); CoUninitialize(); Py_Finalize(); return 0; } ---------------------------------------------------------------------- Comment By: Mark Hammond (mhammond) Date: 2010-09-29 18:20 Message: I tried to reproduce this but hit manifest related issues trying python 2.6 - what python version are you using? ---------------------------------------------------------------------- Comment By: SourceForge Robot (sf-robot) Date: 2010-09-29 12:30 Message: This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker). ---------------------------------------------------------------------- Comment By: Farshid Lashkari (farshizzo) Date: 2010-09-13 16:03 Message: I just attached a simple console app that reproduces the issue for me using Python 2.7. ---------------------------------------------------------------------- Comment By: Mark Hammond (mhammond) Date: 2010-08-29 21:34 Message: I'm going to need either a repo or more details information on the crash. ---------------------------------------------------------------------- Comment By: Farshid Lashkari (farshizzo) Date: 2009-08-28 23:02 Message: Forgot to mention that I'm using Python 2.4 & 2.6, and both exhibit the same behavior. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=2846720&group_id=78018 |
From: SourceForge.net <no...@so...> - 2011-12-08 21:06:31
|
Bugs item #3454662, was opened at 2011-12-08 13:06 Message generated for change (Tracker Item Submitted) made by kxroberto You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3454662&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: kxroberto (kxroberto) Assigned to: Nobody/Anonymous (nobody) Summary: GetFileAttributesEx, GetFileTime yield wrong time Initial Comment: > >>> os.path.getmtime('x.txt') > 1193160881 > >>> int(win32file.GetFileAttributesExW('x.txt')[-2]) > 1193153681 > >>> int(win32file.GetFileAttributesExW('x.txt')[-2]) - > os.path.getmtime('x.txt') > -7200 > > (Win XP) > is this a bug, or is there a issue with timezones/summer time? > aren't time.time() values absolute? > had this issue again. py_GetFileAttributesEx creates <PyTime> objects from (linear) FILETIME). PyTime stores linear time as well (Windows VariantTime "DATE"), but the conversion is done via SYSTEMTIME - with hour,minute,... :-) py_GetFileAttributesEx > PyObject_FromFILEX_INFO > PyWinObject_FromFILETIME > FileTimeToSystemTime > PyTime Upon int(<PyTime>) the conversion from PyTime back to linear time is again done via SYSTEMTIME. These conversions via SYSTEMTIME are somehow buggy and principally bogus (during daylight-saving transition hours) overall. => the bug should perhaps be fixed by computing Pytime.m_time directly from FILETIME via y = a*x + b perhaps even better: GetFileAttributesEx should simply return Pythonic time.time() style linear time stamps, not PyTime. (but not backwards compatible; possibly by a flag parameter) Python example for linear time conversion: def FILETIME2time(ft): "returns time.time() style seconds from FILETIME" tutc = ft.dwHighDateTime * 4294967296L + ft.dwLowDateTime tt = tutc * 100e-9 - 11644473600 return tt ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3454662&group_id=78018 |
From: SourceForge.net <no...@so...> - 2011-12-06 21:08:21
|
Bugs item #3356683, was opened at 2011-07-06 10:05 Message generated for change (Comment added) made by chintanvj You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3356683&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: installation Group: None Status: Pending Resolution: None Priority: 5 Private: No Submitted By: LMO (rzn8tr) Assigned to: Nobody/Anonymous (nobody) Summary: Import Error: DLL load Failed Win XP Pro Initial Comment: Installed python 2.7, installed pywin32-216 without problems Uninstalled python 2.7, pywin32 Installed python 2.6 When installing pywin32-216 (or -215, same result), setup dialog shows: Traceback (most recent call last): File "<string>", line 604, in <module> File "<string>", line 314, in install File "<string>", line 152, in LoadSystemModule ImportError: DLL load failed: The specified module could not be found. ---------------------------------------------------------------------- Comment By: chintan (chintanvj) Date: 2011-12-06 13:08 Message: Hi, I am having the same problem. Having redistributables does not work. Thanks for the effort ---------------------------------------------------------------------- Comment By: http://jibinjohn.myopenid.com/ () Date: 2011-10-12 02:48 Message: @mhammond pywin32-216.win32-py2.6.exe ---------------------------------------------------------------------- Comment By: http://jibinjohn.myopenid.com/ () Date: 2011-10-12 02:45 Message: @mhammond I tried that its not working.Same error Windows xp professional sp3 python 2.6 (r26:66721, Oct 2 2008, 11:35:03) [MSC v.1500 32 bit (Intel)] ---------------------------------------------------------------------- Comment By: Mark Hammond (mhammond) Date: 2011-07-06 16:12 Message: I suspect you need the VS redistributables from http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=29 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3356683&group_id=78018 |
From: SourceForge.net <no...@so...> - 2011-11-28 21:53:18
|
Bugs item #3442669, was opened at 2011-11-26 03:47 Message generated for change (Comment added) made by mhammond You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3442669&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: com Group: None >Status: Closed >Resolution: Works For Me Priority: 5 Private: No Submitted By: https://www.google.com/accounts () Assigned to: Nobody/Anonymous (nobody) Summary: Calling Win32_NetworkAdapterConfiguration routines fails Initial Comment: I am trying to set the ip address of a network interface using win32com module and unable to do so. I have tried searching a lot but wasn't able to get a answer for the issue. Here is the code I am running : import win32com.client obj = win32com.client.Dispatch("WbemScripting.SWbemLocator") wmobj = obj.ConnectServer("localhost","root\cimv2") nobj = wmobj.ExecQuery("Select * from Win32_NetworkAdapterConfiguration") for n in nobj: print n.Caption n.SetMTU('9000') When I run this code it errors out with following error : Traceback (most recent call last): File "", line 3, in n.SetMTU('9000') File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line 505, in getattr ret = self.oleobj.Invoke(retEntry.dispid,0,invoke_type,1) com_error: (-2147352567, 'Exception occurred.', (0, u'SWbemObjectEx', u'Invalid method ', None, 0, -2147217362), None) I did some more debugging and found that I can access any variables of Win32Networking class but whenever I try to call any routine of the class it returns me this same error. ---------------------------------------------------------------------- Comment By: Mark Hammond (mhammond) Date: 2011-11-28 13:53 Message: Thanks for your report, but this tracker is for reporting bugs in pywin32 rather than a support forum. Please email support requests to the python-win32 mailing list where many more people will see your request and be able to help. You need to be subscribed to the list before you can post to it - see http://mail.python.org/mailman/listinfo/python-win32 for subscription options. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3442669&group_id=78018 |
From: SourceForge.net <no...@so...> - 2011-11-26 11:47:30
|
Bugs item #3442669, was opened at 2011-11-26 03:47 Message generated for change (Tracker Item Submitted) made by You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3442669&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: com Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: https://www.google.com/accounts () Assigned to: Nobody/Anonymous (nobody) Summary: Calling Win32_NetworkAdapterConfiguration routines fails Initial Comment: I am trying to set the ip address of a network interface using win32com module and unable to do so. I have tried searching a lot but wasn't able to get a answer for the issue. Here is the code I am running : import win32com.client obj = win32com.client.Dispatch("WbemScripting.SWbemLocator") wmobj = obj.ConnectServer("localhost","root\cimv2") nobj = wmobj.ExecQuery("Select * from Win32_NetworkAdapterConfiguration") for n in nobj: print n.Caption n.SetMTU('9000') When I run this code it errors out with following error : Traceback (most recent call last): File "", line 3, in n.SetMTU('9000') File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line 505, in getattr ret = self.oleobj.Invoke(retEntry.dispid,0,invoke_type,1) com_error: (-2147352567, 'Exception occurred.', (0, u'SWbemObjectEx', u'Invalid method ', None, 0, -2147217362), None) I did some more debugging and found that I can access any variables of Win32Networking class but whenever I try to call any routine of the class it returns me this same error. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3442669&group_id=78018 |
From: SourceForge.net <no...@so...> - 2011-11-24 10:17:48
|
Feature Requests item #3441730, was opened at 2011-11-24 02:17 Message generated for change (Tracker Item Submitted) made by kxroberto You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551957&aid=3441730&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: win32 Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: kxroberto (kxroberto) Assigned to: Nobody/Anonymous (nobody) Summary: "error: Callback must return an integer, or None" needs info Initial Comment: In win32ui apps "'error: Callback must return an integer, or None'" is raised without any info which callback function/method (and optionally which Hook/Window) it is about. No traceback stack as well. Thus it is quite impossible to locate the problem. win32uimodule.cpp/Line 749: PyErr_SetString(ui_module_error, "Callback must return an integer, or None"); There should be some info raised with the exception. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551957&aid=3441730&group_id=78018 |
From: SourceForge.net <no...@so...> - 2011-11-22 15:30:06
|
Bugs item #3438213, was opened at 2011-11-15 02:12 Message generated for change (Comment added) made by jaraco You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3438213&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. >Category: win32 Group: None Status: Open Resolution: Accepted Priority: 5 Private: No Submitted By: Anthony (hovea) >Assigned to: Mark Hammond (mhammond) Summary: astimezone could not process time on Pythonwin for 3.2 Initial Comment: Runing the testPersist.py Timezone processing failed on python32 returning Stat 1 pythoncom error: Unexpected exception in gateway method '<unknown>' ValueError: astimezone() cannot be applied to a naive datetime pythoncom error: Unexpected gateway error ValueError: astimezone() cannot be applied to a naive datetime Set Size0 Traceback (most recent call last): File "C:\Python32\Lib\site-packages\win32com\test\testPersist.py", line 204, in <module> test() File "C:\Python32\Lib\site-packages\win32com\test\testPersist.py", line 134, in test stcom = pythoncom.StgCreateDocfileOnILockBytes(lbcom, storagecon.STGM_DIRECT| storagecon.STGM_CREATE | storagecon.STGM_READWRITE | storagecon.STGM_SHARE_EXCLUSIVE, 0) pywintypes.com_error: (-2147467259, 'Unspecified error', None, None) ---------------------------------------------------------------------- >Comment By: Jason R. Coombs (jaraco) Date: 2011-11-22 07:30 Message: Anthony, thanks for tracking this down. Mark, can you take a look at the proposed workaround. I don't understand the implications of the change, and I'm guessing you can do a better review of the patch than me. ---------------------------------------------------------------------- Comment By: Anthony (hovea) Date: 2011-11-22 00:49 Message: This issue could be fixed by change win32\src\PywinTypes.h from line 470 to 484 as follwings: #if (PY_VERSION_HEX < 0x03000000) # define NO_PYWINTYPES_TIME #endif // Python 2.3 doesn't have C Api for datetime, so can't have our new funky // support. #if (PY_VERSION_HEX >= 0x02040000) # define PYWIN_HAVE_DATETIME_CAPI #endif // XXX - fixme - ack - we don't yet like *both* defines existing - and for now // its only enabled in py3k #if (PY_VERSION_HEX > 0x03000000) # undef PYWIN_HAVE_DATETIME_CAPI #endif ########################################### This issue is caused by old, crap, custom time object, using standard one will be OK ---------------------------------------------------------------------- Comment By: Anthony (hovea) Date: 2011-11-21 19:26 Message: It's the same bug as https://sourceforge.net/tracker/?func=detail&aid=2831327&group_id=78018&atid=551954 Pytime in py3k does not work . ---------------------------------------------------------------------- Comment By: Anthony (hovea) Date: 2011-11-19 06:02 Message: This issues is cause in PyObject *PyIPropertyStorage::SetTimes(PyObject *self, PyObject *args). File PyIpropertyStorage.cpp line 622, which is called by Com Storage creation. PyWinObject_AsFILETIME not set the timezone information will cause failed of SetTimes. ---------------------------------------------------------------------- Comment By: Anthony (hovea) Date: 2011-11-16 01:02 Message: The Error is generated by pythoncom.StgCreateDocfileOnILockBytes call from testPersist.py" . Which is located in PyTime.cpp. line 806. I am building pywin by using VisualStudio 2008sp1. Simply Run setup.py build in the source code directory. When I am tracking down, it seems that from python3, astimezone should function should have timezone information to convert the correct time. I did not yet indentify where PyWinObject_AsSYSTEMTIME is called. ---------------------------------------------------------------------- Comment By: Jason R. Coombs (jaraco) Date: 2011-11-15 06:30 Message: I'm not familiar with building pywin32 from scratch. Are there instructions somewhere on how to build pywin32 on Python 3? I don't have VS2008 handy, so I tried using VS2010 and patched msvc9compilermodule with jaraco.develop.msvc (https://bitbucket.org/jaraco/jaraco.develop/src/5d0574e79d6f/jaraco/develop/msvc.py), but I'm still unable to build. Furthermore, I don't think this is an issue with win32timezone. "astimezone()" is a method on a datetime.datetime object (part of the stdlib). I don't think win32timezone comes into play. Furthermore, the text 'timezone' doesn't appear in testPersist.py. I don't understand what testPersist.py is trying to do. I think the errors about naive datetimes are coming from some other code which is opaque to testPersist. I don't feel qualified to address this issue, so I'm going to re-assign this to no one. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3438213&group_id=78018 |
From: SourceForge.net <no...@so...> - 2011-11-22 14:51:47
|
Bugs item #3074702, was opened at 2010-09-24 03:03 Message generated for change (Comment added) made by kxroberto You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3074702&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: pythonwin Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: kxroberto (kxroberto) Assigned to: Nobody/Anonymous (nobody) Summary: frequent KeyDot failed, UnicodeError in interactive Initial Comment: build214 Firing event 'KeyDot' failed. Traceback (most recent call last): File "C:\Python23\Lib\site-packages\pythonwin\pywin\scintilla\bindings.py", line 145, in fire rc = binding.handler(*args) File "C:\Python23\Lib\site-packages\pythonwin\pywin\scintilla\view.py", line 307, in KeyDotEvent self._AutoComplete() File "C:\Python23\Lib\site-packages\pythonwin\pywin\scintilla\view.py", line 467, in _AutoComplete text = self.GetTextRange(self.LineIndex(minline),endpos) File "C:\Python23\Lib\site-packages\pythonwin\pywin\scintilla\control.py", line 362, in GetTextRange ret = ret.decode(default_scintilla_encoding) UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 5946: unexpected code byte ---------------------------------------------------------------------- >Comment By: kxroberto (kxroberto) Date: 2011-11-22 06:51 Message: I have still this same "maximum recursion" kind of error in build 216. The solution probably: browser.list => browser.listControl And the recursive "return getattr(self, attr)" in HierList.__getattr__ probably makes no sense. (if attr in .__dict__ then .__getattr__ is not called. ) --- --- _orig/view.py 2011-02-25 11:04:38 +0000 +++ ./view.py 2011-11-22 14:46:18 +0000 @@ -510,7 +510,7 @@ pass if browser is None: return (minline,maxline,None) # Current window has no browser - if not browser.list: return (minline,maxline,None) # Not initialized + if not browser.listControl: return (minline,maxline,None) # Not initialized path = self.GetDocument().GetPathName() if not path: return (minline,maxline,None) # No current path --- _orig/hierlist.py 2009-02-16 17:43:26 +0000 +++ ./hierlist.py 2011-11-22 14:43:35 +0000 @@ -56,10 +56,10 @@ self.filledItemHandlesMap = {} self.bitmapMask = bitmapMask def __getattr__(self, attr): - try: + ##try: return getattr(self.listControl, attr) - except AttributeError: - return getattr(self, attr) + ##except AttributeError: + ## return getattr(self, attr) def ItemFromHandle(self, handle): return self.itemHandleMap[handle] ---------------------------------------------------------------------- Comment By: Michael Toews (mwtoews) Date: 2011-05-29 22:25 Message: I frequently (daily) have a similar error, typically while editing code or comments in Python scripts where I happen to type letters followed by the "." character. This edited error was 2000 lines long: Firing event 'KeyDot' failed. Traceback (most recent call last): File "C:\Python25\Lib\site-packages\pythonwin\pywin\scintilla\bindings.py", line 142, in fire rc = binding.handler(*args) File "C:\Python25\Lib\site-packages\pythonwin\pywin\scintilla\view.py", line 307, in KeyDotEvent self._AutoComplete() File "C:\Python25\Lib\site-packages\pythonwin\pywin\scintilla\view.py", line 465, in _AutoComplete minline, maxline, curclass = self._GetClassInfoFromBrowser() File "C:\Python25\Lib\site-packages\pythonwin\pywin\scintilla\view.py", line 520, in _GetClassInfoFromBrowser if not browser.list: return (minline,maxline,None) # Not initialized File "C:\Python25\Lib\site-packages\pythonwin\pywin\tools\hierlist.py", line 62, in __getattr__ return getattr(self, attr) File "C:\Python25\Lib\site-packages\pythonwin\pywin\tools\hierlist.py", line 62, in __getattr__ return getattr(self, attr) 80 lines deleted File "C:\Python25\Lib\site-packages\pythonwin\pywin\tools\hierlist.py", line 62, in __getattr__ return getattr(self, attr) File "C:\Python25\Lib\site-packages\pythonwin\pywin\tools\hierlist.py", line 60, in __getattr__ return getattr(self.listControl, attr) RuntimeError: maximum recursion depth exceeded I'm using pywin32 build 214, WinXP, Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] ---------------------------------------------------------------------- Comment By: Mark Hammond (mhammond) Date: 2011-04-25 23:10 Message: Yeah - we are sending the GETTESTRANGE message, but the start and end pos have both come directly from LineIndex (EM_LINEINDEX). This is basically the same strategy taken by GetLine(): start = self.LineIndex(line) end = self.LineIndex(line+1) return self.GetTextRange(start, end) the docs for EM_GETTEXTRANGE say end if "Character position immediately following the last character in the range.", so this looks correct. The above all assumes scintilla doesn't have a bug in some corner case:) It also seems strange the exception refers to 0xff - best I can tell, 0xff is not a leading utf8 byte. So I guess I need instructions for a repro so I can see what is going on via the debugger! ---------------------------------------------------------------------- Comment By: kxroberto (kxroberto) Date: 2010-10-28 05:06 Message: the start/end for this GetTextRange come unchecked from LineIndex() 's. The lineno's unchecked from _GetClassInfoFromBrowser Maybe just a line is -1 or so. If always complete valid lines are decoded completely, may there should be no such problem? ---------------------------------------------------------------------- Comment By: Roger Upole (rupole) Date: 2010-09-28 10:24 Message: The underlying problem is how Scintilla handles (or fails to handle) multibyte characters when in utf-8 mode. None of the text handling messages (SCI_GETTEXTRANGE in this case) take continuation characters into account. If you ask for say 10 characters, what you get back is 10 bytes, which may contain partial characters at the start or the end of the buffer. The only way I can see to deal with discrete characters are the SCI_POSITIONBEFORE and SCI_POSITIONAFTER messages, which means all operations would have to be done one character at a time. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3074702&group_id=78018 |