Skip to content

Commit a7efed7

Browse files
committed
Merge branch 'main' of https://github.com/mhammond/pywin32 into Native-ARM64-CI-wheels
2 parents 391e958 + 40ee25a commit a7efed7

File tree

8 files changed

+16
-27
lines changed

8 files changed

+16
-27
lines changed

Pythonwin/win32cmdui.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,6 @@ inline void *GetPythonOleProcAddress(const char *procName)
2727
#endif
2828
hMod = GetModuleHandle(buf);
2929

30-
// XXX It is unclear why the code previously tried to identify a loaded PythonCOM DLL of
31-
// any Python version 1.5 .. 3.9. If some InprocServer would load the DLL of a different
32-
// Python version that would likely cause a crash. Thus deactivated.
33-
//
34-
// for (int i = 0; hMod == NULL && i < 40; i++) {
35-
// #ifdef _DEBUG
36-
// wsprintf(buf, _T("PythonCOM3%d_d.dll"), i);
37-
// #else
38-
// wsprintf(buf, _T("PythonCOM3%d.dll"), i);
39-
// #endif
40-
// hMod = GetModuleHandle(buf);
41-
// }
42-
4330
if (hMod) {
4431
void *rc = GetProcAddress(hMod, procName);
4532
if (rc == NULL)

Pythonwin/win32uimodule.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2559,9 +2559,9 @@ extern "C" PYW_EXPORT BOOL Win32uiApplicationInit(Win32uiHostGlue *pGlue, const
25592559
PyObject *argv = PySys_GetObject("argv");
25602560
PyInit_win32ui();
25612561
// Decide if we render sys.argv from command line.
2562-
// PY3.6- Py_Initialize sets sys.argv=NULL .
2563-
// PY3.7 Py_Initialize or intentional script triggers set sys.argv=[] .
2564-
// PY3.8+ Py_Initialize sets sys.argv=[''] - cannot be distinguished
2562+
// Python 3.6- Py_Initialize sets sys.argv=NULL .
2563+
// Python 3.7 Py_Initialize or intentional script triggers set sys.argv=[] .
2564+
// Python 3.8+ Py_Initialize sets sys.argv=[''] - cannot be distinguished
25652565
// from a pre-existing command line setup anymore. So we need to check
25662566
// another flag regarding the intended type of invokation, e.g. `cmd`
25672567
// (or untangle all that crossover startup + module + app init here)

build_env.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This describes how to setup the build environment for pywin32.
55
Double check the compiler version you need in the [Python wiki](https://wiki.python.org/moin/WindowsCompilers)
66
but note that Python 3.5+ all use version 14.X of the compiler, which,
77
confusingly, report themselves as V.19XX (eg, note in Python's banner,
8-
3.5's "MSC v.1900", even 3.9b4's "MSC v.1924")
8+
3.5's "MSC v.1900", even 3.13's "MSC v.1941")
99

1010
This compiler first shipped with Visual Studio 2015, although Visual Studio
1111
2017, 2019 and 2022 all have this compiler available, just not installed

com/win32com/client/__init__.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -529,13 +529,14 @@ def __init__(self, oobj=None):
529529
oobj = oobj._oleobj_ if isinstance(oobj, DispatchBaseClass) else oobj
530530
oobj = oobj.QueryInterface(self.CLSID, pythoncom.IID_IDispatch)
531531
except pythoncom.com_error as details:
532-
import winerror
533-
534-
# Some stupid objects fail here, even tho it is _already_ IDispatch!!??
535-
# Eg, Lotus notes.
536-
# So just let it use the existing object if E_NOINTERFACE
537-
if details.hresult != winerror.E_NOINTERFACE:
538-
raise
532+
if not isinstance(oobj, _PyIDispatchType):
533+
import winerror
534+
535+
# Some stupid objects fail here, even tho it is _already_ IDispatch!!??
536+
# Eg, Lotus notes.
537+
# So just let it use the existing object if E_NOINTERFACE
538+
if details.hresult != winerror.E_NOINTERFACE:
539+
raise
539540

540541
self.__dict__["_oleobj_"] = oobj # so we don't call __setattr__
541542

com/win32com/client/gencache.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ def _LoadDicts():
9999
arc_path = loader.archive
100100
dicts_path = os.path.join(win32com.__gen_path__, "dicts.dat")
101101
if dicts_path.startswith(arc_path):
102+
# Remove the leading slash as well
102103
dicts_path = dicts_path[len(arc_path) + 1 :]
103104
else:
104105
# Hm. See below.

com/win32com/src/PyRecord.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ PyRecord *PyRecord::new_record(IRecordInfo *ri, PVOID data, PyRecordBuffer *owne
257257
PyErr_NoMemory();
258258
return NULL;
259259
}
260-
return new (buf) PyRecord(ri, owner->data, owner);
260+
return new (buf) PyRecord(ri, data, owner);
261261
}
262262

263263
PyRecord::PyRecord(IRecordInfo *ri, PVOID data, PyRecordBuffer *buf_owner)

pyrightconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"enableTypeIgnoreComments": true,
77
// Exclude from scanning when running pyright
88
"exclude": [
9-
".git/",
9+
".git/", // Avoids scanning git branch names ending in ".py"
1010
"build/",
1111
// Vendored
1212
"Pythonwin/Scintilla/",

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2023,7 +2023,7 @@ def convert_optional_data_files(files):
20232023
project_urls={
20242024
# https://docs.pypi.org/project_metadata/#general-url
20252025
"Homepage": "https://github.com/mhammond/pywin32",
2026-
"Changes": "https://github.com/mhammond/pywin32/blob/main/CHANGES.txt",
2026+
"Changes": "https://github.com/mhammond/pywin32/blob/main/CHANGES.md",
20272027
"Docs": "https://mhammond.github.io/pywin32/",
20282028
"Bugs": "https://github.com/mhammond/pywin32/issues",
20292029
# Arbitrary URLs (icons still recognized)

0 commit comments

Comments
 (0)