From c126ac1e37e002abc6be626a29f52dd59690e263 Mon Sep 17 00:00:00 2001 From: Avasam Date: Thu, 9 May 2024 18:44:52 -0400 Subject: [PATCH 1/3] fix failing isort check (#2256) --- adodbapi/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adodbapi/setup.py b/adodbapi/setup.py index 031ca01315..f6b274661d 100644 --- a/adodbapi/setup.py +++ b/adodbapi/setup.py @@ -41,8 +41,8 @@ def setup_package(): - from setuptools.command.build_py import build_py from setuptools import setup + from setuptools.command.build_py import build_py setup( cmdclass={"build_py": build_py}, From 0163cda7c48b7c35002f799fc2c1813097ee7c57 Mon Sep 17 00:00:00 2001 From: Avasam Date: Thu, 9 May 2024 18:45:10 -0400 Subject: [PATCH 2/3] Fix flipped debug check in `win32com.server.register` (#2257) --- com/win32com/server/register.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/com/win32com/server/register.py b/com/win32com/server/register.py index d332912df9..6fd412e9da 100644 --- a/com/win32com/server/register.py +++ b/com/win32com/server/register.py @@ -98,9 +98,9 @@ def _find_localserver_exe(mustfind): if sys.platform != "win32": return sys.executable if os.path.splitext(os.path.basename(pythoncom.__file__))[0].endswith("_d"): - exeBaseName = "pythonw.exe" - else: exeBaseName = "pythonw_d.exe" + else: + exeBaseName = "pythonw.exe" # First see if in the same directory as this .EXE exeName = os.path.join(os.path.split(sys.executable)[0], exeBaseName) if not os.path.exists(exeName): From 371f784d7a13edf6db407f25f1db286a6e9200f8 Mon Sep 17 00:00:00 2001 From: Avasam Date: Thu, 9 May 2024 21:49:47 -0400 Subject: [PATCH 3/3] Added all Avasam authored changes to changelog (#2255) --- CHANGES.txt | 130 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 129 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 7a238523fb..dda19c322f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,7 +3,7 @@ Maintained by hand, so what's "notable" is subjective! Contributors are encouraged to add entries for their work. -All changes can be found via git - eg, for all changes afer a build: +All changes can be found via git - eg, for all changes after a build: git log -rb3xx: or https://github.com/mhammond/pywin32/compare/b3xx...main @@ -13,7 +13,135 @@ https://mhammond.github.io/pywin32_installers.html. Coming in build 307, as yet unreleased -------------------------------------- +### pywin32 * Release GIL when calling CreateService or StartService +* Drop support for Internet Explorer 10 (#2229, @Avasam) +* Removed considerations for never-built Windows CE (#2218, @Avasam) +* Stopped building `winxpgui` (#2217, @Avasam) + * Raise `DeprecationWarning` when importing `winxpgui` + * Added `GetWindowRgnBox` to `win32gui` + * `winxpgui.GetConsoleWindow` now aliases `win32console.GetConsoleWindow` + * Everything else is re-exported from `win32gui` +* Fixed the `win32com.demos.ietoolbar` demo (#2217, @Avasam) +* Fixed undefined names reported by Flake8/Ruff (#2101, @Avasam, @kxrob) + Fixed the following public API: + * Fixed `NameError` in `pywin.Demos`'s `fontdemo.FontView.SetFont` + * The `Pythonwin/pywin/Demos/ocx/msoffice` demo now uses the docName argument + * Fixed `NameError` in `WordFrame.Create`, even though it wasn't used + * Fixed a handful of `NameError` in `pywin.dialogs.ideoptions.OptionsPropPage` with format + * Fixed `AttributeError` in `pywin.framework.dlgappcore.AppDialog.OnPaint` + * Fixed trying to write banner to `sdterr` in `pywin.framework.interact.InteractiveCore.Init` + * Fixed a `NameError` in `pywin.framework.mdi_pychecker.TheDocument.doSearch` + * Removes unusable `HandleToUlong`, `UlongToHandle`, `UlongToPtr` and `UintToPtr` from `pywin.scintilla.scintillacon` + * Fixed a `NameError` in `win32comext.axscript.client.pydumper.Register` + * Fixed a `NameError` in `win32comext.shell.demos.servers.context_menu.ShellExtension.QueryContextMenu` + * Fixed a `NameError` in `win32comext.shell.demos.servers.shell_view.ScintillaShellView.CreateViewWindow` + The following methods no longer throw errors (although their implementation is still unvalidated): + * `mmsystem.MEVT_EVENTTYPE` + * `mmsystem.MEVT_EVENTPARM` + * `mmsystem.MCI_MSF_MINUTE` + * `mmsystem.MCI_MSF_SECOND` + * `mmsystem.MCI_TMSF_TRACK` + * `mmsystem.MCI_TMSF_MINUTE` + * `mmsystem.MCI_TMSF_SECOND` + * `mmsystem.MCI_TMSF_FRAME` + * `mmsystem.MCI_HMS_HOUR` + * `mmsystem.MCI_HMS_MINUTE` + * `mmsystem.MCI_HMS_SECOND` + * `mmsystem.DIBINDEX` + * `winnt.IMAGE_SNAP_BY_ORDINAL` + * `winnt.IMAGE_ORDINAL` +* Removed `Unicode` and `UnicodeType` from `pywintypes` and `win32api` (#2200, @Avasam) +* Deprecate `afxres` in favor of `pywin.mfc.afxres`. The modules were identical (#2177, @Avasam) +* Improved `DispatcherWin32dbg`'s deprecation warning and raise an error when used (#2145, @Avasam) +* Removed obsolete/legacy way of registering a Pythonwin app and its Idle handlers from `pywin.framework.app` (#2144, @Avasam) +* Removed unused `win32comext.axscript.server.error` (#2202, @Avasam) +* Removed deprecated `win32com.server.exception.Exception` (#2142, @Avasam) +* Removed long-deprecated `UnicodeToString` param from multiple methods (#2143, @Avasam) +* Fixed `win32api.SetClassWord` being overwritten by `win32api.SetWindowWord` (#2199, @Avasam) + * If you were using `win32api.SetClassWord` for its current behaviour, use `win32api.SetWindowWord` instead. + * This also adds missing support for `win32api.SetWindowWord` +* Annotated module-level variables with ambiguous typing (#2175, @Avasam) +* `win32com.client.build.NoTranslateMap` is now a `set` (#2176, @Avasam) +* Fixed `ModuleNotFoundError: No module named 'dialog'` in `pywin.tools.regpy` (#2187, @Avasam) +* Fixed passing a `float` to `range` in `win32pdhquery.Query.collectdatafor` (#2170, @Avasam) +* Check that the filename w/o extension ends with `_d` rather than checking for `_d` anywhere in the file path (#2169, @Avasam) +* Cleaned up and fixed Axdebug (#2126, @Avasam) + * `win32comext.axdebug.codecontainer.SourceCodeContainer` now uses the `debugDocument` parameter + * `win32comext.axdebug.codecontainer` script can now be run independent of location + * Fixed Method Resolution Order issue in `win32comext.axdebug.documents` + * Fixed undefined names (`NameError`) in `win32comext.axdebug.expressions.DebugProperty.GetPropertyInfo` + * Removed unused `win32comext.axdebug.util.all_wrapped` + * Fixed multiple `ModuleNotFoundError` in `win32comext.axdebug` (#1983, @Avasam) +* Change `mbcs` encoding to `utf-8` in `com.win32com.client` (#2097, @Avasam) +* Avoid using `importlib` directly (#2123, @Avasam) +* Replace most usages of deprecated `distutils`: + * Replace distutils.dep_util with setuptools.modified (#2148, @Avasam) + * Replaced `distutils.FileList` usage with `pathlib` (#2138, @Avasam) + * Replace `distutils.log` with `logging` (#2134, @Avasam) + * Replace `distutils` with direct `setuptools` equivalents where possible (#2134, @Avasam) +* Replaced usages of the removed (in Python 3.12) `imp` module (#2113, @Avasam) + * Fixed registering Python as a scripting language for `axscript` + * Fixed `isapi` install +* Use collection literals and comprehensions where applicable (slight performance improvement) (#2108, @Avasam) +* Cleanup obsolete code for unsupported Python versions (#1990, #2127, #2205, @Avasam) + The following public names have been removed: + * `pywin.framework.app.Win32RawInput` + * `win32com.client.makepy.error` + * Long obsoleted `dbi` module, use the `odbc` module instead + Added support for the following Python 3 methods: + * `pywin.mfc.dialog.Dialog.__contains__` + * `win32com.client.CoClassBaseClass.__bool__` + * `win32com.client.combrowse.HLIRoot.__lt__` + * `win32com.client.genpy.WritableItem.__lt__` + * `__bool__` in classes generated by `win32com.client.genpy.WritableItem.WriteClassBody` + * `win32/Demos`'s `win32clipboardDemo.Foo.__lt__` + * `win32timezone._SimpleStruct.__le__` (subclassed by `SYSTEMTIME`, `TIME_ZONE_INFORMATION`, `DYNAMIC_TIME_ZONE_INFORMATION`, `TimeZoneDefinition`) + The following methods no longer throw errors (although their implementation is still unvalidated): + * `winnt.PRIMARYLANGID` + * `winnt.SUBLANGID` + * `winnt.LANGIDFROMLCID` + * `winnt.SORTIDFROMLCID` +* Removed obsolete compatibility aliases (#2087, @Avasam) + The following public names have been removed: + * `win32comext.mapi.mapiutil.TupleType` + * `win32comext.mapi.mapiutil.ListType` + * `win32comext.mapi.mapiutil.IntType` + * `netbios.byte_to_int` +* Resolved invalid string escapes warnings (#2045, #2124, @Avasam) +* Idiomatic type comparisons. Better handling of subclasses. (#1991, @Avasam) +* Cleaned up obsolete and redundant code (this should not directly affect the end-user): + * Update and standardise obsolete `OSError` aliases (#2107, @Avasam) + * Removed redundant and obsolete references to older python unicode compatibility (#2085, @Avasam) + * Use byte-string (`b""`) for constant bytes values instead of superfluous `.encode` calls (#2046, @Avasam) + * Cleaned up unused imports (#1986, #2051, #1990, #2124, #2126, @Avasam) + * Removed duplicated declarations, constants and definitions (#2050 , #1950, #1990, @Avasam) +* General speed and size improvements due to all the removed code. (#2046, #1986, #2050, #1950, #2085, #2087, #2051, #1990, #2106, #2127, #2124, #2126, #2177, #2218, #2202, #2205, #2217) + +### adodbapi +* Remove references to outdated IronPython (#2049) + This removes the following public names: + * `adodbapi.adodbapi.onWin32` + * `adodbapi.apibase.onIronPython` + * `adodbapi.apibase.NullTypes` + * `adodbapi.apibase.DateTime` +* Remove references to outdated `mxDateTime` (#2048) + This removes the following public names: + * `adodbapi.apibase.mxDateTime` + * `adodbapi.apibase.mxDateTimeConverter` +* Removed obsolete Python 2 aliases (#2088) + This removes the following public names: + * `adodbapi.adodbapi.unicodeType` + * `adodbapi.adodbapi.longType` + * `adodbapi.adodbapi.StringTypes` + * `adodbapi.adodbapi.maxint` + * `adodbapi.apibase.unicodeType` + * `adodbapi.apibase.longType` + * `adodbapi.apibase.StringTypes` + * `adodbapi.apibase.makeByteBuffer` + * `adodbapi.apibase.memoryViewType` +* Remove outdated and unused remote feature (#2098) +* Migrated from `distutils` to `setuptools` (#2133) Build 306, released 2023-03-26 ------------------------------