Skip to content

Remove pywin32 dependency in favour of ctypes #2291

Closed

Description

@bdbaddog

This issue was originally created at: 2009-01-12 14:36:07.
This issue was reported by: ephelon.
ephelon said at 2009-01-12 14:36:07

The builtin file and open methods are augmented by SCons.Platform.win32 to unset
the HANDLE_FLAG_INHERIT flag. Rather than using pywin32 to do this, I've loaded
the appropriate methods using ctypes and removed the pywin32 dependency.

I've not added any unit tests for this, because I'm not sure how to reproduce
the problems that unsetting this flag cause.

ephelon said at 2009-01-12 14:37:41

Created an attachment (id=568)
Patch removing pywin32 in favour of ctypes

gregnoel said at 2009-01-23 01:48:31

Bug party triage. Since ctypes is not available on all the Python versions we
support, Brandon to research and figure out the fallback strategy.

azverkan said at 2009-03-01 23:43:52

The patch doesn't actually work for me. I have a script that can reproduce the
HANDLE_FLAG_INHERIT problems in under 30 seconds and the ctypes patch below
doesn't seem to be disabling handle inheritance correctly.

The problem isn't even completely solvable at the moment as Bug 2124 is still an
issue.

stevenknight said at 2009-03-03 06:56:40

Reset target milestone to -unspecified- for Bug Party re-triaging.

gregnoel said at 2009-03-05 14:25:54

Bug party triage. Good idea, but the ctypes module isn't standard until Python
2.5. The ctypes module isn't a candidate for forward-compatibility support as
it requires C code in order to function. Apply a tag so we'll look at it again
when our floor becomes Python 2.5, but shelve this issue for now.

bdbaddog said at 2016-01-13 15:53:03

Taking this issue. Related to dropping pywin32

ephelon attached ctypes_win32.patch at 2009-01-12 14:37:41.

Patch removing pywin32 in favour of ctypes

gregnoel said this issue depends on #2124 at 2009-03-05 14:25:54.

Activity

  1. added this to the milestone on Jan 2, 2018
  2. added a commit that references this issue on Oct 4, 2020
    8334884
  3. removed this from the milestone on May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions