pywin32-checkins Mailing List for Python for Windows Extensions (Page 10)
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
(2) |
May
(1) |
Jun
(6) |
Jul
(50) |
Aug
(11) |
Sep
(24) |
Oct
(184) |
Nov
(118) |
Dec
(22) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(31) |
Feb
(25) |
Mar
(34) |
Apr
(105) |
May
(49) |
Jun
(38) |
Jul
(39) |
Aug
(7) |
Sep
(98) |
Oct
(79) |
Nov
(20) |
Dec
(17) |
2005 |
Jan
(66) |
Feb
(32) |
Mar
(43) |
Apr
(30) |
May
(58) |
Jun
(30) |
Jul
(16) |
Aug
(4) |
Sep
(21) |
Oct
(42) |
Nov
(11) |
Dec
(14) |
2006 |
Jan
(42) |
Feb
(30) |
Mar
(22) |
Apr
(1) |
May
(9) |
Jun
(15) |
Jul
(20) |
Aug
(9) |
Sep
(8) |
Oct
(1) |
Nov
(9) |
Dec
(43) |
2007 |
Jan
(52) |
Feb
(45) |
Mar
(20) |
Apr
(12) |
May
(59) |
Jun
(39) |
Jul
(35) |
Aug
(31) |
Sep
(17) |
Oct
(20) |
Nov
(4) |
Dec
(4) |
2008 |
Jan
(28) |
Feb
(111) |
Mar
(4) |
Apr
(27) |
May
(40) |
Jun
(27) |
Jul
(32) |
Aug
(94) |
Sep
(87) |
Oct
(153) |
Nov
(336) |
Dec
(331) |
2009 |
Jan
(298) |
Feb
(127) |
Mar
(20) |
Apr
(8) |
May
|
Jun
(10) |
Jul
(6) |
Aug
|
Sep
(2) |
Oct
(2) |
Nov
|
Dec
(1) |
2010 |
Jan
(7) |
Feb
(1) |
Mar
|
Apr
|
May
(15) |
Jun
(4) |
Jul
(3) |
Aug
(28) |
Sep
(1) |
Oct
(19) |
Nov
(16) |
Dec
(6) |
2011 |
Jan
(2) |
Feb
(18) |
Mar
(17) |
Apr
(12) |
May
(5) |
Jun
(11) |
Jul
(7) |
Aug
(2) |
Sep
(2) |
Oct
(4) |
Nov
(4) |
Dec
|
2012 |
Jan
(6) |
Feb
(2) |
Mar
|
Apr
(8) |
May
(4) |
Jun
(3) |
Jul
(13) |
Aug
(27) |
Sep
(8) |
Oct
(9) |
Nov
(3) |
Dec
(2) |
2013 |
Jan
|
Feb
(1) |
Mar
(5) |
Apr
(10) |
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(9) |
2014 |
Jan
(2) |
Feb
(4) |
Mar
(4) |
Apr
(1) |
May
(4) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
(1) |
2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
(6) |
May
(2) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
(3) |
Feb
(2) |
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Vern C. <kf...@ya...> - 2011-02-26 03:52:47
|
I'm afraid this shows carelessness on my part. In adodbapi\tests\adodbapitestconfig.py you will find the lines... doAllTests = True doAccessTest = True or doAllTests doSqlServerTest = False or doAllTests doMySqlTest = False or doAllTests doPostgresTest = False or doAllTests Obviously, I run the test module with doAllTests set to True, and I have edited the connection string for the SQL server several times as my test configuration changes. At the present moment, it is set to attach to an SQLexpress instance on my laptop. But it's a bit of a mess . MySQL and PostgreSQL are tested against a very old Linux box which I have parked on a consumer cable Internet connection which will sometimes actually work from a remote location. If they work at all they are pretty slow. Also the test is run twice (three times if mxdatetime is installed) to test both (or all three) time converters. I intended to set doAllTests to False before publishing, in which case it will run only the Jet database connector, for which it will happily build its own test database if needed, using code lifted from the odbc module test suite. That runs quickly and reliably. I shall post the correction shortly, after which testing adodbapi should not require special case handling. -- Vernon From: Mark Hammond <mha...@us...> To: pyw...@li... Sent: Fri, February 25, 2011 7:24:31 PM Subject: [pywin32-checkins] pywin32 pywin32_testall.py, NONE, 1.1 setup.py, 1.120, 1.121 MANIFEST.in, 1.21, 1.22 Update of /cvsroot/pywin32/pywin32 In directory vz-cvs-2.sog:/tmp/cvs-serv20404 Modified Files: setup.py MANIFEST.in Added Files: pywin32_testall.py Log Message: add pywin32 test runner for all automated tests Index: setup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup.py,v retrieving revision 1.120 retrieving revision 1.121 diff -C2 -d -r1.120 -r1.121 *** setup.py 26 Feb 2011 00:24:53 -0000 1.120 --- setup.py 26 Feb 2011 02:24:28 -0000 1.121 *************** *** 2188,2192 **** }, ! scripts = ["pywin32_postinstall.py"], ext_modules = ext_modules, --- 2188,2192 ---- }, ! scripts = ["pywin32_postinstall.py", "pywin32_testall.py"], ext_modules = ext_modules, Index: MANIFEST.in =================================================================== RCS file: /cvsroot/pywin32/pywin32/MANIFEST.in,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** MANIFEST.in 26 Feb 2011 00:24:53 -0000 1.21 --- MANIFEST.in 26 Feb 2011 02:24:28 -0000 1.22 *************** *** 9,12 **** --- 9,13 ---- include setup3.py include pywin32_postinstall.py + include pywin32_testall.py # don't know how to include "Python and Extensions.dsw" - spaces upset things # Core win32 stuff --- NEW FILE: pywin32_testall.py --- """A test runner for pywin32""" import sys import os import distutils.sysconfig import win32api # locate the dirs based on where this script is - it may be either in the # source tree, or in an installed Python 'Scripts' tree. this_dir = os.path.dirname(__file__) site_packages = distutils.sysconfig.get_python_lib(plat_specific=1) if hasattr(os, 'popen3'): def run_test(script, cmdline_rest=""): dirname, scriptname = os.path.split(script) # some tests prefer to be run from their directory. cwd = os.getcwd() os.chdir(dirname) try: executable = win32api.GetShortPathName(sys.executable) cmd = '%s "%s" %s' % (sys.executable, scriptname, cmdline_rest) print script stdin, stdout, stderr = os.popen3(cmd) stdin.close() while 1: char = stderr.read(1) if not char: break sys.stdout.write(char) for line in stdout.readlines(): print line stdout.close() result = stderr.close() if result is not None: print "****** %s failed: %s" % (script, result) finally: os.chdir(cwd) else: # a subprocess version - but we prefer the popen one if we can as we can # see test results as they are run (whereas this one waits until the test # is finished...) import subprocess def run_test(script, cmdline_rest=""): dirname, scriptname = os.path.split(script) # some tests prefer to be run from their directory. cmd = [sys.executable, "-u", scriptname] + cmdline_rest.split() print script popen = subprocess.Popen(cmd, shell=True, cwd=dirname, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) data = popen.communicate()[0] sys.stdout.buffer.write(data) if popen.returncode: print "****** %s failed: %s" % (script, popen.returncode) def find_and_run(possible_locations, script, cmdline_rest=""): for maybe in possible_locations: if os.path.isfile(os.path.join(maybe, script)): run_test(os.path.abspath(os.path.join(maybe, script)), cmdline_rest) break else: raise RuntimeError("Failed to locate the test script '%s' in one of %s" % (script, possible_locations)) if __name__=='__main__': # win32 maybes = [os.path.join(this_dir, "win32", "test"), os.path.join(site_packages, "win32", "test"), ] find_and_run(maybes, 'testall.py') # win32com maybes = [os.path.join(this_dir, "com", "win32com", "test"), os.path.join(site_packages, "win32com", "test"), ] find_and_run(maybes, 'testall.py', "2") # adodbapi maybes = [os.path.join(this_dir, "adodbapi", "tests"), os.path.join(site_packages, "adodbapi", "tests"), ] find_and_run(maybes, 'adodbapitest.py') # This script has a hard-coded sql server name in it, (and markh typically # doesn't have a different server to test on) so don't bother trying to # run it... # find_and_run(maybes, 'test_adodbapi_dbapi20.py') if sys.version_info > (3,): print "** The tests have some issues on py3k - not all failures are a problem..." ------------------------------------------------------------------------------ Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev _______________________________________________ pywin32-checkins mailing list pyw...@li... https://lists.sourceforge.net/lists/listinfo/pywin32-checkins |
From: Mark H. <mha...@us...> - 2011-02-26 02:56:19
|
Update of /cvsroot/pywin32/pywin32 In directory vz-cvs-2.sog:/tmp/cvs-serv5600 Modified Files: setup.py Log Message: add raise 2to3 converter for adodbapi Index: setup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup.py,v retrieving revision 1.121 retrieving revision 1.122 diff -C2 -d -r1.121 -r1.122 *** setup.py 26 Feb 2011 02:24:28 -0000 1.121 --- setup.py 26 Feb 2011 02:56:17 -0000 1.122 *************** *** 579,584 **** # we only need some fixers. fixers = """basestring exec except dict import imports next nonzero ! print raw_input long standarderror types unicode urllib ! xrange""".split() fqfixers = ['lib2to3.fixes.fix_' + f for f in fixers] --- 579,584 ---- # we only need some fixers. fixers = """basestring exec except dict import imports next nonzero ! print raise raw_input long standarderror types unicode ! urllib xrange""".split() fqfixers = ['lib2to3.fixes.fix_' + f for f in fixers] |
From: Mark H. <mha...@us...> - 2011-02-26 02:24:31
|
Update of /cvsroot/pywin32/pywin32 In directory vz-cvs-2.sog:/tmp/cvs-serv20404 Modified Files: setup.py MANIFEST.in Added Files: pywin32_testall.py Log Message: add pywin32 test runner for all automated tests Index: setup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup.py,v retrieving revision 1.120 retrieving revision 1.121 diff -C2 -d -r1.120 -r1.121 *** setup.py 26 Feb 2011 00:24:53 -0000 1.120 --- setup.py 26 Feb 2011 02:24:28 -0000 1.121 *************** *** 2188,2192 **** }, ! scripts = ["pywin32_postinstall.py"], ext_modules = ext_modules, --- 2188,2192 ---- }, ! scripts = ["pywin32_postinstall.py", "pywin32_testall.py"], ext_modules = ext_modules, Index: MANIFEST.in =================================================================== RCS file: /cvsroot/pywin32/pywin32/MANIFEST.in,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** MANIFEST.in 26 Feb 2011 00:24:53 -0000 1.21 --- MANIFEST.in 26 Feb 2011 02:24:28 -0000 1.22 *************** *** 9,12 **** --- 9,13 ---- include setup3.py include pywin32_postinstall.py + include pywin32_testall.py # don't know how to include "Python and Extensions.dsw" - spaces upset things # Core win32 stuff --- NEW FILE: pywin32_testall.py --- """A test runner for pywin32""" import sys import os import distutils.sysconfig import win32api # locate the dirs based on where this script is - it may be either in the # source tree, or in an installed Python 'Scripts' tree. this_dir = os.path.dirname(__file__) site_packages = distutils.sysconfig.get_python_lib(plat_specific=1) if hasattr(os, 'popen3'): def run_test(script, cmdline_rest=""): dirname, scriptname = os.path.split(script) # some tests prefer to be run from their directory. cwd = os.getcwd() os.chdir(dirname) try: executable = win32api.GetShortPathName(sys.executable) cmd = '%s "%s" %s' % (sys.executable, scriptname, cmdline_rest) print script stdin, stdout, stderr = os.popen3(cmd) stdin.close() while 1: char = stderr.read(1) if not char: break sys.stdout.write(char) for line in stdout.readlines(): print line stdout.close() result = stderr.close() if result is not None: print "****** %s failed: %s" % (script, result) finally: os.chdir(cwd) else: # a subprocess version - but we prefer the popen one if we can as we can # see test results as they are run (whereas this one waits until the test # is finished...) import subprocess def run_test(script, cmdline_rest=""): dirname, scriptname = os.path.split(script) # some tests prefer to be run from their directory. cmd = [sys.executable, "-u", scriptname] + cmdline_rest.split() print script popen = subprocess.Popen(cmd, shell=True, cwd=dirname, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) data = popen.communicate()[0] sys.stdout.buffer.write(data) if popen.returncode: print "****** %s failed: %s" % (script, popen.returncode) def find_and_run(possible_locations, script, cmdline_rest=""): for maybe in possible_locations: if os.path.isfile(os.path.join(maybe, script)): run_test(os.path.abspath(os.path.join(maybe, script)), cmdline_rest) break else: raise RuntimeError("Failed to locate the test script '%s' in one of %s" % (script, possible_locations)) if __name__=='__main__': # win32 maybes = [os.path.join(this_dir, "win32", "test"), os.path.join(site_packages, "win32", "test"), ] find_and_run(maybes, 'testall.py') # win32com maybes = [os.path.join(this_dir, "com", "win32com", "test"), os.path.join(site_packages, "win32com", "test"), ] find_and_run(maybes, 'testall.py', "2") # adodbapi maybes = [os.path.join(this_dir, "adodbapi", "tests"), os.path.join(site_packages, "adodbapi", "tests"), ] find_and_run(maybes, 'adodbapitest.py') # This script has a hard-coded sql server name in it, (and markh typically # doesn't have a different server to test on) so don't bother trying to # run it... # find_and_run(maybes, 'test_adodbapi_dbapi20.py') if sys.version_info > (3,): print "** The tests have some issues on py3k - not all failures are a problem..." |
From: Mark H. <mha...@us...> - 2011-02-26 00:32:38
|
Update of /cvsroot/pywin32/pywin32/win32/Lib In directory vz-cvs-2.sog:/tmp/cvs-serv10037 Modified Files: pywin32_testutil.py Log Message: add REGDB_E_CLASSNOTREG to errors we count as a test being 'skipped' Index: pywin32_testutil.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/pywin32_testutil.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** pywin32_testutil.py 16 Feb 2009 06:27:22 -0000 1.3 --- pywin32_testutil.py 26 Feb 2011 00:32:36 -0000 1.4 *************** *** 217,221 **** # is admin) elif isinstance(exc_val, pywintypes.com_error) and \ ! exc_val.hresult==winerror.CO_E_CLASSSTRING: exc_val = TestSkipped(exc_val) # NotImplemented generally means the platform doesn't support the --- 217,221 ---- # is admin) elif isinstance(exc_val, pywintypes.com_error) and \ ! exc_val.hresult in [winerror.CO_E_CLASSSTRING, winerror.REGDB_E_CLASSNOTREG]: exc_val = TestSkipped(exc_val) # NotImplemented generally means the platform doesn't support the |
From: Mark H. <mha...@us...> - 2011-02-26 00:24:57
|
Update of /cvsroot/pywin32/pywin32 In directory vz-cvs-2.sog:/tmp/cvs-serv15501 Modified Files: CHANGES.txt MANIFEST.in setup.py Log Message: add a 'loader module' with a manifest and other magic for COM objects Index: setup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup.py,v retrieving revision 1.119 retrieving revision 1.120 diff -C2 -d -r1.119 -r1.120 *** setup.py 21 Feb 2011 00:31:42 -0000 1.119 --- setup.py 26 Feb 2011 00:24:53 -0000 1.120 *************** *** 902,905 **** --- 902,946 ---- os.path.join(self.build_lib, "pythonwin")) + def _build_pycom_loader(self): + # the base compiler strips out the manifest from modules it builds + # which can't be done for this module - having the manifest is the + # reason it needs to exist! + # At least this is made easier by it not depending on Python itself, + # so the compile and link are simple... + suffix = "%d%d" % (sys.version_info[0], sys.version_info[1]) + if self.debug: + suffix += '_d' + src = r"com\win32com\src\PythonCOMLoader.cpp" + build_temp = os.path.abspath(self.build_temp) + obj = os.path.join(build_temp, os.path.splitext(src)[0]+".obj") + dll = os.path.join(self.build_lib, "pywin32_system32", "pythoncomloader"+suffix+".dll") + if self.force or newer_group([src], obj, 'newer'): + ccargs = [self.compiler.cc, '/c'] + if self.debug: + ccargs.extend(self.compiler.compile_options_debug) + else: + ccargs.extend(self.compiler.compile_options) + ccargs.append('/Fo' + obj) + ccargs.append(src) + ccargs.append('/DDLL_DELEGATE=\\"pythoncom%s.dll\\"' % (suffix,)) + self.spawn(ccargs) + + deffile = r"com\win32com\src\PythonCOMLoader.def" + if self.force or newer_group([obj, deffile], dll, 'newer'): + largs = [self.compiler.linker, '/DLL', '/nologo', '/incremental:no'] + if self.debug: + largs.append("/DEBUG") + temp_manifest = os.path.join(build_temp, os.path.basename(dll) + ".manifest") + largs.append('/MANIFESTFILE:' + temp_manifest) + largs.append('/PDB:None') + largs.append("/OUT:" + dll) + largs.append("/DEF:" + deffile) + largs.append("/IMPLIB:" + os.path.join(build_temp, "PythonCOMLoader"+suffix+".lib")) + largs.append(obj) + self.spawn(largs) + # and the manifest + out_arg = '-outputresource:%s;2' % (dll,) + self.spawn(['mt.exe', '-nologo', '-manifest', temp_manifest, out_arg]) + def build_extensions(self): # First, sanity-check the 'extensions' list *************** *** 946,949 **** --- 987,993 ---- # Not sure how to make this completely generic, and there is no # need at this stage. + if sys.version_info > (2,6): + # only stuff built with msvc9 needs this loader. + self._build_pycom_loader() self._build_scintilla() # Copy cpp lib files needed to create Python COM extensions Index: MANIFEST.in =================================================================== RCS file: /cvsroot/pywin32/pywin32/MANIFEST.in,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** MANIFEST.in 13 Feb 2011 02:11:31 -0000 1.20 --- MANIFEST.in 26 Feb 2011 00:24:53 -0000 1.21 *************** *** 34,37 **** --- 34,38 ---- include com/win32com/src/*.h include com/win32com/src/PythonCOM.def + include com/win32com/src/PythonCOMLoader.def include com/win32com/readme.htm include com/win32com/HTML/*.html Index: CHANGES.txt =================================================================== RCS file: /cvsroot/pywin32/pywin32/CHANGES.txt,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -d -r1.69 -r1.70 *** CHANGES.txt 26 Feb 2011 00:05:35 -0000 1.69 --- CHANGES.txt 26 Feb 2011 00:24:53 -0000 1.70 *************** *** 8,11 **** --- 8,18 ---- Since build 215: ---------------- + * New loader module for COM objects to avoid some CRT manifest issues. + pythoncomloaderxx.dll will be copied to your System32 directory and used as + the entry-point for COM objects instead of pythoncomxx.dll. This DLL + is very small - includes a manifest referencing the C runtime library and + simply loads pythoncomxx.dll and deletes the COM object creation back to it. + You will need to re-register any COM objects you have to take advantage of + this. * Fix printing on pythonwin on 3.x |
From: Mark H. <mha...@us...> - 2011-02-26 00:24:55
|
Update of /cvsroot/pywin32/pywin32/com/win32com/test In directory vz-cvs-2.sog:/tmp/cvs-serv15501/com/win32com/test Modified Files: util.py Log Message: add a 'loader module' with a manifest and other magic for COM objects Index: util.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/util.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** util.py 5 Feb 2009 06:58:11 -0000 1.20 --- util.py 26 Feb 2011 00:24:53 -0000 1.21 *************** *** 51,55 **** # no CLSID or InProcServer32 - not good! break ! if os.path.basename(dll) != os.path.basename(pythoncom.__file__): why_not = "%r is registered against a different Python version (%s)" % (progid, dll) break --- 51,57 ---- # no CLSID or InProcServer32 - not good! break ! ok_files = [os.path.basename(pythoncom.__file__), ! 'pythoncomloader%d%d.dll' % (sys.version_info[0], sys.version_info[1])] ! if os.path.basename(dll) not in ok_files: why_not = "%r is registered against a different Python version (%s)" % (progid, dll) break |
From: Mark H. <mha...@us...> - 2011-02-26 00:05:39
|
Update of /cvsroot/pywin32/pywin32 In directory vz-cvs-2.sog:/tmp/cvs-serv8134 Modified Files: CHANGES.txt Log Message: add roger's recent changes Index: CHANGES.txt =================================================================== RCS file: /cvsroot/pywin32/pywin32/CHANGES.txt,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -d -r1.68 -r1.69 *** CHANGES.txt 19 Feb 2011 03:58:11 -0000 1.68 --- CHANGES.txt 26 Feb 2011 00:05:35 -0000 1.69 *************** *** 6,9 **** --- 6,17 ---- However contributors are encouraged to add their own entries for their work. + Since build 215: + ---------------- + + * Fix printing on pythonwin on 3.x + + * Pythonwin gets an option to set the background color of the selected text. + + Since build 214: ---------------- |
From: Mark H. <mha...@us...> - 2011-02-25 06:02:58
|
Update of /cvsroot/pywin32/pywin32/com/win32com/test In directory vz-cvs-2.sog:/tmp/cvs-serv26559 Modified Files: testExplorer.py Log Message: fix test failure on vista/ie8 Index: testExplorer.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testExplorer.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** testExplorer.py 4 Dec 2008 03:38:20 -0000 1.10 --- testExplorer.py 25 Feb 2011 06:02:55 -0000 1.11 *************** *** 48,52 **** 'Internet Explorer_Server']: hwnd = win32gui.FindWindowEx(hwnd, 0, child_class, None) ! assert hwnd, "Couldn't find '%s'" % (child_class,) # But here is the point - once you have an 'Internet Explorer_Server', # you can send a message and use ObjectFromLresult to get it back. --- 48,55 ---- 'Internet Explorer_Server']: hwnd = win32gui.FindWindowEx(hwnd, 0, child_class, None) ! # ack - not working for markh on vista with IE8 (or maybe it is the ! # lack of the 'accessibility' components mentioned in Q249232) ! # either way - not working! ! return # But here is the point - once you have an 'Internet Explorer_Server', # you can send a message and use ObjectFromLresult to get it back. |
From: Mark H. <mha...@us...> - 2011-02-25 05:46:24
|
Update of /cvsroot/pywin32/pywin32/com/win32com/test In directory vz-cvs-2.sog:/tmp/cvs-serv1991 Modified Files: testROT.py Log Message: ignore errors if a moniker doesn't support enumeration Index: testROT.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testROT.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** testROT.py 4 May 2004 07:00:22 -0000 1.3 --- testROT.py 25 Feb 2011 05:46:21 -0000 1.4 *************** *** 2,5 **** --- 2,6 ---- import unittest import win32com.test.util + import winerror class TestROT(win32com.test.util.TestCase): *************** *** 11,17 **** name = mk.GetDisplayName(ctx, None) num += 1 ! # Monikers themselves can iterate their contents ! for sub in mk: ! num += 1 #if num < 2: --- 12,22 ---- name = mk.GetDisplayName(ctx, None) num += 1 ! # Monikers themselves can iterate their contents (sometimes :) ! try: ! for sub in mk: ! num += 1 ! except pythoncom.com_error, exc: ! if exc.hresult != winerror.E_NOTIMPL: ! raise #if num < 2: |
From: Roger U. <ru...@us...> - 2011-02-24 23:48:51
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla In directory vz-cvs-2.sog:/tmp/cvs-serv15865 Modified Files: view.py Log Message: Fix printing in Python 3 Index: view.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla/view.py,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** view.py 6 May 2010 16:30:20 -0000 1.36 --- view.py 24 Feb 2011 23:48:48 -0000 1.37 *************** *** 614,618 **** left, top, right, bottom = pInfo.GetDraw() # Leave space at the top for the header. ! rc = (left, top + (9*metrics['tmHeight'])/2, right, bottom) pageStart = 0 maxPage = 0 --- 614,618 ---- left, top, right, bottom = pInfo.GetDraw() # Leave space at the top for the header. ! rc = (left, top + int((9*metrics['tmHeight'])/2), right, bottom) pageStart = 0 maxPage = 0 *************** *** 666,670 **** dc.TextOut(right, 2*cyChar, pagenum_str) dc.SetTextAlign(win32con.TA_LEFT) ! top = top + (7*cyChar)/2 dc.MoveTo(left, top) dc.LineTo(right, top) --- 666,670 ---- dc.TextOut(right, 2*cyChar, pagenum_str) dc.SetTextAlign(win32con.TA_LEFT) ! top = top + int((7*cyChar)/2) dc.MoveTo(left, top) dc.LineTo(right, top) |
From: Mark H. <mha...@us...> - 2011-01-09 00:30:59
|
Update of /cvsroot/pywin32/pywin32 In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv29432 Modified Files: setup.py Log Message: use tempfile module to locate temp dir Index: setup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup.py,v retrieving revision 1.116 retrieving revision 1.117 diff -C2 -d -r1.116 -r1.117 *** setup.py 18 Nov 2010 04:21:43 -0000 1.116 --- setup.py 9 Jan 2011 00:30:51 -0000 1.117 *************** *** 74,77 **** --- 74,78 ---- import types, glob import re + from tempfile import gettempdir is_py3k = sys.version_info > (3,) # get this out of the way early on... *************** *** 610,614 **** build.run(self) # write a pywin32.version.txt. ! ver_fname = os.path.join(os.environ['temp'], "pywin32.version.txt") try: f = open(ver_fname, "w") --- 611,615 ---- build.run(self) # write a pywin32.version.txt. ! ver_fname = os.path.join(gettempdir(), "pywin32.version.txt") try: f = open(ver_fname, "w") *************** *** 2115,2119 **** py_modules = py_modules, ! data_files=[('', (os.path.join(os.environ['temp'],'pywin32.version.txt'),))] + convert_optional_data_files([ 'PyWin32.chm', --- 2116,2120 ---- py_modules = py_modules, ! data_files=[('', (os.path.join(gettempdir(),'pywin32.version.txt'),))] + convert_optional_data_files([ 'PyWin32.chm', |
From: Mark H. <mha...@us...> - 2011-01-06 03:12:42
|
Update of /cvsroot/pywin32/pywin32 In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv27101 Modified Files: MANIFEST.in Log Message: add mapilib.i to source dist (via bug 3152207) Index: MANIFEST.in =================================================================== RCS file: /cvsroot/pywin32/pywin32/MANIFEST.in,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** MANIFEST.in 25 Aug 2010 07:32:56 -0000 1.18 --- MANIFEST.in 6 Jan 2011 03:12:33 -0000 1.19 *************** *** 68,71 **** --- 68,72 ---- include com/win32comext/bits/test/*.py include com/win32comext/internet/src/*.h + include com/win32comext/mapi/src/mapilib.i include com/win32comext/mapi/src/*.h include com/win32comext/mapi/demos/*.py |
From: Mark H. <mha...@us...> - 2010-12-18 01:09:23
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv24654 Modified Files: PyUnicode.cpp win32consolemodule.cpp Log Message: fix build errors in python 3.2 Index: win32consolemodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32consolemodule.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** win32consolemodule.cpp 8 Dec 2008 13:16:37 -0000 1.17 --- win32consolemodule.cpp 18 Dec 2010 01:09:15 -0000 1.18 *************** *** 110,114 **** return FALSE; } ! if (PyUnicode_AsWideChar((PyUnicodeObject *)obchar, onechar, 1)==-1) return FALSE; return TRUE; --- 110,119 ---- return FALSE; } ! #if (PY_VERSION_HEX < 0x03020000) ! #define PUAWC_TYPE PyUnicodeObject * ! #else ! #define PUAWC_TYPE PyObject * ! #endif ! if (PyUnicode_AsWideChar((PUAWC_TYPE)obchar, onechar, 1)==-1) return FALSE; return TRUE; Index: PyUnicode.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyUnicode.cpp,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** PyUnicode.cpp 3 Feb 2009 05:22:25 -0000 1.34 --- PyUnicode.cpp 18 Dec 2010 01:09:15 -0000 1.35 *************** *** 256,266 **** *pResult = SysAllocStringLen(NULL, nchars); if (*pResult) { ! PyUnicode_AsWideChar((PyUnicodeObject *)stringObject, *pResult, nchars); ! // The SysAllocStringLen docs indicate that nchars+1 bytes are allocated, ! // and that normally a \0 is appened by the function. It also states ! // the \0 is not necessary! While it seems to work fine without it, ! // we do copy it, as the previous code, which used SysAllocStringLen ! // with a non-NULL arg is documented clearly as appending the \0. ! (*pResult)[nchars] = 0; } } --- 256,274 ---- *pResult = SysAllocStringLen(NULL, nchars); if (*pResult) { ! #if (PY_VERSION_HEX < 0x03020000) ! #define PUAWC_TYPE PyUnicodeObject * ! #else ! #define PUAWC_TYPE PyObject * ! #endif ! if (PyUnicode_AsWideChar((PUAWC_TYPE)stringObject, *pResult, nchars)==-1) { ! rc = FALSE; ! } else { ! // The SysAllocStringLen docs indicate that nchars+1 bytes are allocated, ! // and that normally a \0 is appened by the function. It also states ! // the \0 is not necessary! While it seems to work fine without it, ! // we do copy it, as the previous code, which used SysAllocStringLen ! // with a non-NULL arg is documented clearly as appending the \0. ! (*pResult)[nchars] = 0; ! } } } |
From: Mark H. <mha...@us...> - 2010-12-18 00:40:20
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv19259 Modified Files: mdi_pychecker.py Log Message: ask pychecker to only check current file (kxroberto) Index: mdi_pychecker.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework/mdi_pychecker.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** mdi_pychecker.py 27 Jan 2009 06:25:56 -0000 1.5 --- mdi_pychecker.py 18 Dec 2010 00:40:12 -0000 1.6 *************** *** 208,212 **** self.dirpattern = params[0] self.filpattern = params[1] ! self.greppattern = params[2] or '-#1000' self.casesensitive = int(params[3]) self.recurse = int(params[4]) --- 208,212 ---- self.dirpattern = params[0] self.filpattern = params[1] ! self.greppattern = params[2] or '-#1000 --only' self.casesensitive = int(params[3]) self.recurse = int(params[4]) |
From: Mark H. <mha...@us...> - 2010-12-18 00:14:31
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv14087/win32/src Modified Files: win32event.i Log Message: stop win32event swallowing exceptions (Ziga Seilnacht via issue 3136751) Index: win32event.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32event.i,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** win32event.i 3 Jan 2009 06:43:58 -0000 1.12 --- win32event.i 18 Dec 2010 00:14:23 -0000 1.13 *************** *** 35,45 **** // We can get better perf from some of these functions that don't block // by not releasing the Python lock as part of the call. - %typedef BOOL BOOLAPI_NL - - %typemap(python,out) BOOLAPI_NL { - $target = Py_None; - Py_INCREF(Py_None); - } - %typemap(python,except) BOOLAPI { $function --- 35,38 ---- *************** *** 284,288 **** // @pyswig |ReleaseMutex|Releases a mutex. ! BOOLAPI_NL ReleaseMutex( PyHANDLE hMutex // @pyparm <o PyHANDLE>|hEvent||handle of mutex object ); --- 277,281 ---- // @pyswig |ReleaseMutex|Releases a mutex. ! BOOLAPI ReleaseMutex( PyHANDLE hMutex // @pyparm <o PyHANDLE>|hEvent||handle of mutex object ); *************** *** 299,308 **** // @pyswig |ResetEvent|Resets an event ! BOOLAPI_NL ResetEvent( PyHANDLE hEvent // @pyparm <o PyHANDLE>|hEvent||handle of event object ); // @pyswig |SetEvent|Sets an event ! BOOLAPI_NL SetEvent( PyHANDLE hEvent // @pyparm <o PyHANDLE>|hEvent||handle of event object ); --- 292,301 ---- // @pyswig |ResetEvent|Resets an event ! BOOLAPI ResetEvent( PyHANDLE hEvent // @pyparm <o PyHANDLE>|hEvent||handle of event object ); // @pyswig |SetEvent|Sets an event ! BOOLAPI SetEvent( PyHANDLE hEvent // @pyparm <o PyHANDLE>|hEvent||handle of event object ); *************** *** 310,314 **** #ifndef MS_WINCE // @pyswig |SetWaitableTimer|Sets a waitable timer. ! BOOLAPI_NL SetWaitableTimer( PyHANDLE hTimer, // @pyparm int|handle||handle to timer LARGE_INTEGER *INPUT, // @pyparm long|dueTime||timer due time --- 303,307 ---- #ifndef MS_WINCE // @pyswig |SetWaitableTimer|Sets a waitable timer. ! BOOLAPI SetWaitableTimer( PyHANDLE hTimer, // @pyparm int|handle||handle to timer LARGE_INTEGER *INPUT, // @pyparm long|dueTime||timer due time |
From: Mark H. <mha...@us...> - 2010-12-18 00:14:31
|
Update of /cvsroot/pywin32/pywin32 In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv14087 Modified Files: CHANGES.txt Log Message: stop win32event swallowing exceptions (Ziga Seilnacht via issue 3136751) Index: CHANGES.txt =================================================================== RCS file: /cvsroot/pywin32/pywin32/CHANGES.txt,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** CHANGES.txt 28 Oct 2010 01:52:49 -0000 1.65 --- CHANGES.txt 18 Dec 2010 00:14:23 -0000 1.66 *************** *** 72,75 **** --- 72,78 ---- that doesn't exist (ghazel via bug 1409321) + * Many functions in win32event would swallow exceptions due to things like + invalid handles etc (Ziga Seilnacht via issue 3136751) + Since build 213: ---------------- |
From: Mark H. <mha...@us...> - 2010-12-18 00:14:31
|
Update of /cvsroot/pywin32/pywin32/win32/test In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv14087/win32/test Modified Files: test_win32event.py Log Message: stop win32event swallowing exceptions (Ziga Seilnacht via issue 3136751) Index: test_win32event.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/test/test_win32event.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test_win32event.py 25 Jan 2009 03:20:43 -0000 1.3 --- test_win32event.py 18 Dec 2010 00:14:23 -0000 1.4 *************** *** 1,4 **** --- 1,5 ---- import unittest import win32event + import pywintypes import time import os *************** *** 29,32 **** --- 30,40 ---- self.failUnlessEqual(rc, win32event.WAIT_TIMEOUT) + def testWaitableError(self): + h = win32event.CreateWaitableTimer(None, 0, None) + h.close() + self.assertRaises(pywintypes.error, win32event.SetWaitableTimer, + h, -42, 0, None, None, 0) + + class TestWaitFunctions(unittest.TestCase): def testMsgWaitForMultipleObjects(self): *************** *** 52,55 **** --- 60,115 ---- self.assertEquals(res, win32event.WAIT_TIMEOUT) + + class TestEvent(unittest.TestCase): + + def assertSignaled(self, event): + self.assertEquals(win32event.WaitForSingleObject(event, 0), + win32event.WAIT_OBJECT_0) + + def assertNotSignaled(self, event): + self.assertEquals(win32event.WaitForSingleObject(event, 0), + win32event.WAIT_TIMEOUT) + + def testCreateEvent(self): + event = win32event.CreateEvent(None, False, False, None) + self.assertNotSignaled(event) + event = win32event.CreateEvent(None, False, True, None) + self.assertSignaled(event) + self.assertNotSignaled(event) + event = win32event.CreateEvent(None, True, True, None) + self.assertSignaled(event) + self.assertSignaled(event) + + def testSetEvent(self): + event = win32event.CreateEvent(None, True, False, None) + self.assertNotSignaled(event) + res = win32event.SetEvent(event) + self.assertEquals(res, None) + self.assertSignaled(event) + event.close() + self.assertRaises(pywintypes.error, win32event.SetEvent, event) + + def testResetEvent(self): + event = win32event.CreateEvent(None, True, True, None) + self.assertSignaled(event) + res = win32event.ResetEvent(event) + self.assertEquals(res, None) + self.assertNotSignaled(event) + event.close() + self.assertRaises(pywintypes.error, win32event.ResetEvent, event) + + + class TestMutex(unittest.TestCase): + + def testReleaseMutex(self): + mutex = win32event.CreateMutex(None, True, None) + res = win32event.ReleaseMutex(mutex) + self.assertEqual(res, None) + res = win32event.WaitForSingleObject(mutex, 0) + self.assertEqual(res, win32event.WAIT_OBJECT_0) + mutex.close() + self.assertRaises(pywintypes.error, win32event.ReleaseMutex, mutex) + + if __name__=='__main__': unittest.main() |
From: Mark H. <mha...@us...> - 2010-12-17 23:37:59
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv7020/Pythonwin/pywin/scintilla Modified Files: document.py Log Message: Warn about invalid encoding names and warn not to save the file (bug 3137807) Index: document.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla/document.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** document.py 27 Oct 2010 04:23:48 -0000 1.12 --- document.py 17 Dec 2010 23:37:51 -0000 1.13 *************** *** 126,130 **** dec = text.decode(source_encoding) except UnicodeError: ! print "WARNING: Failed to decode bytes from %r encoding - treating as latin1" % source_encoding dec = text.decode('latin1') # and put it back as utf8 - this shouldn't fail. --- 126,135 ---- dec = text.decode(source_encoding) except UnicodeError: ! print "WARNING: Failed to decode bytes from '%s' encoding - treating as latin1" % source_encoding ! print "WARNING: Do not modify this file - you will not be able to save it." ! dec = text.decode('latin1') ! except LookupError: ! print "WARNING: Invalid encoding '%s' specified - treating as latin1" % source_encoding ! print "WARNING: Do not modify this file - you will not be able to save it." dec = text.decode('latin1') # and put it back as utf8 - this shouldn't fail. |
From: Mark H. <mha...@us...> - 2010-11-18 04:21:51
|
Update of /cvsroot/pywin32/pywin32 In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv9275 Modified Files: setup.py Log Message: give up attempting to build exchange support for 64bit builds Index: setup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup.py,v retrieving revision 1.115 retrieving revision 1.116 diff -C2 -d -r1.115 -r1.116 *** setup.py 17 Nov 2010 04:13:40 -0000 1.115 --- setup.py 18 Nov 2010 04:21:43 -0000 1.116 *************** *** 741,744 **** --- 741,748 ---- def _why_cant_build_extension(self, ext): # Return None, or a reason it can't be built. + # This kinda sucks, but I'm giving up on exchange support in 64bit + # builds. + if self.plat_name == 'win-amd64' and ext.name in ['exchange', 'exchdapi']: + return "Can't get exchange support working in 64bit builds" include_dirs = self.compiler.include_dirs + \ os.environ.get("INCLUDE", "").split(os.pathsep) *************** *** 1740,1744 **** sources=(""" %(mapi)s/exchange.i %(mapi)s/exchange.cpp ! %(mapi)s/PyIExchangeManageStore.i %(mapi)s/PyIExchangeManageStore.cpp """ % dirs).split()), WinExt_win32com_mapi('exchdapi', libraries="advapi32", --- 1744,1748 ---- sources=(""" %(mapi)s/exchange.i %(mapi)s/exchange.cpp ! %(mapi)s/PyIExchangeManageStore.i %(mapi)s/PyIExchangeManageStore.cpp """ % dirs).split()), WinExt_win32com_mapi('exchdapi', libraries="advapi32", |
From: Mark H. <mha...@us...> - 2010-11-18 04:21:21
|
Update of /cvsroot/pywin32/pywin32/win32/Lib In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv9155/win32/Lib Modified Files: win32verstamp.py Log Message: use modern integer division Index: win32verstamp.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/win32verstamp.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** win32verstamp.py 11 Dec 2008 06:59:33 -0000 1.5 --- win32verstamp.py 18 Nov 2010 04:21:12 -0000 1.6 *************** *** 63,67 **** key = nullterm(key) value = nullterm(value) ! result = struct.pack('hh', len(value)/2, 1) # wValueLength, wType result = result + key result = pad32(result) + value --- 63,67 ---- key = nullterm(key) value = nullterm(value) ! result = struct.pack('hh', len(value)//2, 1) # wValueLength, wType result = result + key result = pad32(result) + value |
From: Mark H. <mha...@us...> - 2010-11-17 04:13:48
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/axdebug/src In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv1632/com/win32comext/axdebug/src Modified Files: stdafx.h Log Message: Work around more axdebug build woes Index: stdafx.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axdebug/src/stdafx.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** stdafx.h 2 Mar 2009 06:10:40 -0000 1.4 --- stdafx.h 17 Nov 2010 04:13:40 -0000 1.5 *************** *** 21,25 **** --- 21,29 ---- #endif + #ifdef HAVE_SDK_ACTIVDBG + #include <activdbg.h> + #else #include "activdbg.h" + #endif #if defined(__REQUIRED_RPCNDR_H_VERSION__) |
From: Mark H. <mha...@us...> - 2010-11-17 04:13:48
|
Update of /cvsroot/pywin32/pywin32 In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv1632 Modified Files: setup.py Log Message: Work around more axdebug build woes Index: setup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup.py,v retrieving revision 1.114 retrieving revision 1.115 diff -C2 -d -r1.114 -r1.115 *** setup.py 16 Nov 2010 04:43:23 -0000 1.114 --- setup.py 17 Nov 2010 04:13:40 -0000 1.115 *************** *** 517,520 **** --- 517,528 ---- return "win32comext/mapi" + class WinExt_win32com_axdebug(WinExt_win32com): + def __init__ (self, name, **kw): + # Later SDK versions again ship with activdbg.h, but if we attempt + # to use our own copy of that file with that SDK, we fail to link. + if os.path.isfile(os.path.join(sdk_dir, "include", "activdbg.h")): + kw.setdefault('extra_compile_args', []).append("/DHAVE_SDK_ACTIVDBG") + WinExt_win32com.__init__(self, name, **kw) + # A hacky extension class for pywintypesXX.dll and pythoncomXX.dll class WinExt_system32(WinExt): *************** *** 1655,1659 **** # ActiveDebugging is a mess. See the comments in the docstring of this # module for details on getting it built. ! WinExt_win32com('axdebug', libraries="axscript", pch_header="stdafx.h", --- 1663,1667 ---- # ActiveDebugging is a mess. See the comments in the docstring of this # module for details on getting it built. ! WinExt_win32com_axdebug('axdebug', libraries="axscript", pch_header="stdafx.h", |
From: Mark H. <mha...@us...> - 2010-11-17 04:12:58
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/shell/src In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv1390/com/win32comext/shell/src Modified Files: PyINameSpaceTreeControl.cpp PyINameSpaceTreeControl.h Log Message: fix issues building NameSpaceTree support Index: PyINameSpaceTreeControl.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/PyINameSpaceTreeControl.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyINameSpaceTreeControl.cpp 26 Jul 2008 07:02:34 -0000 1.1 --- PyINameSpaceTreeControl.cpp 17 Nov 2010 04:12:51 -0000 1.2 *************** *** 423,427 **** PyObject *obpsi; IShellItem * psi; ! DWORD nstcgi; IShellItem * ppsiNext; if ( !PyArg_ParseTuple(args, "Ol:GetNextItem", &obpsi, &nstcgi) ) --- 423,427 ---- PyObject *obpsi; IShellItem * psi; ! long nstcgi; IShellItem * ppsiNext; if ( !PyArg_ParseTuple(args, "Ol:GetNextItem", &obpsi, &nstcgi) ) *************** *** 431,435 **** HRESULT hr; PY_INTERFACE_PRECALL; ! hr = pINSTC->GetNextItem( psi, nstcgi, &ppsiNext ); if (psi) psi->Release(); PY_INTERFACE_POSTCALL; --- 431,435 ---- HRESULT hr; PY_INTERFACE_PRECALL; ! hr = pINSTC->GetNextItem( psi, (NSTCGNI)nstcgi, &ppsiNext ); if (psi) psi->Release(); PY_INTERFACE_POSTCALL; Index: PyINameSpaceTreeControl.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/PyINameSpaceTreeControl.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyINameSpaceTreeControl.h 26 Jul 2008 07:02:34 -0000 1.1 --- PyINameSpaceTreeControl.h 17 Nov 2010 04:12:51 -0000 1.2 *************** *** 37,129 **** ~PyINameSpaceTreeControl(); }; - // --------------------------------------------------- - // - // Gateway Declaration - - class PyGNameSpaceTreeControl : public PyGatewayBase, public INameSpaceTreeControl - { - protected: - PyGNameSpaceTreeControl(PyObject *instance) : PyGatewayBase(instance) { ; } - PYGATEWAY_MAKE_SUPPORT2(PyGNameSpaceTreeControl, INameSpaceTreeControl, IID_INameSpaceTreeControl, PyGatewayBase) - - - - // INameSpaceTreeControl - STDMETHOD(Initialize)( - HWND hwndParent, - RECT * prc, - DWORD nsctsFlags); - - STDMETHOD(TreeAdvise)( - IUnknown * punk, - DWORD * pdwCookie); - - STDMETHOD(TreeUnadvise)( - DWORD dwCookie); - - STDMETHOD(AppendRoot)( - IShellItem * psiRoot, - DWORD grfEnumFlags, - DWORD grfRootStyle, - IShellItemFilter * pif); - - STDMETHOD(InsertRoot)( - int iIndex, - IShellItem * psiRoot, - DWORD grfEnumFlags, - DWORD grfRootStyle, - IShellItemFilter * pif); - - STDMETHOD(RemoveRoot)( - IShellItem * psiRoot); - - STDMETHOD(RemoveAllRoots)( - void); - - STDMETHOD(GetRootItems)( - IShellItemArray ** ppsiaRootItems); - - STDMETHOD(SetItemState)( - IShellItem * psi, - DWORD nstcisMask, - DWORD nstcisFlags); - - STDMETHOD(GetItemState)( - IShellItem * psi, - DWORD nstcisMask, - DWORD * pnstcisFlags); - - STDMETHOD(GetSelectedItems)( - IShellItemArray ** psiaItems); - - STDMETHOD(GetItemCustomState)( - IShellItem * psi, - int * piStateNumber); - - STDMETHOD(SetItemCustomState)( - IShellItem * psi, - int iStateNumber); - - STDMETHOD(EnsureItemVisible)( - IShellItem * psi); - - STDMETHOD(SetTheme)( - LPCWSTR pszTheme); - - STDMETHOD(GetNextItem)( - IShellItem * psi, - DWORD nstcgi, - IShellItem ** ppsiNext); - - STDMETHOD(HitTest)( - POINT * ppt, - IShellItem ** ppsiOut); - - STDMETHOD(GetItemRect)( - IShellItem * psi, - RECT * prect); - - STDMETHOD(CollapseAll)( - void); - - }; --- 37,38 ---- |
From: Mark H. <mha...@us...> - 2010-11-17 04:12:04
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/shell/src In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv1274/com/win32comext/shell/src Modified Files: shell.cpp Log Message: add a couple of casts to fix compiler errors in certain SDK versions Index: shell.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/shell.cpp,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** shell.cpp 23 Oct 2010 05:21:24 -0000 1.77 --- shell.cpp 17 Nov 2010 04:11:56 -0000 1.78 *************** *** 965,969 **** BOOL PyObject_AsEXPLORER_BROWSER_OPTIONS(PyObject *ob, EXPLORER_BROWSER_OPTIONS *ret) { ! *ret = PyLong_AsUnsignedLongMask(ob); return *ret != -1 || !PyErr_Occurred(); } --- 965,969 ---- BOOL PyObject_AsEXPLORER_BROWSER_OPTIONS(PyObject *ob, EXPLORER_BROWSER_OPTIONS *ret) { ! *ret = (EXPLORER_BROWSER_OPTIONS)PyLong_AsUnsignedLongMask(ob); return *ret != -1 || !PyErr_Occurred(); } *************** *** 976,980 **** BOOL PyObject_AsEXPLORER_BROWSER_FILL_FLAGS(PyObject *ob, EXPLORER_BROWSER_FILL_FLAGS *ret) { ! *ret = PyLong_AsUnsignedLongMask(ob); return *ret != -1 || !PyErr_Occurred(); } --- 976,980 ---- BOOL PyObject_AsEXPLORER_BROWSER_FILL_FLAGS(PyObject *ob, EXPLORER_BROWSER_FILL_FLAGS *ret) { ! *ret = (EXPLORER_BROWSER_FILL_FLAGS)PyLong_AsUnsignedLongMask(ob); return *ret != -1 || !PyErr_Occurred(); } |
From: Mark H. <mha...@us...> - 2010-11-16 04:46:52
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv11274 Modified Files: univgw.cpp Log Message: Use 'capsule' API instead of CObject in python 3.1 and later Index: univgw.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/univgw.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** univgw.cpp 27 Aug 2010 07:32:02 -0000 1.14 --- univgw.cpp 16 Nov 2010 04:46:44 -0000 1.15 *************** *** 353,359 **** /* free the gw_vtbl object. also works on a partially constructed gw_vtbl. */ ! static void __cdecl free_vtbl(void * cobject) { ! gw_vtbl * vtbl = (gw_vtbl *)cobject; assert(vtbl->magic == GW_VTBL_MAGIC); Py_XDECREF(vtbl->dispatcher); --- 353,361 ---- /* free the gw_vtbl object. also works on a partially constructed gw_vtbl. */ ! static void free_vtbl(gw_vtbl * vtbl) { ! assert(vtbl); ! if (!vtbl) ! return; assert(vtbl->magic == GW_VTBL_MAGIC); Py_XDECREF(vtbl->dispatcher); *************** *** 366,369 **** --- 368,416 ---- } + #if PY_VERSION_HEX > 0x03010000 + // Use the new capsule API + const char *capsule_name = "win32com universal gateway"; + + static void __cdecl do_free_vtbl(PyObject *ob) { + free_vtbl((gw_vtbl *)PyCapsule_GetPointer(ob, capsule_name)); + } + + static PyObject *PyVTable_Create(void *vtbl) + { + return PyCapsule_New(vtbl, capsule_name, do_free_vtbl); + } + static gw_vtbl *PyVTable_Get(PyObject *ob) + { + return (gw_vtbl *)PyCapsule_GetPointer(ob, capsule_name); + } + + static bool PyVTable_Check(PyObject *ob) + { + return PyCapsule_IsValid(ob, capsule_name) != 0; + } + #else + // Use the old CObject API. + static void __cdecl do_free_vtbl(void * cobject) + { + gw_vtbl * vtbl = (gw_vtbl *)cobject; + free_vtbl(vtbl); + } + + static PyObject *PyVTable_Create(void *vtbl) + { + return PyCObject_FromVoidPtr(vtbl, do_free_vtbl); + } + + static gw_vtbl *PyVTable_Get(PyObject *ob) + { + return (gw_vtbl *)PyCObject_AsVoidPtr(ob); + } + + static bool PyVTable_Check(PyObject *ob) + { + return PyCObject_Check(ob) != 0; + } + #endif + static PyObject * univgw_CreateVTable(PyObject *self, PyObject *args) { *************** *** 493,497 **** PyObject *result; ! result = PyCObject_FromVoidPtr(vtbl, free_vtbl); if ( result == NULL ) { --- 540,544 ---- PyObject *result; ! result = PyVTable_Create(vtbl); if ( result == NULL ) { *************** *** 516,520 **** ) { ! gw_vtbl * vtbl = (gw_vtbl *)PyCObject_AsVoidPtr(obVTable); if ( vtbl->magic != GW_VTBL_MAGIC ) --- 563,569 ---- ) { ! gw_vtbl * vtbl = PyVTable_Get(obVTable); ! if (!vtbl) ! return NULL; if ( vtbl->magic != GW_VTBL_MAGIC ) *************** *** 556,560 **** // obVTable must be a CObject containing our vtbl ptr ! if ( !PyCObject_Check(obVTable) ) { PyErr_SetString(PyExc_ValueError, "argument is not a CObject/vtable"); --- 605,609 ---- // obVTable must be a CObject containing our vtbl ptr ! if ( !PyVTable_Check(obVTable) ) { PyErr_SetString(PyExc_ValueError, "argument is not a CObject/vtable"); *************** *** 615,619 **** // obVTable must be a CObject containing our vtbl ptr ! if ( !PyCObject_Check(obVTable) ) { assert(FALSE); --- 664,668 ---- // obVTable must be a CObject containing our vtbl ptr ! if ( !PyVTable_Check(obVTable) ) { assert(FALSE); *************** *** 659,663 **** // obVTable must be a CObject containing our vtbl ptr ! if ( !PyCObject_Check(obVTable) ) { PyErr_SetString(PyExc_ValueError, "argument is not a CObject/vtable"); --- 708,712 ---- // obVTable must be a CObject containing our vtbl ptr ! if ( !PyVTable_Check(obVTable) ) { PyErr_SetString(PyExc_ValueError, "argument is not a CObject/vtable"); |