I recently discovered that import win32ui was broken in Python 3.9. This is 
described in https://github.com/mhammond/pywin32/issues/1593.

I upgraded pywin32 from the build I had (288) to the latest build (301) and 
that made the import problem go away.

But today I ran a pygame application that was packaged as an .exe with 
pyinstaller before I upgraded pywin32. On startup it issued the popup

The procedure entry point PyWinObject_AsWriteBuffer [C++ name mangling] could 
not be located in the dynamic link library 
C::\Windows\SYSTEM32\pythoncom39.dll. 

I dismissed this message and the application ran as usual, which was a relief.

Now this was clearly caused by the new build of the DLL not containing an entry 
point that was previously there. From the Python docs I see that this entry 
point is associated with the C API function PyObject_AsWriteBuffer which 
supports the deprecated old Python buffer protocol 
(https://docs.python.org/3/c-api/objbuffer.html). So I upgraded pygame from 
1.9.6 to 2.0.1 and repackaged the application.

This time, during the pyinstaller run, I got the same popup from pyinstaller 
that previously appeared when starting the application. After dismissing this 
the packaging proceeded as normal. And the packaged .exe does not now issue the 
warning on startup.

This is relatively harmless, and certainly not a showstopper, but it does 
appear that pygame is expecting there to be an entry point in pythoncom39.dll 
that is no longer there. I suppose I could get the build 288 version of the DLL 
and override the packaging to include it instead of the latest version, but 
that strikes me as the tail wagging the dog.

--
Paul Keating
Soustons, Nouvelle Aquitaine, France


Reply via email to