Commit b42e6de3 authored by Tim Peters's avatar Tim Peters

Port critical Windows fix from the 2.7 branch.

I hate checking into a tag, but 2.8's Windows release
process has been dying from neglect, and I don't see
a saner way to proceed.  The 2.8b2 Windows installer
on zope.org was effectively built from this tag
after this patch was applied, although the 2.8b2
tarball on zope.org does not contain this patch.  If
you try to build a 2.8b2 Windows installer using the
2.8b2 tarball on zope.org as an input, this Windows bug
will return.

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 d3421d15
......@@ -48,12 +48,17 @@ import asyncore
import atexit
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
# catch the import error.
from win32api import SetConsoleCtrlHandler
import win32con
import win32event
import pywintypes
import ntsecuritycon
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