Commit ee368cf7 authored by Tim Peters's avatar Tim Peters

Merge critical Windows fix from Zope/tags/Zope-2-8-0-b2, rev 30651.

Mark Hammond's original checkin comment:

As at pywin32-204, we must ensure pywintypes is the first win32 module
imported in our process, otherwise we can end up with 2 pywintypesxx.dll
instances in our process resulting in:
TypeError: The object is not a PySECURITY_ATTRIBUTES object
parent 4a76b01d
...@@ -48,12 +48,17 @@ import asyncore ...@@ -48,12 +48,17 @@ import asyncore
import atexit import atexit
import Lifetime import Lifetime
# As at pywin32-204, we must ensure pywintypes is the first win32 module
# imported in our process, otherwise we can end up with 2 pywintypesxx.dll
# instances in our process resulting in:
# TypeError: The object is not a PySECURITY_ATTRIBUTES object
import pywintypes
# SetConsoleCtrlHandler not in early pywin32 versions - Signals.py will # SetConsoleCtrlHandler not in early pywin32 versions - Signals.py will
# catch the import error. # catch the import error.
from win32api import SetConsoleCtrlHandler from win32api import SetConsoleCtrlHandler
import win32con import win32con
import win32event import win32event
import pywintypes
import ntsecuritycon import ntsecuritycon
import logging import logging
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment