[pywin32-checkins] /hgroot/pywin32/pywin32: 6 new changesets
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: <pyw...@li...> - 2012-05-12 03:48:31
|
changeset 49afc629bc10 in /hgroot/pywin32/pywin32 details: http://pywin32.hg.sourceforge.net/hgweb/pywin32/pywin32/hgroot/pywin32/pywin32?cmd=changeset;node=49afc629bc10 summary: Check for archive before assuming the module is readonly changeset 988fea031f18 in /hgroot/pywin32/pywin32 details: http://pywin32.hg.sourceforge.net/hgweb/pywin32/pywin32/hgroot/pywin32/pywin32?cmd=changeset;node=988fea031f18 summary: Ensure attribute names are correctly converted for Python 3.x changeset dc6d198349c1 in /hgroot/pywin32/pywin32 details: http://pywin32.hg.sourceforge.net/hgweb/pywin32/pywin32/hgroot/pywin32/pywin32?cmd=changeset;node=dc6d198349c1 summary: fix issues with the new import mechanism changeset 0250f408b69b in /hgroot/pywin32/pywin32 details: http://pywin32.hg.sourceforge.net/hgweb/pywin32/pywin32/hgroot/pywin32/pywin32?cmd=changeset;node=0250f408b69b summary: fix for new import mechanism changeset f67da355ef8b in /hgroot/pywin32/pywin32 details: http://pywin32.hg.sourceforge.net/hgweb/pywin32/pywin32/hgroot/pywin32/pywin32?cmd=changeset;node=f67da355ef8b summary: another fix for FileLists changeset 93b87a416b72 in /hgroot/pywin32/pywin32 details: http://pywin32.hg.sourceforge.net/hgweb/pywin32/pywin32/hgroot/pywin32/pywin32?cmd=changeset;node=93b87a416b72 summary: Correct arguments to Exception object in active script exception handlers diffstat: com/win32com/client/gencache.py | 4 ++-- com/win32comext/adsi/src/PyIADs.cpp | 2 +- com/win32comext/axscript/client/framework.py | 6 +++--- pywin32_postinstall.py | 3 +-- setup.py | 2 +- 5 files changed, 8 insertions(+), 9 deletions(-) diffs (84 lines): diff -r 70123c669c9e -r 93b87a416b72 com/win32com/client/gencache.py --- a/com/win32com/client/gencache.py Thu May 10 09:09:42 2012 -0400 +++ b/com/win32com/client/gencache.py Sat May 12 13:46:28 2012 +1000 @@ -42,7 +42,7 @@ # a "__loader__" attribute, so we use that. # (Later, it may become necessary to check if the __loader__ can update files, # as a .zip loader potentially could - but punt all that until a need arises) -is_readonly = hasattr(win32com, "__loader__") +is_readonly = is_zip = hasattr(win32com, "__loader__") and hasattr(win32com.__loader__, "archive") # A dictionary of ITypeLibrary objects for demand generation explicitly handed to us # Keyed by usual clsid, lcid, major, minor @@ -72,7 +72,7 @@ def _LoadDicts(): # Load the dictionary from a .zip file if that is where we live. - if hasattr(win32com, "__loader__"): + if is_zip: import cStringIO as io loader = win32com.__loader__ arc_path = loader.archive diff -r 70123c669c9e -r 93b87a416b72 com/win32comext/adsi/src/PyIADs.cpp --- a/com/win32comext/adsi/src/PyIADs.cpp Thu May 10 09:09:42 2012 -0400 +++ b/com/win32comext/adsi/src/PyIADs.cpp Sat May 12 13:46:28 2012 +1000 @@ -257,7 +257,7 @@ PyObject* PyIADs_getattro(PyObject *ob, PyObject *obname) { - char *name = PyString_AsString(obname); + char *name = PYWIN_ATTR_CONVERT(obname); if (!name) return NULL; IADs *p = PyIADs::GetI(ob); diff -r 70123c669c9e -r 93b87a416b72 com/win32comext/axscript/client/framework.py --- a/com/win32comext/axscript/client/framework.py Thu May 10 09:09:42 2012 -0400 +++ b/com/win32comext/axscript/client/framework.py Sat May 12 13:46:28 2012 +1000 @@ -99,7 +99,7 @@ """ print "**************** ASSERTION FAILED *******************" print desc - raise Exception(scode, desc) + raise Exception(desc, scode) class AXScriptCodeBlock: """An object which represents a chunk of code in an AX Script @@ -966,11 +966,11 @@ def BeginScriptedSection(self): if self.scriptSite is None: - raise Exception(E_UNEXPECTED) + raise Exception(scode=winerror.E_UNEXPECTED) self.scriptSite.OnEnterScript() def EndScriptedSection(self): if self.scriptSite is None: - raise Exception(E_UNEXPECTED) + raise Exception(scode=winerror.E_UNEXPECTED) self.scriptSite.OnLeaveScript() def DisableInterrupts(self): diff -r 70123c669c9e -r 93b87a416b72 pywin32_postinstall.py --- a/pywin32_postinstall.py Thu May 10 09:09:42 2012 -0400 +++ b/pywin32_postinstall.py Sat May 12 13:46:28 2012 +1000 @@ -156,8 +156,7 @@ filename = "%s%d%d%s.dll" % \ (modname, sys.version_info[0], sys.version_info[1], suffix) filename = os.path.join(lib_dir, "pywin32_system32", filename) - mod = imp.load_module(modname, None, filename, - ('.dll', 'rb', imp.C_EXTENSION)) + mod = imp.load_dynamic(modname, filename) def SetPyKeyVal(key_name, value_name, value): diff -r 70123c669c9e -r 93b87a416b72 setup.py --- a/setup.py Thu May 10 09:09:42 2012 -0400 +++ b/setup.py Sat May 12 13:46:28 2012 +1000 @@ -2196,7 +2196,7 @@ def expand_modules(module_dir): flist = FileList() flist.findall(module_dir) - flist.include_pattern("*.py") + flist.include_pattern("*.py", anchor=0) return [os.path.splitext(name)[0] for name in flist.files] # NOTE: somewhat counter-intuitively, a result list a-la: |